Kanzi 3.6.8 migration guide

Use this migration guide to update Kanzi applications from Kanzi 3.6.7 to 3.6.8.

Transitions between states without animations

In a State Manager when you use transitions that do not have an animation, in Kanzi 3.6.8 the State Manager sends the Transition Started and Transition Finished messages. If your application relies on not receiving these messages, when you upgrade your application to Kanzi 3.6.8, modify your application to take into account this change in the functionality.

Changes to skinned meshes

If in your Kanzi application you use skinned meshes, when migrating your application to Kanzi 3.6.8, update mesh data and transformations of skeleton nodes.

To update only the required items in the Library and keep the values of existing properties, merge the skinned meshes from an fbx or a dae file:

  1. In the Library > Resource Files > 3D Assets right-click a skinned mesh and select Merge 3D Asset File. See Merging 3D assets.

  2. In the Merge tool:

    1. Select the check box next to the skinned mesh. This way you update the mesh data.

    2. Select the skeleton nodes whose transformations differ from those in the existing Kanzi Studio project.

    3. In the Merge tool click Resolve to source and then click Merge.

    After merging make sure that your changes to the nodes, such as added properties and modified values, in the imported Scene node, remain the same.

  3. In the vertex shader of the material that you use for the skinned mesh that you merged replace the part of the shader that calculates skinning with the code that works in Kanzi 3.6.8 and in the Shader Source Editor click Save.

    For example, replace

    localToSkinMatrix = kzWorldMatrix * localToSkinMatrix;
    
    vec4 positionWorld = localToSkinMatrix * vec4(kzPosition.xyz, 1.0);
    vViewDirection = positionWorld.xyz - kzCameraPosition;
    vec4 Norm = mat4(localToSkinMatrix[0],
                     localToSkinMatrix[1],
                     localToSkinMatrix[2],
                     vec4(0.0, 0.0, 0.0, 1.0)) * vec4(kzNormal.xyz, 0.0);
    vN = normalize(Norm.xyz);
    gl_Position = kzProjectionCameraWorldMatrix * vec4(positionWorld.xyz, 1.0);
    

    with

    mat4 localToWorldMatrix = kzWorldMatrix * localToSkinMatrix;
    
    vec4 positionWorld = localToWorldMatrix * vec4(kzPosition.xyz, 1.0);
    vViewDirection = positionWorld.xyz - kzCameraPosition;
    vec3 V = normalize(vViewDirection);
    vec4 Norm = mat4(localToWorldMatrix[0],
                     localToWorldMatrix[1],
                     localToWorldMatrix[2],
                     vec4(0.0, 0.0, 0.0, 1.0)) * vec4(kzNormal.xyz, 0.0);
    vN = normalize(Norm.xyz);
    gl_Position = kzProjectionCameraWorldMatrix * localToSkinMatrix * vec4(kzPosition.xyz, 1.0);