Volume camera resizing events problems

I’m testing out the volume camera resizing function and found the values of WindowState.OutputDimensions and WindowState.ContentDimensions were different with what I had expected. My understanding is based on the document here. I’m not sure if my understanding is incorrect, or there is inconsistency with the document and the real behaviors.

I created a bounded volume camera, both input and output dimensions are 1x1x1, ScaleContentWithWindow is initially enabled. I subscribed to OnWindowEvent using this simple logging function:

public void OnVolumeCameraWindowEvent(VolumeCamera vcamera, VolumeCamera.WindowState state)
{
    if (state.WindowEvent == VolumeCamera.WindowEvent.Resized)
    {
        Debug.Log($"vc.outDim={vcamera.OutputDimensions}, vc.inDim={vcamera.Dimensions}, " +
                  $"state.outDim={state.OutputDimensions}, state.contentDim={state.ContentDimensions}");
    }
}

If I resize the volume to 1.5x1.5x1.5 in the simulator, the values I receive are ContentDimensions = 1.5x1.5x1.5 (which is good), OutputDimensions = 1x1x1 (which is wierd). The volume occupies a 1.5x1.5x1.5 space in real world now so I expect the OutputDimensions to be also 1.5x1.5x1.5 according to the document.

If I disable ScaleContentWithWindow now and further resize the volume to 1.3x1.3x1.3 for example, the values I receive are ContentDimensions = 1.3x1.3x1.3 (which is wierd), OutputDimensions = 1x1x1 (which is wierd). From my understanding, all contents are unscaled when ScaleContentWithWindow is disabled so ContentDimensions should be 1x1x1, and the volume occupies a 1.3x1.3x1.3 space in real world so OutputDimensions should be 1.3x1.3x1.3.

Maybe my understanding is incorrect. Can someone help me out? Thanks a lot!!!

Environment: PolySpatial 2.0.0-pre.11 + Unity 6 Preview (6000.0.11f1) Apple Silicon

Thanks for the feedback!

Your understanding is correct and ContentDimensions should be swapped with OutputDimensions - right now, ContentDimensions is incorrectly reflecting what the actual window size in space is, and OutputDimensions is fixed to 1x1x1, which is the size of the window configuration that was assigned to the VolumeCamera. I’ll file a bug for it and hopefully will get this patched up soon.

Thank you!

Thank you for your quick response!

I guess you’re saying OutputDimensions? ContentDimensions should reflect if the content is scaled in real world, respective to their size in editor, e.g. if a cube is 0.4x0.4x0.4 in editor and 0.8x0.8x0.8 on device, then the ContentDimensions should be 2x2x2.

Currently, ContentDimensions is referring to the actual size of the volume window.

In the future, yes, ContentDimensions would refer to how much the content is scaled by the VolumeCamera with respect to the size in editor, and OutputDimensions will refer to the actual size of the volume window.