View Full Version : Mental Ray - Camera inside volumetric light container - How to get it to work?

07 July 2011, 04:00 PM
In preparation for a large scene I'm making, I've been toying around quite a bit with volumetric lighting, trying to get a good crotchgrab on it, so to speak. I've only got access to mental ray for this project, so that's the renderer im forced to use.

Now, I've hit a brick wall, in several ways.

First and foremost, the scene I'll be doing will have a large room with a hatch at the top, which opens and lets sunlight inside. This means the camera will have to be inside the volumetric container. But the second the camera enters the volumetric container, the volumetric effect vanishes! The animation test I've linked below shows this quite clearly. Why's it doing this, and how do I get it to work?

Secondly is a matter of atmosphere. How do I achieve the sense of realistic volumetric light, of dust flying through the air getting illuminated by the sun rays and adding to the volumetric effect? Is this best done with a shader, or with a particle system? Give me some pointers, or more in-depth tips if you have the time!

07 July 2011, 11:24 AM
I have / had the exact same problem and was basically writing that when I had an idea. I assume you use that parti_volume-box technique. You need to connect that node to your cameras volume shader slot aswell. At least on my side here it seems to work.

07 July 2011, 06:16 PM
I've never had this problem, but have read about others having it. All my volumetric stuff in mental ray is done using the parti_volume shader, which can be tricky at first, but the camera should work fine inside this shader. And your light rays will be accurate, so if you need beams, you'll need geometry to occlude the light and cast the shadows to make it work proper. Alternatively, you can map a texture to your spotlight for the shading, but it'll look nicer usually if you don't fake the light beams.

07 July 2011, 07:27 PM
Spectacular, connecting the parti_volume to the camera did the trick! :)

07 July 2011, 01:19 PM
sorry I havent time for reading all your posts guys, but what usualy helps is

to check "AutoVolume" option in mray render globals...

usualy when you render outside the parti_volume shader (helper object) it works even without that checker on but going by camera inside the parti_volume object this checker do the trick

...just my 2 cents


CGTalk Moderation
07 July 2011, 01:19 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.