Loading certain assets, then instance them

   2797   5   1
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline
Hi,


Let's assume have a library of alembic based assets on disk (server), in a clean folder structure.

example:
assets:
trees
tree_1.abc
tree_2.abc
cars
car_1.abc
vases
vase_1.abc
vase_2.abc

Further, there are points with the following point attr structure for instancing:
point 1 - rx, ry, rz, sz, sy, sz, “trees/tree_2”
point 2 - rx, ry, rz, sz, sy, sz, “trees/tree_1”
point 3 - rx, ry, rz, sz, sy, sz, “vases/vase_1”
point 4 - rx, ry, rz, sz, sy, sz, “trees/tree_2”
point 5 - rx, ry, rz, sz, sy, sz, “trees/tree_2”
point 6 - rx, ry, rz, sz, sy, sz, “trees/tree_2”

Using the ‘file’ SOP: Is there a way in combination with the ‘instance’ SOP to first ONLY load the according assets from disk only then instance them on the points? I'm searching for a way not to have to load ‘many’ assets beforehand.


Any input welcome!
User Avatar
Member
2534 posts
Joined: June 2008
Offline
Here is what I have been playing around with. It leverages the @instancefile attribute for an instance object. In my case I have a folder structure, similar to your own, but instead of .abc files i have Redshift proxy files with the .rs extension I also have a companion version of the same object in the .bgeo.sc file format. In my image you can see how I split two different file types for different tasks. When Houdini is rendering, the @instancefile is set to a .rs redshift proxy extension when I am viewing my instance in the viewport Houdini will use the .bgeo.sc version of the file because I have re-written the filename with an alternate extension just for the viewport.

In your case, the viewport and render can use the same file extension.
Edited by Enivob - Dec. 2, 2017 15:36:42

Attachments:
Untitled-1.jpg (130.0 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline
Hey!

sorry for the late reply.

thanks for the input. much appreciated.


we'll look into this example!!

have a great day!!
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Hi,

I'm currently trying to recreate this setup, but with mixed results. While the .rs part of the network seems to work just fine, the .bgeo part isn't showing up in the viewport, neither does it render, when both display flags are pointed to its output node inside the Instance geometry node.
The only luck I've been getting with displaying the instances in my viewport, was when the path was pointing to a node in the scene, not a an external file.
Any idea how to get this working, or what I might be doing wrong?

Thanks in advance.
Cheers,
Ivan
User Avatar
Member
2534 posts
Joined: June 2008
Offline
I noticed this same technique was not working consistently using H16.5.378.
I think it is just a bug in Houdini. Instancing and the viewport is certainly flaky.
I am waiting for Redshift to be compatible with the latest H16.5.496 release then I'll test again.

One thing to review, which has got me a few times, is the Display/Render flags inside the Instance node. Make sure you have the Pink color on the .rs proxy and the Blue color on the swap file extension.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
143 posts
Joined: Sept. 2017
Offline
Hi Enivob,

thanks for the reply. In the end, I did a workaround, where I left the .rs part of the network as you show above, and substituted the part that creates the .bgeo.sc @instancefile attribute by a for loop, that contains a copy to points node.
Not only does it work now, but I also get the dynamic culling in the viewport, that goes along with using packed primitives for display, so it works even much better than the original approach.
Edited by ivanmalek - June 11, 2018 09:53:17

Attachments:
Capture.JPG (78.1 KB)

  • Quick Links