Skydomes and the OSG Background Map Export Setting
Many scenes benefit from having a skydome in the background - an image of a sky that replaces the flat background color of a scene. The easiest way to do this with an OSG Export is to take advantage of the exporter's "Background Map" feature. This feature automatically generates an infinitely distant skydome that will never accidentally cut off our models or mess with your model's clip plane.
At the moment HDRI skydomes are not supported, but this feature may be coming sometime in the future.
Where to Get a Sky Texture
You can start off by grabbing high quality skydomes off of places like https://www.cgskies.com/, stock texture sites, or make your own with a 360 camera on a tripod (such as the Ricoh Theta) and capture through its associated remote shutter app. Various other solutions for capturing professional panoramas exist as well, such as incremental nodal camera mounts (e.g. Nodal Ninja) or automated heads (e.g. Gigapan), though these methods may have trouble stitching together moving objects such as clouds.
Here's a sample spherical panorama you can grab for testing, captured with an older Theta. The Theta has some stitching artifacts where the edges of its two lenses come together, but this is most noticeable when placed directly on a flat surface instead of a tripod. This version of the Theta also has a noticeable amount of color noise, even when shooting in well-lit situations with a low ISO.
In this example the tripod was originally visible, edited out in Photoshop using the polar coordinates filter and content aware fill, and the photographer (yours truly) was also removed using content aware fill. This sky texture has a small worldviz logo watermark at the very bottom which should not typically be visible unless a user manages to look underneath the ground.
When you don't have an appropriate sky on hand yet, or don't want the current map to draw attention away from a model up for review, a texture with simple gradient can also do the job.
Setting up the Map in Max
To use the map, first you'll want to open Environment and Effects. This can be done either from the Rendering menu, or by pressing 0 on the keyboard. From there, add the map as a bitmap into the environment map slot.
Exporting to OSG and the Background Map Feature
Once the map is in place, to export you'll want to enable the "Background Map" feature, found in the OSG exporter's object filters - i.e. the "Export Objects" rollout.
If you've set up Inspector as your default OSG viewer (which you definitely should), then enabling the preview will show your skydome in action after export. Check out this article for a preset file that will load up some good defaults for the rest of the exporter.
Mirrored Skydomes
If you want to save texture space by just using a skymap cropped to just the upper half:
- Drag the background map into the material editor from the Environment Map slot of Environment and Effects
- Select "As Instance" in the prompt
- Double-clicking on the map to show its properties
- If the map comes in showing "real world scale" as turned on, switch from Environment coordinates to Texture, uncheck Real World Scale, then switch back to Environment. Keep the dropdown set to Spherical.
- Switch "V" from Tile to Mirror. This lets Max and the exporter know you want to mirror the texture
- Set V's offset from 0 to 0.5. Max mirrors from the top by default, so adding the offset makes it mirror from the middle instead.
Previewing the Sky Map in Max's Background
Go to [menu] or press Alt+B to open up the background options. Set it to "Use Environment Background" to show the map behind your scene at a reduced resolution. The background will export at its full resolution regardless of how it is displayed in Max, but if you want to preview it in more detail this can be increased from the Display Performance tab.
See Also...
For 2D background maps displayed in screen space, see:
http://kb.worldviz.com/articles/813
To grab a preset file for the exporter with some good default settings, and to see how to load it, check out this article:
http://kb.worldviz.com/articles/2571