Shaderlight

Need help with transparent material

 
davidheim
Total Posts: 6

I’m using Shaderlight 6.2.1 for Mac, and trying to render a coffee table with a nearly clear glass top. I’ve chosen the Translucent Glass Gray texture from the choices in SketchUp. But no matter what I do, I can’t get the Shaderlight Material Editor to display the name of the SketchUp glass texture. It comes up as Material 8 or Material 9. In any event, I set the material to Transparent and Thin Glass in the Shaderlight Material Editor, but the glass top comes out as nearly opaque when I start a render.
What am I doing wrong, and what can I do to remedy this situation?
Thanks in advance.
dh

awaddington
Total Posts: 392

Hi David,

A couple of quick ideas.

First, make sure your material is applied to both sides of every face (it is possible to have an opaque material on the back of a transparent face ... in SketchUp this would look transparent but will render with issues.)

Second, try adjusting the opacity in the Sketchup material editor (not the Shaderlight editor). This setting controls the opacity in the render. Total opacity will appear inky (nearly opaque) while fully transparent ... well you get the idea.

Good luck.  Post again if this doesn’t work.

Also, I would reach out to support@artvps.com about the material name issue.

Cheers,
Andrew

davidheim
Total Posts: 6

Thanks. I hadn’t thought to apply the texture front and back. Good advice.
Best,
dh

awaddington
Total Posts: 392

If that doesn’t work, post a sample render that shows the issue and a screenshot of your settings in SketchUp.

davidheim
Total Posts: 6

The glass is still coming out too opaque. Here are a screen shot of the settings and a sample render. Any suggestions?

Image Attachments
table_render.jpgScreen_Shot_2019-03-31_at_12.20_.41_PM_.png
Click thumbnail to see full-size image
awaddington
Total Posts: 392

I think the solution will lie in trial and error adjusting the tint and/or the opacity. You can probably bring the opacity setting down to around 8% or less.

Also, try using the solid glass setting under transparent. Your glass pane is 3D. I think the thin glass setting is really intended for single face panes (like 2D windows). I don’t think it interacts with other faces the same way.

Solid glass will calculate distortion and attenuation based on the opacity setting and the distance between the top and bottom faces.  With the thin glass, it may be treating the faces as independent geometries—so one face at 50% plus one face at 50% would collectively be full opacity (or close to it while still being transparent).

So next attempt:
-Change to solid glass in Shaderlight
-Reduce opacity to 8% in SketchUp

Then in subsequent attempts, adjust the opacity or lighten the colour tint (i.e., lighter grey).

Let us know how you make out.

Andrew

davidheim
Total Posts: 6

Adjusting the opacity and color of the glass helps. So does the solid glass setting. Thanks for all your help and advice.
Best,
dh

EGIE
Total Posts: 509

hi David and Andrew - I have also played with your suggestions :-)  Andrew´s suggestion to materialize both glass sides is very valuable - so thanks to both ;-) !!

Maybe this little trick could be interesting for your glass plate - I used “Thin Glass” for both test glass plates.  The edges of the left plate, however, is made with a second material slightly green and “Solid Glass” to imitate this polished glass appearance.

PS:  a so nice coffee table !

Image Attachments
Glasses.jpg
Click thumbnail to see full-size image
kfoojones
Total Posts: 284

You can actually achieve a result very similar to EGIE’s using a single solid glass material. Because the amount of attenuation (and therefore tinting) depends on how far the light travels through the material, when the light passes straight through a thin sheet of glass, it appears almost completely transparent. Light passing through the edge of the pane of glass undergoes total internal reflection, which means it bounces around inside the glass many times and is much more strongly attenuated and tinted.

Making every face solid glass is more physically accurate, because it properly accounts for light entering and leaving the solid body. By have some faces use thin glass, Shaderlight doesn’t count rays passing through the thin glass face as having entered a solid body. If the ray then leaves the solid body through an edge face (with the solid glass material), Shaderlight incorrectly treats it as entering the body at that point. I suspect this might be the reason for the bright white edge in EGIE’s render. Thin glass also doesn’t produce any refraction.

Additionally, using a single solid glass material is much easier to set up: you can simply leave both sides of all faces set to the SketchUp default material, group the faces into a single entity and then apply the glass material to the group as a whole. This will make both sides of all of the faces use the glass material.

The attached image is a recreation of EGIE’s scene, using just the solid glass material on all faces of both panes of glass. I made the second pane vertical to more clearly show how transparent it is (by not reflecting the sky). I also added a tiled rectangle beneath the glass to show the subtle effect of refraction – the tile lines are slightly offset when seen through the glass – this effect would be lost if using thin glass.

