Titania X3D Editor

It starts with you!

Titania v3.0.4

It starts with you!

X3D Reference

Importing 3D Objects and other Media

Importing 3D Objects and other Media

X3D can contain a variety of media including 3D objects, images, audio, and video.

Importing Objects as Inlines

Find it: Choose File > Import

When you import an object as an inline, a reference to the file containing the object is added to your scene file. The data within that file is not copied directly. Using inlines reduces file size, but it also places added responsibility on you for managing all the files you use as inlined references.

Creating Inline Objects

Use inline objects to break a large file into smaller pieces that can be downloaded separately. An inline object contains the URL for another file, either on the local system or anywhere else on the Web. Some browsers display bounding boxes for inline objects until the complete inline file is loaded. This technique allows users to navigate through a world while they are waiting for all the pieces to load. For complex files, inline objects are an efficient way to manage data for a large number of objects.

Editing Inline objects

When you have imported an object as inline reference, you may want to edit it directly without closing your current scene. The Outline Editor gives you the ability to change your current scene while preserving the last one. If you want to set an Inline node as current scene go to the Outline Editor place your cursor over an Inline node and open the context menu, then select Set As Current Scene. Your last scene is still loaded and can be restored with the Scene Menu above the tree view. Use the small arrow button to quickly change between scenes.

The Scene Menu

scene-menu

You may want to access nodes from an Inline node, see Imported and Exported Nodes for further details.

Importing 3D Objects

Find it: Choose File > Import...

(or drag and drop the file icon from the desktop into the browser surface)

You can add 3D objects, 2D images, sounds, and movies to your scene, either by adding the object directly to your scene or by importing the object using an inline reference. If you import the object as an inline, a reference to the file containing the object is added to your scene, but the file itself isn't copied. There''s no visible difference between an object imported as an inline and an object imported directly into the scene. Inlines are often used for complex geometry and for textures, to keep your file small and to reduce transmission time.

Importing Images

Find it: Choose File > Import...

(or drag and drop the file icon from the desktop into the browser surface)

Importing an Image

When you import an image, the image is »pasted« as a flat rectangle in the scene. The width and height of the rectangle depends on the resolution (usually in dpi) set in the image. If there is no resolution set in the image a resolution of 72 dpi is considered.

The image can be in any format ImageMagick supports. Typical web image formats are PNG, JPEG and GIF.

Textures

Often, you'll import images and then apply this new texture to the objects in your scene:

  1. Select an object
  2. Deselect File > Import As Inline
  3. Choose File > Import...
  4. Choose Images as File Filter
  5. Choose the image you want to import as texture

Instead of point 2 to 5 you can also drag and drop an image from the desktop into the main window.

Tip: Use small textures up to 128 × 128 pixel and remove the alpha channel if not needed, this speeds up load time and reduces file size. Texture sizes should be a power of two.

Importing Sounds

Find it: Choose File > Import...

(or drag and drop the file icon from the desktop into the browser surface)

You can import sounds into your file using the File > Import... option, or by dragging and dropping file icons directly from the desktop.

A global sound is created at the origin, pointing down the Z axis, and with default minimum and maximum ranges. The URL is set to the name of the file you imported, and the name is base name of the file. The loop field is set to TRUE, i.e. the sound immediately starts playing.

All sound files supported by GStreamer can be imported. Typical web audio format are MP3 and AAC.

After you import a sound, you'll need to create a trigger so that the sound will be played when the specified type of event occurs (clicking an object, entering a world, coming close to an object). Also, be sure to adjust the range of the sound so that it can be heard at the desired distances.

Importing a Movie

Find it: Choose File > Import...

(or drag and drop the file icon from the desktop into the browser surface)

Importing a movie works the same way as importing a image. The movie can be in any format GStreamer supports. Typical web movie formats are MP4 and FLV.

Supported File Formats

You can import the following file formats into a Titania scene:

  • VRML 2.0
  • X3D Classic Encoding
  • X3D XML Encoding
  • SVG Scalable Vector Graphics
  • PDF Portable Document Format
  • Autodesk 3DS Max File
  • Wavefront OBJ File

All format can be compressed using GZip compression.