I would like to create God rays, where sunlight comes through a window. I have been able to achieve this using Vray Environment Fog in the render globals, and a Maya spotlight. This has two disadvantages,
1) if I add any other lights to the scene they also are affected by the fog, which is undesirable. In Max you can include a list of lights that affect the volume when “Use all lights” is off. I do not see this in the Maya implementation.
2) Sun rays are paralell, and so a directional light would be preferable over the inaccurate cone shape of a spot light. However applying fog to a directional light is very costly. In Mental ray one can reduce this my confining the fog area to a bounding box so there is not an infinite calculation. Is there a way to improve the efficiency of the shader here?
I saw in the Max version that one can use “gizmos” but again, I do not see anything about this in the Maya Vray documentation.
There are other fog shaders in the Vray volume section, which are all undocumented. Would any of these be preferable to use in this case? One of them I recall had an icon of a fog spotlight, but I could figure out how to use it…
The VRayEnvironmentFog node is a set, so you can link lights and geometric objects to it.
Set the “Light mode” of the VRayEnvironmentFog node to “Override shape lights”, then use the Relationship editor to link the desired lights to the VRayEnvironmentFog node.
2) Sun rays are paralell, and so a directional light would be preferable over the inaccurate cone shape of a spot light. However applying fog to a directional light is very costly. In Mental ray one can reduce this my confining the fog area to a bounding box so there is not an infinite calculation. Is there a way to improve the efficiency of the shader here?Use the Relationship editor to link the bounding shape to the VRayEnvironmentFog node (you will also need to make the bounding shape itself invisible).
You should be able to draw a cube or any other shape, but give it a transparent material. Not sure if supported, but you could try it with Volume Primitives
Volume primitives are not supported, but you can use any polygonal object. Make sure that it is either invisible or has a transparent material, so that you can see the fog inside.
So I did this using a spot light and a point light. I linked the spot to connect to the VRayEnvironmentFog as described above, and the point light not to link to it. However, they both are still getting fog on them. So the linking does not seem to be doing anything.
I see here a node called “VrayScatterFog” what does that do? Could it be used for this effect (godrays)?
Ahh, okay I was linking it in the relationship editor under light linking. What I needed to do is link it in the relationship editor under set editing. Works now.
yep, looks nice… did you put an alpha map into the light source in order to get the nice light-streaks ?
By streaks I actually mean the god-rays, not the caustics on the ground.
I noticed in some tests I did that it was very hard to achieve fast/good rendering with dmc AA. Using adaptive made the renders both quicker and and a lot better.
i have a caustic seq map attached on the (spot) light color and thats it, thats the light/rays streaks that u see and the caustic on the ground (everything is the same)
setup is really simple, i dont have anything in the scene, 1 light, objects and the vray envfog :), maybe ill will share scene, im not sure yet coz its a part of commercial i did.
im still waiting for client approval for uploading the video on my vimeo
makes sense with the map… about the objects… for the water you used a plane and positioned the cam below ?
Or did you use for the “water-object” itself something additional ?
I made a quick test with real caustics. Low render quality, just a quick check how it works straight with all vray options.
Vlado and you mentioned earlier, that you create a box and limit the vray_env_fog to calculate inside this bounding box only.