How to use CubeMap in Reality Composer Pro?

I just do as the document in https://developer.apple.com/documentation/shadergraph/realitykit/cube-image-(realitykit)

I have a .ktx file, and use CubeImage node to load it, then Convert node, but it shows black. I check it on my Vision Pro, it's still black, I don't know why? Is it something wrong?

ps: I also use Image node to load .ktx file, it shows one image, so I belive .ktx file is right. I alse checked it on Vision Pro.

Answered by Vision Pro Engineer in 809606022

Hi @XanderXu

Your shader looks correct to me, so I'm guessing there's an issue with the cube map .ktx file.

Could you try generating your .ktx file with the xcrun realitytool image --generate-cube-map command in your terminal? You can run xcrun realitytool image --help to see more information on how to use the --generate-cube-map command.

Let me know if you run into any issues.

Accepted Answer

Hi @XanderXu

Your shader looks correct to me, so I'm guessing there's an issue with the cube map .ktx file.

Could you try generating your .ktx file with the xcrun realitytool image --generate-cube-map command in your terminal? You can run xcrun realitytool image --help to see more information on how to use the --generate-cube-map command.

Let me know if you run into any issues.

I’ve also encountered an issue where I need to convert PNG files to KTX format for use with MetalKit. However, most available tools seem too technical for non-engineers. Is there a more user-friendly tool available to handle this conversion?

How to use CubeMap in Reality Composer Pro?
 
 
Q