Jump to content

Copy Stamping alternatives?

Recommended Posts

Hi Everyone,

First post here and beginner level at Houdini so a nudge in the right direction would be great

I have saved out a wind turbine model with a group called blades, and am copy stamping this .bgeo across a grid. I'm then using a point wrangle to create an attribute "id" and assigning a random value based on @ptnum, which is plugged into the stamp and a "blades" transform node further up the tree to offset the rotation of the blades.

Its super slow playback in the viewport - even with pack before copying checked etc. I've read a few posts that suggest copy stamping isn't the way to go post H15 - could anyone point me to a good explanation of whats going on here and any possible solutions to better performance? I did run the performance monitor on my setup and its no doubt the transform node with the expression reference to the copy stamp that's causing it.

Im running H16.5 NC - Any suggestions / further reading will be much appreciated!

Cez

CopyStampOffset.hipnc

TurbineGroup_01.bgeo

Share this post

Share on other sites

Have a look at this.

Share this post

Share on other sites

For something like rotation / orientation, copy stamping doesn't make sense because transforming instances or packed primitives is something the Copy to Points SOP can do just using template point attributes, no stamping or For/Each loops required.

If you check the docs for copying and instancing here, you can see that by providing either an N and up attribute or an orient attribute to the template points, the Copy SOP will automatically apply those transformations to each copy.

Setting those attributes is sometimes less intuitive than using the familiar Transform SOP, though, so here's a bit of VEX code to help you out. You could put this in a Point Wrangle to convert user-friendly Euler rotations (like what you see in a Transform) to a Copy SOP-friendly orient quaternion:

```vector R = chv("rotate"); // you could replace this with a vector point attribute with Euler values!
vector4 orient = eulertoquaternion( radians(R), 0 );

p@orient = orient;```

If you were in a situation in which the shape of each copy needs to be varied, then Sepu's video above is the right choice. You'd want to use a multithreaded For/Each loop to vary each copy.

FWIW, I have a big guide to this whole question of instancing here: http://www.toadstorm.com/blog/?p=493

Share this post

Share on other sites

Thank you to both of you for taking the time out look at my question, it's much appreciated.

toadstorm - had a quick look at your post and that looks like exactly the thing i'm looking for! I much prefer to read through an explanation, so that's great, thank you!

It seems like i've decided to pick up Houdini at strange intersection in time - lots of new and better ways of doing things i.e. the move to VEX, point SOP restructuring etc. Makes the learning curve that little bit steeper, but would rather learn the new way once to get me prepped for the future.

Cheers,

Cez

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

×