the tips and tricks page     
introduction    models    textures    tips    tools

Over the years we've collected some important tips and tricks that we've never seen in any VRML manual or tutorial. From semi-invisible objects to how to get around that pesky filesize limit in VRCreator, they're on this page. We've even tracked down how to have your own 3D chatrooms, using your own custom pages.

File Size Limits

At the top of every .wrl file you write in VRCreator, you'll see something like this:

#VRML V2.0 utf8
# (c) 2003 Pacoima Ranch Offices, All rights reserved.
# http://www.pacranch.com or 1-310-326-8092 or webmaster@pacranch.com

Background {
    skyColor 1 1 1
    frontUrl "simplenight1.jpg"
}

WorldInfo {
    title "virtualimmersionopener.wrl"
    info "made by Michael Dana Murphy"
}


It's perfectly OK to erase this part off of all except the first file when you are stitching many smaller .wrl files into a larger .wrl file to get around the file size limit. Just create a common terrain for all the files, then erase (usually via the Edit..Clear function in VRCreator) the unneeded duplicate bits. By using a common terrain, you can save yourself from having to remember precise XYZ coordinates, though using precise XYZ coordinates is also a good way to make many smaller files that stitch together nicely. Experiment with how it works and there is almost no upward limit to filesize--though try and have the gzipped .wrl be under 250K with 250K or less in graphics. Overly large files may load oddly. Smaller is better in VRML, just as it is in HTML. Use a plain text editor when stitching files together.

Graphics

As a rule, it's best to use .jpg's in the development environment. This doesn't mean that you need to stick with them though. Create your models and worlds using .jpg's as textures, then exchange them for tranparentized .gif's (see semi invisible objects, also), .png's (in Characterz Builder you must use only .png's). Though technically proper, use of .bmp's should be avoided due to large filesizes. You can make the exchange in your favorite plain text editor. We frequently make two versions of a file, one in either flatfile .png or .gif, and a second in .jpg for use in the development environment.

You can also make beautiful movie and animated texture affects by a little more hand editing. Assign any .jpg you like to the object, then find this part of the file:

   }
      texture ImageTexture { url "ball_glow.jpg"
        }


In the sample above, ball_glow.jpg is the name of the graphic you attached to the object in the development environment. In reality you want an amazing animated .gif (or Flash 3 .swf, QuickTime .mov, 8-bit animated .png, 8-bit .mpeg) as the real texture. To do it, make the above part look like this:

   }
      texture MovieTexture { url "ball_glow_animated.gif"
       loop TRUE
        }


the loop TRUE  part is very important, it tells the MovieTexture to play and play continuously. Values other than TRUE are also possible. Be sure to NOT use Compress Mode in Flash, it adds extra code that makes the movie fail in VRML. The .mpeg or animated .png files should be 8-bit, that's the current support level in VRML.

Because we've seen so many people struggle to get MovieTexture to work, the small VRML panel to the left is a cube with its front textured using an animated .gif file. You should not attempt to apply Movies in VRCreator, do it as a handedit. You can find all the files involved by looking in your Blaxxun or Bitmanagement cache.

On a design note, using Flash as a MovieTexture can make your worlds run very slow, even if the movie is a very small filesize. Animated .gif's will sometimes slow down a world, but not as fast as Flash movies do. Also note that all your FSCommands, URL hooks and similar FlashScripting will not work in VRML, just the basic animation will run. Due to recent changes in Internet Explorer, RealPlayer G2 and Contact (Blaxxun or BS VRML), MovieTexture usually jams the browser and should be avoided. Your webmaster has attempted to get support from Bitmanagement on this issue, but is currently being ignored on the MovieTexture problem.

You can also avoid certain lighting problems by how you use graphics. Rather than using ambient or specula color to paint an object (with the attendant too grey problem), texturize the object with a small .jpg of a solid color. Using ambient and specula color with a texture makes the object frequently look very good in low light situations. Our texture library (see the Texture Page), has many very small .jpg's in solid colors for this. An additional way to change how models and worlds look is to hand edit the shininess lines in the .wrl file. By changing the shininess attributes from something like shininess 0.3945   to shininess 0, you can give the finished model and worlds a more gamelike appearance. We usually "save a copy" for backups purposes before doing this type of hand edit in case the finished result is nasty.

Don't forget to remove the extra path information from your .wrl files. Chances are your VRML authorware may add something like this inside the texture ImageTexture  lines:

}
  texture ImageTexture { url "file\\/c:\vrmlauthorware\images\textures\bitmap.jpg"
  }


