PDA

View Full Version : Get mesh vertex position in nodes and set their position in nodes?



probiner
02-04-2014, 12:15 PM
I've been doing some stuff in ICE and from time to time I wonder how could I replicate that same thing in LW displacement and motion nodes.
http://vimeo.com/85787454

Dpont has a node, Point Info, to get point position but only returns One vertex position. If I feed it an array of Indices I seem to get an array of point positions. But I don't know a node that outputs a mesh Vertex ID, othe than... Dpont's Point Info.
If for example I feed it the Nearest Point ID output , which I think it's an array I seems to have multiple point positions returned, but it's not the actual point position but... it's nearest point.

https://dl.dropboxusercontent.com/u/143766132/Forums/NewTek/pointposition.png

Here's a sample. Scene.

Also... displacement sets position as an offset so there's some issues to solve there, but right now what I want is to have an array of Vertex Index in a vertex context.

Wish I could along side make some things for LightWave as I learn more stuff in Softimage.

Cheers

RebelHill
02-04-2014, 12:49 PM
Hard to say without knowing what you're trying to do, but I suspect that spot info is what you want.

Sensei
02-04-2014, 05:14 PM
Displacement input is accepting offset = delta. If delta is 0 (or rather 0,0,0 because it's vector), then no displacement.
But World Position outputs in nodes is returning absolute position of thing.
So, you have to subtract new position from old position (Spot Info > World Position) to get delta between them.

probiner
02-04-2014, 06:10 PM
@ RH
What I'm trying to do there its simple. Have the point positions vectors in the Node editor, being read from the object and also being set-up on the object, to have some custom deformations.
The point of my print-screen and scene was to show that Dpont's node Point Info works to read the object's point positions, but it requires a set of IDs (vertex ID) in order to return ALL points position vectors and not just the one on the node options. I used Nearest since it gives me a set of Vertex IDs, just not their own. I was wondering then if there was a node that would output something like "Vertex ID" so I could plug it into Point Info. As for now it seems there isn't.

@ Sensei
True, thanks, I have that in mind. I was more worried actually in getting the Point position vectors in the first place.

Cheers

Sensei
02-04-2014, 06:55 PM
As for now it seems there isn't.

You seem not understanding how displacement handler plugin class works.
It's loop for each vertex in object. For every vertex in mesh there is called separate "evaluate vertex #1", "evaluate vertex #2", etc. etc. 1 mln vertex, 1 mln executions.
For every vertex there is filled Spot info world position, object position to position of currently evaluated vertex. Once it's position of 1st vertex, in other it's position 2nd vertex, and so on. Variable as many times as quantity of points.
So Nearest Point is taking Spot info position, then is searching the nearest point to position were is actually evaluation routine. So it has absolute no sense. The same info (position of point) you have already in Spot info.
Same vector subtract same vector should give 0,0,0. Because X'=X,Y'=Y,Z'=Z.

ID for Point Info you're getting in Modeler (select point and press 'i'). One single Point ID.

RebelHill
02-04-2014, 07:01 PM
Have the point positions vectors in the Node editor, being read from the object and also being set-up on the object, to have some custom deformations.

Ok... Spot info, or... Nothing. Because the extant positions are already there. Any displacement you add will always be on top of those positions.

Sensei
02-04-2014, 07:04 PM
I used Nearest since it gives me a set of Vertex IDs, just not their own.

It's not set. It's just one.
It's single integer value.
One for every evaluation.

Then context is switched to other vertex and repeated over and over again.