PDA

View Full Version : Help!-Light Rays Through Stained Glass


Tempest6x
10-26-2009, 07:19 PM
Hello All,

I am hoping someone can point me in the right direction here through an explanation, or link.

I am working on a church scene and I would like to have colored sun rays going through the stained glass window. I am using MIA_material X with a refraction to get the color on the floor. I just cant seem to get the rays to work.

I feel like I am missing something. I have a poly cube surrounding the scene (the camera is outside of the box) with transmat as the material and parti_volume attached to its volume material. I am using a directional light to light the scene. Could someone give me a step by step on how to to this? I know I am missing a step.

Here is an example of what I am looking to do:

http://www.mentalimages.com/fileadmin/user_upload/gallery/dustyroom_001.jpg

InfernalDarkness
10-26-2009, 07:31 PM
Volumetric lighting in mental ray is a hit-or-miss situation at best. Another example of how the people at mental images just don't get it. But it's possible to do.

Do you have "Auto Volume" checked, in your Render Settings?

Also, I think your camera needs to be inside the volume for it to work.

Did you link your light to the parti_volume?

Did you create a physical light shader?

The transmat is superfluous, generally. I've never had to use that before for volumetrics, although I've seen it in other people's workflows.

Tempest6x
10-26-2009, 09:42 PM
So if you don't use transmat what do you assign the parti_volume to?

InfernalDarkness
10-26-2009, 11:03 PM
So if you don't use transmat what do you assign the parti_volume to?

I assign it to the same slot you would if you did use the transmat, which is "Volume Shader" in the Shading Group. Also, if you're using GI, make sure to place a parti_volume_photon in the Photon Shader slot. And make sure "Export with Volume Sampler" is checked, of course.

I can possibly dig up an old scene where I did pretty much what you're looking for, but it might be in 2008, so it might not work with 2009... Keep trying, and I'll see what I can do. And I expect a few others will chime in with some knowledge too...

Tempest6x
10-27-2009, 03:38 PM
Thanks for your help so far but I am stuck once again. You said using the box is superfluous so I am assuming that I am not putting Parti_volume in the shading group of the box since I got rid of it.

If thats the case, what shading group do I place it in? The Stained glass?

Tempest6x
10-27-2009, 03:43 PM
This is what I have so far. It's the shading group of the stained glass.

http://i251.photobucket.com/albums/gg293/tempestblayze/Picture1-1.png

tostao_wayne
10-27-2009, 04:18 PM
you must to use the parti volume into the volume material and the sahdow material, you must be outside the cube that you have assigned the transmat.

here you have a sample scene

sorry, in the example scene you must to grow up the refractions to 4 in the global render setings to see the glass

InfernalDarkness
10-27-2009, 04:23 PM
Me:
The transmat is superfluous, generally. I've never had to use that before for volumetrics, although I've seen it in other people's workflows.

You:
You said using the box is superfluous so I am assuming that I am not putting Parti_volume in the shading group of the box since I got rid of it.

Not the box, the transmat which was being applied to the box.

Your stained glass material SG doesn't need the parti_volume or photon shaders, the box or shape surrounding your scene needs the parti_volume shaders. Your stained glass just needs to interact with it; the best way to do this would be to use a mia_material_x in my opinion.

So, to clarify:

Box surrounding scene gets parti_volume and parti_volume_photon in the mental ray slots.

Window doesn't get those, but put your Stained_Glass material in the photon slot instead. Break volume connection; the volumetrics happen in the box's shader, not the window's shader.

Think of the box as the area you want dusty air in, basically. It is invisible, other than the dust.

Tempest6x
10-27-2009, 04:38 PM
Thank you guys! I understand how it works and I got it to work in my scene. Here is my test scene.

http://i251.photobucket.com/albums/gg293/tempestblayze/Picture2-2.png

CGTalk Moderation
10-27-2009, 04:38 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.