Castle Game Engine
← Users Developers →
 
Intro
 
News
 
view3dscene
 
The Castle
 
All Programs
 
Forum
 
Donate
 
Engine
 
VRML/X3D
 
Blender
 

view3dscene (version 3.14.0)

"view3dscene" rendering tower with sunset sky
Tremulous ATCS in VRML, with 2 viewports and frustum visualized in right viewport
Horse model from 3DS file with bump map
Examine navigation tooltip, and some fog by texture layers
"view3dscene" rendering Tremulous creature from MD3
Lucy with our joints visualization

view3dscene is a VRML / X3D browser, and a viewer for other 3D model formats.

  1. Downloading and installing
    1. Optionally install GNOME (and other freedesktops) integration
  2. Features
  3. Navigation with keys & mouse
  4. Command-line options
    1. Capturing screenshots and movies of 3D scenes and animations
    2. Converting to VRML/X3D
    3. Other options
    4. Deprecated options
  5. Requirements
  6. Freshmeat entry

1. Downloading and installing

Download view3dscene:
 Linux<br/>(32 bit)
Linux
(32 bit)
 Linux<br/>(64 bit, x86_64)
Linux
(64 bit, x86_64)
 Windows<br/>(32 bit, works on 64-bit too)
Windows
(32 bit, works on 64-bit too)
 Mac OS X<br/>(32 bit)
Mac OS X
(32 bit)

If you like this software, please consider donating.

No installation is required. Just download and unpack these archives wherever you want, and run the view3dscene program inside. Included is also the tovrmlx3d program, useful for converting 3D models to VRML/X3D in batch (command-line) mode. The documentation (this web page) is also included inside, for offline viewing (open the documentation/view3dscene.html file).

This is free/open-source software. Developers can download sources of this program.

Demo scenes: our VRML/X3D demo models contains a lot of interesting models, you can open them all with view3dscene.

For Linux: Install also gtkglext on your system using your package manager. If you want to hear 3D sound in some VRML/X3D worlds, install also OpenAL and OggVorbis (VorbisFile and dependencies) libraries. For Windows: All useful libraries are already included in the archive, so you don't have to do anything. Mac OS X requirements are listed here.

1.1. Optionally install GNOME (and other freedesktops) integration

If you use GNOME (or other desktops following freedesktop.org specifications), you can optionally install also view3dscene menu item (will be placed in the Graphics menu category), with a nice icon, and associate it with appropriate 3D model types.

# Place view3dscene on $PATH, for example like this:
sudo ln -s /usr/local/bin/view3dscene view3dscene

# Install menu items, icons, mime types:
cd desktop/
./install.sh

You may need to logout and login again to your GNOME/desktop session for all programs to catch up (alternatively, you can do killall gnome-panel && killall nautilus but this is obviously somewhat brutal method).

If you use GNOME file manager Nautilus there's one more cool thing you can do: use view3dscene to generate on-the-fly thumbnails of 3D models in the viewed directory. Assuming that view3dscene is on the $PATH and you already did previous ./install.sh, you can run:

./install_thumbnailer.sh

This will add the gconf keys to run thumbnailers on your 3D models. Enter some directory with VRML / X3D / other 3D files, and enjoy your thumbnails :) Beware that loading arbitrary 3D scene may take a lot of time, so using the thumbnailer may consume a lot of memory and CPU power. But it seems that thumbnailer is nicely run with appropriate priority, so it doesn't actually exhaust your cpu. And the author of this text is using view3dscene thumbnailer all the time, and it works flawlessly :) So give it a try!


2. Features

Supported file formats:

Among many features are:


3. Navigation with keys & mouse

All navigation modes:

Examine navigation mode:

Mouse:
Rotate Left mouse dragging
Move Middle mouse dragging (or Left mouse + Shift)
Zoom Right mouse dragging (or Left mouse + Ctrl; or scroll wheel)
Keys:
Rotate Arrows
Stop rotating Space
Move Ctrl + Arrows
Scale + / -

Walk / Fly navigation modes:

Walk/Fly navigation controls
Mouse:
Forward / backward Drag up / down with left mouse button
Rotate Drag left / right with left mouse button
Move (strafe) left / right Drag left / right with right mouse button
Fly up / down Drag up / down with right mouse button
Raise / bow your head Mouse wheel
Keys:
Forward / backward W / S or Up / Down
Rotate Left / Right
Move (strafe) left / right A / D
Jump / Crouch (or fly up / down) Space / C
Run Shift
Turn Mouse Look On (Ctrl+M) to look around by moving the mouse.
It is usually comfortable to combine it with movement using AWSD keys.
Additional controls:
Increase / decrease moving speed + / -
Increase / decrease avatar height (preferred camera height above the ground) Ctrl + Insert / Delete
Rotate slower (useful to precisely set the camera) Ctrl + Left / Right

