Skip to content

Question about expected matrix order in iplInstancedMeshUpdateTransform #427

@mellinoe

Description

@mellinoe

I'm currently trying to integrate Steam Audio in my engine. I've added support for static geometry without much of an issue, and am moving on to dynamic objects using IPLInstancedMeshes. I've been using iplSceneSaveOBJ as an easy way to reflect an IPLScene's state back into my editor view, and it has been very helpful for static meshes, to make sure they are placed correctly. If I feed my engine's row major local-to-world matrices into iplInstancedMeshUpdateTransform, the OBJ file mesh data looks good and perfectly matches the engine's mesh view. However, the occlusion results don't match, and seem to act as if the mesh is at the origin (e.g. an identify instance transform matrix).

If I transpose the matrix before passing it to iplInstancedMeshUpdateTransform, the audio occlusion seems to work properly, but the dumpOBJ mesh data no longer looks correct. According to the header file, an IPLMatrix4x4 is row major, so I wouldn't expect to need to transpose it. Stepping through the implementation a bit, I see that iplInstancedMeshUpdateTransform immediately transposes the input matrix, and Scene::dumpObj also transposes the instance matrix before dumping vertex data. What is the expected format here?

Version: 4.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions