glNormal - Surface/Vertex normals
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!
Anyway, I lied... any spheroid will do, as long as it's centered on the origin
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.
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.
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...
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...
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...4 bytes/float * 3 floats = 12 bytes per vertex
2 and some mb per model... * 2 for the normals too... 4 mb per model.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| texture no square surface | kendric | 7 | 3,848 |
Mar 20, 2009 05:26 PM Last Post: kendric |
|
| surface rendering from data points | mc1961 | 6 | 4,194 |
Nov 15, 2007 03:37 PM Last Post: TomorrowPlusX |
|
| Trouble turning an SDL surface into an OpenGL texture | Joseph Duchesne | 4 | 4,987 |
May 22, 2007 05:14 PM Last Post: Joseph Duchesne |
|
| Surface/Vertice Normals and Scene Placement | Jones | 3 | 2,565 |
Aug 22, 2006 02:45 PM Last Post: scgames |
|
| Getting surface x & y coords? | Jones | 4 | 2,846 |
May 7, 2006 04:29 PM Last Post: Jones |
|

