Page 1 of 1

Maxscript Normals Issue

Posted: Sat Jul 12, 2014 10:40 pm
by dainazinas
I`m building a mesh importer and I got a problem. When I apply a texture on the build mesh object it looks inverted(TEXT, numbers). Flipping normals don`t do any good. And I can`t seem to find an answer in the help files.

https://www.dropbox.com/s/vhntho32z2kjs ... .03.29.png

So I suspect it has to be done before the mesh is build from vert and face arrays?
here`s the snip of my script

--Build Mesh From Arrays
mesh1 = mesh vertices:Vert_array faces:Face_array
mesh1.numTVerts = UV_array.count
buildTVFaces mesh1
for j = 1 to nm_array.count do meshop.setMapVert mesh1 1 j nm_array[j]
for j = 1 to Face_array.count do meshop.setMapFace mesh1 1 j Face_array[j]


anyone has any clues?

Re: Maxscript Normals Issue

Posted: Sat Jul 12, 2014 11:00 pm
by Chipicao
It has nothing to do with normals, the mesh itself needs to be mirrored. Specifically, it looks like you need to load vertices as [-x, y, z].
You can also tell by the fact that the watch is on the right hand, whereas it should be on the left. ;)

Careful when doing this! Inverting or switching an odd number of vertex components will reverse the face winding. Activate backface cull on your mesh and see if it looks ok. If it doesn't, you'll need to flip face indices ([i3, i2, i1] instead of [i1, i2, i3]]

Re: Maxscript Normals Issue

Posted: Mon Jul 14, 2014 10:24 pm
by dainazinas
Your a star Chipicao. -Vpx does the job beautifully, thank you so much :)