Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-117914

Render result scaled by dynamically changing clipFar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.5, 6.6
    • 6.5.3
    • Quick: 3D
    • None
    • Qt6.5.3, MacOS 13.5.2, XCode 15.0, MacBookPro M1
    • macOS
    • 907c4e7763ed8cc808bad1d55495b0d92491f675

      The following is based on the Quick3d/View3d example (the one with the 4 green teapots).

      The rendering result is scaled (zoomed) when I dynamically change the far clipping plane of an OrthographicCamera used within a View3D.

      The relevant portion of main.qml is this:

       

      // Stationary orthographic camera viewing from the top
      Node {
        OrthographicCamera {
          id: cameraOrthographicTop
          y: 600
          eulerRotation.x: -90
          clipFar: 800
          onClipFarChanged: print("clipFar= " + clipFar)
       }
        Timer {
            interval: 100; repeat: false
            //running: false; // v1, rendering ok
            //running: true; // v2, rendering scaled
            onTriggered: cameraOrthographicTop.clipFar = 801
        }
      }

              
      The v1 line creates the view shown in "v1 - ok.png". The lower left teapot is nicely rendered.

       

      The v2 line only updates the clipFar value once (from the timer), causing the rendered result to be scaled ("v2 - scaled.png"). This is not expected behavior, as adjusting the far clipping plane of an OrthographicCamera should not result in scaling.

      I have not checked for other circumstances that show similar behavior (clipNear, perspective camera, etc.).

       

        1. v1 - ok.png
          251 kB
          Frank Deinzer
        2. v2 - scaled.png
          327 kB
          Frank Deinzer
        3. main.qml
          8 kB
          Frank Deinzer
        4. main_scale.qml
          7 kB
          Jonas Karlsson
        5. output.mp4
          1.39 MB
          Jonas Karlsson
        6. Clip sweep.mp4
          10.76 MB
          Frank Deinzer
        7. NO clip sweep.mp4
          5.92 MB
          Frank Deinzer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.graphics.and.multimedia Qt Graphics Team
            frank2525 Frank Deinzer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes