How to render side by side videos in OculusRiftEffect or VREffect - three.js

I'm experimenting with videojs-vr which is using THREE.OculusRiftEffect for rendering the video in an Oculus friendly way.
I downloaded a side by side video from YouTube and played it within the videojs-vr example.html.
Now I'm searching for a way to show only the left part of the video in the left camera of OculusRiftEffect / VREffect and the right part for the right eye.
I think I have to find/use an event which draws the movie onto the mesh and identify which camera is currently rendered to copy only the left or the right part of the video.

If you're using Three.js I would make two spheres, one for left eye and the other one for right eye. Then separate the video using a shader on those spheres to map only half texture in each one. Then attach each sphere to one of the two cameras.
Don't sure how to do it in three.js, as I come from Unity and I'm still a noob with three, but I did exactly that in Unity. Maybe the idea helps you.

Related

Unreal - Move players's camera and hands at the same time

I'm new to Unreal Engine and I want to make a First-Person game. I want my player to climb on top of a cube.
So I created a Camera animation, in order to see that the player is climbing (the camera goes up, then rotates a little, then goes forward). When the player is climbing the cube, I also want their hands to grasp the edge of the platform and push in the upward direction. I don't have a full skeleton, only hands like in the basic first-player example.
So basically, when the player presses space in front of a cube, I'd like to have my camera animation and my hand animation to play at the same time and to be synchronized.
Is there any animation class to do both in the same class ? Like a montage, or a sequence. When I go to animation montage, I can't find anything to import my camera animation.
When I create a new skeleton animation, there is no camera attached to the skeleton so I cannot move the camera and the hands in the same animation.
Thanks for your help!
Root Motion can do this. With Root Motion, you wouldn't animate the camera directly. Instead, you'd animate the character's root bone to move the character capsule (and thus camera). This would keep the camera and hands in sync and also allow you to implement your climb.
Stack Overflow isn't the best place to ask animation questions. I'd recommend one of the following instead:
Anim State (which also has a discord server)
UE4 Animation Forum

Perspective transform in THREE JS

I found few incomplete threads regarding Perspective Transform using Three JS.
I was looking to have a rectangle with video texture on it, and each corner one after another will animate to fullscreen or in reverse. As each corner animates the texture should stretch. Something like this demo but in Three JS.
It will be great help if someone can point to an example, docs or resources to get this effect.

Position of player changes when the attack animation starts - unity

So I did an attack animation in the program Aseprite and everything was fine with the animation, but when I put in inside the animator in unity the character changes position.
Here's the images, first one is a gif with the animation running as I want, and then the before and after of the animation in Unity.
I know it's small but I hope you can see
This is because it's setting the center point at the location, and the gif is wider than the standard player image, you will need to offset to compensate.
So I just sliced the sprites again but with the pivot to the left instead of center, and then adjusted the Collider. It seems to work. Not sure if it's the perfect way though.

Unity script: scene to 3D led cube

I am a total beginner to Unity, but I'm getting familiar with the interface and the way scripts work with Game Objects. Some days ago, I came across with an article regarding a 3D LED Matrix controlled by Unity and since then I've been trying to make it work with my project.
Original article: http://philippseifried.com/blog/2014/10/29/3d-led-matrix-with-unity/
Basically, once the script is attached to an Orthographic camera (or at least that's what I understood from the article), the camera layers and "slices" the scene, transforms it into a pixel matrix and paints the result into some preview layers dynamically generated.
I have accomplished to attach the camera and get the preview layers to show up. However, I'm unable to get the final result the article shows, as preview layers show absolutely nothing. I think it has to do with the fact that the author is using some kind of transparent planes I have been unable to replicate.
It would be great if someone could guide me a bit to get the exact same result of the article by reading it and watching the last Vine, as it shows his Unity screen with the transparent layers working up and running.
The script was looking at the background color to decided wether a pixel had to be painted or not.
Changing the camera background to transparent (RGBA) was enough to see the final result.

Three.js: Video Texture on Skybox

Can someone help with videotexture on cube in three.js with WebGLRenderer.
I am trying to use Three.js to render a cube with one-piece videotexture from one file without use
THREE.ImageUtils.loadTextureCube
instead image such as jpg, but I don't get visible cubes. Should ideally i need create something like 180 degrees half sphere video panorama but only with cube. That is, i want to put a texture to all faces of a cube, not cutting it, in the one stream because if I use different video textures on every face then this will affect the performance.
I am trying to use video texture on sphere like here
http://mrdoob.github.com/three.js/examples/webgl_panorama_equirectangular.html
and all works fine, but i want use cube like here
http://mrdoob.github.com/three.js/examples/webgl_materials_cubemap_balls_refraction.html
but I don't get visible cubes.
I don't want to cut a movie file to six different parts to put them on every face of the cube as in this example.
Maybe other methods to overlay material on cube form one video file than using different textures for each face?
Thx and sorry for my english.

Resources