One little wrinkle to bear in mind (with either approach) is that the amount of total internal reflection that Shaderlight will calculate depends on the quality setting (in order to avoid spending too much time bouncing around inside objects). The secondary image was rendered at Q5 (vs. the Q10 used in the main image). The refracted objects / background seen through the edges of the glass is different in each because the internal reflections get cut off at different points

Regards,
Shaderlight support

Image Attachments
SketchUp_Setup_Q10_Render.pngQ5.jpg
Click thumbnail to see full-size image
kfoojones
Total Posts: 284
davidheim - Mar 30, 2019 09:40pm

...no matter what I do, I can’t get the Shaderlight Material Editor to display the name of the SketchUp glass texture. It comes up as Material 8 or Material 9.

I think what’s going on here is that, when you select a glass material (e.g. ‘Translucent Glass Gray’) from SketchUp’s material library and then assign it to an object in your scene, SketchUp makes an ‘in model’ copy of that material named ‘Material#’, which is what Shaderlight actually sees. This only seems to happen for some of SketchUp’s materials and I’m not sure why.

You can edit the name of the ‘in model’ material by double-clicking it in SketchUp’s material editor to show the ‘Edit Material’ controls.

Regards,
Shaderlight support

davidheim
Total Posts: 6

This is all very helpfiul. My thanks to everyone for taking the time to answer my questions. I do have one final question for Shaderlight Support, though. As I said in an earlier post on this thread, the glass material I want to use (Translucent Glass Gray) doesn’t appear in the Shaderlight Material Editor under that name; it comes in as Material8 or Material9 or some such. If I choose a different glass material, though, it shows up correctly in the Material Editor. How come Shaderlight doesn’t recognize the one material?
Best,
dh

kfoojones
Total Posts: 284

Upon further investigation, I think the factor that determines whether the material ends up ‘in model’ with the library name or the generic ‘Material#’ name is whether or not there is a texture map associated with the material – plain colours get the ‘Material#’ name. As far as I know, this is something that SketchUp does before Shaderlight gets involved – the name that Shaderlight shows is the same as the one that SketchUp shows in all cases, although bear in mind that Shaderlight can only show ‘in model’ materials.

Regards,
Shaderlight support

davidheim
Total Posts: 6

But a texture named “Glass Translucent Gray” should be named that way in the Shaderlight Material Editor; this is not a plain color. Other Glass materials show up properly named. This seems to be an exception and I can’t figure out why.

kfoojones
Total Posts: 284

If we’re talking about the ‘Translucent Glass Gray’ material that comes with SketchUp under its ‘Glass and Mirrors’ library, then (at least in SketchUp 2018, which is what I currently have installed on this machine) it is a ‘plain colour’ in the sense of not having a texture map assigned to it. Some of the other built-in ‘Glass and Mirrors’ materials do have texture maps assigned (e.g. ‘Translucent Glass Block Dark’ or ‘Translucent Glass Gold’) and these materials don’t end up with ‘Material#’ names when imported into your model.

SketchUp only tells Shaderlight about materials that have been imported into the current model, so it doesn’t see the ‘Translucent Glass Grey’ version of the material from the library.

The sequence of screenshots below might help explain what is going on.

To start with, there are no materials in the model and the Shaderlight material editor shows ‘No In Model Material Selected’. The SketchUp material editor is showing the ‘Glass and Mirrors’ material library, with the ‘Translucent Glass Gray’ material indicated by a tool tip.

Next, I assign ‘Translucent Glass Gray’ to the square. At this point, SketchUp makes a copy of ‘Translucent Glass Gray’ in the model and names it ‘Material’ (subsequent materials would have a number appended). SketchUp tells Shaderlight about the newly added material and Shaderlight’s material shows it as ‘Material’. This is confusing because the SketchUp material editor is still showing the ‘Glass and Mirrors’ library, which has the original ‘Translucent Glass Gray’ material in it.

Finally, I switch SketchUp’s material editor to show ‘Colors in Model’, which reveals that SketchUp has actually assigned the in-model material named ‘Material’ to the square.

I agree that this is undesirable behaviour but unfortunately I don’t think there is anything that we can do at Shaderlight to change how SketchUp works in this respect.

If the above explanation doesn’t match your experience, please do let us know so that we can investigate further.

Regards,
Shaderlight support

Image Attachments
Before_Assignment.pngAfter_Assignment.pngIn_Model.png
Click thumbnail to see full-size image