Hi Nagore,

An alternative is to use Remo 3D for this. It supports STL (binary .sta and ASCII .stl) and many of OpenSceneGraph's supported formats for import and export. Remo 3D is available at www.remograph.com.

Regards,
Andreas


On 2011-03-08 11:45, Alberto Luaces wrote:
"Nagore Barrena" writes:

Hi,

I'm working in Windows XP with Osg-2.8.2. I use Catia to generate my 3d models. 
The only possibility to save the model in Catia and then to load it right in 
osg is to save the model in .stl extension. But
when I save the model using this extension the model loses the colour, 
transforming into a grey model.

I load the 3d model using osgDB::readNodeFile() method:
modelNode = osgDB::readNodeFile("model.stl");

Do you know how I can add custom colours to the model using OSG methods?

You can assign a StateSet in the code with a material definition which
overrides the colour of the model.

Or you can import the file in Blender, fine tune the material definition
for the object, save it into OBJ format and open it into OSG.


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to