Fork me on GitHub

Images, sound and movie formats

This tutorial shows what type of image, sound and movie formats can be used in x3dom and what are the features and restrictions.


You can use PNG, JPEG or GIF to encode your static Texture data. JPG has a low memory profile but has a lossy compression and it does not support alpha channels. PNG compression is lossless and can handle alpha. GIF is also lossless and has alpha.

General: If you do not need an alpha channel and the content does not have hard edges (e.g. Text) use JPG. Otherwise use PNG. You should really not use GIF anymore. PNG is more flexible for future content (e.g. 16-bit channels).

<ImageTexture url='foo.jpg' />


You can use WAVMP3 and OGG for sound sources. All UA should support WAV. If you would like to use compressed formats (e.g. MP3 or OGG) provide alternative encodings in your AudioClip node.

<AudioClip url='"foo.wav","foo.ogg"' />


There is right now no single movie file supported by all UA. Use this link to check your browser.

The best solution right now is to encode your content as MP4 and OGV movie and provide alternative sources in your MovieTexture node.

<MovieTexture url='"foo.mp4","foo.ogv"' />