Querying/assigning vertex Normals

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 04 April 2003   #1
Querying/assigning vertex Normals

I would like to read out the vertex normals of a polyObject and write them to another object with the same topology but a different shape, therefore using the "polyNormalPerVertex -q -xyz" command seems to be the weapon of choice. This actually returns an array of xyz-values for a vertex (3 values for each face it is part of), but how do I assign this array to another vertex (that shares the same number of faces)?

The command accepts only three floats when not in query mode.
One solution would be to break the polyObject into single faces, transfer the values and combine them back together, but I wonder if there is a smarter method.
Old 04 April 2003   #2
I think that's what you're going to have to do.

-- Mark
Mark R. Wilkins
author of MEL Scripting for Maya Animators
Old 04 April 2003   #3
but I guess that`s something that can be scripted.
Thanx anyway
Old 04 April 2003   #4
I'm not sure why you have to break the object into faces. Can't you just pass the names of each face to the command?

pObject.f[23] would be the 23rd face, and so on, if pObject were your object...

-- Mark
Mark R. Wilkins
author of MEL Scripting for Maya Animators
Old 04 April 2003   #5
The vertices I query via the polyNormalPerVertex command may be only part of one face, otherwise it will return more values (3 for each face they are part of) but I can not assign more than 3 values to a vertice (the command doesn`t allow it). I assume that Maya saves the values for each vertexnormal for every face a vertex is part of, because otherwise it wouldn`t be able to return them, but one is not able to assign them directly. But breaking the object down and building it back together is ok and works for my purposes.
Old 01 January 2006   #6
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 05:25 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.