hi, i ve a Qn..
Where/How deformers keep the positions of each vertex? i.e; is thr any vertex-related complex attribut, like pSphere1.vtx, in any node related to deformers?
created
Oct '10
last reply
Oct '10
- 5
replies
- 3.8k
views
- 1
user
hi, i ve a Qn..
Where/How deformers keep the positions of each vertex? i.e; is thr any vertex-related complex attribut, like pSphere1.vtx, in any node related to deformers?
They dont need to store them as such. The mesh output contains ALL the information needed to create a mesh. This value is cached by maya however they do not need to store anything since they can just recompute the output. Since they get the meshdata to perate on in input (and this input is where they get the vertex positions).
There is however a single deformer that does some storing. And thats the blendshape. Howeevr it does not actually store vertices it stores deformation deltas, which it generates form mesh inputs. It will recreate the deltas if the mesh input is present othewise it will not.
This all said even pSphere1.vtx does not actually exist at all its a sort of a magic shortcut to athe shape. Even the shape does not really store the vertex positions in the node. It stores only the relavant parts of the node network so while the data is stored in the mesh connection slot and then temporarily in slots for disk access when saved. the data is not actually necceseriky stored in the way you think.
Wow! That explains a lot of things. I've been really wondering how weird accessing vert positions are sometimes. Maybe I've been treating verts as objects. How come you get this:
shpe.vrts[0].get()
# Result: (0.14877812564373016, -0.98768836259841919, -0.048340942710638046) #
while accessing x, y, or z for that vert gives you:
shpe.vrts[0].vrtx.get()
# Result: 0.0 #
btw, where 'shpe' is of type:
type(shpe)
# Result: #
Thanks, Joojaa!
The shape is a bit dangerous. See the shape contains 2 values for the vertex.
See internally the vrts only really exists for file saving and caching purposes, and it does not reflect the position of a vertex. At best its the position of the vertex before tweak hits in, so it is atleast off by the value of pnts. And it may need to compute the value on fly and may cache the compound child as obsolete. So in theory
pCube1.vtx[0]
is
pCubeShape1.pnts0]+ pCubeShape1.vrts[0]
But the compound children may in fact not be computed correctly for vrts yes One should avoid direct querries unless ne has a very specific node graoph releted design in mind. And never EVER set pnts values!
So the attributes in maya are allways just base data storage. That does not mean the storage is doing it in the way one would think there might be a algorithm on top of them.
Soooo cool, Joojaa! How do you know all of this? This is amazing. A couple months ago, I was trying to understand the difference of the three. I thought pnts are really just inherited from parent node types but aren't really used in polygons and only used in nurbs. But you really shed some light by this clarification.
One of the things I was hoping to accomplish was to be able to apply computations (using nodes) on the positions of these verts. Something like:
pc.PyNode('pSphereShape1.vrts[266]').connect(pc.PyNode('locator1').t)
The locator would simply be grounded to the zero zero zero coordinates. Even though
pc.PyNode('pSphereShape1.vrts[266]').get()
gives:
# Result: (-0.47552844882011414, 0.58778524398803711, -0.65450876951217651) #
Does this mean a special node has to be written to accomplish this? Thanks super!
How do you know all of this? T
It reads in the manual. Its just that most users do NOT read the right part fo the manual. Its pretty clearly wirtten in the node reference.
but aren't really used in polygons
arent used if theres no tweak to the node. Tweaks exist os thát you can have history and user edit at the same time. the ttweak is just a move on top. to retain user editebility. It has to be stored somehow. So its a additional layer of data.
Does this mean a special node has to be written to accomplish this? Thanks super!
Yes. Manual states that its not connectile so you cant rely on it to do anything specific (that basically means that they have a attribute for this but they dont update it consistently so theres no point in connecting it to anything). Since it wouldnt even donot do what you want you really want to use a follicle/point on mesh node etc to attach to. Easiest is to use the rivet.mel script everubodey else does too.
Topic | Category | Replies | Views | Activity |
---|---|---|---|---|
Who is interested in deploying this real-time renderer? | Maya | 0 | 1.3k | Mar 3 |
Free Toolkit for Modeling, Rigging, Animation! | Maya | 0 | 244 | Mar 31 |
Project a geometry onto another geometry with a locator origin | Maya | 0 | 160 | 20d |