This needs to be removed before you upload to the 'Net or the file will fail to load correctly. Use your favorite plain text editor to do this so that the line now appears like:

}
  texture ImageTexture { url "bitmap.jpg"
  }


Using the Save Package choice will also do this as well as save all graphics to the assigned folder. Programs other than VRCreator usually have a similar feature that cuts out the unneeded garbage from the ImageTexture { url: tags and moves the graphics to the same folder as the .wrl file.

Shininess

An additional way to change how models and worlds look is to hand edit the shininess lines in the .wrl file. By changing the shininess attributes from something like shininess 0.3945   to shininess 0, you can give the finished model and worlds a more gamelike appearance. We usually "save a copy" for backups purposes before doing this type of hand edit in case the finished result is nasty - highly detailed models with many highly patterned textures don't always work. You can also make an object appear more like shiny plastic or metal by increasing its shininess value. As a general rule, no shininess should exceed the 0.6000 mark. Also, the shinier the object, the more it absorbs and reflects colors and shadows from the objects around it, so the too grey problem may become obvious.

It is not possible to create a mirrored object no matter what the shininess value. So-called VRML mirrors are actually obverse copies with a semitransparent wall (or floor - think lakes) between the viewer and the obverse copy. This obverse copy effect really does look exactly like a mirror, but greatly increases file size. As a rule, it should be avoided.

Semi Invisible Objects (Transparency)

Sometimes you need an object to be partially visible, partially invisible. This is actually a very easy effect. There are two different ways to do it, depending on how you want the end result to look. Some VRML authorware will also offer special "screen punch" effects to create semi transparent glass. These examples assume that your authorware does not offer this choice. To achieve a semi invisible all over effect, create your object as normal and attach the "gonna get switched" .jpg to it. In your favorite plain text editor, find each line ABOVE this graphics line and change the transparency value to exactly 1:

        transparency 1

Now switch the graphic to an alphachannel partially transparent .png file or carefully dithered and transparentized .gif file. Reset the transparency back to about 0.8 for best results. This can be used to make really cool "light through the leaves" type effects. Best in small doses, and we rarely use it, but it is a choice. Note that avatars can NOT walk through the transparent parts. Transparent glass has had the same thing done, only no graphic is assigned, just a color (usually blue, green or grey, use 0.6 to 0.8 as the transparency value). In addition, some authorware will offer this type of "light falling from above" as a set effect.

A second way (suggested above) is to take a model that is more or less the right shape as you want. Reset the trasparency value to exactly 0:

        transparency 0

Now switch the graphic on the model to a transparentized .gif or .png file. This is a fantastic effect for making slatted boxes with seethrough areas (use a cube as the model), seethrough parts of a multilevel structure (note, avatars may NOT move through these objects, so use sparingly) or for creating a forest effect with lots of small plants around the base of trees ("jackflatting"). To do the "forest garden" effect, use a vertically oriented 2D plain, perform the transparency value change as noted above, then switch to a transparentized .gif of the plants. Medium sized models work best for this (about half the height of an avatar).

To create larger trees and such, very large files need to be made (about 700 pixels by 700 pixels), so filesize planning should be done to avoid overly large download time for surfers. You may also need to reduce shininess to zero with these effects. On any of these methods, if the object becomes 100% invisible, reset transparency back to 0. Here's an example of transparency (look out for the trees, they're actually jackflats). No handedit on transparency was performed, just a switch to a transparentized .gif file.

Deployment And Emplacement

Now that you've made your files, cleaned them, optimized them, made certain exchanges and recodings for special effects, you need to embed and upload them. For best results, keep all graphics in the same folder as the finished .wrl file. There are three basic ways to deploy and embed your files. The first is the fullscreen method. Simply create a normal A HREF type link:

Chat Tower Virtual Reality

You may use a long or short URL, they each work equally well. In this example a long URL with a TARGET="_blank" and TITLE="go fullscreen mode with Chat Tower" sub A HREF tags have been used so that the full screen opens in a new window with a nice text popup effect explaining the link. You may use this method or omit the TARGET="_blank" and TITLE="go fullscreen mode with Chat Tower" sub A HREF's. This is how the coding looks for the above example:

 <a href="http://www.pacranch.com/chatworld/chattower.wrl"
   target="_blank"
     title="go fullscreen mode with Chat Tower">
       Chat Tower Virtual Reality
         </a>


Another common method is to embed the file in an HTML (or similar) page. This looks like the sample below:

