Hi, ive created a surface (e.g. terrain) by the delaunaytriangulator. the generated traingle-mesh looks fine and now i want to place a texture on top of it.
Could someone explain me the steps for usage with texgennode? What i did so far: - ive looked at the "osgspotlight" example here is my code for setting up the texgennode: Code: osg::TexGenNode* texgenNode = new osg::TexGenNode; texgenNode->setTextureUnit(1); osg::TexGen* texgen = texgenNode->getTexGen(); texgen->setMode(osg::TexGen::OBJECT_LINEAR ); //EYE_LINEAR //position in the middle of the surface .. a little bit above it in z-direction osg::Vec3f position(-(xmax+xmin)/2,(ymax+ymin)/2,3.0f); //look down along the z-axis osg::Vec3f direction(0.0f,0.0f,-1.0f); //camera head to osg::Vec3 up(0.0f,1.0f,0.0f); texgen->setPlanesFromMatrix(osg::Matrixd::lookAt(position, position+direction,up)* osg::Matrixd::perspective(0,1.0,0.1,100)); what do i need to do next? i set the surface-node as child to the texgenNode. But which attributes needs to be set for the surface node? Thank you! Cheers, Sid ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26017#26017 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

