Archived

This topic is now archived and is closed to further replies.

Bicubic Bezier Normal Vector Calculation...

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

Recommended Posts

I am trying to implement bezier patches into my engine and have been able to calculate the heights in a uniform grid. However, when I started looking into how to calculate the normal vector at each of these points on the grid I became confused. Real Time Rendering (page 500) says that to calculate the normal vector at P(u,v) then I need to calculate the cross product as so: dP(u,v) dP(u,v) n(u,v) = ------- x ------- du dv However, each of the partial derivative equations should return a scalar value when evaluated at the point (u,v) right? So how do I do a cross product on two scalar values to produce a vector? Am I looking at this all wrong? Thanks in advance for any help you can give. Jason Z

Share on other sites
I have this in a book somewhere but I''m not sure if I could find it. Anyway, the tangent equations should return a vector. They should be similar to the equation that you use to evaluate the vertices in that they operate on the control points. So I think if you''re getting a scalar you may be misinterpreting the equations.

Share on other sites
P(u,v) is not the height value h(u,v) as you might have expected, but the 3D coordinate, i.e.

P(u,v) = (u, v, h(u,v)), so

dP/du (u,v) = (1, 0, dh/du (u,v)) and
dP/dv (u,v) = (0, 1, dh/dv (u,v)),

so that the cross product of them becomes

(-dh/du (u,v), -dh/dv(u,v), 1).

Share on other sites
Lutz,

Thanks a bunch, that cleared it up.

Jason Z

1. 1
Rutin
25
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 9
• 9
• 14
• Forum Statistics

• Total Topics
633310
• Total Posts
3011304
• Who's Online (See full list)

There are no registered users currently online

×