Asset libraries: Proper approach?

   3014   13   1
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline



Hi,


If I'm building a library of assets (for instancing, e.g. with the copy sop) in Houdini what is the proper approach?

Each asset would of course have 1-n materials assigned, potentially also lights.


Any input welcome!
Matt
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline


Hi again,


I have just tried some approaches via an HDA, but I'm confused about the context the HDA should be created in.


If I create an HDA on the obj level that contains a geo node, a shop net (with the material inside), I cannot create of the HDA within an other geo node, e.g. to scatter the HDA via the copy sop. And if I try to create an HDA from within a geo node, there's no way to assign the material..

Hope to get an input, thanks!
Matt
Edited by deadalvs - July 5, 2016 11:14:08
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline



I have read that it's not possible to instance HDAs .. which makes it even trickier ..

User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi the strategy
deadalvs
Hi again,


I have just tried some approaches via an HDA, but I'm confused about the context the HDA should be created in.


If I create an HDA on the obj level that contains a geo node, a shop net (with the material inside), I cannot create of the HDA within an other geo node, e.g. to scatter the HDA via the copy sop. And if I try to create an HDA from within a geo node, there's no way to assign the material..

Hope to get an input, thanks!
Matt

Hi, there is just use a material SOP and assign your materials to groups or a material to all the geometry.
Rob
Gone fishing
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
deadalvs
I have read that it's not possible to instance HDAs .. which makes it even trickier ..


HDA strategy : An interesting question thats at the heart of workflow in Houdini. The approach I take is to build a tool to do one thing so in your case you would build the instancing into your tool. Ie you build a HDA that will create 10 different chairs , you then build the ability to instance those chairs onto some points. In the case of chairs your asset , could be just geometry and a shader. On the other hand if I am building a tracer fire tool for a show , I will include in the tool , geometry / shaders / Rops to cache geo / Mantra rops/ ie a fully self contained tool that I can attach to some alembic data.

Rob
Gone fishing
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline


interesting. thanks for the inputs.


so if I have 200 environment assets, with ~400 materials in total, each of the assets should be a self-contained HDA?

this just doesn't sound super efficient.

I'm still doing early steps in houdini .. but I assume you would recommend now that I create 1 ‘library HDA’ that stores all assets, plus then the mechanism to instance each asset via file paths that point into that HDA.. right?
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Being Efficient really depends on what your doing > You can have as many HDAs as you like it does not mean your being inefficient. You can have hundreds of HDAs on a show and even nest them. As your learning why not be a bit more descriptive with what your planning !

Rob
Gone fishing
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline


hi,


all I'd like to do is drive asset instances (asset, transl, rot, scl), pointing to a library of final-quality assets. so there will be trees, lamps, sign posts, .. all with their materials, ready to be rendered.

the question was about storing each asset with it's materials (and lights, ..) so that all assets can easily be edited, but also the whole library referenced into new hip files for other projects.
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Hey Deadalvs, have you tried the instance OBJ node instead of the copy SOP? copy is a geometry operator which literally generates a geometry with duplicated vertices. This is very flexible, however, also very memory and performance intensive (unless you are packing primitives as you are copying). For instancing objects in a set, the instance OBJ node may be more appropriate and efficient, as it does rendertime instancing with some GL instancing

If you MUST use the copy SOP, you can also make an OBJ level HDA which takes another Object as input (i.e. via an object path parameter although if you feel adventurous, you can override the transform plug), then internally, fetch the geometry of the incoming object (i.e. via an object merge), then copy it via the copy SOP. This will give you Copy SOP functionality at the object level

Hope this helps!
-G
User Avatar
Member
196 posts
Joined: Aug. 2011
Offline

hey .. thanks for the input.

I don't specifically need the copy sop. I want to be as mem-efficient as possible, means I may need to pack the original obj geo or store separately again as a different, more efficient file.


I've been quite busy, but I hope to work on this again soon!

User Avatar
Member
196 posts
Joined: Aug. 2011
Offline


ok, I have a network I like .. it's pretty simple.

the instancing of the geo works, but the material is lost .. is there a way to grab that too?

please see file ..

Attachments:
houLib.hipnc (186.3 KB)

User Avatar
Member
196 posts
Joined: Aug. 2011
Offline


any input would be most welcome ..
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Hey Deadalvs, I have been out of town unfortunately, so I have not been able to look at your file ): I can try to find a bit of time next week to take a look (unless someone beats me to it…!) have you tried also emailing your scene to support@sidefx.com, asking to see if there is a way to preserve your materials?
-G
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi I had a look at the file, its an open asset. Please just post up the otl / HDA file and a scene showing what it does. Then we might be able to help. Please do advise what you are trying to do with this otl as it will help.

Rob

Gone fishing
  • Quick Links