Jump to content
Sign in to follow this  
bratro

Polywire shape adjustments

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×