Play video in render texture for animation & motion capture.
This repository provides a lightweight tool for playing video footage within Unity 3D's render texture. This allows you to seamlessly integrate video playback into your projects:
- Overlay video content onto your 3D scenes.
- Use video as a reference for animation and motion capture.
- Facilitate rotoscoping techniques with tools like UMotion (UMotion Comunity, UMotion Pro, Pose Editor).
Features:
- Play video files within a render texture.
- Control playback: play, pause, and seek.
- Customize video properties: playback speed.
- Integrate the render texture into your scenes using RawImage (Canvas UI) or 3D meshes (Quad Mesh).
Getting Started:
- Clone or download the repository.
- Place the RotoscopyTool folder into your Unity project.
- Add the RotoscopVideoPlayer prefab to your scene.
- Assign your video to the Video Clip property of the Video Player component within the RotoscopVideoPlayer prefab.
- Use the RotoscopyVideoRenderTexture as the texture for a RawImage or 3D mesh.
- Access the tool's editor for additional options:
- Select a GameObject containing the "Video Controller" component.
- Go to "Tools > Show Video Editor Player Editor". This menu won't activate if you don't select a GameObject containing the "Video Controller" component.
- In the opened Editor Window controller, click play, pause to control the video.
- Click inside the progress bar to seek within the video. Seeking within the video currently works best while playing.
- Adjust video speed from 25% to 100% using the slider.
- The tool functions both in the Unity editor and in-game.
Additional Information:
- This project is under development and open to contributions.
- Feel free to use and modify the code for your own purposes.
- If you encounter any issues or have suggestions, please create an issue on the repository.
Enjoy!