Do NOT place the command inside a table or IFrame as it will fail in some browsers if you do - the .wrl file will be compressed to exactly 1 pixel by 1 pixel (or 10 by 10 in CosmoPlayer), which looks nasty. You can use either a long or short URL. The HTML gods have again changed their mind and using the </EMBED> tag as part of the code is optional - it even fails in some browsers, so I've been leaving it out once again. We've hacked together a special multi plugin version of the OBJECT also so that a single OBJECT tagset can use ANY VRML plugin present on the surfers' machines. The ActiveX elements cascade from Blaxxun's Contact to ParallelGraphic's Cortona to CAI's CosmoPlayer, with a depracated EMBED in the middle for unknown plugins and ancient browsers to use. The code used in the above example looks like this:

    <object classid=
        "CLSID:4B6E3013-6E45-11D0-9309-0020AFE05CC8
         CLSID:86A88967-7A20-11d2-8EDA-00600818EDB1
         CLSID:06646724-BCf3-11D0-9518-00C04FC2DD79"
        name="CC3D" id="CC3D" width="95%" height="65%">
         <param name="SRC" value= "http://www.pacranch.com/chatworld/chattower.wrl">
         <param name="scene" value= "http://www.pacranch.com/chatworld/chattower.wrl">
         <param name="src" value= "http://www.pacranch.com/chatworld/chattower.wrl">
       <embed src="http://www.pacranch.com/chatworld/chattower.wrl" width="95%" height="65%">
    </object>


The third method is to create a VRML chatroom. To do this, your files must be uploaded to the 'Net, then bounced off the Blaxxun servers. The Blaxxun servers will create the chatroom, complete with chatpanels and several dozen avatar choices. You need to edit the pages to match your sites URL's, and to set preferences and variables. Takes just a few minutes and yields an elegant chat interface in 3D. Here's my copy of the pages. I always add in Voice support and make a lot of the colors different to match my pages. A typical change to the contact.bxx page is this:

server
port
scene

sname
message
3dscene
htmlframe
voicesupport
clientvoiceenable
botvoiceenable
noblaxxunicon
maxneighbourspp
panelbackrgb
paneltextrgb
bottextchatrgb
inputtextchatrgb
systemtextchatrgb
owntextchatrgb
othertextchatrgb
historytextchatrgb
avatarworld
   www.blaxxun.com
2000
http://www.pacranch.com/chatworld/nebulatower_indexconference_contact.bxx
Chat World 3D - Nebula Tower
Chat World 3D - Nebula Tower
Pacoima Ranch welcomes you
http://www.pacranch.com/chatworld/chattower.wrl
HTML
1
1
1
1
15
255,255,239
0,0,0
0,0,0
0,0,0
0,0,0
217,0,108
0,0,0
0,0,0
http://www.pacranch.com/chatworld/avatars/avatar_entrance.html

Setting voicesupport, clientvoiceenable  and botvoiceenable  to a value of 1 allows Voice to work in the chatroom. Special synthetic voice filters will speak the text as you type it. Setting maxneighbourspp  to a higher number allows more than six (6) people in the room at once (the default is 6). Set the avatarworld  attribute to a reputable public avatar page, the original Blaxxun pages are no longer always available. The choice above is our Chat World 3D avatar page. You may use this if you like. The other variables do what you think they do, controlling the color of text and backgrounds. Alter them to match your pages. If you like to muck around with raw variables, here's a text copy that covers most of them. Some of them only apply to fullon Platform server installations, but it's handy to see how to turn on or turn off certain features and how to change colors of the panels.

NOTE: Blaxxun seems to have recently emerged from bankruptcy little worse for the wear. It should always be remembered that the chatrooms they host for free are a gift to the VRML community, not a guaranteed contract. Also, the older Blaxxun Frameset Generator yields useless code (for most versions of Internet Explorer), so we're only mentioning it here in passing.

introduction    models    textures    tips    tools

visit our sponsor, they're absolutely great
visit VRDimension - 3D Chat at its best
this could be your ad, click here for details

Pacoima Ranch pagehits



© copyright 1999, 2002, Pacoima Ranch Offices. All rights reserved.

Best in any Generation 6 Browser (Netscape 6.x+, Mozilla 0.9x+, Internet Explorer 5.5x+, Opera 5.x+ and WebTV Classic or Deluxe Spring 2001). For best viewing, we recommend Internet Explorer 5.5x+ or 6.x+ and Opera 5.x+. These fonts are used throughout the site (click the name, unzip and install if you are missing any--Windows only, please) Arial, Arial Black, Arial Rounded MT Bold, Times New Roman, and Verdana.

click me and return to the main entrance to Pacoima Ranch     click me to go to the VRML Resources start page