Jump to content
Sign in to follow this  
magneto

How to copy packed prims/fragments onto points?

Recommended Posts

Hi,

 

I have a few dozen packed prims combined in an alembic. I want to instance these onto points in the scene as actual geometry not render time, but I can't do it. I checked Instance SOP which uses the Copy SOP's Attribute stamp but I can't get it to work. I tried point int attributes, prim int, point string and prim string attributes but no luck.

 

 

Thanks :)

Share this post


Link to post
Share on other sites

Thanks, I know how to do it this way by deleting using stamping but I think there is a way to do it without stamping just like Instance SOP, unless I am missing something.

Share this post


Link to post
Share on other sites

I've got a simiar issue here.

 

I was wondering if there was any more efficient way of copystamping instances as I created a scene where I've got millions of points and instanced some packed primitives onto these points. Rendering a frame is taking ages, as well as baking the instance part.

 

My setup is slightly different than the one posted by Matt, but it basically it does more or less the same (the main difference is I am not using any alembics and I'm randomising my instances using a stamp on a switch node's input value).

 

The thing is, it feels rather slow. Does anybody have an idea how to make it any more efficient?

 

Here's a basic example of what I'm doing using a less complex setup:

packedInstances_v01.hiplc

Edited by Phlok

Share this post


Link to post
Share on other sites

As magneto suggested, a better way is probably with the instance sop:

 

http://www.tokeru.com/cgwiki/index.php?title=Houdini#Instance_with_instance_sop

 

(edit)

 

Hmm... peek inside the instance sop... its using exactly the same stamped switch trick! Outrageous! 

 

Maybe the instance node at the /obj level rather than the instance sop works more efficiently? Worth a test.

 

(more edits)

 

I took that example from the wiki, boosted it to a million points, put the render flag on the instance sop (with its 'display as' parm set to 'hidden' for good measure), and the display flag on the node before.

 

When left in this way houdini stays pretty interactive for general use, which is nice.

 

When rendering, my macbook pro takes about 1 minute before the first pixels appear; you can see the first 30 seconds of that is the stamp inside the instance sop churning away. I assume there's a better way. I tried the instance object, and object merged the points inside it, but it doesn't look like it reads the @instancepath attribute at all, and just complains that it wants a shape connected to its top level parameter.

Edited by mestela

Share this post


Link to post
Share on other sites

How about the "transform pieces" otl? You need matching "name" attributes for the source geo and the template points. The name attribute should be a prim attrib for the source and point attrib for the template points. The template points should also have a "pivot" attribute which would be their tx,ty and tz values.

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  

×