Jump to content
Sign in to follow this  
cupoftea

transfer Cd with CopyToPoints

Recommended Posts

hello.
anyone knows why when using CopyToPoints in "pack and instance" mode, Cd attrib is being transferred to PolySpheres but not to PimitiveSpheres?
whereas pscale for example is always transferred?

polySphere.thumb.png.98dc50ced512da0052fb0eda791eec9a.png
primSphere.thumb.png.a253b9ec53877aa16216ce5761591fd0.png

Share this post


Link to post
Share on other sites

Probably because primitive spheres are already a single primitive, so packing them is causing some janky interactions. There's no benefit to packing primitive spheres.

Share this post


Link to post
Share on other sites

ok i see thanks.
but why is pscale transferred and Cd not?

should it not be possible to transfer any attrib to prim spheres (or points)?
 

Share this post


Link to post
Share on other sites

Because you have assigned Cd to primitives, not points. There are no primitives in the sphere primitive, only the central point which derives the surface from a spherical calculation. Try assigning Cd to points, and it works.

Untitled-1.jpg

Share this post


Link to post
Share on other sites

interesting. i actually had both of the "Attrib Randomize" SOPs to run over points.
thanks anyway, Atom

Share this post


Link to post
Share on other sites
Posted (edited)

When you pack the Cd attribute (or any attribute) into a point, the viewport can no longer access that attribute. It appears as missing to the system. Try turning off Pack and Instance your current setup may work. It's like not being able to see a thumbnail of an image inside a ZIP file. All you see is the ZIP.

 

 

Edited by Atom

Share this post


Link to post
Share on other sites

true. and understood. hence my initial question:
why is it then seeing pscale?
whats the diff between an attribute like pscale (working) and Cd (not working). i expected both or none to be "visible"

Share this post


Link to post
Share on other sites

Geo spreadsheet is your friend here. And I admit it's a little confusing. Plus in your question there's some mixing of metaphors going on.

When you create a primitive sphere and apply a color to it, the color is applied to the point representing the primitive and the viewport does a trick to color the sphere from the point color.

When you pack and instance the copy to points, the sphere (primitive or poly) is stored in memory and color IS transferred to the new points that represent each packed sphere. If you look in the geo spreadsheet, you can see that Cd IS transferred to the points regardless of whether the sphere is primitive or poly. However, because the primitive sphere is itself packed, the viewport can't do its little display trick so they all look grey, despite having a Cd attribute. As Atom said, if you want to see the colors on the primitive spheres you have to unpack them (either by unchecking the pack and instance option or by appending an unpack node and transferring Cd in "Transfer attributes". Now the primitives are assigned a color and the viewport can display them.

Finally, pscale is NOT technically transferred. If you look at the geo spreadsheet after the Copy to Points, you'll see that there is NO pscale attribute on the points. The default is for pscale not to be transferred. Instead it (and the orient attribute) are applied as a transform matrix to all the copies. You could change this by unchecking "Transform Using Target Point Orientations" and deleting ^pscale (not pscale) from the list of "Attributes from target". Now pscale IS transferred as an attribute (although if you want to use it to scale your copies you now have to do that manually, but that is another post topic).

Digging through the geo spreadsheet is often a good way to figure out how Houdini is moving attributes about.

  • Like 1

Share this post


Link to post
Share on other sites

ah. this clarifies things.
thank you, much appreciated!

still, final question. remains unclear:
in above example of atom: color sop set to points, it IS working.
in above example of my initial screenshot: Cd set to points, it is NOT working.

so, both are technically the same. arent they??
(only diff is: Color SOP vs AttribRandomize SOP. both with Cd. both on points. one is working. one not?)

 

Share this post


Link to post
Share on other sites

Could also simply be a viewport bug. Houdini's viewport is notoriously buggy with packed prims, especially with colours. Sometimes it'll display, sometimes it wont.

You can try appending an unpack to see if the colour is there, if so you can swear, log a bug with sidefx, know thats how you do it from now on. It should render properly with mantra/karma, and can be made to work with mild effort with other renderers.

 

  • Like 1

Share this post


Link to post
Share on other sites

@cupofteaIn my setup I don't have pack and instance active, that's why the colors flow through.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×