VRML Models
The main part of my work I do in C++ using OpenGL and OpenGL Performer
as well as other APIs for non 3D stuff.
However, I used VRML models to check out some ideas and concepts.
The models are converted from other 3D file formats using converters
built on top of OpenGL Performer including my own to read and write
VRML2 (geometry only).
VRML2 models provide the following advantages:
- provide all essential features of VR models
- are human readable and can therefore be processed even with
text editors
- involve VRML script (similar to Java Script) and can therefore
easily enriched with simple interactions
- are system independent (browsers available for nearly every
reasonable hardware and operating system).
Samples
Head Up Model
Bag Protect
Compress VRML Files
Due to its human-readability VRML files tend to become very large.
This does not fit so well into the Internet concept to keep things
simple and small for short download times.
There are some tricks to shrink VRML files (commands typed in a shell
on Linux or Windows/Cygwin):
- Remove leading spaces and tabs:
> cat file.wrl | sed -e 's#^[ \t]*##' > file.1.wrl
If files are written well structured (indented) this can save
a significant amount of bytes (in some cases more than 12 %).
- Compress the file itself:
> gzip file.1.wrl ; mv file.1.wrl.gz file.gz.wrl
As usual for human readable text files, gzip will achieve
impressive compression rates (upto 90 %) especially for large
files.
Most VRML browsers are able to detect compressed files and will
uncompress them silently.
Take into account that the above compression tricks do not change the
actual contents of the files although readability is lost.