Jump to content
  • Advertisement
Sign in to follow this  
FunkyMonkey

computing tangents

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to figure out a way to compute tangents for models. I'm not using the .x format to load models, so using the D3DXComputeTangents function won't work simply because I'm not using meshes. Any ideas or good sources for reference?

Share this post


Link to post
Share on other sites
Advertisement
Hi there FunkyMonkey,
How are you doing buddy?

The Problem
Computing tangents for a model.

The Solution
There are a number of ways you can do this. Here are 2 suggestions.
1)Computing tangent space basis vectors for an arbitrary mesh

2)What I normally do is exploit the D3DXComputeTangent, D3DXComputeTangentFrame methods.
I construct the mesh using the data that I have.
2.1) Construct a new Mesh using D3DXCreateMesh
2.2) Set the Lock the Vertex/Index buffers of the mesh and set your data.
2.3) Use the D3DXComputeTangent() method and there you go :) you can then read the data you want from the mesh :)


I hope this helps buddy :)
Take care.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!