Contributors

VRMLworks

comp.lang.vrml FAQ Answers
2. Common problems

  1. My world looks fine on my machine, but when I put it on my website, all I get is text.

    This used to be the most frequently asked question on comp.lang.vrml. Here's why it still comes up.

    When you're viewing files on your local machine, most browsers (HTML and VRML) will look at either the file extension (e.g., in file "foo.wrl", ".wrl" is the extension) or the MIME type, "magic" value, or application associated with the file by the operating system.

    When browsers get files from the net, they rely on the web server to supply the MIME type for the file as part of the HTML stream. You are probably the first person to ever have a VRML world on that machine, and the webmaster hasn't set up the server to indicate the appropriate MIME type. Since most web servers default to "text/plain" when they don't have a MIME type assigned, that would explain why you get text.

    What you should do is ask the webmaster at that machine (nicely) to add the following MIME type definition to the HTTP server:

    model/vrml	wrl
    

    The exact method for doing that varies from server to server. For NCSA httpd (all known versions) either add the line above to <DocumentRoot>/conf/mime.types or add a line to <DocumentRoot>/conf/srm.conf that says

    AddType model/vrml .wrl
    

    Depending on the server, the webmaster may need to kill off and restart the HTTP daemon or server process, and you'll probably need to clear out your browser's cache so that it doesn't serve you up the local copy of your world, still encoded as text.

    Don't forget to thank your webmaster.

  2. All I see on my screen is black -- help!

    Several years ago I said to my doctor, "I don't feel good." He replied, "Unless you're more specific than that, I'll have to operate."

    If you tell us:

    you'll find a number of people on comp.lang.vrml who not only want to help, but now can help.

  3. When I select my VRML file foo.wrl.gz [on my local disk/on a website] it opens my unzip application instead of my VRML browser.

    This is a well known bug in some web browsers. The workaround is to rename the file "foo.wrl" even though it's a gzipped file. All VRML browsers I know of are smart enough to load the file properly. If the file is on a website, save it to your local disk and rename it. And write a nasty letter to the people who made your web browser telling them that if they don't know the difference between a "Content-encoding" type and a "Content-type" type, you do.

  4. How can I visit VRML worlds in my AOL browser?

    Does anybody know the answer to this?

  5. The ["javascript:"/"vrmlscript:"] URL doesn't work.

    That's a historical artifact. The history is in the answer to another question. Basically, earlier versions of Cosmo Player can interpret vrmlscript: scripts and can't interpret javascript: scripts. Other browsers can interpret javascript: cripts but not vrmlscript:.

    If it's a VRML world you're building, remember that you can specify multiple URLs for scripts. Write your script like this:

    DEF Diode Script {
      eventIn SFBool in
      eventOut SFBool out
      url [ "javascript:
        function in(value) {
          if (value) out = true;
        }
      ",
      "vrmlscript:
        function in(value) {
          if (value) out = true;
        }
      "]
    }

    If it's someone else's world, if you really think you'll like the world, download it to your machine and change the url type to the one your browser likes. And send the author a note reminding her that folks with your browser would like to see that world too.

    Note: early versions of Sony's Community Place browser only accept Java Scripts and don't accept javascript: or vrmlscript: Scripts.

  6. Where is the center of rotation of the EXAMINE navigation type?

    Nobody knows. The spec doesn't say. I once caught Gavin Bell in the hall between meetings at a VRML Symposium and told him about the problems I was having when I switched to EXAMINE in the Tenochtitlan world, and the world revolved about the origin, several miles away. Gavin's advice then is still good: don't do that.

    Some browser makers have put a description of the algorithm for EXAMINE in their release notes, but it really doesn't matter. If you want the visitor to your VRML world to examine an object, put in sensors and tools to let her do that easily. Don't rely on your visitor having a particular browser.

  7. Can you give me a crack for [modeling program]?

    No.

    One of the things that may make the difference between success and failure for VRML is whether or not the companies who are making tools that support VRML succeed or fail. And certainly one thing that may make the difference between whether those companies succeed or fail is whether people cheat them out of the money they've rightfully earned.

    The VRML pioneers haven't quite pledged their lives, their fortunes, and their sacred honor, but many of them have made considerable sacrifices. It's only right that we respect that.

    Besides, some of the best VRML worlds out there have been built by hand using nothing more than a plain text editor.

  8. How do you turn off gravity?

    You probably don't have a NavigationInfo node in your file. The default type when you don't have one is ["WALK", "ANY"]. "WALK" turns gravity on. "FLY" is the rough equivalent to "WALK" but with gravity off (the spec leaves a little wiggle room in case browser makers want to have a different set of controls for flying). So if you already have a NavigationInfo node in your file, change "WALK" to "FLY", and if you don't have one, add one like this:

    NavigationInfo {
      type ["FLY", "ANY"]
      headlight FALSE
    }

    I tried to sneak a personal prejudice past you there: I hate VRML worlds that rely on the headlight for lighting. Turn it off and put in some lights that light the world the way you want it to look.


[line]

Did I leave something out on one of these questions that you need to know? Let me know.

-- Bob Crispen
-- Monday, June 22, 1998