Multiple material slots

   6658   4   0
User Avatar
Member
2 posts
Joined: Oct. 2015
Offline
Hi,
How to import or export object with multiple materials? If I try to import .obj or .fbx exported from Blender with multiple materials, I can just assign one material in Houdini?
User Avatar
Member
2529 posts
Joined: June 2008
Offline
Export from Blender using FBX and you will get a subnet with all your objects as individual objects. The Houdini FBX importer will also create a SHOP net inside the subnet called 'materials". You can then tweak those materials or reassign as you see fit.

Also, with OBJ files you can leverage groups output from Blender inside of Houdini. Just drop down a Material node in the SOP context and you can add many materials each affecting only a single group of faces.

So the solution is proper export from Blender and then fix up inside of Houdini after import.

Attachments:
Untitled-1.jpg (142.5 KB)

Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
2 posts
Joined: Oct. 2015
Offline
Thanks, I was using file node (I expected it to add material id attribute for each polygon), didn't realise there was file->import that creates material groups. Now it works!
User Avatar
Member
2 posts
Joined: April 2019
Offline
This does not work for me.

When I use File > Import > Geometry, it just creates a new obj network with a single file node, which I already have, and which is incapable of assigning a material properly.

When I do File > Import > Filmbox FBX, it creates a subnetwork that seems to have one file node per geometry piece in the FBX file, but nothing renders and it just doesn't work.


Work Around:
use a Connectivity Node to assign a group to each connected piece of geometry after you import it with a File Node. In the Connectivity Node, name the group to create “mesh_piece” for example.

Then, use a group expression node with the expression “@mesh_piece == 0;”

Do so for every group you need to make.

Then you can assign one material per group.
User Avatar
Member
3 posts
Joined: Oct. 2017
Offline
zoey222

is this mean the same with manually selected each primitives and assign them to group?

Enivob
So the solution is proper export from Blender and then fix up inside of Houdini after import.

what do you mean by proper? isn't every export made from DCC is proper from their build workflow and imo most export already has their own materialID set and which I don't know why you need to do much more than that when its imported in Houdini just to expose those multiple material ID setup.

Isn't this need to be already implemented in Houdini? why?
  • Quick Links