Copy stamping / Random scale slowing down playback / cache?

   6320   9   2
User Avatar
Member
408 posts
Joined: June 2015
Offline
Hey guys. I'm completely new to Houdini. Just got into it recently, so i don't know much.

I just created a pop network, some particles emitted from a turbulent noise (used to delete non-selected polys) on a geometry (Torus for now) and then instanced (copy) spheres onto each particle. I'm using the copy stamping to randomize the scale, and noticed that when doing so the playback / caching speed has dramatically dropped. What was priory almost real time takes now about 20 times slower. Any particular reason for that please? Am i using a wrong approach?

Thanks in advance.

A.
Edited by Adriano - Jan. 22, 2017 18:51:25

Attachments:
NEt1.JPG (36.5 KB)
Net2.JPG (48.5 KB)
RandScaleSpherese.JPG (267.2 KB)

User Avatar
Member
419 posts
Joined: Feb. 2012
Online
use “pack geometry before copying”
User Avatar
Member
408 posts
Joined: June 2015
Offline
I did. It didn't change anything.

If i turn off “Stamp Inputs”, the playback with all the spheres (of identical scale) is fast again. But with “cache stamping + Pack geo before copying” or not, as soon as i turn on the “stamp inputs”, it starts choking again.


Actually it's inaccurate. It's as soon as i use “rand($PT)*2” expression in the variable 1 (scale) value of the “ Stamp inputs” that things get terribly slow. Because using Stamp inputs variable (scale in my case)with an integer value does not slow down anything.

Am i using an old vex expression? is “rand($PT)*2” obsolete or something?

Cheers,

A.
Edited by Adriano - Jan. 22, 2017 19:13:43
User Avatar
Member
419 posts
Joined: Feb. 2012
Online
use an Attribute Wrangle before the Copy node and add this

@pscale = rand(@ptnum);

do not use the stamp function
Edited by sepu - Jan. 22, 2017 19:19:37
User Avatar
Member
419 posts
Joined: Feb. 2012
Online
Here a quick example

Attachments:
copy.hipnc (1.4 MB)

User Avatar
Member
408 posts
Joined: June 2015
Offline
Thanks a lot. That indeed works flawlessly. Does it mean that Stamp inputs should be avoided at all times? Can you think of an example where Stamp Inputs would be required please?

Thanks again, great stuff.

A.
User Avatar
Member
419 posts
Joined: Feb. 2012
Online
stamp function can rapidly slow down houdini scenes when you start playing with huge amounts of point counts. You can use it for more simple stuff but I'll recommend try to avoid as much as you can and use vex instead, also vex take advantage of parallelism, which gives you a nice speed up.
User Avatar
Member
408 posts
Joined: June 2015
Offline
Thanks again.

A.
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Only pscale / Cd will work like that as its internally handled by default. What you can do is set your attributes on the template geometry and then stamp that attribute in the copy sop. Also make sure to pack your geometry either before input into the copy sop or on the copy sop.
Rob
Edited by circusmonkey - Jan. 22, 2017 20:12:18
Gone fishing
User Avatar
Member
408 posts
Joined: June 2015
Offline
Noted. Thanks a lot.

A.
  • Quick Links