Hi Nicoulaie,

I'm not the original author of the TangentSpaceGenerator so in the
same boat as yourself with trying to work out what is intended with
this code.  Unfortunately the code is very old and the original author
is no longer active in the OSG community so we can't ask him what he
meant.  We'll just have to work it out from the code.

I too am surprised that the tangent and binormal enties for the
corners of the triangle being computed ignore previous values, so it
would seem to not handle shared vertices well.  This code block must
exist for a reason though, it's odd that the normal data is
accumulated by the tangent and binormal data isn't.  I don't know if
this is intended or an oversight.

I don't have any data that illustrates problems.  Could you provide a
test case for how others can reproduce the problem you are seeing?

Cheers,
Robert.

On 6 September 2013 09:04, Nicoulaie Vernouillet
<[email protected]> wrote:
> Hi,
>
> i'm currently trying to debug tangentSpace's seams and mirroring in our 
> softawre, and it might have a bug in your tangentspacegenerator. (i say might 
> because i'm really not sure ... TBN almost killing my brain right now ...)
>
> i'm wondering why you don't add the Different Tangent and binormal to the 
> previous computation in the final array (in the case of normal's array are 
> already computed) like you do when you have to compute faces normals.
>
>
> Code:
>
>
> osg::Vec3 tempvec;
> tempvec = N1 ^ T1;
> (*T_)[iA] = osg::Vec4(tempvec ^ N1, 0);
>
>
>
>
> vs
>
>
> Code:
>
> (*T_)[iA].x() += -V.y() / V.x();
> (*T_)[iA].y() += -V.y() / V.x();
> (*T_)[iA].z() += -V.y() / V.x();
>
>
>
>
> it's seems that you overwrite the last tangent with the new one for a same 
> vertex id.
> do i read this in the wrong meaning  ?
>
> if it's not the case just forget it, i'm losing my mind in my vertices' 
> welding problem
>
> and at least, sorry for my very bag english. :|
> Thank you!
>
> Cheers,
> nicoulaie[/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=56155#56155
>
>
>
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to