• FEATURED
• FEATURED
• FEATURED
• FEATURED
• FEATURED

View more

View more

View more

Image of the Day Submit

IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

How do I create a vector tangent to each point in a non-function defined surface/model?

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.

3 replies to this topic

#1JoryRFerrell  Members

Posted 29 December 2012 - 03:40 PM

I am learning a little calculus (very little ), and I am feeling a little impatient. I want to write a shader (completely unnecessary since OpenGL can handle lighting, but it's a puzzle I'd like to solve for several other reasons) and this is a useful bit of math involved apparently. But again, I am not hardcore in math, so I need some assistance. Can anyone help point me to resources covering the math involved in this technique or lay out the exact equation/s behind it? I found a possible solution that gives at least an approximation, for most situations, on yahoo answers which I'll try after this post, but I was wondering if there are any equations for handling every problem set definitively. I appreciate the help.

Posted 29 December 2012 - 04:36 PM

Sounds like a job for... NURBSMAN!<br /><br />http://en.wikipedia.org/wiki/Non-uniform_rational_B-spline
"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#3luca-deltodesco  Members

Posted 29 December 2012 - 04:40 PM

sounds like an XY situation: http://www.perlmonks.org/index.pl?node_id=542341

Why don't you describe what your actually trying to do?

You mention lighting, you mean that you want to write a shader to emulate how opengl would do its lighting?

You're talking about 'vector tangent to a point', do you mean the surface normal? You need to specify those for opengl lighting in the first place, so lighting is not really the question here, it seems to me you have a mesh, and you want to find the normals for each vertex of the mesh's triangles.

#4Eric Lengyel  Members

Posted 31 December 2012 - 04:59 PM