Loading material properties from cad file

Hi!



We are three students working with jME in a school project. In this project we need to load models from dxf (cad format) (3d)  into the game engine. We are thinking about importing this model via a blender conversion script that outputs collada. This is a simulation project and we need to show the effects of flooding and fire.



Ideally, we import all the material properties from the material data given in the cad file. Is there a convenient way to do this?



Alternatively we let the user walk around inside the model and give the walls, floors, roofs, windows properties in real time. To this use, is there a way to get a hold of logical polygon groupings? like a wall, or a roof? (we dont want the user to have to put properties on each polygon).



Thanks in advance.

Ideally, we import all the material properties from the material data given in the cad file. Is there a convenient way to do this?

There's no built-in way to get material properties from a DXF file. You must write your own loader. You can find some examples from the Ogre3D model loader here:
http://code.google.com/p/radakan/source/browse/trunk/ogreloader/src/com/radakan/jme/mxml/MaterialLoader.java
http://code.google.com/p/radakan/source/browse/trunk/ogreloader/src/com/radakan/jme/mxml/Material.java

Alternatively we let the user walk around inside the model and give the walls, floors, roofs, windows properties in real time. To this use, is there a way to get a hold of logical polygon groupings? like a wall, or a roof? (we dont want the user to have to put properties on each polygon).

Make sure each object is in it's own mesh, then you'll be able to select each object by it's mesh, apply the material to it, etc.