Pages

Advertisement

Wednesday, October 9, 2013

Creating Light rays(god rays) using Maya and Mentalray

                       
                              Using mental ray nodes to create volumetric fog is very easy but very tricky when you are dealing with scene scale. Let's start with the polygon cube.
                            Create a cube which covers your entire scene and assign a lambert material.

                                Create a transmat and a parti volume node. You can find it under mental ray nodes. Select the lambert material and go to it's output connection.

                            Expand the custom shaders section. Then drag and drop the transmat node to material shader and the shadow shader using middle mouse button. Then drag and drop the parti volume node to volume shader.


                            Then we have to consider the scale of the scene. My scene scale is in real world scale(diameter of the bamboo is 13cm) so I have to create a large cube for the scene.

                              This is very important because following values depend on the scene scale.

  • Scatter.
  • Extinction.
  • Min step len.
  • Max step len.

                             I have set the scatter color to dark green  H=103.146 S=0.669 V=0.001. Actually this V value depends on the scene scale. If your scene is small then you have to increase the  V value. My extinction value is actually 0.0001 but the attributes editor shows 0.000. Don't worry about that.

                              Since my poly cube is too large, I have to increase min step len and the max step len. You can use the default values but it takes much time to render(at least 10-20 hours when you have a large number of polygons). But when increasing these values, it will reduce the quality. The above values are fine for me. Make sure to adjust these values properly. No need to change other values for basic light rays.
                            You can use the physical sun and sky or other light source but make sure to link your lights to parti volume. Normally it will automatically link the physical sun and sky. But if you have two or more lights then you have to link them manually. This is my final render. It has over 500 million of polygons so it takes 3 hours to render. All the vegetations are created using Maya paint effects.


No comments:

Post a Comment