Jump to content

SOP Solver | Constraint Colors keeps changing


kube

Recommended Posts

Hey I have a simple problem!

I have a Vellum DOP Network with a SOP Solver in it. In the SOP Solver I´ve just transferred the Cd from my original Geometry to my ConstraintGeometry to control some parameters like the restlgenth via the color of the Geometry.

image.thumb.png.15440e2c528e135e73458b48b4f9840d.png   ->   image.thumb.png.64d63b35ab263bb84acfd0913c764b38.png

 

It´s working fine for the first frame each ball having it´s individual color.

However as soon as I start simulating, the colors don´t stay attached to the individual balls. So each ball doesnt have a unique Constraint Color, like in the first frame, the color start shifting.

image.png.992ab9c5631c1995bba8220305cae096.png

Can someone please help me with this problem, the attributetransfer node seems to just transfer the Cd correctly in the first frame but not in the following frames.

I´ve attached the HIP. Thanks in advance!
 

SOP_CONSTRAINT_COLORS.hipnc

Edited by kube
Link to comment
Share on other sites

Hey, 

The attributetransfer node works by proximity, hence why it only works properly on the first frame since the original geo and the vellum simulation are both in the same position. Every point in the vellum balls looks for the closest point in the original geo and reads its colour, since the vellum balls are changing positions constantly the closest point will not remain the same. 

A fix for this would be to transfer the colours using point id since both the original geo and vellum balls share the same point number & id. You can use either an attributecopy node or a point wrangle to do this.

 

Hope this helps! 

 

SOP_CONSTRAINT_COLORS_2.hipnc

image.thumb.png.899b390e04bb8f3abcfe8f1179797339.png

Edited by Ziyad
  • Like 1
Link to comment
Share on other sites

7 hours ago, Ziyad said:

Hey, 

The attributetransfer node works by proximity, hence why it only works properly on the first frame since the original geo and the vellum simulation are both in the same position. Every point in the vellum balls looks for the closest point in the original geo and reads its colour, since the vellum balls are changing positions constantly the closest point will not remain the same. 

A fix for this would be to transfer the colours using point id since both the original geo and vellum balls share the same point number & id. You can use either an attributecopy node or a point wrangle to do this.

 

Hope this helps! 

 

 

Man I knew that the solution was that simple, still I couldnt figure it out. I see so if i want to tarnsfer Data to the ConstraintsGeometry I´ll have to use Points instead of primitives, still i don´t get why primitives won´t work but points do.

 

Doesn´t the ConstraintGeometry have the same amount of primitives as well?

So the Constraint amount always equals the amount of Points of the original Geometry?

 

And thanks for your help Ziyad!

Link to comment
Share on other sites

When you generate constraints (for example with vellum) Houdini will represent the constraints using polylines e.g. primitives (see below image - white lines). These constraints do not represent the original primitives of the original geometry, they are newly created primitives used to control the behavior of the simulation. If you middle-mouse-click the constraints & geo null nodes you made you'll see that the number of primitives does not match. 

As for the point count/number, it will remain the same since constraints are stored using primitives/polylines that connect each of the existing points (see below image - blue dots). 

 

Apologies if my explanation is bad :lol:

image.thumb.png.0548c0c1338a7b0d2699e7f57f825647.png

  • Like 1
Link to comment
Share on other sites

Ahh very nice explanation! That really gave an answer to some questionmarks i´ve still had. Thanks a lot for the further explanation, I´m slowly getting the hang of Geospreadsheets and the technicalities behind Vellum.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...