how mdlvis messes up normals

Level 32
Joined
Feb 27, 2015
Messages
391
Here's a one geoset cube, six unconnected square sides made out of two connected triangles. On the left is how it should look, on the right is how it looks after saving in mdlvis
crap.png
I think what happens is that mdlvis averages the normals of vertices that occupy the same coordinates within one geoset. I always thought to myself "why do standard blizz models have their geometry all in weird unconnected patches when there's no difference?" Well turns out there's a difference but I couldn't see it because mdlvis screws it up.

If you don't think this is bad or this doesn't concern you, then look at Jaina's face after saving in mdlvis

Here's a post by @Hermit with one solution and there's a few more up in the same thread. One other (mdlvis only) workaround is detaching some of geometry into a different geoset (like that same cube above on the left, which is actually six geosets and not one).

I realize that I'm not discovering anything new here, but I could never find how exactly mdlvis screws the normals. Well, now I think I know how.

If you're just starting modelling then do yourself a favor and learn RMS or something else. We're too far gone but it's not too late for you!
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
A vertex as far as the graphics card cares is all of the data that is needed to render it, which includes the position, texture coordinate, normal, bone references, and for HD also a tangent.

There is no such thing as having one position and 3 normals for a corner of a cube - you need 3 positions and 3 normals (with that being said, many times this won't be visible to you as a modeller using the big programs, because they hide the fact your vertex is really 3 vertices since it's not important or useful information for you).

Now, some modeling tools might automatically try to optimize your model and see that the position is the same and merge the vertices, however smarter code will check that all components are the same, see the normals aren't, and work correctly. I don't know specifically about mdlvis, but indeed "unconnected patches" are used to split the relevant vertex to multiple vertices, probably with only some components differing (mainly the normal and tangent, sometimes texture coordinates come to play).
 
Last edited:
Top