Jump to content

How to copy packed prims/fragments onto points?


magneto

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 :)

Link to comment
Share on other sites

  • 2 months later...

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
Link to comment
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
Link to comment
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...