Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


How do you calculate normals for a 4+ sided polygons


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.

  • You cannot reply to this topic
2 replies to this topic

#1 simonstone2001   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 September 2001 - 05:31 AM

I have started coding a First Person Shooter,and am trying to implement collsion detection.The engine uses polygons rather than triangles and i need to find how to calculate surface normals for a 4+ sided polygon.I have only seen normal tutorials for triangles.COuld anyone out there help.I must not turn polys into triangles though. Cheers Simon Stone

Sponsor:

#2 Dobbs   Members   -  Reputation: 164

Like
Likes
Like

Posted 03 September 2001 - 08:40 AM

First of all I would say definitely DO turn polygons into triangles at some point. Design your levels and models and whatever with polygons if you''d like but at some point convert those polygons to triangles before rendering.

The problem with finding surface normals for polygons with 4+ sides is that they aren''t necessarily flat. A triangle is always flat, so it only has one surface normal. A surface that isn''t flat has a different normal at every point, so there is no single normal that is correct for the entire polygon.

If your 4+ sided polygons ARE flat, you use the same basic method as you would for triangles. Pick a corner of the polygon, and find vectors from that corner to two adjacent corners. Take the cross product of those two vectors and normalize the result.

Note to math nazis out there: I am fully aware that by definition all polygons are flat, but I''m assuming here he just means a shape defined by 4+ sides.

#3 simonstone2001   Members   -  Reputation: 122

Like
Likes
Like

Posted 03 September 2001 - 08:58 AM

cheers for the suggestions




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.



PARTNERS