PDA

View Full Version : Trying to do the impossible.??.



dabeav
06-05-2002, 05:37 AM
Here I am again, attempting the impossible. Why would one not be able to aply multiple normals per vertex, just like you could apply multiple textures per vertex. I understand, i could simply create another identical vertex, and give it another normal, but then thats 2 verts that have be transformed each frame. Isnt there ANY way to simply assign multiple normals to ONE vertex?? This would make LOW poly models, able to look VERY VERY HIGH poly. I think Q3 did something like this, but im not aware how. Any clues??

Bob
06-05-2002, 05:56 AM
A vertex can only have one normal. What would be the point in using several normals for a vertex? OpenGL doesn't use more than one anyway.

Multiple sets of texture coordinates has a function, since you can apply several textures to a primitive, and therefore need a set of texture coordinates for each texture. Multiple normals have no function in OpenGL.

Roadmaster
06-05-2002, 12:26 PM
Wow, what exactly are you trying to achieve?
I actually thought you needed a whole triangle to have a normal. The normal is perpindicular to the triangle. You can't have 2 normals per triangle because there is only 1 thats perpindicular to the triangle.. right? Maybe I'm thinking of something else.
That seems right though.
What were you going to do with 2 normals? maybe theres a different way to get the same effect.

chmod
06-05-2002, 12:48 PM
You can always try and average the normals for a common vertex.

Jambolo
06-05-2002, 07:11 PM
Multiple normals would make the data very complicated and there really isn't much use for them.

Also, while a vertex can have multiple texture coordinates, it can't have one set of coords for one poly and a different set for the other poly. That's what you want to do with the normals, right?

Roadmaster: if you want to do smooth shading, you need to specify a normal for each vertex. If you are doing flat shading, you can specify a normal for each poly but OpenGL still sets a normal for each vertex (using the same one on all three vertices).

[This message has been edited by Jambolo (edited 06-05-2002).]

T2k
06-06-2002, 01:24 AM
why multiple normals, if you want to have smooth edges you simply calc: vertex_normal= normalized(sum of triangle_normals[using this vertex]). and if you want to have sharp edges you have to use a bit more data...


T2k

Arsenal
06-11-2002, 11:05 AM
I think what dabeav is trying to do is implement a DOOM3-similar way of modeling, just that he's going by the approach all wrong.

DOOM3 uses both ultra-high poly models and lower "good for games" poly models for the games. The high-poly model is used to generate a "normal map" which is basically a bumpmap over the entire model. This normal map is rendered onto the game poly model to make it look much more detailed than it actually is.

I assume the DOOM3 model is bumpmapped using object-space vectors, not tangent-space vectors. Most bumpmapping tutorials use tangent-space vectors.

jmg
06-11-2002, 04:14 PM
dabeav,

In OpenGL, there is only the concept of "current normal". Whatever the current normal is set to, that's what it is for subsequent vertices.

The meaning of OpenGL's "normal" not *quite* the same as it is in math class. http://www.opengl.org/discussion_boards/ubb/smile.gif