Jump to content

Keep backbone attributes when using sweep


csp

Recommended Posts

Hi all,

I have a simple question with maybe not possible solution.

I would like to keep the point attributes from the geometry which is used as a backbone in the sweepSOP. By default, sweep will deleted all the attributes of the backbone but I noticed that succesfully transfers the color to the new geometry.

Is there any way to trasfer custom attributes?

If there was only one attributes vector attribute or three floats I could assign them to the color and then following the sweep I can break them again to individual attributes but I have two vector attributes.

Also attributetrasferSOP can do it successfully when the geometry is like the example in the attached file. Finally I can't use copySOP or polywireSOP because in my original scene I have multiple backbones merged and only sweepSOP gives me the right result by treating each backbone separately.

attributes_sweep.hip

Link to comment
Share on other sites

here is one way (in the file)

use Cd to temporary store original P of the backbone points

then create rest of sweep geometry

transfer it to Cd so it bacames aligned with original points

attribtransfer all the attributes you want even Cd from before creating temporary one

(this will be precise since all points lie exactly on top of original backbone point and you sample just first closest point anyway)

transfer it back to rest so it becomes sweep again

the other way would be to store pt as first component of Cd and then import attributes directly from that pt in the vops, but attribtransfer can nicely copy many attributes of different type at once so I prefer that method

and of course you can use Copy SOP, but you would need to make sure your backbone has correct orientation attributes so Sweep is easier to use

attributes_sweep_fix.hip

  • Like 1
Link to comment
Share on other sites

Alternatively, it is probably possible to create a double loop with 2 copy SOPs. (or 1 copy SOP and a foreach SOP)

You could create one copy sweep per backbone.

use join to make sure each backbone is a single primitive if you need to.

Then simply loop through all primitives.

Link to comment
Share on other sites

Alternatively, it is probably possible to create a double loop with 2 copy SOPs. (or 1 copy SOP and a foreach SOP)

You could create one copy sweep per backbone.

use join to make sure each backbone is a single primitive if you need to.

Then simply loop through all primitives.

that was my backup plan :)

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