kiryha Posted May 17, 2018 Share Posted May 17, 2018 How to set PROFILE length individual for each curve? Using custom @stripWidth attribute for example? PARAMETER_001.hipnc Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 17, 2018 Share Posted May 17, 2018 vu_SweepWidths.hipnc 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted May 17, 2018 Author Share Posted May 17, 2018 (edited) 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 May 18, 2018 by kiryha Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 18, 2018 Share Posted May 18, 2018 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) 1 Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted May 18, 2018 Share Posted May 18, 2018 Maybe that would be much easier? PARAMETER_001_01.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 18, 2018 Share Posted May 18, 2018 1 hour ago, vicvvsh said: Maybe that would be much easier? PARAMETER_001_01.hipnc certainly looks it..but I'm not much of a coder so will have to consult the Help oracle....but yeah as said I tried prim/primattrib first but couldn't get it working...hence my long way...:) Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 18, 2018 Share Posted May 18, 2018 (edited) 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 May 18, 2018 by Noobini Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted May 18, 2018 Share Posted May 18, 2018 $PATH is a local variable. See the help card for sweep node http://www.sidefx.com/docs/houdini/nodes/sop/sweep.html 1 Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 18, 2018 Share Posted May 18, 2018 (edited) ok..why stop there...I dug a bit more.....simply give it a pscale...then the sweep works by default !!!!! PARAMETER_001_01_01.hipnc (meaning you can control the width along a certain road with ramp !!! variable !!! Exclaimations !!!) Edited May 18, 2018 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted May 18, 2018 Share Posted May 18, 2018 (edited) Yes, it's more convenient way in some reasons. PARAMETER_001_02.hipnc Edited May 18, 2018 by vicvvsh 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted May 18, 2018 Author Share Posted May 18, 2018 (edited) 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: Also, I was not able to get this attribute value in polyexpand2d2 SOP... ROADS_003.hipnc Edited May 18, 2018 by kiryha Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted May 18, 2018 Share Posted May 18, 2018 You lost some attributes in attr transfer node. ROADS_003_01.hipnc 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted May 18, 2018 Author Share Posted May 18, 2018 How to decide when use point attributes, and when primitive? At previous example we used primitive, now switch back to points... Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted May 18, 2018 Share Posted May 18, 2018 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 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted May 18, 2018 Author Share Posted May 18, 2018 (edited) 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 May 18, 2018 by kiryha Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted May 18, 2018 Share Posted May 18, 2018 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 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted May 18, 2018 Author Share Posted May 18, 2018 (edited) 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. Edited May 18, 2018 by kiryha Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 18, 2018 Share Posted May 18, 2018 (edited) here's a generic Road Loop generator...just expand2d the path.... vu_Road_Loop.hipnc Edited May 19, 2018 by Noobini Quote Link to comment Share on other sites More sharing options...
Noobini Posted May 19, 2018 Share Posted May 19, 2018 (edited) arrrggg...silly me, this way is much shorter...and it does intersections... If you don't need intersections, then simply disable copy and intersectionstitch vu_Road_Loop2.hipnc Edited May 19, 2018 by Noobini 2 Quote Link to comment Share on other sites More sharing options...
kiryha Posted May 21, 2018 Author Share Posted May 21, 2018 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... 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.