Jump to content

Efficient way to instance/copy geometry onto points


ch3

Recommended Posts

On 6/30/2015 at 6:22 PM, ch3 said:

Actually for the time being I don't need to modify the points afterwards, but it's important for me to be able to preview the result and modify the simulation in an interactive way.

 

 

So when copying a selection of packed primities on to points, how do you select which primitive will go on each point? The only way I know so far is using stamping which is rather slow.

 

 

 

 

On the other side I manage to find a better way. The instance node seems to be the fastest, but the problem is the various pieces need to exist at object level with a transform, which could be rather painful to build and manage hundreds of different pieces. So what I did was to export all my packed primitives into a single frame alembic archive and create an hierarchy using a pathAttribute. Then I imported the alembic file, which automatically creates and manages the hierarchy under one alembic node and re-constructed the necessary path at the point's instance attribute to determine which piece of geometry should go on each point. So far this works really well, but I still need to see how well it translates to arnold archive for rendering in maya.

 

thank again

An example hip would be super helpful. This is what I've been trying to achieve. Please share if you can. I realize it's ages past.

Link to comment
Share on other sites

On 7/9/2015 at 5:26 AM, Kardonn said:

 

A little trick I do because sometimes there's WAY too many SHOPS in the file to be worth taking the compilation hit...just make a little script that goes through all of the shop_materialpath values, makes a point or sphere or whatever you want for each, and attaches every single SHOP the asset needs to these placeholders. Then you either set them to phantom, scale them down to microscopic, etc., but having them in your scene with force Mantra to compile those SHOPS at render time and make them available to the packed objects.

An example hip please for us cool koo donkeys would be nice. Lol. Thanks for the tip though. 

Link to comment
Share on other sites

  • 7 months later...
On 6/30/2015 at 11:13 PM, pbarua said:

I created a tool for faster instancing. Most of the tool is written in VEX.

It can instance live node from network and file from disk.

It's ultra fast compare to copy SOP. You will notice huge difference on more 100,000 points. 

File attached. Check and let me know if you have any difficulty.

copy_instancing.hipnc

pbInstance.hda.tar.gz

the instance node in your file is not loading in houdini H18

Link to comment
Share on other sites

It isn't really necessary to use fancy tricks for varying copy shapes in Houdini 18... the new Copy SOP has a pretty straightforward workflow for this. Pack each of the objects you want to instance and merge them, then on your template points create an integer attribute that will refer to the primitive number from the merge that you want to copy to each point. Then on the Copy to Points SOP just activate the "piece attribute" parameter and give it the name of the integer attribute you created on the template points.

  • Like 1
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...