programmable 3d objects

hi, I’m working on a 3D model of a building with windows on each floor. Now I want to light up a couple of windows randomly and I’m wondering what would be a good approach to do this. I’ve created the model in blender3D.

All suggestions are welcome as I’m a noob on this subject.

Roxlu

you know there is game engine in blender. It works with nodes and python. May it’s worth to give it a try since your models are created with that tool

http://wiki.blender.org/index.php/Doc:T-…-ngine/BSoD

martin thanks for your reply! For the visualization I could use blender and python, but in the future I need some other possibilities like communicating with hardware like arduino, storing data into a database, etc. Im sure that could be done using python but I really want to use oF for this.

Would it be possible to define nodes in blender and get an reference to the vertices array in my c++ code ?

roxlu

there are several ways you could go about this…but here are some thoughts…

In a big complex scene you might use a scene graph to managed your 3d assets, but in this case perhaps try exporting the objects individually from the original scene making sure to maintain their relative 3d coordinates. Then import them using 3dModelLoader addon or equivalent. Not sure if that addon will give you access to materials and textures of an imported model, but if not you should be able to hack it somehow. Once you have a reference to a model, you should then be able to bind different textures on the fly.
In your case you would have a model for a window with different textures depending on whether the window was lit or not.

hope that helps!