Jump to content

Split curve into X segments.


Recommended Posts

I have a curve, I want to split this curve into a multitude of seperate segments, that have no gaps. Ideally by specifying the number of points allowed in each segment.

Essentially the 'Add' node with the 'Group of N Points' value specified, but that produces gaps between each new segment, I need it without gaps. 

How do I do this?

Link to comment
Share on other sites

I need more help now.

I am now sweeping this curve. It produces separated meshes. 

But, I need each of those separate meshes to be in a separate group. How would you do that?

They need to be in separate groups because I am ultimately trying to get these to load into Unity as separate meshes. Putting them in separate groups is how you do that.

Edited by rygo6
Link to comment
Share on other sites

I have a new problem.

There are now small gaps in between my sweeps due to the curve being separate.

See this image:

lVWxpLK.png

 

How would I fix that? I am thinking somehow I need to add one more vertex before and after each cut in the curve so that the sweep is aligned.

Edited by rygo6
Link to comment
Share on other sites

Sweep SOP can use instancing attributes (like N, up, orient, pscale, ...)

so you can create for example N and up on original curve using PolyFrame SOP

then Sweep will use those for orienting cross-sections and since they would have the same values for split points, the cross-sections would align

since you didn't post your file, here is modified F1's file: orient_multisegment_sweep.hipnc

Link to comment
Share on other sites

Thank you thats working. It introduced one problem though.

On my sweep I had a curve attached to the reference slot of the sweep sop to control the up orientation of my sweep.

Using your described technique seems to override this, it now ignores the reference curve for up orientation. Is there someway I can get that mixed into it?

Edited by rygo6
Link to comment
Share on other sites

Ok attached is my file. 

I am only trying to get the 'Sweep1' node working properly, I will copy the correct fixes to the other sweeps. By properly I mean, have the PolyFrame node to what it does do close the gaps between sweep sections, and also have the sweep oriented up towards the reference curve.

I was trying to read more about the 'Attributes from Path' section of sweep but am not quite following it. On your example you put '* ^P ^N'

I presume the ^N takes the info from the PolyFrame node with N in the tangent name. But I don't understand where P is coming from, nor what ^ signifies, nor what * signifies. So I could not decipher how to get the up normal of the reference curve mixed into that. Is there anywhere that describes these things in more detail? The info page on the sweep node doesn't have much info.

Track2.hiplc

Link to comment
Share on other sites

here is modified file with custom up attribute created from reference curve: Track2_fix.hiplc

also ^N is there just to prevent swept geometry from inheriting N from backbone  (the same as what ^P is for by default), as it is just meant for orienting cross-sections and not to actually affect the N attrib or anything

what * ^P ^N actually means is: *(inherit all attributes from backbone) ^P(except for P) ^N(and except for N)

more about it here: http://archive.sidefx.com/docs/houdini15.5/model/groups#manual

Edited by anim
Link to comment
Share on other sites

  • 1 month later...

Hello, if by chance you are still around. I have encountered another I didn't notice before.

Using this setup the beginning and end of the track has a gap. It seems that the tangents on the point where the track closes are not in alignment. Is there a way to fix that?

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