Jump to content

For-each Patterns (Solved)


Recommended Posts

Found on some Asian--Forum only Picture and code.

I follow tutos and made (something:blush:)

but I have only H 16.5 and Qlib ( Don't get it- Centroid and for-each(extract -Centroid:blink: ) if someone can look  the file  and explain :wub:

prim_scale
vector max_pos=getbbox_max(1);
vector min_pos=getbbox_min(1);

float position=fit(@P.z,min_pos.x,max_pos.x,0,1);
float scale=chramp("scale",position)+0.5;

f@prim_scale=scale;

------------------------------------------------------

prim_color
float position=fit(@prim_scale,0.5,1.5,0,1);
vector color=chramp("prim_color",position);

@Cd=color;

 

dess.png

TutosOdforce.hipnc

Link to comment
Share on other sites

'Extract Centroid' can store the centroid as a primitive attribute. You can get the same effect by using centroid(0, *X/Y/Z*) in 'transform3''s pivot, then scale by 'prim_scale'. Not sure how the setup makes sense but maybe I'm missing something.

23132.jpg.39d458fd0ffa313a64ad74bafc7b0168.jpg

Link to comment
Share on other sites

  • Librarian changed the title to For-each Patterns (Solved)

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...