I want to make a social application that can play 3D videos and 3D pictures. Users can shoot and share 3d videos. I need to know how to play 3D videos
Hi @LindongEn –
We don’t provide built-in support for 3D movies and pictures. If this is an important feature for you, I encourage you to use the “Submit Idea” option in the upper right corner of our public roadmap.
In the interim, your best bet would probably be to use render textures and write a custom shadergraph that uses the eye node to dispatch left- and right- images and/or frames to each eye manually.
Hope that helps!
–Tim
@timc-unity
Wow, I am so happy to receive your reply, thank you for showing me a way, but I still have some doubts about how to let the left and right eyes see different pictures. Is it creating two cameras? If so, how vision Pro recognizes two cameras. I really hope you can answer it, it is very important to me. Thank you very much
Hi @LindongEN–
Unity doesn’t create cameras on this platform, RealityKit does. Instead, what I’m suggesting is that you use the eye index node to branch on the GPU to send one texture to each eye.
A very simple version of this graph would be a single quad in your scene, with a material that references custom unlit shadergraph that takes two texture inputs - leftImage and rightImage. Then, you can branch (or lerp) between these two input textures based on the value of the eye node. Here’s the basic framework of the graph.
Then, for each fragment being computed by the GPU, it’ll evaluate whether the fragement is for the left or right eye, and select whether it should sample the left or right image accordingly. Does that make sense?
–Tim
@timc-unity
Thank you very much for giving me the answer. I have tried your method successfully, because I know nothing about shader. I would like to further ask you how to split one Texture directly into two textures and give them to each eye.
-Ling
@timc-unity
Hello, I tried to use your method to test, but there was no effect on the vision pro virtual machine, only the picture of one eye was displayed, and the effect was the same when I tested on the PICO device. Is there something wrong with my shader? Could you please help me check it? Thank you very much
It only work on the Headset. Because Eyeindex need the mult cam