How to dynamicly detect and assign materials to an object loaded through a file sop.

   1259   2   2
User Avatar
Member
7 posts
Joined: Nov. 2017
Offline
Hi.

I am working on a tool to build a building facade for a video game. I would like to use the file merge node within the geo for the facae system import the files for the building parts I have created in a external program. But I can't seem to get the materials for them this way. However, if I first import the files into the project itself, and then merge them in to the facade system through object merge, I can get the materials to follow. But this is way less dynamic and quite cumbersome. Is there a way to do dynamicly detect, create and assign the proper materials through the file merge node?

Attachments:
file_merge_vs_object_merge.jpg (633.1 KB)

User Avatar
Member
7740 posts
Joined: Sept. 2011
Online
no, the file merge node isn't for loading fbx files.
User Avatar
Member
183 posts
Joined: Dec. 2011
Offline
Currently we do this by creating an export script in Maya that creates a material linker file which basically tells us what textures go to which material and which material goes on which material group. We then export the geo from Maya as an .obj with the material groups included. In Houdini we import the geo using a script which places the file merge node along with a material that best matches the material used in Maya using the definitions in material linker file. That file also tells the script which textures go to which new material and then how to assign those materials to the proper groups in a material SOP.

So it definitely takes a bit of coding overhead, but once it's working it speeds up the process of Maya->Houdini imports significantly.
  • Quick Links