Crepuscular rays are shafts of sunlight streaming through the clouds or around mountains when the sun is low and blocked. The scattering of sunlight by particles in the air makes the effect possible. In both the real world and VNS, the effect is most noticeable when looking toward the sun and it is partially blocked by clouds or terrain. This tutorial sets up a simple project with Components as a basis for exploring this effect.
1. Start with a simple and fast-rendering terrain. Use the Terrain Generator with the following settings to create a flat square-mile DEM with a 32-m grid.
2. Add Jamie Krutz's Ocean Lake Component from the Component Gallery. Don't scale the Wave positions and don't scale the Lake's elevation. Assign it an elevation of 50 m. This will give us an interesting foreground for the scene.
3. Lower the perspective camera to an elevation of about 100 m and move/rotate it so it's at the NE corner of the DEM looking southwest.
4. Zoom the camera back to a wide-angle view of 80º.
5. Rotate the camera upward to fill the frame with sky. Your rendered view should look something like this.
6. Our view is looking southwest so change the Light position to a winter afternoon at 3 pm.
7. Darken the horizon by shifting the Sky Editor Color Gradient Horizon pin toward the Nadir and the Zenith pin to the Horizon.
8. A rendered view will show an obvious sky brightening around the Light.
9. Add a Cloud Model from the Gallery and load Gary Huber's BacklitClouds. Don't scale the Cloud Model bounds. If you don't have the BacklitClouds Component in the Gallery, open the BacklitClouds project from the Demos folder and save it as a Component.
10. Set Bounds in a View and click new bounds for your Cloud Model.
11. Lower the Base Elevation to 1500 m.
12. Increase the Coverage to 85%.
13. The Cloud Model creates pathways for the rays. We need a volumetric Atmosphere to make them visible. Open the project's default Atmosphere and load Gary's BacklitClouds from the Gallery. Again, if you don't have the BacklitClouds Component in the Atmosphere section of the Gallery, open the BacklitClouds project from the Demos folder and save it.
14. To speed preview rendering, increase the Speed Boost to 25X.
15. Render a preview. What you get will be different; cloud placement depends on your Cloud Model bounds. Try shifting the Center X and Y values of the Density Pattern texture to move the clouds around.
16. Here's the same view with a Normal Speed Boost and higher fractal depth. With higher volumetric quality comes longer render times.
17. Now that you have a starting place, vary Cloud Model and Atmosphere parameters to see how they work and what effects you can achieve.
Copyright 2007 R Scott Cherba All Rights Reserved