Jump to content

Recommended Posts

Hello, this is a real Noob question and you can tell I'm not too familiar with how attributes work.

 

The short version of my question is:

 

how can i divide a circle into a number of circular arcs without creating a carve SOP for every arc?

 

Long version:

 

I want to create a number of circular arcs, you could imagine one arc from 12 o'clock to 2 o'clock, one arc from 2 to 5 o'clock and the last from 5 to 12 o'clock.

 

Now I would need it to be procedural, because there will not always be three arcs around the circle, but variying numbers.

It would also be nice to have them slightly separated.

 

I tried by creating an attribute create with the values 0, 2, 5 and 12. Then I created 3 carve SOP's and copied those values and "paste copied relative reference" for the first and second u in the carve sops.

It would be possible to create another attribute to tell how much separation there should be between the arcs.

 

But it's not very procedural if the number of arcs changes.

 

Any thoughts?

Link to comment
Share on other sites

Are the lengths random or do you want to control them? Either way if you dont want to recreate a carve sop for each arc you can still use the copy sop and use the stamp function.

You could make a control object with a ramp that represents the arc length as a function of the number of copies and have the copy sop use the value from the ramp to carve the arc.

Link to comment
Share on other sites

Well with control object I just meant a control interface. You could make a null node with a ramp parameter that is being referenced by the input of your copy. The ramp parameter is a pretty abstract way of visualizing your arc lengths but it will work for any number of copies you want. You just have to re-adjust your ramp if you change the amount of copies so that the position of the ramp matches the segment you had in mind.

 

For something more concrete you could mimic the interface of the add sop. Here you could add extra segments and give values for the min and max u values to carve.

Link to comment
Share on other sites

Wow, that's great.

 

If I understand it correctly the carve sops first and second u takes value 0 and 1 from the list, and then the $CY variable in the copy sop makes the carve sop use value number 1 and 2 for the next copy.

 

Wonderful, thank you very much!

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