Hi David, Thanks for detailed explanation. I will look osgFX and BumpMapping.
Best Regards. Umit Uzun 2008/9/25 David Spilling <[EMAIL PROTECTED]> > Hi Umit, > > Assuming you are loading an external model, your model will need to have > tangent and binormal attributes associated with its vertices. > > Even if you can do this in your modelling package, I'm not sure if any of > the intermediate formats will read/write tangents and binormals. (Other than > .osg, of course. Does anybody out there know?) > > Therefore you will most likely need to generate tangent and binormals > within your application. In the first instance you will need a model with UV > texture coordinates assigned. You should look at > osgUtil:TangentSpaceGenerator and use that to generate and attach tangent > and binormal vector arrays to your geometry. If you have more than one > geometry (in particular if you load up a model) you will need to write a > Visitor which will traverse your model scenegraph and generate all the > tangent/binormals itself. The osgFX::BumpMapping technique gives a good > example of how the TangentSpaceGenerator is actually used with a Visitor > pattern. > > Of course, if you are generating your geometry on-the-fly from within your > application, then you don't need all of this stuff. Just generate a > Vec3Array with the right vectors in it for binormal and tangent, and attach > them to the geometry (in otherwise unused vertex attribute numbers like 6 > and 7, otherwise strange things will happen). Again, have a look at how > osgFX::BumpMapping does it. > > Hope that helps, > > David > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

