Heightfield Export
Create Sunlight
Cloud Animation
Panorama Creator
Create Water
Network Render
![]()
Heightfield Export
[Top]Heightfield Export is used to convert 3DS Max objects into heightfield maps which can be used as terrain in Terragen. This will allow terrain geometry to be modeled in 3DS Max before being exported into Terragen. Possible uses include editing imported terrain to include roads, buildings, walls or cliffs. One disadvantage for Heightfield Export is that overhanging objects such as archways or caves are not possible. Another disadvantage is that heightfield images are limited to 256 color greyscale palate, meaning "stair stepping" will be evident. To fix this try editing image using terrain editing software such as World Machine. Heightfield Export requires the use of two plugins: Avg Extension from Larry Minton (3DS Max plugin) and Firmament from John McLusky (Terragen Plugin). Use avg_dlx50_6 for 3DS Max 5 and avg_dlx42 for 3DS Max 4.
Create Heightfield Cam - Pressing this will create heightfield camera in your 3DS Max scene.
Get from scene - If you have created and saved heightfield camera in a previously created file; instead of having to create a new one for the scene this will allow you to read the position of one currently existing in scene. By pressing Create Heightfield Cam any existing heightfield camera in scene will be deleted before the new heightfield camera is put into the scene.
Terrain Size - Allows you to select size of terrain to be exported. By changing value; will move move camera in scene as well as change size of rendered heightfield image. Highly recommended to use selection of available terrain size buttons: 129, 257, 513, 1025, 2049, 4097.
X,Y,Z Position - Changing X,Y,Z value will change position of heightfield camera in scene.
Reset - By pressing Reset, heightfield camera's position will be set to default position of [129,129,257].
Scaled - Use if terrain mesh has been scaled from Scale Terrain. Will convert heightfield camera position to correctly scaled units.
Save image to - Use to save image path which will be used to save heightfield image.
Preview - Use to render preview of heightfield image without saving.
Export - Will render and save heightfield image.
Min/Max - Once heightfield image has been created, positions of highest and lowest object in scene must be known to obtain correctly scaled heightfield map in Terragen. To import rendered map into Terragen do the following procedure.
- Open Terragen. Set scene to correct terrain size in Landscape Settings and set units to Terrain Units.
- Press Accessories and select Firmament BMP Import.
- Open previously rendered heightfield map and then press fi button which will import BMP into Terragen. When prompted, leave scaling factor at default of 10%.
- Before this terrain can be used it must first be scaled correctly in height. Press Modify Terrain.
- Back in TG-Max, use Select Object (from Min/Max) to select object wit highest point in rendered scene. Make sure object was in rendered heightfield map. Use Copy Max to copy that objects position.
- Back in Terragen, Paste (CTRL+V) value in Bound Vertical - Max. Repeat Step 5 again but with lowest point and use Copy Min to copy position. Be careful to copy correct object position from rendered image. If box was used at lowest point in scene, use position from highest point on box for correct scale position.
- Press Bound Vertical to apply highest and lowest point to imported terrain. Terrain should now be properly scaled.
![]()
Create Sunlight
[Top]Select Sunlight - To use Create Sunlight simply create a Sunlight using 3DS Max (Daylight feature in 3DS Max 5 does not work), press Enable from Select Sunlight and then pick sunlight using Select Sunlight. Sunlight controls are broken into two features: Manual and Solar. By clicking Manual - Solar button you turn that particular feature on and the other off.
Manual Controls - Orbital Scale is used to set distance between sunlight and center of scene. Use Get from scene to acquire manual sunlight values from scene. By changing the value of Heading and Altitude you are changing the manual sun position. If you create a script with sunlight enabled, this sun position would be exported.
Sun Animation - However, if you want to have the sun animated, this would not be possible from Manual Controls. By enabling Sun Animation you can import a value for the sun Heading and Altitude at the animation start and end. Start and end values are dependent on Frame: Start and Frame: End values. Once values are entered, press Animate which will animate manual sun on per frame basis over a set of designated frames. To delete this animation press Clear. By turning off Sun Animation (enables Manual Controls) sun animation is deleted.
Manual Sun Color and Intensity - Use Base Sun Color to change manual sunlight color and Intensity to change brightness. Because sun color and intensity are not scriptable in Terragen yet, values must be manually tweaked and adjusted in Terragen to match.
Solar Controls - Allows sun position to be determined using 3DS Max's sunlight utility. By pressing Open Solar Controls, sunlight controls will be opened in 3DS Max allowing use of time and date settings. Days (+/-) can also be used to change days (past and future) offset from current day. Use Longitude and Latitude to determine location in the world to use for lighting scene. 3DS Max provides a helpful and accurate feature which allows you to choose any major city in the world to determine location. Orbital Scale is the distance the sunlight is from the center of the scene. Heading and Altitude values provide position to set solar sunlight (disabled from user editing).
Solar Sun Color and Intensity - Use Base Sun Color to change solar sunlight color and Intensity to change brightness. Because sun color and intensity are not scriptable in Terragen yet, values must be manually tweaked and adjusted in Terragen to match.
Shadow Lightness and Exposure - Enable each feature to use when Teragen script is created. Shadow Lightness is used to change darkness of scene shadows in Terragen. Exposure is used to change brightness or exposure of Terragen scene. Shadow Lightness and Exposure do not effect 3DS Max scene.
Cloud Animation
[Top]Clouds - Turn on cloud animation by clicking Enable. Adjust direction using Heading. Adjust speed using Speed. To remove cloud animation when exported by script simply turn off Enable button.
Panorama Creator
[Top]Panorama Creator can be used for many purposes including previewing where to create a panorama in Terragen, importing panorama images into 3DS Max for previewing in scene, or for creating HDRI panoramas for Image Based Lighting (explained below).
Create Panorama Gizmo - Pressing this will create a gizmo in your 3DS Max scene which includes four cameras which are grouped together at the same point.
Get from scene - If you have created and saved your panorama gizmo in a previously created file; instead of having to create a new one for the scene this will allow you to read the position of one currently existing in scene. By pressing Create Panorama Gizmo any existing panorama gizmos in scene will be deleted before the new gizmo is put into the scene.
Get from script - If you've already created a panorama script the gizmo position can also be read from it as well. This will also work on camera path animation scripts by simply reading the position of the camera at the first frame of the script.
X,Y,Z Position - Changing X,Y,Z value will change position of panorama gizmo in scene.
Reset - By pressing Reset panorama gizmo's position will be set to [0,0,0].
Preview - If you would like to preview the scene from the gizmo without having to view in 3DS Max viewports, preview will render the scene for viewing. If the terrain has already been imported the scene will appear as though it is freezing up when what is really happening is the scene is being rendered at high res. To fix this simply turn on Render Optimize from Optimize. Doing this will allow scene to be rendered in low res.
Wireframe - Allows preview render to be viewed in wireframe.
Background Color - Use this to change background color of entire scene.
Use Environment Background - Will allow environment background to be toggled on or off.
HDRI (High Dynamic Range Image) is different from the normal bitmap (jpg, tif, bmp) in that it not only contains color values but includes light values for any given pixel. This allows an HDR image to contain a greater dynamic range than what can be normally displayed by a single exposure. HDR images are created by taking several pictures of the same scene (applies to live action photography or CG scenes) at multiple exposures "bracketed exposure" and then assembling them in programs such as HDRShop.
One major advantage of HDRI is that if the scene is captured in a panoramic fashion, this data can be used to light a CG scene. Unlike normal CG lighting techniques where a scene is lit using very few lights, this makes it difficult to correctly and realistically light the scene within a live action background. This technique is called IBL (Image Based Lighting) and accounts for lighting in a CG scene from all 3D directions as well as accounting for light intensity and color.
TG-Max's HDR panorama feature is used to create a bracketed exposure Terragen script, which can be used for IBL (Image Based Lighting) within 3DS Max or other 3D applications with HDR-IBL capabilities. I used this often for accurate scene lighting for better integration of 3DS Max elements within Terragen scenes. Sean O'Malley's SOPack includes an HDR Rendering feature within Terragen and has helped simplify this process by eliminating the need to render several exposure brackets and for user to assemble the images into a readable HDR format image.
Eventually I will have a tutorial explaining how to create a HDR-IBL panorama in 3DS Max using Terragen.
Start Bracket - Represents start value of bracketed exposure.
End Bracket - Represents end value of bracketed exposure.
Number of Brackets - Total number of images of bracketed exposure that will be taken.
Bracket Range - Total number of bracket range from start to end.
Bracket Distance - Distance between brackets.
Links Explaining HDR - Image Based Lighting:
- HDRShop
- HDRI & Luminance space
- What is a High Dynamic Range Radiance Imaging?
- Final Render - HDRI Explanation
- Using HDR with Terragen Tutorial
Save script to- To create panorama script, use this to save script.
Save images to - Directory and name of image files which will be rendered in Terragen using panorama script.
Create Script - Used to create script. Will give message error if above information has not been provided by user.
Load from script - Use to select panorama script to view panorama images as background image. Will load six panorama images in rendered order and preview them.
Load from last script - Use to load last script created in Save script to. Will load six panorama images in rendered order and preview them. Will not load if Save script to is empty.
Front, Right, Back, Left, Up, Down - If you don't have a script to load panorama images from you can use this to manually select the images.
Load - Loads images into background. Requires the following procedure:
- Select 3DS Max viewport (camera or perspective) that you would like background to be viewed in.
- Click on Load.
- Viewport Background window will open.
- Turn on: Use Environment Background and Display Background.
- Press OK.
Save as cubic pano - Use this to save all six images into one cubic cross image.
Create Water
[Top]Create Water - Click this to create water. Will delete water object if it already exists in scene.
Reset water size - Will change water object to original size of imported terrain.
Water Level - Use this to change level of water height.
Water Size - Use this to change size of water object. Default size will be terrain size from imported terrain.
Preview Color - Use to change color of preview water.
Segments - Use this to change number of height and width segments on water.
Water Animation - Is possible with new feature in Terragen v0.9.08 which allows water level to be animated. By enabling Water Animation this allow water level animation to be included in script. Use Water Level: Start and Water Level: End to designate level at beginning and end of animation. Frame: Start and Frame: End can be used to change where animation started and ends. Once values are entered, press Animate which will apply animation to scene. To delete this animation press Clear. By changing Water Level after animation has been applied water animation is deleted.
Network Render
[Top]Network Render is not exactly used for rendering over a network but instead for breaking up the scene's animation into multiple scripts which can be manually rendered on several computers on a network.
Number of Files - Use to break up scene animation into particular number of files.
Edit Times - Turn this on to change script start and end times. Helpful if one of two computers you're rendering on is slower than the other.
Execute - Press this to create scripts of given start and end times shown in Scripts Setup.
© Mark Sporleder 2003, all rights reserved