glNormal - Surface/Vertex normals

Oldtimer
Posts: 834
Joined: 2002.09
Post: #16
Quote:The only shape where the normals are normalized versions of the vertices is a sphere centered on the origin
...that is of size 1, just as I said. :-P

Gosh darn, I'm out of whack. I need to get off this vacation quick! Wink
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #17
Anyway, I lied... any spheroid will do, as long as it's centered on the origin Smile
Quote this message in a reply
Jones
Unregistered
 
Post: #18
But why would I want to use a precalculated table that may no even correspond to the model I have?

Silly... is it not? It would look better if I grabbed all the normals myself, with calculations and such. (Either generated into a file, or system memory.)

No?

Thanks for the link tho, I'll try it with this table thingy...

Ahh.. "anorms.h" must be what I'm looking for.
Quote this message in a reply
Jones
Unregistered
 
Post: #19
A question regarding performance:

If I store all my interpolated normals and vertices in memory, would it really help performance? (So I don't have to calculate them again.)

A float is 4 bytes, correct? If it takes 3 floats per vertice, and the model has say... 1000 vertices, for... dunno, like 199 frames. It would be...

2 and some mb per model... * 2 for the normals too... 4 mb per model.

I think... Wacko
Quote this message in a reply
Member
Posts: 161
Joined: 2005.07
Post: #20
Jones Wrote:A float is 4 bytes, correct? If it takes 3 floats per vertice, and the model has say... 1000 vertices, for... dunno, like 199 frames. It would be...

2 and some mb per model... * 2 for the normals too... 4 mb per model.
4 bytes/float * 3 floats = 12 bytes per vertex
1000 vertices = 12,000 bytes = 11.7 kb
1000 vertices * 2 for normals = 23.4 kb
199 frames = 23.4 kb still (not really sure why the number of frames changes anything...?)

So instead of 4 MB, it's 23 kilobytes. Don't forget the polygons too, which would be three ints for each one for 12 bytes per polygon.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  texture no square surface kendric 7 4,628 Mar 20, 2009 05:26 PM
Last Post: kendric
  surface rendering from data points mc1961 6 5,206 Nov 15, 2007 03:37 PM
Last Post: TomorrowPlusX
  Trouble turning an SDL surface into an OpenGL texture Joseph Duchesne 4 5,855 May 22, 2007 05:14 PM
Last Post: Joseph Duchesne
  Surface/Vertice Normals and Scene Placement Jones 3 3,048 Aug 22, 2006 02:45 PM
Last Post: scgames
  Getting surface x & y coords? Jones 4 3,377 May 7, 2006 04:29 PM
Last Post: Jones