Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Computing Tangent Space Basis Vectors promblem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 endrollex   Members   -  Reputation: 211

Like
0Likes
Like

Posted 10 August 2014 - 08:29 AM

Hello,

 

I am trying to export Blender's model data for DirectX.

The tangent is need to compute.

The Algorithm is from http://www.terathon.com/code/tangent.html

 

But in this step: float r = 1.0F / (s1 * t2 - s2 * t1);

It appears an error: float division by zero

I found the reason is one triangle face has two same uv. (the uv mapping in DirectX is seems OK

Is it regular?

How can I get the tangent In this case?

 

Update: Perhaps uv mapping is wrong, I am not familiar with the principles of uv mapping.

 

Thanks.


Edited by endrollex, 10 August 2014 - 10:33 PM.


Sponsor:

#2 JohnnyCode   Members   -  Reputation: 580

Like
2Likes
Like

Posted 11 August 2014 - 04:44 PM

if any of two (or three) verticies of a triangle has identical mapping coordinates, then it is a bogus mapping. It never happens for texture mapping attribute across any triangle, you do not need to secure this possibility at all.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS