Setting prim type as Scope for usdexport

   1446   5   0
User Avatar
Member
13 posts
Joined: Jan. 2023
Offline
Hi, how do I set the type of prim I'm exporting using usdexport node in Geometry context as Scope?

I'm using usdexport nodes to export polyreduce nodes (polyreduce results from an .fbx):


I can set the end result's prim's path (arrow to the right above) but I can't set the prim type as Scope. And so the prim comes out as an Xform:
Edited by KatanaPoland - Sept. 11, 2023 05:03:56

Attachments:
Screenshot_1.png (68.8 KB)
Screenshot_2.png (8.3 KB)

User Avatar
Member
28 posts
Joined: June 2022
Offline
you can try adding the usdprimtype attribute to "Scope".

s@usdprimtype = "Scope";
User Avatar
Member
13 posts
Joined: Jan. 2023
Offline
spektra
@usdprimtype = "Scope"
Hi spektra, thanks for getting back to me. I've followed your lead. It doesn't throw errors but doesn't change the prim the Scope for .usd export either.

I've created an attribute expression node like so:


Here's the code it generates:
Edited by KatanaPoland - Sept. 11, 2023 06:39:09

Attachments:
Screenshot_4.png (58.9 KB)
Screenshot_6.png (25.6 KB)

User Avatar
Member
146 posts
Joined: June 2019
Offline
It has to be point attribute.
anything in sop lacks of hierarchy data so you should provide it. Also terminology mixing doesn't help, sop primitive here is polygon and it has nothing to do with usd primitive (setting usd prim type for every polygon doesn't make much sense). One way to deal with it is packing sop primitives and set Packed Primitive to Unpack/Create XForms on USD Configure so you won't use instancing

In this case you do:
  1. Create a dummy point to represent usd prim
  2. Create attributes so point treated as usd prim (it will be ignored in geometry). In your case set @path and usdprimtype. the latter exactly points translator to treat it as usd prim

check the attached example of usd configure

also Scope doesn't carry transform so hierarchy probably should be something like /Root/LODs/LODx with LODs being scope

Attachments:
point_as_usdprim.hiplc (114.0 KB)

User Avatar
Member
146 posts
Joined: June 2019
Offline
Also if you pack your LODs you can merge it in sops and export under one usdexport.
It's generally a bit better mental model to use packed primitives in sops for usd because this way points basically holds geometry and in a way represents usd prims (because sop<->usd translator would use @name or @path to build hierarchy)
User Avatar
Member
13 posts
Joined: Jan. 2023
Offline
Thanks for your advice and the example file elovikov. It gave me an idea how to better move between geo and solaris contexts. I'll try out the packing approach moving on, thanks!
  • Quick Links