VRML on the Macintosh

VRML on the Macintosh FAQ

Version 0.4.4
1st November 1999


 

1.0 Getting Started

1.1 What do I need to view VRML on my Mac?

There are several VRML viewers for the Mac that are available for download. CosmoPlayer and Worldview are caught up in the buyout of Platinum by Computer Associates and currently are not being developed. Inspite of this, CosmoPlayer remains our best suggestion. Cosmo Player 2.1. Cosmo Player is a plug-in for Netscape Navigator/Communicator and later. It is free, unsupported, software.

New projects include "Twirl" from Zap Technologies and "Lookat" a port of the Lookat/LibVRML97 for the Macintosh. (see our tools page for details)

The suggested configuration for Cosmo Player is:

  • Power Macintosh with Mac OS 7.6.1 or later
  • Netscape 4.04 or later
  • 20MB disk space
  • 16-bit color depth

Cosmo Player will run under Netscape 3.0 / System 7.5 and has tested up to the early G4 systems and OS 9.

The Mac version of Cosmo Player requires plenty of RAM to work efficiently. Cosmo Player can be used on a machine with 64Mb, but you should have more if you intend to run other applications simultaneously or do VRML development yourself.

IMPORTANT: Give Netscape 40Mb for casual use or 60Mb if you are a VRML developer. Cosmo Player works fine with virtual memory turned on. See "4.1 Netscape freezes when it tries to start Cosmo Player or load a model" below for more details about memory allocation. Failing to increase Netscape's memory partition has led many people to believe that the Mac version of Cosmo Player does not work.

If you don't have as much as 64Mb of RAM then you could try Intervista WorldView. WorldView has more modest memory requirements than Cosmo Player, but is less compliant to the VRML standard and renders worlds differently. We would only recommend trying WorldView if you have a Mac with less than 64Mb of RAM and/or a processor of 100 Mhz or less.

A PowerPC G3-based Mac is the ideal platform for VRML, but a 603 or 604 processor will often suffice. The more complex a world is the more powerful a processor you will need to view it efficiently. Cosmo Player will not run on m68k Macintoshes.

We recommend a 3D graphics accelerator with at least 4Mb of VRAM. Cosmo Player will work on a machine without 3D hardware acceleration but some of the larger worlds may run too slow to be usable. Make sure that you have recent drivers for your graphics card.

1.2 Can I use Internet Explorer instead of Netscape Navigator/Communicator?

No.

1.3 Where can I find out more about VRML?

The following sites are particularly useful:

The VRML Works is the home of the comp.lang.vrml FAQ . Many of the VRML/Web3D working groups have useful FAQs too. These can be found via the Web3D Consortium site.

1.4 Is there a mailing list for Mac users and developers?

Yes. The mac-vrml-x3d mailing list is hosted by eGroups:

<http://www.eGroups.com/list/mac-vrml-x3d/>
 

2.0 Multi-User Systems

2.1 Are there any multi-user systems that work on the Mac?

Yes. VNet works well on the Mac. Deep Matrix almost works.

2.2 How do I run the VNet server on a Mac?

