Thank you I'll have a look at it.

Anyway I think I managed to solve the problem, I think that the problem was
that I had texture coordinates set only for TU 0 while the
TangentSpaceGenerator requires coordinates for the normal map TU which I had
not.

Regards.
Alessandro

On Fri, Oct 30, 2009 at 6:23 PM, Ümit Uzun <[email protected]> wrote:

> 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 <[email protected]>
>
>> 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
>> [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
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to