We also support 3D mouse devices, see the demo video about 3D mouse inside view3dscene.

There are many more operations with key shortcuts, that work in all navigation modes. Just explore the view3dscene menu, and look at the key shortcuts.


4. Command-line options

All options described below may be given in any order. They all are optional.

4.1. Capturing screenshots and movies of 3D scenes and animations

Command-line options:

  --screenshot  TIME  FILE-NAME
  --screenshot-range  TIME-BEGIN  TIME-STEP  FRAMES-COUNT  FILE-NAME

These options allow you to capture a screenshot of the loaded scene. They know about animations stored in 3D files, that's why they take parameters describing the animation time to capture. They are used to take screenshots in "batch mode". (In interactive mode, you can use comfortable menu items Display -> Screenshot....)

For a still 3D scene, you usually just want to use the simpler --screenshot option with TIME set to anything (like zero) and not worry about anything else.

For animations, more possibilities are available. You can capture any frames of the animation by using many --screenshot options. You can also capture a movie by --screenshot-range (as a series of images or, if ffmpeg is installed and available on $PATH, even directly to a single movie file). The biggest advantage of recording movie this way is that the movie is guaranteed to be captured with stable number of frames per second. This is different than using some independent programs to capture OpenGL output, like the fine GLC (nice GLC overview here), as real-time capture usually means that the program runs slower, and often you loose movie quality.

You most definitely want to pass 3D model file to load at command-line too, otherwise we'll just make a screenshot of the default empty (black) scene. So to take a simple screenshot of a scene, at it's default camera, just call

  view3dscene my_model.wrl --screenshot 0 output.png

The detailed specification how screenshot options work:

Examples:

Hints:

4.2. Converting to VRML/X3D

In interactive mode, you can use view3dscene menu items File -> Save As.. to save (converting if needed) all 3D model formats to VRML/X3D.

You can also change the X3D encoding (from classic to XML or the other way around). Changing encoding is a lossless operation, as the same nodes graph can be exactly expressed in both encodings.

All these conversions can be also performed in batch mode by command-line options described below. You can either use view3dscene with --write option, or you can use separate binary tovrmlx3d. Separate tovrmlx3d may be sometimes more desirable, as it's smaller, not linked with any GUI libraries (so it will work even on a stripped-down system) and has simpler command-line options (as it's purpose is only to convert).

Examples:

# Convert Collada to X3D
view3dscene input.dae --write > output.x3dv
# Same as above, but by tovrmlx3d binary
tovrmlx3d   input.dae         > output.x3dv

# Convert VRML 2.0 to X3D in classic encoding.
# You could add --encoding=classic, but it's not needed
# (it is the default anyway).
view3dscene input.wrl --write --write-force-x3d > output.x3dv
# Same as above, but by tovrmlx3d binary
tovrmlx3d   input.wrl               --force-x3d > output.x3dv

# Convert VRML 2.0 to X3D in XML encoding.
# You could add --[write-]force-x3d, but it's not needed
# (it is implied by XML encoding anyway).
view3dscene input.wrl --write --write-encoding=xml > output.x3d
# Same as above, but by tovrmlx3d binary
tovrmlx3d   input.wrl               --encoding=xml > output.x3d

Detailed docs of view3dscene command-line options for converting:

--write

Do not open any window, only write the 3D model to the standard output as VRML/X3D and exit. Other --write-xxx options affect the generated output. Model will also be processed by --scene-change-* options, if specified (see their docs lower on this page).

--write-encoding classic|xml

Choose encoding of the output file. By default, we use classic encoding.

This option is meaningful only when --write option is also used.

--write-force-x3d

Force output to be an X3D file. This is really useful only when input model is VRML 2.0.

Conversion to X3D is also automatically forced (no need to specify it explicitly by this option) if the chosen encoding is XML (that is, you used --write-encoding=xml). That's because only X3D supports XML encoding.

Summarizing, you only need to use this option when you want to convert VRML 2 to X3D in classic encoding.

When this is used on VRML 1.0 or Inventor models, we'll also convert parts of them to X3D. But the result is not really useful: you will get a file encoded using X3D keywords, but using VRML 1.0/Inventor node names. Real conversion from VRML 1.0/Inventor to X3D is not implemented (yet).

This has no effect when used on 3D models that are already X3D, or that can be only output as X3D (Collada, 3DS, etc.).

This option is meaningful only when --write option is also used.

tovrmlx3d has analogous options for converting, but without the write- prefix (as tovrmlx3d is only useful for converting). More precisely:

4.3. Other options

--hide-menu

Hide the top menubar. Useful for full-screen presentations.

--anti-alias AMOUNT

Use full-screen anti-aliasing. You can also configure it from the menu File -> Startup Preferences -> Anti aliasing. Using this command-line option is mainly useful together with --screenshot option.

Argument AMOUNT is an integer >= 0. Exact 0 means "no anti-aliasing", this is the default. Each successive integer generally makes method one step better. But also more demanding — program may run slower (if your graphic card cannot provide context with sufficient number of samples needed for multi-sampling). See Anti aliasing in interactive mode for the meaning of AMOUNT values. Currently, highest value is 4. So AMOUNT numbers above 4 are exactly the same as 4.

There is no guarantee what specific values of AMOUNT exactly mean, as this depends on your graphic card capabilities. The graphic cards themselves don't provide methods to reliably set some specific FSAA method (only hints, like glHint(GL_MULTISAMPLE_FILTER_HINT_NV, ...)) since the general idea is that better GPU models may provide the same or even better results using different methods. From your (user) point of view, you can test each method and just decide which looks best and isn't too slow on your 3D model and graphic card.

--viewpoint VIEWPOINT-NAME

Specifies the name or a number of the viewpoint that will be bound (used) when the scene is loaded.

By default, when this option is not used, we follow VRML/X3D standard and use the first viewpoint found in the file (but not in the inlined files). Of course you can always add nodes to the scene to trigger binding other viewpoints at the beginning (for example, add ProximitySensor with very large size that sends the enter event to the set_bind of chosen viewpoint). Or you can just exchange the order of viewpoint nodes. But sometimes it's not comfortable to edit the scene. Especially if you want to use the --screenshot options to capture a scene, it's useful to be able to choose a viewpoint by this command-line option.

If you use this option: when the given VIEWPOINT-NAME is a number, it is treated as the index of viewpoint to be used (0 means the first viewpoint, 1 means the 2nd viewpoint and so on). Otherwise, VIEWPOINT-NAME is treated as a node name (node name is given by "DEF Xxx" in VRML/X3D, and it cannot start with a digit, so this is unambigous).

In interactive mode, remember that you don't need this option — instead you can use comfortable Navigation -> Viewpoints menu.

As usual all standard options understood by OpenGL programs, standard options understood by OpenAL (3D sound) programs, standard options understood by all my programs are also allowed. Run with command-line --help to get full list.

4.4. Deprecated options

--scene-change-no-normals
--scene-change-no-solid-objects
--scene-change-no-convex-faces

Using one of these options changes the scene before it is displayed (or saved to VRML/X3D, if you used --write option). These options are useful when you suspect that some of the informations in scene file are incorrect.

These options change only the scene which filename was specified at command-line. Later scenes (that you open using "Open" menu item) are not affected by these options. Instead, you can use "Edit" menu commands to perform any of these scene changes at any time. Really, these command-line options are usable mostly when you're using parameter --write.

Below is the detailed description of what each scene change does. This is also a documentation what corresponding command in "Edit" menu of view3dscene does.

  • --scene-change-no-normals :

    Scene change: Clear normal and normalIndex fields, remove Normal and VRML 1.0 NormalBinding nodes.

    Effect: view3dscene will always calculate by itself normal vectors. Useful when you suspect that normals recorded in scene file are incorrect (incorrectly oriented, incorrectly smoothed etc.)

  • --scene-change-no-solid-objects :

    Scene change: For VRML 1.0, in all ShapeHints nodes we will set shapeType to UNKNOWN_SHAPE_TYPE. UNKNOWN_SHAPE_TYPE is the default value of this field, so the purpose of this modification is to cancel SOLID values for this field. For VRML >= 2.0, all solid fields are set to FALSE (on all geometric nodes, like IndexedFaceSet, actually all X3DComposedGeometryNode, Extrusion, etc.).

    Effect: program will not use back-face culling optimization. This optimization often saves us time because we don't have to render faces that would be seen from "inside" if these faces are part of some solid object. Unfortunately, many VRML models have objects incorrectly marked as solid. There are also some scenes that were prepared for some special viewing (e.g. as game levels) and so some amount of "cheating" to optimize these scenes was allowed, e.g. to mark some non-solid objects as solid.

    To view such models properly you have to tell view3dscene (using this command-line option) that such objects are not really solid.

  • --scene-change-no-convex-faces :

    Scene change: For VRML 1.0, in all ShapeHints nodes we will set faceType to UNKNOWN_FACE_TYPE. Moreover we will wrap whole scene in Group node and we will add at the beginning node

    ShapeHints { faceType UNKNOWN_FACE_TYPE }
    For VRML >= 2.0, all convex fields are set to FALSE.

    Effect: All IndexedFaceSet and Extrusion faces will be treated as potentially non-convex. This means that we will load the scene a little longer but all faces will be correctly interpreted and displayed. It's useful when you suspect that some scene faces are non-convex but it's not correctly marked in the scene by VRML author.

Example: I have here some model helicopter.wrl that looks incorrectly when it is displayed because all parts of model are marked as SOLID while they are not solid. So to view this model correctly I can use command
  view3dscene --scene-change-no-solid-objects helicopter.wrl
I can also correct this model once using command
  view3dscene --scene-change-no-solid-objects helicopter.wrl --write > helicopter-corrected.wrl.

Deprecated: I don't think the --scene-change-* options are useful. Doing this operation interactively is sometimes useful (to check bad models), doing it from command-line probably not (you better fix your exporter). Please report if you have a good reason to keep this working.

--camera-radius <float>

When you move in the scene with collision detection, the "user" is treated as a colliding sphere with given radius. Default radius of this sphere is the average size of scene bounding box divided by 100. Using this command-line option, you can set the radius of this sphere to any value (greater than 0). This can be very useful, but be careful: too large radius will make moving (with collision detection turned on) impossible (because every possible move will produce a collision). Too little radius may produce precision-errors in depth-buffer (this can lead to some strange display artifacts).

Deprecated: instead of using this option, consider adding/editing a NavigationInfo node in your scene (camera radius is taken from the first float on NavigationInfo.avatarSize). Editing your scene (or creating a VRML/X3D file that includes the original scene, by Inline node, and only adds some customization) is much more flexible.

--navigation EXAMINE|WALK|FLY|NONE...

Set initial navigation type. Default is EXAMINE. This can be overridden in particular VRML/X3D scene by using the NavigationInfo node. Valid values for this option are the navigation type names for VRML/X3D NavigationInfo.type, see link above.

You can always change navigation mode later, while the program is running: use the menu Navigation.

Deprecated: instead of using this option, consider adding/editing a NavigationInfo node in your scene. Editing your scene (or creating a VRML/X3D file that includes the original scene, by Inline node, and only adds some customization) is much more flexible.

--detail-quadric-slices <integer>
--detail-quadric-stacks <integer>
--detail-rect-divisions <integer>

These options control triangulating. Two --detail-quadric-xxx options control triangulating of spheres, cones and cylinders: how many slices (like slices of a pizza) and how many stacks (like stacks of a tower) to create. The 3rd option, --detail-rect-divisions, says how we triangulate faces of cubes. It's best to test how your models look in wireframe mode to see how these options work.

Note that my programs do two different variants of triangulation, and they automatically decide which variant to use in each case:

  1. Normal triangulation, that is intended to improve the approximation of quadrics as triangle meshes. This is used for collision detection and for ray-tracer.
  2. The so-called over-triangulation (it's my term, used in various places in my code and documentation and printed messages), that is intended to improve the effect of Gouraud shading. This is used when rendering models with OpenGL.

    In this variant we do some more triangulation than in "normal" triangulation. E.g. in normal triangulation we don't divide cones and cylinders into stacks, and we don't divide cube faces (because this doesn't give any better approximation of an object). But when over-triangulating, we do such dividing, because it improves how objects look with OpenGL shading.

Deprecated: instead of using this option, consider adding/editing a KambiTriangulation node in your scene.


5. Requirements

To play movies (in VRML/X3D MovieTexture nodes) and to record movies (by --screenshot-range option) you have to install ffmpeg and make sure it's available on $PATH.

Also convert program from ImageMagick package must be available on $PATH for some miscellaneous image formats to work. See glViewImage documentation for a list of image formats handled.


6. Freshmeat entry

Here's a link to view3dscene entry on freshmeat. You can use this e.g. to subscribe to new releases, so that you will be automatically notified about new releases of view3dscene.