Hi.. We are trying to change the texture on a characters head. The character is a vrml model which is loaded in to the program. We have managed to get hold of the correct node and obtain the geometry of that node. We want to change the image in the material of the node and use the same texture coordinates that is stored in the file. Below is some code which tries to do this, but doesn't work. Basically we are trying to change only the image field of the material and leave the rest of the material as it is.
GeometryPtr geo = GeometryPtr::dcast(node->getCore()); SimpleTexturedMaterialPtr material = SimpleTexturedMaterialPtr::dcast(node>getCore()); beginEditCP(material,SimpleTexturedMaterial::ImageFieldMask); material->setImage(image); endEditCP(material,SimpleTexturedMaterial::ImageFieldMask); Can anyone help? Any comments will be appreciated! Cheers ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
