Hi Alessandro, Try my bumpmapping sample from http://www.fileden.com/files/2007/9/10/1423182/BumpMapping.rar
Hope this helps. Ümit Uzun 2009/10/30 alessandro terenzi <a.tere...@gmail.com> > I'm trying to use the TangentSpaceGenerator in order to apply a bump > mapping shader, but I cannot manage it to work properly. Having looked also > at the osgFX::BumpMapping effect, I used the visitor defined in BumpMapping > in order to find all the geodes and apply TangentSpaceGenerator on them, but > if I save the model to disk just before and after the generation has been > applied, I notice that in the .osg the arrays supposed to contain normals, > tangents and binormals are empty...here is the only part that is different > among the two .osg: > > VertexAttribBinding 1 PER_VERTEX > VertexAttribNormalize 1 FALSE > VertexAttribArray 1 Vec4Array 0 > { > } > VertexAttribBinding 6 PER_VERTEX > VertexAttribNormalize 6 FALSE > VertexAttribArray 6 Vec4Array 0 > { > } > VertexAttribBinding 7 PER_VERTEX > VertexAttribNormalize 7 FALSE > VertexAttribArray 7 Vec4Array 0 > { > } > > 6 is supposed to be the TU of the tangent, 7 is for binormal attributes and > 1 for the normal map textures. The model have textures coordinates set for > TU 0 that is associated to the diffuse map. > > Maybe I'm missing some steps to setup properly everything... > > Thanks in advance. Kind regards. > Alessandro > > _______________________________________________ > 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