Search code examples
realitykitvisionosreality-composer-procustom-material

How to use a rotated/scaled image as custom material in Reality Composer Pro?


I am playing with custom materials in Reality Composer Pro. It is easy to add an image to the project browser and use it as diffuse color in a MaterialXPreviewSurface (see image). However, the text that is correctly displayed in the shader graph pane, 1) is mapped turned by 90° right in the 3D display, and 2) fills the surface of the virtual object n-times copied. I tried to turn and scale the image to get a correct display, but apparently the orientation and scale of the image has no effect.

I also tried to find a node that allows to turn or scale the input image, but could not find one. I could probably turn and scale the virtual object, apply the custom material, and maybe I could then turn and scale it back. But is this the expected procedure?

enter image description here


Solution

  • OK, this is how to make it happen:

    Texcoord -> UsdTransform2D -> image

    enter image description here