Home Technical Talk

MAYA: how to transfer normal info from one vert to another?

polycounter lvl 6
Offline / Send Message
Beddall polycounter lvl 6
Hey,

Have a question for the resident MAYA experts to have a crack at :)

How do I copy vertex normal info from a vert on one side of a seam to a vert on another mesh the other side of the seam? (I've tried transfer attributes and it wont work)

example.
I have 2 poly planes. Plane_A and Plane_B. (they have been deformed and so don't have uniform normals)
They align together vert for vert along one edge but cannot be combined as they have to remain seperate meshes.
the normals on Plane_A must remain locked and cannot be changed as this mesh is already in use elsewhere in the project.
so I want the vert normals on Plane_B to align to the normals of the verts on Plane_A only along the seam where they join. thus, making it seamless. or so it would seam. ^^

Now, I have tried 'transfer attributes' but I'm finding no joy there. I've tried all the different sample spaces but each time it changes ALL the normals on the target mesh. (even though they are locked) . Normally for something like this I would select both verts and just average them.... but in this case that's not going to work as I can't change the normals on Plane_A.

anyone know how I can achieve this?
even if it's finding the vert normal vector from somewhere and having to copy / paste those for every single vert then I'll do it god damnit!

any help would be greatly appreciated.

cheers

Replies

  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    polyNormalPerVertex -q -xyz; in mel will give you the vertex normals for the vertices you have selected. then you can manually input them into the new mesh using set vertex normal.

    or just duplicate the mesh you want to match the normals to, attach the new mesh and select both verts you want to match. go to the vertex edit tool and just click on the manipulator without moving it - in the test i just did that aligned the new normal to the edited one.

    hope that helps
  • Beddall
    Options
    Offline / Send Message
    Beddall polycounter lvl 6
    Hey,

    Thanks for the reply.
    The first solution you suggested seems to work, though it's quite time consuming... but it DOES work :) so I'm already 100% better off. thanks
    I tried the 2nd suggestion and for me that just averaged the normals. Though perhaps I was doing something wrong. :(
    by 'attach' did you mean to combine the new mesh (result of duplicating plane_A) with the target mesh ( Plane_B)?

    thanks for that little bit of mel tho

    cheers
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    Use transfer attributes, its built in to Maya and let's you transfer vertex attributes including normals between meshes.

    Can work based on position or based on vertex order
  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    yeah by attach i mean combine - too much time hanging around the max users at work... :P

    it worked on my quick test but it might have been a different version of maya or more complex mesh or something.

    i know you said you'd tried transfer attributes but its should work - again it just worked on my quick test case... could you post a screenshot or fbx of what you're trying to do?

    last possibility if you have a nicely quadded mesh would be to just duplicate it and delete all but the edge faces. then just move the verts from the edge that isnt the join over to the other side and clean up their normals - they wont need to match anything so it should be just a simple(r) process.
  • Beddall
    Options
    Offline / Send Message
    Beddall polycounter lvl 6
    Hey,

    Thanks for the replies.
    I tried transfer attributes again just to make sure and it's defo not working. It changes all of the normals on the target mesh, no matter which sample space I choose.

    I've prepared an FBX but there doesn't seem to be a way to upload it. I tried changing the extension to an image file but it seems that doesn't work any more.

    I managed to achieve what I needed with the script that was poseted but I'll need to do this again quite a lot I imagine. So a better solution would be helpful. I just dont understand why TA isn't doing the job.

    Unfortunately the way the meshes are, after deleting and duplicating faces from one side to the other, it would then require further work. Which I'd rather have to not remember to do after each modification that's needed. (moving UV's etc that would then require rebaking possibly)
  • throttlekitty
    Options
    Offline / Send Message
    You can use Transfer Attributes on selected verts, not just the whole mesh. I just double-checked since it's been a while.

    Select source model first (leave it in object mode), then the vertices you want affected on the target mesh.

    edit: Turns out it only works on whole faces, not just single or a row of vertices, and that's kind of annoying. You could create temporary edges along your borders and delete them after the transfer.
Sign In or Register to comment.