Jump to content

Sweep individual section length for each curve.


Recommended Posts

I can not replicate the setup... how spare_input_0 connection was done?

Why are you promoting attribute to detail? Point attribute would not work?
What does -1 means in detail() expression?
 

 

Edited by kiryha
Link to comment
Share on other sites

14 minutes ago, kiryha said:

Cant replicate the setup... how spare_input_0 connection was done?

select some node, Gear icon (next to the big H)>Add Spare Input

 

Why are you promoting attribute to detail? Point attribute would not work?

well you'd want prim or primattrib coz there's only 1 width for a 'curve' (prim)...not different widths for each point. I did try prim/primattrib first but couldn't get it to work...so for each iteration, I promoted the width attr to detail (a curve)...then interrogate the detail width


What does -1 means in detail() expression?

in a node you see in/out ports (the circles)...the order is 0, 1, 2, 3....99% of the time you'd use 0 as it is the 1st input. For Spare Inputs...they go to the left...ie -3, -2, -1...so in the transform, the default port is 0, the first Spare Input is -1 (an imaginary port to the left). You can use "../blah blah" instead of -1 too (the blah blah is what's in the Spare Input 0 field)

 

 

  • Like 1
Link to comment
Share on other sites

ok so for the hell of it... I changed prim(opinputpath(".", 1), $PATH, "stripWidth", 0)

to prim(1, $PATH, "stripWidth", 0)...works..

Don't understand the $PATH bit tho...can someone pls explain ?

Ahhh...got it...this one:

prim(surface_node, prim_num, attrib_name, attrib_index)

(expression function...not VEX function)

But how does $PATH equate to prim 0, 1, 2 ...etc... ?

Edited by Noobini
Link to comment
Share on other sites

Thanks, guys, the Victor solution is rocking also!

Although I have some issues with my curves sometimes and I don't understand why some of them picking up wrong values:
 

roads.PNG

Also, I was not able to get this attribute value in polyexpand2d2 SOP...

ROADS_003.hipnc

Edited by kiryha
Link to comment
Share on other sites

1 minute ago, kiryha said:

How to decide when use point attributes, and when primitive? At previous example we used primitive, now switch back to points...

Yes, now i use point attr, but then i promote this attribute back to prim attr.  How to decide which attr use? It depend which attribute use node. Some node use point attr some prim attr and some detail attr. Need to look to help card for node

  • Like 1
Link to comment
Share on other sites

Still not able to get polyExpand2D working. Is it because Offset parameter required another then primitive type of the attribute?
I try to use point attribute with an expression point('../attribpromote2',0, "rWidth", 0), it works, but all curves have the same amount of offset...

ROADS_004.hipnc

Edited by kiryha
Link to comment
Share on other sites

Expression was not right. There is some problem in geometry with one of the line before foreach loop and polyexpand2d has error. Hip file in attach so far. And i presume you need to connect lines as in network box in the scene but i not understand actually what you try to achieve with polyexpand2d.

ROADS_004_01.hipnc

  • Like 1
Link to comment
Share on other sites

Thanks, Victor! With  polyexpand2d I build paths for the vehicle's motion.
Now I am thinking how to clone cars with time shift and the only way I know is export car animation to Alembic and clone it with a time shift (as Tomas described here)
This technique works perfect but I am not sure if its a best solution for this task.

CAR_A_01.gif

Edited by kiryha
Link to comment
Share on other sites

Hi, Vusta!
That solution with resampling and smooth also come to my mind and it works well.

So now I need to clone a bunch of cars along a bunch of paths... but this question is far away from the original 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...