Skip to main content
GameDev.net gamedev.net
🔒 Locked

Nomals problem. I need help!

Started by Tassu Nov 25, 2002 at 5:57 AM 3 replies 450+ views
Original Post
Tassu
Tassu
I have a problem calculating normals from my mesh. Ive been an opengl programmer for about a year now and ive done a few minigames. I have a system for normals but its very slow and crappy. Now im making a bigger game so my system just isnt enough. I was wondering how everyone else does it. I cant seem to find good tutorials anywhere. Could someone point me a few tutorials or help in some other way? Thanks.
Basiror
Basiror
i assume you know how to calculate the normal of 2 vectors

n=crossproduct(a,b);

and about your system i store the normal inside the polygon class/structure


anything else?
perform frustrum culling with octrees for visibility
and then sort the polygons of all visible nodes by textures to reduce the render time
switching a texture very often is more expensive than building a quick list of polygons
of course your structures have to be designed to create a linked list hehe

imagine a scene with 15000 visible polygons and 30 different textures it will decrease performance a lot when you switch textures all 10-30 polygons

i think thats enough information to start a big project
http://www.8ung.at/basiror/theironcross.html
Tassu
Tassu
Thanks, but you assume too much
OK i must admitt i should know this stuff already, but
you couldnt possibly type me a simple example?
Please?
My normals arent even really the normals. I just fooled around
until it looked good enough for my first simple games.
I have to learn this someday.
zedzeek
zedzeek
http://www.xmission.com/~nate/opengl.html
http://nate.scuzzy.net/gltut/

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html
Tassu
Tassu
OK Thanks. You have been a great help.
Im sure ill get it right this time

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.