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

The texture does not repeat on 3d model

    XMLWordPrintable

Details

    • 8b45682dfb5bff49c6a7e9ed7b1bbe56e5801585

    Description

      Hello!

      I have .obj model of wheel. In the viewer it loads and looks correct.
      When I load this .obj model throuth SceneLoader all right, but there are only fragment of tyre protector texture.
      Texture does not repeated.

      import QtQuick 2.5
      import QtQuick.Controls 1.4

      import QtQuick.Scene3D 2.0
      import Qt3D.Core 2.0
      import Qt3D.Render 2.0
      import Qt3D.Input 2.0
      import Qt3D.Extras 2.0

      ApplicationWindow {
      visible: true
      width: 640
      height: 480
      title: qsTr("Hello World")

      Rectangle {
      id: scene
      anchors.fill: parent
      anchors.margins: 0
      color: "darkGray"

      Scene3D {
      id: scene3d
      anchors.fill: parent
      anchors.margins: 0
      focus: true
      aspects: ["input", "logic"]
      cameraAspectRatioMode: Scene3D.AutomaticAspectRatio
      visible:true

      Entity {
      id: sceneRoot
      Camera

      { id: camera projectionType: CameraLens.PerspectiveProjection fieldOfView: 45 nearPlane : 0.1 farPlane : 1000.0 position: Qt.vector3d( 0.0, 0.0, 2.0 ) upVector: Qt.vector3d( 0.0, 1.0, 0.0 ) viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) }

      FirstPersonCameraController

      { camera: camera }

      components: [
      RenderSettings {
      activeFrameGraph: ForwardRenderer

      { camera: camera clearColor: "transparent" }

      },
      InputSettings { }
      ]

      SceneLoader

      { id: wheelMesh source: "qrc:///disk_g.obj" }

      Transform {
      id: wheelTransform
      property real userAngle: 70
      matrix:

      { var m = Qt.matrix4x4(); m.rotate(userAngle, Qt.vector3d(0, 1, 0)) m.translate(Qt.vector3d(0, 0, 0)); return m; }

      }
      DirectionalLight

      { id: wheelLight worldDirection: Qt.vector3d(0, -0.707, -0.707) color:"White" intensity: 1.0 }

      DirectionalLight

      { id: wheelLight1 worldDirection: Qt.vector3d(0, 0.707, -0.707) color:"White" intensity: 1.0 }

      Entity

      { id: wheelEntity components: [ wheelMesh, wheelLight, /*wheelLight1,*/ wheelTransform ] }

      }
      }
      }

      Attachments

        1. disk_g.mtl
          0.6 kB
        2. disk_g.obj
          1.41 MB
        3. result.png
          result.png
          62 kB
        4. tire-texture-1b.JPG
          tire-texture-1b.JPG
          24 kB
        5. tire-texture-1b2.jpg
          tire-texture-1b2.jpg
          35 kB
        6. tire_tread.jpg
          tire_tread.jpg
          515 kB
        7. tire_tread2.jpg
          tire_tread2.jpg
          699 kB
        For Gerrit Dashboard: QTBUG-59531
        # Subject Branch Project Status CR V

        Activity

          People

            lemire_p Paul Lemire
            vladimir_sazonov Vladimir Sazonov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes