USDZ with Blend Shapes Workflow Recommendations

Hi,

since RealityKit 4 now supports Blend Shapes I was wondering if there are any workflow or tooling recommendations to bake/export them into a USDZ. Are Blender or Cinema4D capable to do that out of the box? Should we look into NVIDIA omniverse (https://docs.omniverse.nvidia.com/connect/latest/blender/manual.htm)

So far this topic seems very sparsely documented and I would appreciate any hints. Thank you!

Answered by Vision Pro Engineer in 809756022

Hi @arthurfromberlin !

Yes indeed RealityKit does support blend shapes! Unfortunately we don't have official guidance for workflows in third party DCCs like Blender or Cinema4D (btw, the link you shared has 404'd for me). I am not an expert on these software packages by any measure, but my educated guess is that each contains similar functionality for exporting blend shape content to USD format, and I absolutely recommend reaching out to other communities for further guidance on DCC-specific workflows.

I'll speak a bit on how I've made assets in Blender 4.2, in case you or anyone reading is using that. The terminology Blender 4.2 uses for blend shapes is "Shape Keys." When you export a USD asset from Blender 4.2, make sure you are including Shape Keys in your export under the "Rigging" section. Additionally, disable "Convert World Material" under the "Materials" section.

Once you have your USD with blend shapes, you can load it in as a ModelEntity that will have a BlendShapeWeightsComponent. This will allow you to control your entity's blend shapes. In the following example, I created an asset with a single weightSet and two blend shapes, and set the first blend shape to have complete influence over the original shape:

if let cube = try? await ModelEntity.init(named: "blend_shape_demo", in: Bundle.main) {
    var blendShape = cube.components[BlendShapeWeightsComponent.self]!
    
    // weightSet: Assets can have multiple weight sets for different parts of their
    //   model, such as the facial features of a character with many facial
    //   expressions. In this example I am only using the
    //   first weightSet, which contains two blend shapes.
    
    // weights: Each weightSet has a weight value for each blend shape in the set.
    //   Weight values are a numerical representation of the impact a blend shape has
    //   on the original shape. In this example, the first blend shape will have
    //   complete influence over the original shape.
    
    blendShape.weightSet[0].weights = [1.0, 0.0]
    
    // don't forget to set the component and add the entity to the scene!
    cube.components.set(blendShape)
    content.add(cube)
}

Let me know if you have any questions! Be sure to check out Compose interactive 3D content in Reality Composer Pro for more info on blend shapes, as well as the attached sample project containing a working demo of blend shapes in RealityKit.

Accepted Answer

Hi @arthurfromberlin !

Yes indeed RealityKit does support blend shapes! Unfortunately we don't have official guidance for workflows in third party DCCs like Blender or Cinema4D (btw, the link you shared has 404'd for me). I am not an expert on these software packages by any measure, but my educated guess is that each contains similar functionality for exporting blend shape content to USD format, and I absolutely recommend reaching out to other communities for further guidance on DCC-specific workflows.

I'll speak a bit on how I've made assets in Blender 4.2, in case you or anyone reading is using that. The terminology Blender 4.2 uses for blend shapes is "Shape Keys." When you export a USD asset from Blender 4.2, make sure you are including Shape Keys in your export under the "Rigging" section. Additionally, disable "Convert World Material" under the "Materials" section.

Once you have your USD with blend shapes, you can load it in as a ModelEntity that will have a BlendShapeWeightsComponent. This will allow you to control your entity's blend shapes. In the following example, I created an asset with a single weightSet and two blend shapes, and set the first blend shape to have complete influence over the original shape:

if let cube = try? await ModelEntity.init(named: "blend_shape_demo", in: Bundle.main) {
    var blendShape = cube.components[BlendShapeWeightsComponent.self]!
    
    // weightSet: Assets can have multiple weight sets for different parts of their
    //   model, such as the facial features of a character with many facial
    //   expressions. In this example I am only using the
    //   first weightSet, which contains two blend shapes.
    
    // weights: Each weightSet has a weight value for each blend shape in the set.
    //   Weight values are a numerical representation of the impact a blend shape has
    //   on the original shape. In this example, the first blend shape will have
    //   complete influence over the original shape.
    
    blendShape.weightSet[0].weights = [1.0, 0.0]
    
    // don't forget to set the component and add the entity to the scene!
    cube.components.set(blendShape)
    content.add(cube)
}

Let me know if you have any questions! Be sure to check out Compose interactive 3D content in Reality Composer Pro for more info on blend shapes, as well as the attached sample project containing a working demo of blend shapes in RealityKit.

USDZ with Blend Shapes Workflow Recommendations
 
 
Q