Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt3D face culling
Forum Updated to NodeBB v4.3 + New Features

Qt3D face culling

Scheduled Pinned Locked Moved General and Desktop
qt3dqt 5.6
2 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • WidgyW Offline
    WidgyW Offline
    Widgy
    wrote on last edited by
    #1

    Hi,

    we are developing a desktop application with 3D graphics using Qt3D. We have run into some issues when using the Qt3DRender.CullFace settings in the Qt3DRender.StateSet module.

    Basically we have an open surface which was correctly rendering the front, but not the back face. We then added the Qt3DRender.CullFace settings like this (QML):

               Scene3D {
                .....
                .....
                    // Top-level entity
                    entity: Qt3DCore.Entity {
                    .....
                    .....
                        // Simple framegraph that just renders the scene from the camera
                        components: [
                            Qt3DRender.FrameGraph {
                                activeFrameGraph: Qt3DRender.Viewport {
                                    rect: Qt.rect(0, 0, 1, 1) // From Top Left
                                    clearColor: "transparent"
    
                                    Qt3DRender.CameraSelector {
                                        camera: camera
    
                                        Qt3DRender.ClearBuffer {
                                            buffers : Qt3DRender.ClearBuffer.ColorDepthBuffer
    
                                            Qt3DRender.StateSet {
                                                Qt3DRender.CullFace {
                                                    //mode: Qt3DRender.CullFace.FrontAndBack
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        ]
    
                 } //Top-level entity
        } //Scene3D 
    
    

    The obvious first strange thing here is that we don't even have to add the mode setting of the CullFace to make it work - even though the line is commented out, both the front and back face is rendered correctly.

    The other issue is that when rotating the camera, the depth mode seems to be broken - we have two objects in the scene, and now one of them is always in the front of the other when rotating 360 degrees.

    It seems to us that we are either not using the correct way of changing culling settings, or that when adding the Qt3DRender.StateSet part this overwrites other settings as well, related to depth etc.

    Any ideas?

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Qt3D being in tech preview, I'd recommend posting your question on the interest mailing list. You'll find there Qt3D's module maintainers/developers (this forum is more user oriented)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved