X3D Best Practices

This is the initial attempt to define "Best Practices" for creating X3D scenes, especially for handling X3DOM (X3D V4).

An important starting point is the X3D Scene Authoring Hints page developed by Don.

The goal with this page is to help someone starting out to make the best choices in developing a scene to be displayed in a browser. It is meant as entry-level document and needs to have lots of images and coding examples (but probably not all in one document).

This is the initial list of topics that need to be addressed. Some of these may be more specific to X3DOM and may be best as a "side-bar" document.

  1. HTML structure
  2. External libraries (JS and CSS)
  3. X3DOM code in HTML
  4. Reference to external files
    1. Cross-site scripting limitations
    2. URLs
    3. Multiple URLs
  5. Nodes to use / not use
  6. DEF vs. ID
  7. Javascript interface
  8. Content authoring tools (a more focused list than the one at http://www.web3d.org/x3d/content/examples/X3dResources.html#AuthoringSof...)
  9. For exporting X3D files, from authoring application or conversion utility
    1. Ensure that DEF values are unique, do not start with a number, do not use whitespace or special characters.
    2. Define useful "description" fields for all defined viewpoints
    3. Define at least one viewpoint that will show the user a meaningful "view all" display
    4. Do not use spaces or special characters in file and folder names
    5. provide relative paths, which allows retrieval from a local server, in the MFURL paths for ImageTexture Inline, AudioClip and MovieTexture nodes. An additional absolute URL from a remote server may also be provided as backup.
    6. Provide a file-level UNIT statement , to allow for combining models while maintaining proper size relation
    7. Give authors the option at export time to specify the value of the 'solid' field for each shape that has this field.
    8. Export geometry using simple shapes (Box, Sphere, Cone, Cylinder). Remember that using a Transform node with directional scale will allow any rectangular prism to be rendered with Box, and any ellipsoid to be rendered with Sphere.
    9. LineSet and PointSet shapes should have color specified in the emissiveColor field of a Material node.

 

Back to X3D Ecosystem page