Making the most of the vrml exporter in 3DS MAX 3 and higher
Exporter settingsThis is covered in the referance manuals that come with 3ds max. This section also explains some vrml principles.
Texture sizeKeep texture size, both x and y, and file size to a reasonable limit. Re-use textures where ever possible. Keep texture resolutions as 64, 128, 256, 512 etc, this is the 2^x rule, try to follow it where possible. For example downsize 512x512 textures down to 256x256, 128x128. Doing this makes the textures look better in the vrml world, and also helps the scene render a little faster or use less video memory.
Improving on 3DS MAX vrml code
Remove unused codeThe first thing to do is check the .wrl file for Timesensor nodes with a cycleInterval of 3.333 or 0.333 . TimeSensors are used to control animations but max often creates TimeSensors which aren't linked to anything. These are often located just below Lights and have a cycleInterval of 3.333 or 0.333 0.0333 . To find out if a scene which has animations has unused TimeSensors look at the bottom of the file. The ROUTE instruction sends information from timesensors to Interpolators which control the animations. OrientationInterpolators effect rotation or scaleOrientation. PositionInterpolators effect location or scale. CoordinateInterpolators change/morph objects.If a TimeSensor doesn't have any ROUTEs in the file it can be deleted or commented out by putting # infront of the code lines. The TimeSensor's name will start with the name of the object it controls.
Typical unused timesensorDEF light01Timer TimeSensor {
Typical used Timesensor
DEF ManTimer TimeSensor {
Break up file into sectionsVRML allows vrml files to load other vrml files to add more code, functions or objects to the World. This uses the Inline helper tool in 3DS MAX.You can either save bits of your 3DS MAX scene into seperate vrml files and add the code to whichever file you want loaded first or create a new file which has the Inline code only and Navigation Info and lighting only.
PROTOs are used to create new commands which can be used to transfer information or simplify creation of complex objects. A complete course on PROTOs is beyond the scope of this artice. I will cover this subject at a later date.
PROTO Tree[ This is and example of a simple PROTO which makes a new object called Tree at location x y z. Many PROTOs are much more complex than this and often have JavaScript programs to calculate functions or make new objects from inputed data.
Tree { This makes uses the new tree at location -3 0 0
Create reuse of objects3DS MAX can clone objects but it uses copy rather than instance. This results in a complete copy of the original rather than a reference to it. VRML allows the reuse of objects which can be moved, scaled, and rotated. Reuse of objects can reduce file sizes massively.
If you have an existing vrml or MAX file that uses copy instead of instance you have two options. The first is to redo the scene in MAX using instance in place of copy. The second is to use a VRML design tool like ISB from Parallel Graphics to do the same task. Simply load the file into the program and one copy of select the object you wish to copy. Select copy and move, rotate and scale the copy until its in the same postion as the cloned object created by max. Repeat the process copying from the same object each time. You can now delete the max cloned objects and keep the one original and the several copies.
|