Using the node RealityKitTexture2DLOD

I'm trying to control the LOD of textures for an app for vision pro, With the default image node in composer pro the UV's are correct but the LOD is not what I want, I would like to have control over it. I see there is a node called "RealityKitTexture2DLOD" but as soon as I try to use that one the UV's are all messed up. Am I missing something ? Do we need to do something specific to use this node ?

I tried to use the nodes "Place 2D" and "UsdTransform2d" but could not get the texture to align

Any help appreciated

Replies

Hello there!

The issue you're encountering is very likely due to the standard MaterialX "Image" node and all RealityKit image nodes (like "Image 2D LOD (RealityKit)") having different texture coordinate origins. MaterialX uses lower-left as (0,0), whereas RealityKit uses upper-left as (0,0).

This means that if you want to use the same texture coordinate for RealityKit image nodes as you do for MaterialX Image node, you will first need to perform transformedV = 1.0 - originalV. In order to do that, use a "Texture Coordinate" node, feed it to a Separate node, feed 1.0 and the V output of the Separate node to a Subtract node, and then bring this back to a vector2f along with the Separate node's U value via a Combine node. Finally, feed the Combine output to your RealityKit Image node's Texture Coordinates input.

Hope the above explanation isn't too confusing!

Geoff

That worked Perfect !

Thanks Geoff