Same vertex, diffrent normals

Is there a way for a model that indexes the same vertex twice, to have diffrent normals for each index? Or do I need to store the same Vector3f twice?

from the artist point of view, that sounds to smooth groups.Some softwares do break there, and create a new vertex, and some do not, making dunno what trick…

Yeap, it’s smoothing groups. Not sure how to do this though in jME without making new vertexes

Ive heared this problem before in other engines…

don’t know if really is possible in 3d…but in Max, indeed, you do smooth groups and yet the mesh is not broken…which is strange…

is like without braking , a bunch of faces could have a normals threshold, an smoothing normals value, and othe rbunch besides had other one, and a crease appear in the frontier without breaking the mesh .Indeed, when exporting, most softwares can’t do this, so model gets actually broken…(duplicated vertices appear in frontier, that is… usually a weld coincident location vertices is enough to solve it…)

Along similar lines… I’d like it if I could have the same vertex being used with different texture coordinates. I don’t think OpenGL supports that either.

wouldn’t that make normal mapping impossible too tho? yet, it has been done.

I’m thinking practically… how would it be done?

If you have some mesh, the number of texture coordinates must match the number of verticies right? That way when you refer to a vertex via the index it’s referring to the texture coordinates for the vertex coordinates.

For that matter, the number of normals must also match.

“I’d like it if I could have the same vertex being used with different texture coordinates. I don’t think OpenGL supports that either.”

It’s done…In Ultimate Unwrap, in the opengl previewer, I view them alswys, as a single piece model, while I have shared UV vertices.

Specially demonstrated when I mirror half the human face just to save th etexture space of the other half; I just break the uv “front” human face in two halves, mirror one, and position it matching the other. Then I weld with a minimal threshold. I have also done without th efinal uv weld. So, indeed, it can load shared UVs. each vertex is has two UVs. happens also in the borders of each UV chunk…the face one in its borders are uvs that are from same 3d vertices than the corrsponding in neck.

This is very common in games.

I have a feeling that under the sheets it’s actually breaking that vertex up over two faces, and thus allowing for two different texture coordinates on actually two different vertexes. Just because that’s what the application makes it seem like doesn’t mean that is actually what’s happening. I do the same thing in my game.

Underlying, I wonder how, if what you are saying is really true, they got the graphics card to undertand that 1 vertex has two texture coordinates without reloading the same vertex as part of an alternate vertex array.

for my experience as an artist, I think you’re exactly on the right track. :slight_smile:

I believe that Guurk is exactly right, and the application has simply created two instances of a particular vertex with differring UV coordinates. We use vertex arrays (and VBO) to render data, which means, that we render a vertex by index. We simply pass in an index, it retrieves the: vertex at that index, the UV coordinate at that index, the normal at that index, the color at that index and renders (after three have been retrieved to make a triangle). So, we can not have a single vertex having different normals, UV coordinates, etc. We can easily have the logically equivalent vertex having different normals and texture coordinates, it would just have to be contained in it’s own index in the array.