Modeler to VRML Procedures
Creating a Cell for Export to VRML:
- Use the RE-EVALUATE TREE tool to change the geometry attribute of the solids.
(It is usually recommended that all solids be created with the Geometry attribute of Wireframe as, in general, this makes working with solids in MicroStation Modeler far more efficient. Also wireframe storage requires less storage space and it is easier to accurately snap to points on solids.)
- Create cells for individual objects using a common cell origin. Select object, define cell origin, create cell. World coordinate system origin recommended. You may want to create a new cell library for the project.
- Change the active level and place the cells at the common origin.
(Use the PLACE ACTIVE CELL tool with RELATIVE "on" to place the cell on a different level than the one it was created on.)
- Export to VRML.
Exporting to VRML from Modeler
- File > Export > VRML World... opens the settings box.
- Miscellaneous Settings
- Version - This is the VRML version. Set to 2 (version 1 is obsolete).
- Export Live3D Extensions - Grayed out - VRML 1 only
- Export Orthographic Cameras - Grayed out - VRML 1 only
- Check Export Linear Geometry to make sure lines, acrs, strings and curves are exported as Indexed Line Sets in VRML. Otherwise they will be excluded.. (Recommended)
- Check Drop Cells To Components only if you do not want to use instancing or do not want cells separated into their own groups. See Cell Notes below for the advantages of using cells.
- Check Drop Text To Components if browser does not read Ustation text. (I have not tested this yet.)
- Check Export Surface Normals for best rendering of curved surfaces.
- Check Y Axis Up to rotate the Ustation model 90 degrees on the x axis. This orients the model properly for VRML. (Recommended)
- Check Indented Output.for a more easily edited VRML file. The various VRML code sections are hierarchically indented. (Recommended)
- Check Compress Output File to compress the VRML file into GZIP format. Not all browsers can read a GZIP file.
- Check Export Higher Order Surfaces - to export Ustation primitives to VRML primitives. (See below fo more on primitives)
- Check Export Animation if you want your Ustation animation to be exported to VRML.
- Check Loop Animation if you want you animation to run in a continuous loop in VRML. The animation will begin as soon as the VRML file is loaded in the browser.
- Click on Animation Filename Browse if you want a different animation script to be used other than the current one.
- Frames per Second - set to frame rate wanted in VRML file. (default is 10)
- Tolerance (pixels) This setting effects the polygon count of curved surfaces that are exported to VRML IndexedFaceSets. The value specifies the maximum difference in screen pixels between a curved surface and the IndexedFaceSet in the VRML file. The range is .001 to 100 (default is 2)
- Decimal Precision controls how many decimal places are generated for coordinate data in the VRML file. Larger values increase the precision of the coordinate data, but increase the file size as well. Decimal precision values can range from 1 to 10. (default is 3)
- Image File Settings
- Only check Full Image File Paths if you want the VRML file to look in a specific directory for image files rather than the current directory (same directory as VRML file). Not recommended since some browsers only look in the current directory.
- Check Export Image Map Files if you want Ustation to save a copy of the image file (texture map image) to the current directory. Recommended for three reasons:
1. Some browsers only look in the current directory for the image files
2. Makes it easier to copy the necessary files when publishing to the internet.
3. You can reformat and optomize the image file for publishing using the following tools.
- Image File Size is really the image spatial resolution or image size which indirectly effects the file size. Set to the smallest size possible while still retaining sufficient resolution. You want to all files to be small to minimize download times but you don't want texture maps that are not convincing because of low res, fat pixeled images. Choose Original if you need all the resolution of the source file or you want to use GIF format. (This setting is only used if Export Image Map Files is checked.)
- Set Image File Format to JPEG if the image is photographic and you want high a compression ratio. Use PNG if you need texture maps with transparency or if you have hard edge graphics in your image file (similar to GIF). TIFF format supports the widest range of color depth options. If you are uncertain which format to use then use JPEG. It is supported by most browsers and offers the highest compression ratio.
- Set Compression (JPEG only) for highest acceptable loss. Again, small file size means short download time.
- Set Color Mode to lowest acceptable color resolution for smallest file size. Grey Scale or Monochrome will create the smallest file size while 24 bit the largest. (Not used for Original)
General notes:
- Modeler causes all shapes to become indexed face sets in VRML. Modeler primitives do not export as VRML primitives but regular MicroStation primitaves do.
- Creating cells of each part in the design will define named groups in the VRML file.
- Shared cells (instanced) in MicroStation are maintained as instances in VRML.
- Instantiation can reduce the file size significantly which means faster download times.
- All instances share the material properties of the first instance. However you can change the attributes by going directly into VRML and typing in different materials textures etc.
- Only displayed levels are exported.
- The default viewpoint in VRML is the view you select after starting the VRML export tool (view to export). Make camera settings in this view window appropriate for the opening VRML view such as view angle, lens angle etc.
- The other VRML viewpoints are based on the 8 standard Ustation views and include their view angles.
- One foot in Ustation (class2.dgn seed file) equals 1 unit in VRML.
- Surface normals on curves surfaces may sometimes be reversed. In this case open the file in a text editor and search and replace the following: replace: ccw FALSE; replce with: ccw TRUE
- The following regular MicroStation (not Modeler) surface geometric primitives export to VRML primitives.
Sphere - Surface orientation does not export with Higher Order Surfaces checked.thus affecting texture map orientation in VRML. VRML sphere axis is always parallel to the Y axis. Texture map orientation is retained if sphere becomes a IndexedFaceSet (texture coordinates are established).
Cylinder - VRML primitive has end caps regardless of Ustation cylinder. Texture maps prevent them from remaining primitives. End caps are created with different surface orientation.
Cone - Exports to VRML primitive only if the cone comes to a point (no top radius).