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

Dynamically created texture is not rendered in Multi-Scene3D

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: P2: Important P2: Important
    • None
    • 5.12.0
    • Qt3D
    • None
    • Windows

       

      When using multiple Scene3D, only first scene shows the texture that is created dynamically.

      It is expected that the second scene also shows same texture.

       

       

      I attached Andy's opinion

      Hi Ryu,

       

      I can reproduce the issue, and I don’t think it has anything to do with dynamic entity creation.

       

      I’ve created a simpler example which is attached that shows the same issue.

       

      The bug as I see it is that when you have two Scene3D elements, only the first one created has access to Texture assets.  I was able to create all kinds of items in the second scene and they would work fine, but as soon as I added a Texture2D element, I could not get the resource to be used in the second Scene3D.  I suspect what is happening is that Qt3D is assuming it can reuse global texture handles between the two instances for Scene3D, when it can’t.  We would need to create a proper-bug report for this one.

       

      Regardless, using more than one Scene3D is a bad idea. Even terrible since this is for an embedded device.  By using two Scene3D’s you are duplicating loads of stuff unnecessarily, and even if Qt3D was working correctly this approach is like spinning up two Qt3D engines, and creating all assets twice, and rendering each scene twice.  The correct approach is to share the same scene and render two different render targets.  Since this is likely for stereoscopic reasons, you would have a common scene with two cameras with different offsets/angles.  Then you would set up a custom framegraph to render the scene twice (once from each camera). For the RenderTarget, you can decide which approach is best.  You suggest mult-viewport which would be the correct approach if you need to render to just one window surface.  It’s also possible to render to two offscreen buffers if that makes more sense as well (that’s what we do for VR).

       

      Regards,

      Andy Nichols

        1. Scene3DTextureBug.zip
          26 kB
          Unseon Ryu
        2. Screen Shot 2019-01-09 at 15.52.25.png
          74 kB
          Unseon Ryu
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            zakalawe James Turner
            unseon.ryu Unseon Ryu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes