"Copy Stamping" and "Point Instancing" not giving the same results?

   1906   2   2
User Avatar
Member
408 posts
Joined: June 2015
Offline
I set up a bunch of Copy Instancing using “stamp(”../copy1“, ”instance“, 1)” on a switch node and “floor(fit01(rand($PT),1,10))” on the copy node variable “instance” value. All my Geos connected to the switch are connected in an orderly fashion from 1 to 9.

Beside this I then try to recreate the same with a Point-old instancing using the same “floor(fit01(rand($PT),1,10))” pointing at my instances, so “/obj/Geo`floor(fit01(rand($PT),1,10))`/”. As it's way faster rendering that way, i'm using Redshift.

For reasons i still ignore i don't get the same Geo distribution on my points with both methods.

When using the Point-old instancing method i can see the instance number in the Geometry Spreadsheet, but the copy stamp node on the other side does not create an attribute for that, so i don't know how to compare tthe result of my rand(@PT) which i would assume should be identical anyway.

Any idea what i'm missing to get the same results with both instancing and copy stamping please?

Cheers,

A.

Attachments:
Instancing.JPG (247.8 KB)
Copystamp.JPG (255.4 KB)

User Avatar
Member
359 posts
Joined: April 2017
Offline
If you wanted to compare the exact attribute values, you could do it by simply creating a point attribute and setting its value to the “instance” variable you're stamping, via the “stamp” expression.

That said, you're using a deprecated workflow. Rather than stamping variables, you should consider using a compiled for-each block to handle the switch between instances. I did a write-up [www.toadstorm.com] on this a while back that's a helpful overview for copying and varying instances, and it links to Jeff Wagners's much more in-depth tutorial [vimeo.com] on compile blocks if you need more details.

Also, there's a Redshift attribute you can place on a Geometry node that enables Redshift to read packed primitives as instances… try enabling “Instance SOP Level Packed Primitives” under the “Redshift OBJ > Instancing” tab. Might be easier than trying to go the old school instancing route.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
408 posts
Joined: June 2015
Offline
toadstorm
If you wanted to compare the exact attribute values, you could do it by simply creating a point attribute and setting its value to the “instance” variable you're stamping, via the “stamp” expression.

That said, you're using a deprecated workflow. Rather than stamping variables, you should consider using a compiled for-each block to handle the switch between instances. I did a write-up [www.toadstorm.com] on this a while back that's a helpful overview for copying and varying instances, and it links to Jeff Wagners's much more in-depth tutorial [vimeo.com] on compile blocks if you need more details.

Also, there's a Redshift attribute you can place on a Geometry node that enables Redshift to read packed primitives as instances… try enabling “Instance SOP Level Packed Primitives” under the “Redshift OBJ > Instancing” tab. Might be easier than trying to go the old school instancing route.

Thanks for the insights. I'll look into it. Although i fixed my problem by adding a “Null node / Empty obj merge” into the switch (on the first input) above my copy stamp and now my copy node gives the same result as point-old instancing. Well the result was the same already, but the instance applied to each value was offset-ted because of the switch first input being “0” and not “1”, silly me :$

Thanks a lot for your time, i'll follow your links now and do some reading. Appreciated.
Edited by Adriano - July 5, 2019 18:28:42

Attachments:
Fix1.JPG (428.1 KB)
Fix2.JPG (172.8 KB)
Fix3.JPG (185.0 KB)

  • Quick Links