Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt Quick 3D use transparent textures with Model
Forum Updated to NodeBB v4.3 + New Features

Qt Quick 3D use transparent textures with Model

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 302 Views
  • 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.
  • Dmitry87D Offline
    Dmitry87D Offline
    Dmitry87
    wrote on last edited by
    #1

    Im trying to add a 3D model of a car to a 3D QML scene. With only base texture it looks normal, but the windows are not transparent. To solve this problem I added an opacity map:

            PrincipledMaterial {
                id: material__62_material
                baseColor: "#ffffffff"
                baseColorMap: Texture {
                    source: "maps/base.png"
                    tilingModeHorizontal: Texture.Repeat
                    tilingModeVertical: Texture.Repeat
                }
                opacityMap: Texture {
                    source: "maps/opacity.png"
                    tilingModeHorizontal: Texture.Repeat
                    tilingModeVertical: Texture.Repeat
                }
            }
    

    And now the model looks like B image
    demo.jpg
    I tried to set different alpha value. Even if the opacity texture is completely white, I still can see through the model. The same way it looks if I add alpha channel to base.png
    What configurations shall I use for correct alpha blending?

    source code: https://drive.google.com/file/d/1Vnt3DafzEKMUUcbUkB4gQ9u8EhswbBjr/view?usp=sharing

    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