View Full Version : OT (sorry): Fixing tangent coordinates?
06-20-2002, 03:22 PM
You guys are smart, so someone here should know.
How do I go about fixing tangent coords? I know I know, NVMeshMender, but I don't use STL or C++ so I can't use that (and I don't know enough about STL to 'port' it to standard C).
If ANYONE knows, that would r0x0r my b0x0r! http://www.opengl.org/discussion_boards/ubb/smile.gif
When you say "tangent coordinates" do you mean texture coordinates or tangent vectors? Either way, wouldn't we have to know what's wrong with them to suggest a fix?
06-20-2002, 03:49 PM
Vectors, you know... Those thingys you use for DOT3 lighting http://www.opengl.org/discussion_boards/ubb/wink.gif
if you mean how to create them, I wrote a small paper a while ago explaning how to get the formulas.
I am not fully sure that the logic of what I am saying is correct, but the formulas are.
06-20-2002, 04:37 PM
Calculating them I have no problem with, but they aren't always correct (some will be pointing the wrong direction because of 'mirror' texture coords), NVMeshMender is suppose to fix these so they are all pointing the right direction, but as I said, I can't use that.
06-20-2002, 06:07 PM
Your time is probably well spent trying to learn enough C++ and STL to make MeshMender work for you. Worst case, you can always run it as a pre-processing step on your geometry data, and use it as-is in a "black box" pre-processing tool.
06-21-2002, 02:04 AM
You don't actually have to understand STL to find NVMeshMender Useful. I don't actually use it. But I have borrowed snips from it quite a few times in building my own nice mesh generator. All NVMeshMender does is dubplicate vertices/texturecoords/tangents. Just about whatever it needs to fix the mesh. Just look through the code and ignore the pushback calls and the like. The code that does the actual work is basically C with a vector C++ class. But that is really self explanitory.
06-21-2002, 02:25 AM
with a very big chance you have a compiler that can compile c++. so you can simply use nvmeshmender in your code without switching to c++ yourself. all you need is to understand how to input and how to output to and from meshmender, and thats described in the headerfile and even if completely different to how you've coded till now, its straightforward and easy.
else, someone has to write a wrapper.
but i suggest to dive slowly into c++, means staying at your c-style but using the features c++ gives you (function overloading is my loved one http://www.opengl.org/discussion_boards/ubb/smile.gif)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.