r-a-n-d-o-m Posted March 29, 2018 Share Posted March 29, 2018 Hello, I've been playing with the wire solver and have this basic setup: A couple of wires on a grid falling down on the ground. What I would like to do is give every wire a different elasticity. Now the elasticity is set for the whole wire object and everything that is inside it. How can you address each individual wire and give it a random elasticity value? Thanks in advance. WireSolver_01_BasicSetup_01.hipnc Quote Link to comment Share on other sites More sharing options...
Atom Posted March 29, 2018 Share Posted March 29, 2018 If you bring up the help card for the WireObject you will find a chart that describes the various attributes and what context they are located in. All you really need to do is to set them before you enter into the DOP network. Just like you have set velocity. Drop down a wrangle and populate the attributes you want to control. Here is random @targetstiffness setup. ap_WireSolver_01_BasicSetup_01.hipnc Quote Link to comment Share on other sites More sharing options...
r-a-n-d-o-m Posted March 29, 2018 Author Share Posted March 29, 2018 Hi, thanks for the reply. I have tried this approach, but this assigns this value to ALL of the wires. I want to give each wire an individual value. Quote Link to comment Share on other sites More sharing options...
Atom Posted March 29, 2018 Share Posted March 29, 2018 When I inspect the Geometry spreadsheet inside of DOPs I can clearly see that each wire has it's own randomly generated @targetstiffness. Quote Link to comment Share on other sites More sharing options...
r-a-n-d-o-m Posted March 29, 2018 Author Share Posted March 29, 2018 Yes, this is true, but these values are given to each point on the wire. So one wire will have different values on each point. So not the whole wire is given 1 value. I also changed it to a primitive attribute so that the whole wire (primitive) has one value, but I don't see a result in the sim. It looks like the wire sim is using one value on all of the wires. Quote Link to comment Share on other sites More sharing options...
Jesper Rahlff Posted March 29, 2018 Share Posted March 29, 2018 2 hours ago, r-a-n-d-o-m said: Yes, this is true, but these values are given to each point on the wire. So one wire will have different values on each point. So not the whole wire is given 1 value. I also changed it to a primitive attribute so that the whole wire (primitive) has one value, but I don't see a result in the sim. It looks like the wire sim is using one value on all of the wires. outside dop, put your wrangle in a foreach loop on the primitives. this way you can write in a point wrangler to the points on each wire no? Quote Link to comment Share on other sites More sharing options...
Atom Posted March 29, 2018 Share Posted March 29, 2018 What about something like this running over primitives. int pts[] = primpoints(geoself(),@primnum); // Assign @targetstiffness for points in this prim. foreach (int pt; pts) { float ts = fit01(rand(@primnum),0.01,10); setpointattrib(geoself(), "targetstiffness", pt, ts, "set"); } The random seed for the target stiffness is based upon the primitive number. So each point inside that primitive gets the same target stiffness but each strand will be randomly within the range of the fit01. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.