Jump to content

Polywire shape adjustments


bratro

Recommended Posts

Hi there! 

I'm trying to add a certain shape to an object. (see image which hopefully explains it better ;-) the effect I'm trying to achieve is that the polywire should be bigger to the point and smaller/thinner in between. I did try it with a ramp but it obviously doesn't work. I'm still new to houdini and any help is very much appreciated!

Thanks

;-)

 

curve_on_object_hipnc.png

curve on object.hipnc

Link to comment
Share on other sites

Trying to substitute Foor Loop with a primitive wrangle in @Atom setup. It works only for the first primitive.
I thought wrangle is a loop, e.g. the code inside VEX expression window should be executed for each primitive (at the same time, in parallel) but probably I miss something.

There should be printf() instead of sprintf()

polywireRamp.thumb.jpg.81c7467638b5a478bd3ae589e06616a0.jpg

ap_curve on object.hipnc

Edited by kiryha
Link to comment
Share on other sites

You have to setup your foreach to also ouput index.

"currentPoint" will give you the pointnumber globaly. What your interested in is the index of the number in your current primitive.

foreach(int index;int currentPoint;primpts){
	float ramp = fit(index,0,len(primpts)-1,0,1);
	}

 

 

 

  • Like 1
Link to comment
Share on other sites

Yes, that's works! Thanks, Thomas!

i[]@primPts = primpoints(0, @primnum);

foreach (int i; int currentPoint; @primPts){
    float ramp_index = fit(i, 0, len(@primPts)-1, 0,1);
    f@widthPrim = chramp("shape", ramp_index)/20;
    setpointattrib(0, "width", currentPoint, @widthPrim, "set"); 
    }

scalPolywireLoop.thumb.PNG.9e981f659c9999b07bb7cecf0f9ad608.PNG

scalePolywire_loop.hipnc

Edited by kiryha
  • Thanks 1
Link to comment
Share on other sites

Thanks, Thomas! The file is working fine, I just wish to clearly understand how it's working in-depth and replicate it by myself.
I examine the point animation along curve part (skipping orientations) and have some questions and probably I will have even more questions later, so yes, when you will have time you can check that topic.

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