Ok, so i have this model set up in max, and it renders out just about perfeclty with max's renderer. Now the problem is getting the same result in anything else seems to be imposible. Its wrong in our engine and its wrong in xnormal etc.... I think it may be problems with the tangents of the mesh but i dont really know enough technically to really have a clue.
Heres a render from max(yay)
And heres a screenshot from the viewport using ben's 3 light shader.
Basicly im really wondering if anyone has any idea what sort of crazy voodoo magic max is pulling when it renders.
Replies
Really it looks like you need to invert your green channel.
Also might try the STL Check modifier, check for coincident faces, unwelded etc.
Show the low-res wire?
if you dont want to do this and have spare polys in your budget, try adding chamfers or inserting edge loops where the problem areas are.
ie look at the low poly and if the shading is ugly and extreme, sort these bits out.
But, using a single smoothing group and adding a chamfer there instead causes the same duplication (same cost) but gives a lot more control over how the edge is smoothed.
I use smoothing groups only if I'm in a hurry and the quality doesn't really matter. But it's always better with an extra chamfer, and it's the same cost...
Yeah a vertex on an edge between smoothing groups causes that vert to get at least two normals, so you get a hard shading seam there. As I understand it, each vertex can usually only store a single normal. So it's split into two vertices when the mdoel is converted into the game's runtime geometry format.
also if thats the case, what happens with hard edges that fade to soft edges, in max i have to assign three shading groups. does this still just split the mesh along the edge and re-assign 1 smoothgroup?
maybe the coders were worried about giving away their secrets, if only i knew what 2 + 2 is, then the path to coding enlightenment would be mine wmaharhahahah.
sorry for the HI-jack, hope it helps anyway.
So if you look at Poop's tutorial, only the row of verts along the bottom of the nose get duped. The others, incl. the outsides of the nostrils where the crease ends, get just one normal each.
Edit: notice the 3rd example on the left, Pooper shows that those verts get two normals each. Try it out in Max... if you do some SGs, then add an Edit Normals modifier, you'll see where your normals get duplicated. Pretty cool.
man i feel like my primary school education was severly deficient
I'm still thinking its a problem with tangents, dont think they get averaged properly. Ill post more info on it here as we try and work it out.
I don't know if this helps, but this old comment from Chris Subagio might provide a clue why the viewport shader is different than the scanline one:
[ QUOTE ]
The vertex position, normal, color and UVs arrays in Max don't correspond 1 to 1. Each is stored as a flat array of vertices indexed by a face array, i.e. an array number_of_faces long of 3 indices. To get coherent flat data out of it, you need to get at the vertex data through the face data.
So in the case of positions, you need to loop through the faces. Ask each face for for the IDs for verts 1, 2 and 3 in the vertex positions array, then use that to look up the actual position data. You then ask the same face for it's 3 normals indices, looking those up in the normal array. Rinse and repeat for any other vertex info you like.
[/ QUOTE ]
maybe someone can ask autodesk for giving out more details (or maybe those already exist ??), on what data they use in the baker. Would allow people to code proper export data.
Xnormal seems to display the exact same errors as ben's shader in max.
[/ QUOTE ] Was the normal map created in Max or in Xnormal?
it seams stoopid that maxes normals arnt much use in anything but its renderer :Z
[/ QUOTE ]
Yes, but that's not Max's fault, really