You need to use JBindery (a utility that comes with Apple's Java SDK).

The procedure in detail is this:

  1. Put all of the Java class files for the VNet server together in a new folder
  2. Start JBindery
  3. In the "Class name:" field of JBindery, type VSystem
  4. In the "Optional parameters:" field, type 8888
  5. Click on the Classpath icon
  6. Click on the "Add Folder..." button and select the folder you put the class files in
  7. Select the added folder which should have appeared in the "Additions to class path:" list
  8. Click on the "Make VFS" button
  9. Click on the "Save Settings..." button
  10. Type VNet Server in the text field, tick "Save as Application", and then click on the "Save" button
  11. That's it. Either click on the "Run" button in JBindery or exit JBindery and double click on you new VNet Server application. The class files have been packaged in the application so you can throw the originals in the trash if you like
 

3.0 Creating Virtual Worlds

3.1 What do I need to start creating my own virtual worlds?

A 3D modelling package that can export VRML and a good text editor are all that you need to get started with VRML. See the MacWeb3D site for a list of 3D modelling packages, utilities, code generators, optimisation tools, and other development tools that can be useful for creating virtual worlds.

For some tools, you will need to have Apple's Java and Java SDK installed on your machine. Both of these can be downloaded from the Mac OS Runtime for Java. site. You will also need a Java compiler if you intend to do any Java Script Authoring Interface (JSAI) or External Authoring Interface (EAI) programming.

3.2 I have some cool 3DMF and DXF geometry files. Can I convert them to VRML?

Sure. The easiest way to convert them is to import them into a 3D modelling package, and then export them as VRML 2.0/97. Note that this enables you to use a number of interesting tools that generate DXF and 3DMF to create interesting VRML geometry.

3.3 I'm having trouble compiling Java code for Script nodes and/or the Java EAI

Make sure that cosmoplayer.jar (in your Netscape Plug-ins folder) and java40.jar (in your Netscape Essential Files:Java:Lib folder) are in your Java CLASSPATH.

3.4 Are there any dedicated VRML development environments for the Mac?

There are no WYSIWYG tools for the Mac where you can work directly with VRML 2.0/97. Flamingo Optimizer is a Java-based tool from Novafex that enables you to view the scene graph defined in a VRML file and create or modify nodes, but you cannot use it to model complex shapes, for scripting, or routing. For Mac VRML developers, the primary development environment is a combination of a 3D modelling package and a text editor. If you really need a WYSIWYG VRML development tool then a PC emulator and a Windows-based VRML development application such as Spazz3D is usable (really!) on a fast Mac. Many of us consider Chisel from Trapezium an essential tool for optimising our VRML files.

3.5 Which text editor do you recommend?

You can use any text editor you like. SimpleText is enough for some people, but can be difficult to use for debugging VRML code since it doesn't enable you to go to specific line numbers. BBEdit, BBEdit Lite, Alpha, Emacs and other feature-rich text editors are ideal.

 

4.0 Troubleshooting

4.1 Netscape freezes when it tries to start Cosmo Player or load a model

You should allocate 40Mb (or more) of RAM to Netscape otherwise Netscape/Cosmo Player may run out of memory if you load anything much larger than a banner ad. In the Cosmo Player release notes it says at least 15Mb should be allocated to Netscape, but in our experience that is not enough. If you don't increase Netscape's memory partition at all then Netscape will freeze while trying to load the Cosmo Player plug-in. If you have enough RAM and intend to develop VRML code yourself then allocating about 60Mb to Netscape is a good idea to minimize memory-related instability problems.

Virtual memory can be used without problems or noticeable speed degradation if you have 64Mb or more real RAM. It is unlikely that you will be able to use Cosmo Player on a machine with less then 40Mb of real RAM (even with VM turned on to compensate).

4.2 The installer does not appear to have installed Cosmo Player properly

Some users have reported problems installing Cosmo Player on their machine. In particular, in some cases the installer fails to create a link in the Netscape Plug-in folder to the CosmoPlayer file in System Folder:Extensions:Cosmo: and fails to place the file cosmoplayer.jar in Netscape's Plug-in folder. If Cosmo Player fails to Cosmo Player fails to load after attempting to initialise Java then you probably need to copy the cosmoplayer.jar file from another machine where the software has been installed successfully.

4.3 Cosmo Player fails to load after attempting to initialise Java

You probably need to copy the cosmoplayer.jar file from another machine where the software has been installed successfully. See "4.2 The installer does not appear to have installed Cosmo Player properly" above for more details.

4.4 Netscape reports that it is low on memory or simply hangs after viewing a few VRML worlds

Cosmo Player leaks lots of memory (approx. 400k per world). This means that you will probably need to restart Netscape (or even Mac OS) occasionally in order to free up memory. This probably doesn't affect casual users much but when developing VRML code , you should be aware of the problem and restart occasionally to avoid crashing. In particular, if you use Extrusion nodes then you will find that Cosmo Player leaks memory very quickly indeed.

4.5 Some VRML files always cause Netscape/Cosmo Player to crash and I'm sure that it is not a memory or Java-related problem

Cosmo Player on the Mac appears to have problems with Shape nodes that have no geometry field set. If Netscape crashes while a VRML world is loading then check your VRML code to see if this might be the problem. If you have MacsBug installed, you'll see that it crashes in 'CreateCp6DInputSensor'. Unfortunately, there are a few VRML worlds on the Net that will cause a crash because of this bug because some VRML developers use Shape{} as the final LOD level in their LOD nodes. The workaround is to use Group{} instead.

4.6 Cosmo Player hangs while downloading textures

All G3 Macs have a built-in 3D accelerator but the earlier models only have 2 or 4 Mb of VRAM (Video RAM) which is also used as texture memory. If Netscape freezes while loading textures, and allocating more memory to Netscape does not help, then your 3D accelerator might be running out of texture memory. You can make more memory available for textures by switching to a lower display resolution and not using more than 'Thousands of Colours' as your display colour setting (Conix OpenGL only provides hardware acceleration for 'Thousands of Colours' anyway), but this might not be sufficient if you are attempting to view a VRML world that uses many large textures. To verify that the source of your problem is too little texture memory, load a working VRML world into Cosmo Player, set the renderer to 'force software rendering' via the graphics preferences window, then go back to the VRML world that was causing problems. If it works correctly with software rendering then consider buying more memory for your graphics card, if it is expandable.

4.7 Anything that uses the Java Script Authoring Interface (JSAI) or the External Authoring Interface (EAI) causes Netscape to crash always/frequently

In the Cosmo Player release notes, Netscape 4.04 is recommended. Cosmo Player works just fine using later versions of Netscape but there are Java-related issues that make it unstable, in particular when Java is used for scripting. Netscape will often crash when you close the browser window or while Cosmo Player is processing a VRML file that contains Java script nodes. Some things that do not work with Netscape 4.5 seem to work with Netscape 4.04. If it is any consolation, the JSAI is not particularly stable on the MS Windows version either.

In general we would recommend that Mac VRML developers use JavaScript script nodes wherever possible. If you do not have Netscape 4.04 and would like to try it then you can download it from here:

<http://www.dante.com/files/internet/applications/Com4_04_PPC.bin>

The Java EAI works quite well on the Mac under all version of Netscape from 4.04 and on. However, there are some instability issues on all platforms. If you intend to do any EAI work then check out the FAQ (located on the Web3D Consortium Website) as it contains tips that can help developers to avoid programming pitfalls that can cause Netscape to crash. An additional problem on the Mac is that Netscape's Java is relatively old (1.1.5) and some applets that compile and run using Apple's AppletRunner or Internet Explorer don't work.

4.8 Does Cosmo Player support MovieTextures?

Yes. Despite what is written in the Cosmo Player release notes, the beta version that is available for download from Platinum supports both MPEG-1 and QuickTime MovieTexture nodes. Note that QuickTime movie textures will only work with the Mac version of Cosmo Player since other versions do not support QuickTime. Cosmo Player plays movies from Netscape's cache so movie textures will not play if the cache is too small.

4.9 Can Cosmo Player use Apple's OpenGL libraries?

No. Cosmo Players needs to be recompiled to use Apple's libraries. Cosmo Player uses Conix OpenGL version 1.3, which is supplied with the Cosmo Player installer program. Apple's libraries, which are a further development of Conix OpenGL 1.5, are significantly faster than the libraries Cosmo Player currently uses.

 

Please send corrections, contributions, and constructive criticism to Michael.Louka@hrp.no


Author: Michael Louka (michael@macweb3d.org)
Last Updated: 22 June 1999