- Home /
Mapping video in Unity
I have to create a media VR360 player can run video which has format like this
So I need to map each face of cube with each small square of this video. I also use blender to map but I can not bring the mapping after using blender to Unity, it can not run. Normally, they use equirectangular video format and it auto mapping with sphere in Unity. How can I map in my problem?
Answer by Oliver-Bogdan · Oct 20, 2016 at 11:43 AM
This solution might work on other than mobile platforms:
Step 1:Create a MovieTexture of the movie and use it as a normal texture
https://docs.unity3d.com/Manual/Textures.html https://docs.unity3d.com/Manual/class-MovieTexture.html
Step 2: Map this texture on the inside of the cube. For this to happen you need to have the normals pointing inside the cube rather than outside. To achieve this you can either give the vertices of the triangles in a counterclockwise order (Unity uses the lefthand system so clockwise is out, counterclockwise is in) or you could provide them in the cw order, let Unity calculate the normals (Mesh.RecalculateNormals) and then manually go trough them and invert them.
Step3: Place the camera inside the cube (in the center) and rotate the cube around it's center.
Here are some links to help you in your quest.
UV Mapping of textures on a cube
A detailed explanation of how the side mapping of the cube primitive works
Answer by tatbocmui · Oct 21, 2016 at 07:48 AM
@ Oliver-Bogdan: Thannk for your suggestion all most things are done. But now if I want to mapping in sphere, can I use the same UV mapping code for this? I have looked for in DrGoogle but right now, I do not have any solution for this. I want to try all of block to test Does it effect to QoE?
Answer by Tanooki322332 · Aug 01, 2017 at 06:18 AM
This is an interesting topic, I also work in this field, I can advise this video mapping software https://videomapping.store/id/video-mapping-software/
Your answer
Follow this Question
Related Questions
Question about light mapping 1 Answer
3D Hex Terrain Generation with Height 1 Answer
Free level editor for Unity3D? 0 Answers
Unity big sprite size and how to deal with it. 1 Answer
Map some Values taken from Serial Port 0 Answers