I’ve been experimenting with X3DOM and Blender.
The idea is to provide a tool for exporting 3D models to web with some basic interactions. The export is controlled with “meta nodes” defined in a XML file. The actual 3D export is done with slightly modified X3D-export of Blender.
Template is HTML file that has certain structure. The exporter injects the control structure to the template and saves the result. The file name is defined in the metanodes file.
The are two kind of metanodes. First, there are nodes that affect the X3D file written by the exporter. This allows you to add for example Switch or LOD nodes.
Second type of nodes define what kind of HTML is written to the www-template. This makes it possible to define “links” to objects (so that viewpoint is focused to object) or define objects that can be turned on and off (layers).
Here is an example file:
The script uses groups as layers. This makes it possible to group buildings or parts together and allow users to switch them on/off (note: this is different from Switch). Layers (groups) are written in a JSON file.
This was written merely for cultural heritage purposes (displaying virtual reconstructions etc.) But this might be useful also for some other purposes… or not.
There is a demo that is based the fullscreen template (direct export from blender, no extra coding excluding info pages). The texts are in strange language but the idea hopefully is clarified:
Documentation is currently very bad. I’m working on it However, something is written. There is a quick start tutorial in the link above.
I You are interested of this kind of approach, then it would be nice if you could test the addon. Feedback is welcome!