Jump to content

Copy attributes from 1 to many


pixelgate

Recommended Posts

Hi

I'm very new to houdini. I've started learning a few days ago and made my first scene.

I paint the size of the objects. The objects are built in a few steps.

Now I got a problem:

After a sphere, some tubes are copied on the spheres. But the tubes are not scaled correctly. One step before, I could solve the problem with a attribcopy node because tsource and target points had the same numbers.

Now I need to copy pscale from 1 to many points. How could I achieve this?

Best regards,

pixelgate

Link to comment
Share on other sites

Hi

I'm very new to houdini. I've started learning a few days ago and made my first scene.

I paint the size of the objects. The objects are built in a few steps.

Now I got a problem:

After a sphere, some tubes are copied on the spheres. But the tubes are not scaled correctly. One step before, I could solve the problem with a attribcopy node because tsource and target points had the same numbers.

Now I need to copy pscale from 1 to many points. How could I achieve this?

Best regards,

pixelgate

you can use a point() expression to lookup a value and apply it to your many objects. Add a point SOP to your target pts and in the 'pscale' value, point("../tsource", 0, "pscale", 0)

That will look at the pscale value of the point number '0' on the SOP "../tsource".

Hope this helps

Link to comment
Share on other sites

You could also create a point group using your source point. Now in the attrib copy sop specify just that group as a source.

It should copy the attribute to all the points in your input geometry unless specified a destination group.

Creating selection using group sop is a very powerful and flexible way of working. You may want to explore it further, if you are new to Houdini.

Cheers,

Link to comment
Share on other sites

thank you SpencerL and vectorblur.

I forgot to say that I need to have multiple "one - to many" point selections.

Here are two screenshot to explain the problem better. I could copy the point attributes from the base points to the "toppoints". But now I got one "toppoint" and multiple points around it. These points need to have the same scale.

post-6628-133227073247_thumb.jpg

post-6628-133227074066_thumb.jpg

I have tried a few things with attribcopy and attribtransfer but neither worked.

SpencerL's solution could work here but I have no Idea how the expression should look like.

I image dummycode like this:

For each point $PT, point("../toppointgroup", "$matching toppoint", 0)

best regards,

para

Link to comment
Share on other sites

If you use a copy sop then an attribute called pscale will automatically be picked up and used as a uniform scale.

Otherwise you could perhaps use a detail att on the spheres and set it to the same values as those on the tube and when you merge the whole thing ino one geometry you promote that detail att to points (otherwise they'd get lost)

Link to comment
Share on other sites

I could solve the problem.

I just needed to delete the copy sop, made a new one and pre-attach a attribtransfer node. Perhaps, I had some "bad options" turned on the original copy sop.

Here is the render:

post-6628-133260794193_thumb.jpg

regards,

pixelgate

Link to comment
Share on other sites

I could solve the problem.

I just needed to delete the copy sop, made a new one and pre-attach a attribtransfer node. Perhaps, I had some "bad options" turned on the original copy sop.

Here is the render:

post-6628-133260794193_thumb.jpg

regards,

pixelgate

that looks pretty cool :D

keep up the learning!

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