
This tutorial will cover exporting terrain and image map information from Bryce 5 and importing it into MojoWorld 3 Standard/Professional. This image is a Bryce render of a terrain and diffuse coloring that will be used in this tutorial:
After choosing either of those export options, an OS-specific file dialog will open. This dialog has a menu from which a variety of formats can be chosen. Only two formats on this menu are suitable for creating terrain data which can be imported into a MojoWorld parameter bomb: PGM and USGS DEM.
Choose one of these two formats, select a file name and click OK. Note that on the Macintosh platform, the three letter extension must be specified for MojoWorld to correctly recognize the file. Each format has its own quirks.
The USGS DEM format imports into MojoWorld without any editing required, however any texture maps will need to be rotated 90 degrees.
PGM import into MojoWorld 2.0/3.0 is subject to a small known bug which can be worked around with a text editor. When a PGM is exported from Bryce, it includes a few comment lines. MojoWorld will appear to import the PGM data, but the area inside of the Parameter Bomb will be flat. This is because MojoWorld 2.0/3.0 does not correctly deal with the comment lines and assumes 0 for all points in the PGM. This can be fixed by editing the PGM data file in a text editor before importing into MojoWorld. The top few lines of the file will look something like this:
Delete the lines which begin with a # sign and save the file. It will now correctly import into a MojoWorld Parameter Bomb.P2 # Generated by Bryce5 # Brought to you by the letters R&D - MetaCreations, Corp. 256 256 65535 841 843 845 847 849 851 853 855 857 859 861 863 866 868 870 872
Another alternative for getting terrain data out of Bryce and into MojoWorld is as a greyscale heightmap. In the Bryce Terrain Editor, use the keyboard shortcut for Copy (ctrl-C on Windows; command-C on Macintosh). Then, open an image editing program, create a new document and use the keyboard shortcut for Paste (ctrl/cmd-V). Save this document as one of these image formats: PNG, TIF, BMP, JPG. Saving as a greyscale heightmap does not have as much vertical resolution as using one of the digital terrain formats previously discussed.
Here is the heightmap. Note that the render at the top of this tutorial, and subsequent renders of this terrain will have the viewpoint located in the upper left corner looking at the tall tower in the lower right corner.
Initiate a terrain export in Bryce to bring up the OS-specific export dialog. Choose the Wavefront OBJ format from the format menu. Although any format marked as a (Mesh Export) will open the Bryce Terrain Export room (as opposed to directly exporting terrain data, as it did for the DEM export), only the Wavefront OBJ export puts the texture maps in the correct orientation. Many of the other formats create images maps that are inverted vertically, and some of the Mesh Export formats do not export the image maps at all!
The only texture map which will be automatically applied by the MojoWorld terrain import is the Diffusion Color map. Other maps may be generated by the Bryce Terrain Export dialog. Those which are shown as available on the list will depend on the material properties of the material applied to the terrain.
Each texture map file will append a descriptive string, such as "diffcol" for the Diffusion Color map, and "bumpamt" for the Bump map. On Windows, all the exported files have their proper three letter extension. On Macintosh, these extensions must be added manually for MojoWorld to correctly parse the files.
The default format is a highly compressed JPG, so choosing either BMP on Windows or TIF on Macintosh is recommended. Note that on the mac, it'll be necessary to append .tif to the image maps for MojoWorld to correctly recognize them.
Here is the Diffusion Color map.
Create either a square or round Parameter Bomb. The square corners of the terrain data and texture map(s) will be truncated if used in a round Parameter Bomb.
There are two places where the Terrain Import can be accessed in MojoWorld. The first is Import Terrain... option on the File menu, which opens the Terrain Import Wizard, starting at the Intro screen. The second is the Import Terrain... option on the Parameter Bomb Options menu located in the Parameter Bomb editor, which opens the Terrain Import Wizard, starting on screen #2.
The first field is for the terrain data (the DEM, PGM or greyscale heightmap file). The second field is for the diffuse color texture map. Once both fields have been specified, click on Import. The import process will automatically create a terrain texture and a material with a diffuse color texture inside of the selected Parameter Bomb.
Parameters to note here are:
More texture leaves can be added in this texture editor to add procedural detail to the bitmap terrain. Before adding a new texture leaf, note the size of the Parameter Bomb. The Largest Feature Size of any fractal intended to add procedural detail should not be larger than the Parameter Bomb.
Procedural diffuse color detail may be added in this texture editor, with the same caveats as for adding procedural data to the terrain data - that the Largest Feature Size of any fractals should not be larger than the size of the Parameter Bomb itself.
Parameters in the Bitmap Node that may need editing are the ones related to orientation - Flip Horizontal, Flip Vertical, and the Rotation parameter. Which of these may be needed will depend on the formats of the exports. This is summarized in the following table:
| Data / Format / Export | Orientation of Map inside of Parameter Bomb | Notes |
|---|---|---|
| DEM |
|
All image texture maps will need to be rotated 90 degrees because of the orientation of the terrain data inside of the Parameter Bomb. |
| PGM |
|
The text PGM file must be edited to remove comment lines before import into MojoWorld will work correctly. |
| Image-based heightmaps cut and pasted from the terrain editor and saved with an image editor. |
|
Vertical resolution is markedly lower than the digital terrain formats. |
| Image texture maps resulting from exporting the terrain to either .3DS or .DXF |
|
A vertical flip is needed in order to align these image maps with the corresponding terrain. |
| Wavefront OBJ |
|
This is the recommended export format. |
The Result
Here's the imported bitmap and color texture map, first in the RTR, then rendered:
To use this bump map in the current Parameter Bomb imported terrain, open the land material editor for the material inside of the Parameter Bomb. Change the Displacement parameter from a widget to a texture. In the new texture editor that opens, create a new texture. Name it " Imported Terrain Bump". Click the first circle-T to enable the first texture leaf, then click it again to expand its kickstand. Change the Input Coordinate at the bottom of the kickstand from World Position to Helper Position. Select the current Parameter Bomb on the DDLB to the right. Change the Monofractal to a Bitmap Node.
Several changes are needed in the Bitmap Node's parameters. First is the File Name. Click the Load From Disk icon and select the bump map image file. Change the Bitmap Size from its default of (1, 1) to (2, 2). Change the Bitmap Offset from its default of (0, 0) to (-1, -1). This diagram shows why these two changes are needed - with the default values, the Bitmap would only cover one corner of the Parameter Bomb:
Any rotation or flipping that may have been needed for the diffuse color map will also be needed for the bump map.
When Bryce exports a bump map, it's as a greyscale image in 256 shades of grey. It treats the mid-tone grey as zero. MojoWorld interprets black as 0 and white as 1. The displacement amount is measured in meters. This allows the displacements to be very accurately scaled in the Input Curve in this texture leaf.
Here is the Input Curve for an example bump map.
The Min / Max Input values are left at 0 and 1 respectively, as those correspond to black and white in the bitmap node. The center point isn't required, it's just there to show how an input of 0.5 is mapped to 0. The Min and Max Outputs correspond to the amount of displacement, in meters. Negative values push the terrain's surface out and positive values push the terrain in. The curve is inverted so that the white areas of the bump map correspond to pushing the terrain out. The range of -5 to 5 was chosen based on the size of the Parameter Bomb. This particular Parameter Bomb measures approximately 300 meters on a side, so the 10 meter range is around 1/30th of the whole Parameter Bomb. 30 meters would be a suggested maximum for an area of this size.
Here's a completed render of the terrain with a different diffuse color map and a bump map: