iv been able to accomplish the same thing using mig normals tools, but it is a more involved process than just selecting some faces and running a script.
since i got to select a face, get the face normal from it, than covert to vertices, and set there normals to the face normal, than repeat for each face.
also i would need to do 1 face at a time that way, so ideal i want find a way to copy the faces normal vector, into the normal vectors of the verts the face shares, than if i have a selection if multiple faces, have it loop right through and repeat in each selected face.
edit: found it in the mesh menu, it dosnt do what i want, im not trying to transfer normals from 1 mesh to a other, im trying to take face the normal of a face, and put it into the normals of the faces 4 verts.
it does what i want if i got 1 face selected at a time, no i just need to stop sucking at scripting, and find a way to make it loop and run on 1 face at a time, if there is a selection of multiple faces.
ok well the code i have posted in post #4 of this thread, takes a face selection, gets the faces normal, than coverts to verts, and applies that normals to those verts so they have the exact same normal facing as the face.
the problem with that is that it only works on a selection of 1 face at a time, or it will make all the normals it edits face the same direction, no matter which verts they are.
more or less want to take that script, and have it work with selections of multiple faces, but work on them 1 at a time.
busy with other stuff atm, but later i can take screen-shots to what im trying to do, id that description wasn't enough.
EDIT:
ok this is what i want it to do.
simple takeing the face normal of the selected face, than applying it to the 4 vertices's on that face.
and the reason why this is useful to me is for normal-map baking.
the left image is, with out editing the vertex normals like this, and hte one on the right is with the edit vertex normals.
this vertex normal tweak give better and flatter shading, on the flat parts of the cube in the normalmap, which compresses a lot better when brought into udk, since i don't got a big gradient going over the whole thing.
all im trying ti accomplish with the script is a faster and more efficient way to edit the vertex normals like this, since currently i got to do it all by hand, or use the script i have in post #4, which is still slow, since i need to run that on 1 face at a time.
While not the best solution, if you wanted to automate it for now you could perhaps have a script that has a function to iterate through each face in your selection one at a time so that you call it via mouse click and then have the mouse click the necessary buttons in migNormalTools using an autoclicker script to do all the clicks on the screen. Still pretty much doing it manually just with less effort on your end.
how are you running it, and do you got vertex normal view on so you can see what is happening?
if you just copy and run that code it won't do anything untill you run
FaceNRMtoVert();
beat way to use it world be to place it in a file called FaceNRMtoVert.mel in your scripts folder than add FaceNRMtoVert(); to your shelf.
edit: and what Maya version, I wrote it while on 2012 and I believe froyk has it working on 2013. but I have never tested for older versions of maya since 2012 is the only version I own.
So I see it works fine on cube type geo but anyone had issues with Cylinder geo ? Can't find a tool around that works well no luck with AMT normal tools LT too
Replies
also i would need to do 1 face at a time that way, so ideal i want find a way to copy the faces normal vector, into the normal vectors of the verts the face shares, than if i have a selection if multiple faces, have it loop right through and repeat in each selected face.
edit: found it in the mesh menu, it dosnt do what i want, im not trying to transfer normals from 1 mesh to a other, im trying to take face the normal of a face, and put it into the normals of the faces 4 verts.
it does what i want if i got 1 face selected at a time, no i just need to stop sucking at scripting, and find a way to make it loop and run on 1 face at a time, if there is a selection of multiple faces.
that doesn't do what i want, it splits the normal and i end up with 2 normals on 1 vertex.
i just need to know how to make the above code iterate through all the faces in a face selection, than i have exactly what i need.
i tried that but it still does everything as 1, instead of iterating through faces.
the problem with that is that it only works on a selection of 1 face at a time, or it will make all the normals it edits face the same direction, no matter which verts they are.
more or less want to take that script, and have it work with selections of multiple faces, but work on them 1 at a time.
busy with other stuff atm, but later i can take screen-shots to what im trying to do, id that description wasn't enough.
EDIT:
ok this is what i want it to do.
simple takeing the face normal of the selected face, than applying it to the 4 vertices's on that face.
and the reason why this is useful to me is for normal-map baking.
the left image is, with out editing the vertex normals like this, and hte one on the right is with the edit vertex normals.
this vertex normal tweak give better and flatter shading, on the flat parts of the cube in the normalmap, which compresses a lot better when brought into udk, since i don't got a big gradient going over the whole thing.
all im trying ti accomplish with the script is a faster and more efficient way to edit the vertex normals like this, since currently i got to do it all by hand, or use the script i have in post #4, which is still slow, since i need to run that on 1 face at a time.
http://wiki.polycount.com/VertexNormal#FaceNRMtoVert
But I can't get it to work. I tried it on a simple cube, both beveled and not beveled, and with one face selected and multiple. It just does nothing.
if you just copy and run that code it won't do anything untill you run
FaceNRMtoVert();
beat way to use it world be to place it in a file called FaceNRMtoVert.mel in your scripts folder than add FaceNRMtoVert(); to your shelf.
edit: and what Maya version, I wrote it while on 2012 and I believe froyk has it working on 2013. but I have never tested for older versions of maya since 2012 is the only version I own.
since the code only defines the procedure, but dosnt call it.