Hi, Andrea If you know which texture unit used by this texture(if its only one texture applied to geode, this probably will be 0), you can load your own texture and set on your geode stateset on same texture unit with override flag node->getOrCreateStateSet()->setTextureAttribute(unit, moonTexture, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE)
texture can be created from image, image can be loaded with osgDB::readImageFile call Cheers 23.01.2012, 19:13, "Andrea Martini" <martini.and...@gmail.com>: > Hi, > > is it possibile change texture image of a given 3D model? > I have a 3D model coming from lightwave. I know the node* where i can find > the texture (i.e Sun.tga). I'm wondering if is it possibile to change the SUN > texture with another one (i.e MOON.tga) that has the same resolution. > Moreover that texture would be applied in the same way of the previous one. > PS: The only information i have is the name of the surface (geode) that > contains the texture (created with uv map). > > Thank you! > > Cheers, > Andrea > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44974#44974 > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org