Light doesn't pass through glass (Karma)

   4173   11   1
User Avatar
Member
41 posts
Joined: April 2020
Offline
Hi everybody,

this is probably a stupid question...
In my scene I have a window with glass - a box with the default glass material. I can see through it, but the dome light I'm using doesn't pass through. I found out that when I reduce the "Opacity color" light begins to pass through but then I lose reflections.
What am I doing wrong? How do I get glass where light passes through and that still reflects?

Regards and thanks in advance,

Günther
User Avatar
Member
8173 posts
Joined: Sept. 2011
Offline
what do you mean by default glass material? A principled shader? A Mtlx Standard Surface should enable fake caustics automatically, but it has to be manually enabled on the old Mantra shaders.

Alternatively, enable caustics on the render settings. Beware this can intruce a lot of noise that can take a while to resolve.
User Avatar
Member
41 posts
Joined: April 2020
Offline
Thank jsmack,

yes, the principled shader. I'm rendering with Karma, not Mantra.
I found out that the problem only occurs when I render with CPU. Everything's perfect when I render with XPU!?
Is there any logic behind that?
User Avatar
Member
8173 posts
Joined: Sept. 2011
Offline
Sybaris
Everything's perfect when I render with XPU!?
Is there any logic behind that?

With XPU, your Principled shader is not used. It uses a USD preview shader, which automatically has fake caustics enabled. The Principled shader is a Mantra material, which is supported by Karma CPU only, as it has legacy VEX shading support.
User Avatar
Member
41 posts
Joined: April 2020
Offline
Oh, OK, that explains this issue.
Thanks!
User Avatar
Member
8173 posts
Joined: Sept. 2011
Offline
Sybaris
Oh, OK, that explains this issue.
Thanks!

If you're still searching for the setting to change, there is a checkbox on the opacity tab of the principled shader called 'fake caustics'
User Avatar
Member
41 posts
Joined: April 2020
Offline
Thanks again!
I think, I'll stay with XPU for now.
Atm I'm having problems with normal maps under XPU. They always render the same, no matter what the normal effect setting is. Seems to be ignored...
User Avatar
Member
8173 posts
Joined: Sept. 2011
Offline
Sybaris
Thanks again!
I think, I'll stay with XPU for now.
Atm I'm having problems with normal maps under XPU. They always render the same, no matter what the normal effect setting is. Seems to be ignored...

If you're using XPU with the principled shader, all of the settings are ignored as the renderer does not support mantra shaders. The material library does a rough translation from principled shader to usd preview surface for use in the gl view and for basic support by other renderers. the translation is very limited though. I suggest no using the principled shader at all with karma. MaterialX is the official shading def of karma, so I would use that.
User Avatar
Member
41 posts
Joined: April 2020
Offline
Thanks, jsmack, for the insights!
So - something new to learn... ;-)
User Avatar
Member
41 posts
Joined: April 2020
Offline
For all those that run into the same problems as I did:
I have a pretty big project that uses principled shader materials (set by Material SOPs). Since I’m rendering with Karma I wanted to use MaterialX materials. The first step was to recreate the principled shader materials as MaterialX materials. That was done pretty quickly. A lot more effort is to go through all the Material SOPs and replace the old material with the new material. Another not-so-good side effect is, that the MaterialX materials are obviously not rendered in the view…
What I’m doing now is, that I’m defining the MaterialX materials “on stage” and replace the old materials with the new ones by using groups (or names).
At the very end of the creation of the models I do this:


The first node deletes all groups (using “*”), because I only want “material groups”.
The second node creates groups from each material:


The next node deletes the shop_materialpath attribute (and a path attribute that I use):


The last node creates names from nodes because groups do not exist on stage level anymore:
(I’ve put these nodes in a digital asset.)

In the stage context, right after importing the scene(s), I create a material library that contains all the MaterialX materials, and after that every name that I created is assigned the appropriate MaterialX material:



Can anyone confirm that is "good practice"?

Attachments:
image1.png (29.5 KB)
image2.png (16.1 KB)
image3.png (20.6 KB)
image4.png (16.1 KB)
image6.png (34.8 KB)
image5.png (50.8 KB)

User Avatar
Member
9249 posts
Joined: July 2007
Offline
if all your principled shaders are for example in /obj/matnet_old/
you can create all your mtlx materials in /obj/matnet_new/
just give them the same names

then you should be able to just use Attribute String Edit SOP to edit shop_materialpath attribute to replace /obj/matnet_old/* with /obj/matnet_new/*

then Sop Import LOP into solaris
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
41 posts
Joined: April 2020
Offline
This is really boring with Houdini - there's always a better way... ;-)
Thanks Tamte!
  • Quick Links