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

Texture.scaleU/V and positionU/V do not affect mapping of pointer UV coordinates to subscene coordinates

    XMLWordPrintable

Details

    Description

      Model { source: "#Cube" ... } maps the full range of UV coordinates onto each face of the cube, redundantly.  If you want to wrap it with a different part of the texture onto each face, there ought to be an easy built-in way... but in the meantime, the default cube that Blender creates in a new scene has it mapped in the cross-shaped way that you'd expect, so one cube face corresponds to an area that is 1/4 width and height.  It can of course be exported, and turned into a mesh file with Balsam.  Then let's say you want to put an interactive Qt Quick 2D subscene onto just one face of the cube: one way is

      PrincipledMaterial {
        baseColorMap: Texture {
          scaleU: 4; scaleV: 4
          positionU: 0.5
          sourceItem: MyInteractiveScene { }
        }
      } 

      (maybe not quite correct positionU/V, depending on which face it should be mapped to, but because of the default Texture.Repeat tiling modes, it's ok).  But then I saw that as I move the mouse across the face of the cube, large movements correspond to only small movements in the scene.  Since we are transforming the texture, we need to transform the mouse event positions too.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes