PDA

View Full Version : MR dielectric not rendering correctly


Aeredor
12-02-2006, 09:29 AM
Hey folks,

I've been looking for a solution for like three days straight. I haven't been a part of a CG community before, so please ask if I omit a setting or spec while I get the hang of things. I've found numerous threads in several forums about dielectric rendering problems, and I've tried everything I could in most of them, but nothing has worked. I have a few ideas of why my scene is different. Let me lay it out for you all.

I'm revamping an old scene that I had done with all Maya materials and rendering, now in mental ray with all mental ray shaders. I left the geometry and stripped all the materials away and started over. I also redid the lighting.

I'm rendering a snow globe. I have a little scene inside of a clear glass shell with a wooden base. The base is set up with a DGS with a texture lookup on the Diffuse, and just a touch of glossy (0.05), no specular. It is connected to both lights (below).

http://web.ics.purdue.edu/~onken/maya/snowglobe2base.jpg

I spent a while tweaking the lighting on the wooden base, and it's the only thing outside of the dielectric in the scene. There are two lights in the scene, both Maya point lights set to be mental ray area lights. I came up with the follow mental ray settings for the key:
X Emit Photons
Photon Intensity 200
Exponent 2
physical_light
Color.Value 200
Cone 90
Cosine Exponent 1

and the fill:
X Emit Photons
Photon Intensity 50
Exponent 2
physical_light
Color.Value 50
Cone 90
Cosine Exponent 1

The photon intensity is significantly (like, order of magnitude) lower than I've seen in tutorials and stuff. However, if I have it at say, 2000 instead, the scene is totally bleached out by the light. The lights are situated roughly 4 units away from the scene, the globe is exactly two wide. The physical light value and the photon intensity values are the same as suggested.

I will be introducing caustics into the scene later, but right now I need to get the shaders inside the dielectric to respond to the light. This is how the scene should look, the glass shell has been removed for this render. All the shaders "inside" have only diffuse, again mapped to a mental ray texture lookup.

http://web.ics.purdue.edu/~onken/maya/snowglobe2noglass.jpg

My mental ray render stats for that are
Min/Max Sample Level 0/2
Filter Mitchell
Width/Height 4/4
X Jitter
X Ray Tracing
Reflections 100
Refractions 100
Max Trace Depth 200
Shadow Trace Depth 2
No Caustics
No Global Illumination
No Final Gather
No Auto Volume

I think everything else is at its default setting.

I've tried a number of things for the glass shell, all of which have resulted in the same basic idea

http://web.ics.purdue.edu/~onken/maya/snowglobe2dielectric.jpg

As you can see, none of the shaders below the dielectric are functioning correctly. Let me detail what I've tried so far.

I've done everything with NURBS. The glass started as a single sphere, normals facing out. I assigned it a Maya lambert, set the transparency to 0.98 so I can see what's going on, moved to the shading group, and created a Material Shader that was a mental ray dielectric_material. Here are the settings
Color (HSV) 230 0.07 0.97
Ior 1.5
Col_out.Value 1.0
Ior_out 1.0
_ Ignore normals

and connected to both lights. I later checked Ignore_normals and it didn't change anything.

I hypothesized that everything was literally "inside" the glass, that it was acting as a solid ball of glass. I started trying various modeling tricks to get a single-mesh NURBS shell. What I have now has a hole at the bottom so it's not two meshes (like if I used a boolean). It still came out black. The normals on the outside face out, the normals on the inside face in. That's what is actually in the screenshot above.

I added the dielectric to the Photon Shader in the glass Shading Group.

I tried setting Col_out.Value to 0 and Ior_out to 0, this made some crazy stuff happen, it was very distorted, still black, so I put it back.

I then tried the single sphere again, same settings as before. Then I put a duplicate sphere just inside the outer surface close, but hopefully not intersecting the snow mesh. I assigned this a second dielectric_material with an Ior of 1.0 since the inside is just air. I got this idea from the fruit thread

http://forums.cgsociety.org/showthread.php?t=239109

which gave me a lot of insight into the "interface" idea of the dielectric physics. The difference in the final render for this one was the black "edge" of the glass that is visible above is not when I have the dielectric interface.

I haven't clocked them, but the render times are about 5-15 minutes, I'm on a P3 2.4GHz with 512MB RAM, and a NVidia Ti4600. Not bad, huh?

Okay! That's all I can think of that would be helpful for my diagnosis, if I left anything out, please ask, I'll be checking frequently. I know it was a long post. Thanks for reading!

~Aeredor

Exo7
12-02-2006, 02:58 PM
I hypothesized that everything was literally "inside" the glass, that it was acting as a solid ball of glass.If I followed correctly your description, you were right to think so.

What I have now has a hole at the bottom so it's not two meshes (like if I used a boolean).That should do the trick.

It still came out black.Time to activate caustics in your scene ! Without them or special (segments) shadows, everyting seen through a dielectric will cast pure black shadows ;)

Conclusion:I will be introducing caustics into the scene later, but right now I need to get the shaders inside the dielectric to respond to the light.is insane !

Also keep in mind that dielectric's transparency is absolutely not like Maya's shaders transparency, right-click the shader to pop it's specific help up in order to get an insight. Basically it's a mesure on how much light will be stopped by dielectric per scene unit.

Aeredor
12-02-2006, 07:47 PM
Thank you for your feedback.

Let me get this straight... are you saying that in order to get the shaders behind the dielectric to respond to the lights I have to introduce *caustics*? I thought caustics were more "special effects", not essentials.

~Aeredor

Aeredor
12-02-2006, 08:13 PM
Well, I gave it a shot. I turned on (only) Caustics in the Render Settings
X Caustics
Caustic Accuracy 100
Caustic Filter Type Cone
Photon Volume Accuracy 100
Max Photon Depth 10
Max Reflection Photons 100
Max Refraction Photons 100

and it's still all black inside. :(

Can I elaborate on something else I did with my scene if there's another issue you can think of?

~Aeredor

victor
12-03-2006, 05:43 AM
Let me get this straight... are you saying that in order to get the shaders behind the dielectric to respond to the lights I have to introduce *caustics*?Well, not really. Basically, the shadows are black, and the caustics fill them back up with light.

An alternative is to simply turn off shadows for your glass objects or use MR's transparent shadow shader (which will make it behave more like Maya shader shadows).

Caustics with high enough settings will give you realism, but removing the shadows will be more predictable and speed up rendering. Of course, if you use caustics anyway, you'll want the black shadow first.

Can I elaborate on something else I did with my scene if there's another issue you can think of?
You could always post the scene. :)

Exo7
12-03-2006, 10:49 PM
Just pump the photon energy up, in some cases you may need zillions ! That depend on light type, distance to the objects essentially, shaders of course... well on the light setup regarding scene units !

CGTalk Moderation
12-03-2006, 10:49 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.