component builder in for each loop setup how / futile / lops

   1357   1   2
User Avatar
Member
190 posts
Joined: 12月 2016
Offline
Hello,

since im trying to convert a library from KB3D into a USD library without manually making new components for evry file.

I`ve been trying to get thru this but I`m hitting 2 hurdles ATM,
One of them is that Im unable to set the name attribute as the Root prim,

The other one being that Im afraid the add to asset gallery on the component builder won't save for each model.

And i Haven't started yet with the textures.

Any help is appreciated.
Edited by NicTanghe - 2022年12月15日 12:34:11

Attachments:
exampleImport asset Galery v10.hiplc (6.7 MB)

User Avatar
スタッフ
4159 posts
Joined: 9月 2007
Online
What you're trying to accomplish is better handled with PDG, if I'm understanding everything. For-Loops in LOPs/SOPs aren't really intended to write files to disk mid-stream, but PDG is great for this. In theory you could use the built-in loop on the Component Geometry Variants LOP, but in your particular case, each asset is so wildly different, you don't really gain much by combining them all into 1 "uber" asset with variants (especially if the goal is to just get a bunch of KB3D assets into Solaris).

Coincidentally, I had been started an example for a similar purpose, so I cleaned it up and applied it to the free minerva mission kit [kitbash3d.com]. The converted material will render with Karma CPU, but not the XPU beta, since KB3D authored these as principled shaders for Mantra. I am not sure of all the details necessary to get a USD Preview Surface or Usd MaterialX Standard Surface material, but I'm sure it's possible.

Drop this file next to the original "kb3d_missiontominerva-native.hip", and it should work as expected. I've set "ASSET_NAME" to "Asset_M" in the Context Options Editor panel, for preview while setting up the graph. Because this hip file re-uses the original .bgeo files directly and are using the textures as-is, the exported USD files and gallery thumbnails only take up ~2Mb of disk space.

Hope this helps!

Attachments:
kb3d_minerva_assets.png (201.1 KB)
kb3d_component_output.hip (3.6 MB)

I'm o.d.d.
  • Quick Links