5 Replies
      Latest reply on Oct 10, 2018 8:54 PM by JeremyRaven
      YojimboMaster Level 1 Level 1 (0 points)

        I found that there is still lacking of documentation of "USDZ Converter", so I might start some kind of thread talking about this. So far I found developer 'Ash' out there has been really helpful and we are still discovering USDZ feature, gotchas and limitations along the way. There is this USD Interest group at Google Groups that is more specifically talk about USD.

         

        A bit of information about me:

        I am an independent developer, mostly using Blender 3D and XCode only. I have not touched Unity or Unreal. I have old Maya and Houdini, but installing USD plugins seems like not trivial. I did manage to have some USD tools on my Mac, but it is not optimal since I do not have NVidia graphic cards. However, USDZ Converter and the intermediate USDA file generated is pretty helpful.

         

        A couple of interesting things:

        • Make sure your 3D mesh has UV layout, without UV the PBR will simply display black on iOS devices, although it might shows okey on MacOS when using 3D or AR Quick Look.
        • USDZ makes PBR materials and shaders linking quite easy
        • When mesh is too complex or USDZ is too big, or animation has too many objects, USDZ will not display on iOS device. Might work ok on the MacOS. There is no warning about RAM exceeding iOS.
        • Watch out for Mapping, do not use 8K image texture for now.
        • Animation seems to be supported via Alembic export, works for Transform only. No vertex, no bones, no blendshapes yet.
        • USDZ can be easily imported into XCode for 3D SceneKit. I tested it using basic AR app.
        • There is this ModelIO inside XCode that can be used to unpack USDZ, it seems, but I have not gone that far.
        • Procedural animation can be embeded into USDZ, check USD example of Spinning Top animation. It's pretty cool for turntable.

         

        I am currently investigating:

        - Materials that is not PBR, but able to display color, is this possible? Because often time I just need Material with simple Color

        - Can we have Lights inside USDZ?

        • Re: Let's discuss USDZ Converter in details...
          YojimboMaster Level 1 Level 1 (0 points)

          Also I am wondering whether we can:

          - Make Double Sided per Mesh

          - Make Subdivision per mesh

          - Combining USDZ via USDA

          • Re: Let's discuss USDZ Converter in details...
            YojimboMaster Level 1 Level 1 (0 points)

            First of all, to use "USDZ Converter" ensure you have latest XCode 10, and Command Line Tools installed so you can run this inside Terminal:

             

            xcrun usdz_converter <obj, alembic, usda you want to convert> <usdz file>

             

            USAGE:

            <inFilePath> <outFilePath> [options...]

              Options:

                            -g groupName [groupNames ...]       Apply subsequent material properties to the named group(s).

                            -m materialName [materialNames ...] Apply subsequent material properties to the named material(s).

                            -h                                  Display help.

                            -a                                  Generate a .usda intermediate file.  Default is .usdc.

                            -l                                  Leave the intermediate .usd file in the source folder.

                            -v                                  Verbose output.

                            -f                    filePath      Read commands from a file.

                            -texCoordSet          set           The name of the texturemap coordinate set to use if multiple exist (no quotes).

                            -opacity              o             Floating point value 0.0 ... 1.0

                            -specularColor        r g b         Floating point values 0.0 ... 1.0

                            -useSpecularWorkflow  i             0 for false, non-zero for true

                            -color_map            filePath

                            -normal_map           filePath

                            -emissive_map         filePath

                            -metallic_map         filePath

                            -roughness_map        filePath

                            -ao_map               filePath

                            -color_default        r g b a        Floating point values 0.0 ... 1.0

                            -normal_default       r g b a

                            -emissive_default     r g b a

                            -metallic_default     r g b a

                            -roughness_default    r g b a

                            -ao_default           r g b a

             

            (*) Specify infield only with -v (Verbose) to display group information.

            (*) '#' in the first character position of a line in a command file interprets the line as a comment.

            • Re: Let's discuss USDZ Converter in details...
              YojimboMaster Level 1 Level 1 (0 points)

              usdz_converter has interesting feature like:

              -f                    filePath      Read commands from a file.

               

              I am new to this hypen tagging command and using it to "override" Materials and assigning Shader Maps. But really handy after all.

               

              We can apparently supply multi lines commands like this (I am using Sublime Text), we don't even need to worry about using forward slash to separate lines. This is cleaner and easier to work with.

               

              • Re: Let's discuss USDZ Converter in details...
                YojimboMaster Level 1 Level 1 (0 points)

                PBR Shader Map texture can have "Alpha" I tested it works.

                 

                But not sure how to enable "Double Sided". Also I wonder what these below is for because they do not have effect: (all this color_default, normal_default, emissive_default, etc)


                 

                I am using XCode 10 Beta 5 and waiting for Beta 6.