Jump to content

How to apply a single shader at entire subnet obj


Recommended Posts

I'm struggling in houdini, I imported a fbx file, then I have single subnet with several objects and other subnets, but I want apply a single shader to all objets at this subnet. how can I do that without apply that shader a hundred times at entire subnet?

Thanks

Wanderson

Link to comment
Share on other sites

I'm struggling in houdini, I imported a fbx file, then I have single subnet with several objects and other subnets, but I want apply a single shader to all objets at this subnet. how can I do that without apply that shader a hundred times at entire subnet?

Thanks

Wanderson

Well you can apply a material right up at /obj level, check the nodes perameters to see where to link it.

Link to comment
Share on other sites

No artist-friendy way I'm afraid, you could:

0) Use Parameters Spreadsheet, in Op Mask like: /obj/subnet/* ^/obj/subnet/*/*, Parm Mask: shop_mat* , then click on the parm column name to select all queries and drag-n-drop material onto it. Of course FBX will have dozens of multi-nested subnets, so your OpMask expression will be quite longish... You could try bundles but at the end some group expression will be needed anyway.

1) explicitly place shader path per object with Python,

2) or even better link parm (`chs()`) with Python,

3) or filter IFD with Mantra Python call back.

Link to comment
Share on other sites

You could just dive inside the subnet, then make sure you have "hide other objects" in the viewport, then make a box selection to select all the stuff you see in the viewport and then in parameters pane you will most likely see a geo selection (in the top it will say X nodes selected, so if theres any other node than a geo node that you see parameters for you could just change it in the dropdown menu there) and there you can just go to the material tab and change the material and all selected geo nodes will get the same material :) .. ps.. this is if all nodes you want to apply the material to is visible of course

Edited by Magnus Pettersson
Link to comment
Share on other sites

This fine topic is close to my heart as I got familiar with awesome FBX standard via files consisting with ~25.000 OBJ nodes spread across 3-8 subnet's levels (with ~100 geo per subnet == 250 subnets in total) - but yes, hiding all but geos and walking through all subnets is doable. Added value is that you get familiar with your scene throughout, which is always a bonus! :)

Edited by SYmek
Link to comment
Share on other sites

you could object merge all your objects into one with an extract, then bake your results to a bgeo sequence. Then delete the fbx out of your scene. This method has some drawbacks (all your objects will be treated as one object etc).. but it may be good depending upon your needs. In order to do the extract properly follow these steps:

1. unlink your network view pane from your scene view pane and your parameter view pane (set them to 1, 2 , 3 in the link pane tab menu with the push pin on it at the top right of each pane).

2. click the shelf tool "modify->extract" from the shelf tool and select the objects you want to extract from your fbx file and hit enter.

3. unlink the parameter pane to be free floating (right click the pushpin and set it to unlink, and left click to make the pin unhighlighted). You do this to find out where the extract object has been placed into your fbx subnet structure. then go up one directory (or node) by pressing 'u', select the "extract" node and cut it, then paste it into the root /obj level.

4. next you can create a geometry rop in /out, point it to the extract node's contents (you may want to put a null under the object merge named "OUT" for convenience), set the output options for your geometry files (create a subdir named bgeo, and name your bgeo files something like "myGeo.$F.bgeo.gz" or whatever). render these out and bring it into your scene with a file sop.

if you do this on heavy geometry your scene will become much lighter and easier to scrub once you delete the fbx nodes (or bring the bgeos into another hip for rendering for instance).

-G

I'm struggling in houdini, I imported a fbx file, then I have single subnet with several objects and other subnets, but I want apply a single shader to all objets at this subnet. how can I do that without apply that shader a hundred times at entire subnet?

Thanks

Wanderson

Link to comment
Share on other sites

Of course FBX will have dozens of multi-nested subnets, so your OpMask expression will be quite longish... You could try bundles but at the end some group expression will be needed anyway.

I thought there was an option to NOT create those subnets when importing FBX?

Link to comment
Share on other sites

I thought there was an option to NOT create those subnets when importing FBX?

Indeed, but then you end up with thousands of objects inside a singe subnet, which is not helpful either. Having them inside subnets allowed at least create bundles (and I finally had a custom ROP with built-in overwrites via ifd filtering, so I could apply materials without touching a scene). Anyway, such problems are solved every 15 minute with tiny Python snippets in every production...

skk.

... but it just illustrates how useful would be to have multi-selection in Tree view, custom perspectives, and polished Parameters Spreadsheet (not to mention bundles expressions), and how "total nodal approach" isn't practical, at least without some additional tool set.

Link to comment
Share on other sites

  • 2 weeks later...

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...