Advertisement Jump to content
Sign in to follow this  
FunkyMonkey

computing tangents

This topic is 4903 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!