Krion Posted March 14, 2019 Share Posted March 14, 2019 (edited) Hi! I was looking for ways to make a dashed line (between two objects). This video didn't exist anymore. https://lesterbanks.com/2012/01/creating-dashed-lines-in-sidefx-houdini/ Do you guys know any tutorial or do you have any suggestions? Thank you. Edited March 14, 2019 by DévinOdforce Quote Link to comment Share on other sites More sharing options...
Skybar Posted March 14, 2019 Share Posted March 14, 2019 Create a line, resample it and delete every second segment? Quote Link to comment Share on other sites More sharing options...
Krion Posted March 17, 2019 Author Share Posted March 17, 2019 (edited) On 3/14/2019 at 5:12 PM, Skybar said: Create a line, resample it and delete every second segment? How would you do that? I can't make a Group Range for edges. How would you delete points with leaving a gap? Or maybe I can do this directly in the Delete SOP? Edited March 17, 2019 by DévinOdforce Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted March 17, 2019 Share Posted March 17, 2019 Hi, using the carve node combined with a foreach is another option. dotted_line.hipnc 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 17, 2019 Share Posted March 17, 2019 (edited) Let a sine wave run across your curves, set the dash length with frequency, animate by adding time and define the gap size by comparing the value with a custom threshold. float u = vertexprimindex(0, @vtxnum) / float(primvertexcount(0, @primnum)); float u_length = u * primintrinsic(0, 'measuredperimeter', @primnum); float u_anim = (u_length + @Time * chf('speed')); int waves = sin(u_anim * M_PI * chf('frequency')) < chf('gaps'); v@Cd = hsvtorgb( set(u, 1.0, 1.0) ) * waves; If you want your dashed line to be static just replace u_anim inside the sin() function by u_length. dashed_curves.hiplc Edited March 17, 2019 by konstantin magnus Hit play! 2 2 Quote Link to comment Share on other sites More sharing options...
Krion Posted March 18, 2019 Author Share Posted March 18, 2019 (edited) Great stuff! Reminds me i should pick up learning VEX again.. 11 hours ago, konstantin magnus said: Let a sine wave run across your curves Is it possible to change this hip file or technique to be able to handle a (dashed) polywire afterwards? Edited March 18, 2019 by DévinOdforce Quote Link to comment Share on other sites More sharing options...
mestela Posted March 18, 2019 Share Posted March 18, 2019 add sop, check 'delete geometry but keep points' to get back to just points, then on the polygons tab chose 'by group', add mode 'groups of N points'. dashed_line.hip Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 18, 2019 Share Posted March 18, 2019 (edited) On 18.3.2019 at 10:19 AM, DévinOdforce said: Is it possible to change this hip file or technique to be able to handle a (dashed) polywire afterwards? Yes, you could take the convertline SOP, promote the wave attribute to primitives and delete by this attribute. @DévinOdforce: I attached an example. dashed_curves_prims.hiplc Edited March 19, 2019 by konstantin magnus 3 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.