Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.0 Beta1
-
None
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.