Issues with point deforming multiple objects at once (hip file included)

   2223   1   0
User Avatar
Member
1 posts
Joined: June 2015
Offline
Hey everyone,



Been trying to wrap my head around this one for a while but after a few days of being completely stuck it would be amazing to get some help with this point deform problem I'm having.


I've got a pretty simple set-up (or so I thought) that's using the grain solver for quick softbody deformation, I've got three primitives scattered onto some geo which is then being fed into a dop net for simulations,

That part is working well, (and works fine when I want to deform a single object) the only issue I have is when I want to re-attach the original mesh to these objects with a point deform while dealing with multiple input geo's. I've been trying to create a for-each connected primitives loop for my point deform node so the in an attempt to have each piece recognised as its own object however I'm getting some strange deformations on my objects when I try to point deform them.

Any Ideas?

Hip File attached
Attachment Not Found
Edited by MattyG - May 22, 2018 11:30:41

Attachments:
pointDeformMultipleMystery.hip (354.9 KB)

User Avatar
Member
7759 posts
Joined: Sept. 2011
Offline
To avoid loops, one technique I use is to move the rest inputs apart in space, so each island shares no bind points. The point deform supports ‘deform only’ and ‘capture only’ modes that work in conjunction with this technique. Since capture data is only an array of indices and weights, translations have no affect on capture data.

To reduce the impact of float precision when there are a large number of islands, I encode the index (the island's identifier) as a cell position in 3-space.

a cell pattern can be computed from index as so:

int sx,sy,sz,i;
float x,y,z,pitch;
int numelem = number_of_elements(); // pseudocode, insert the relevant value/function here
i = @id; // use your identifier index here
pitch = spacing;  // space width of each cell
sx = stride_x;  // number of cells in x
sy = stride_y;  // number of cells in y
sz = sx * sy;

z = i / sz - numelem/sz/2;
y = (i % sz) / sx - sy/2;
x = (i % sz) % sx - sx/2;
@P += set(x,y,z)*pitch;
  • Quick Links