Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =================================================
- ENG
- # Movie-Material-Animation Tool
- Extract to /Assets folder.
- ## Summary
- This package provides means of converting Image data into an Animation clip inside Unity 2017.
- ### mp4/.mkv (Third party) → (*).jpg/.png → .anim
- https://i.imgur.com/6lckxDr.gif
- Supported Platform: Windows 10, Unity 2017.4.15f1 (Current VRChat recommended version of Unity)
- Untested Platforms: Mac, Linux
- Supported Video Types: (.mp4/.mkv)
- Supported Image Types: (.png/.jpg)
- Dependent on FFmpeg. Other supported filetypes can be gained by modifying the script directly.
- See Assets/Shiggie/MovieTool/Demo for a completed Demo.
- ## Purpose
- This creates an animation clip of images that can be used for an animator controller. This means, it can be used to play movies without scripts (and inside VRChat), however, the file size will be very large so be sure to crunch all your images.
- ## Usage
- <br />
- -------------------------
- Step 0 - Image data from Video
- -------------------------
- Converting a Movie(.mp4/.mkv) to Images (png/jpg) requires other software, this readme will guide you through using the free software FFMPEG, which can be downloaded here:
- https://www.ffmpeg.org/download.html
- For commands to work on Windows, you must update your PATH variable with the FFMPEG/bin location added. It may be required to restart your computer afterwards for the path variable to register.
- For Linux/Mac, a similar process must be used.
- 
- -------------------------
- Provided scripts
- -------------------------
- Windows:
- "./CreateImagesFromMovie.bat"
- Run this to convert "movie.mp4" to "png" data in "frames/" folder.
- Linux/Mac/Windows:
- "./Script.txt"
- Modify and run this command in Bash to convert "movie.mp4" to "png" data in "frames/" folder.
- * Modify the .bat on windows, or the command directly in Linux.
- * Set the scale to adjust resolution, and fps for frames
- * It is recommended to use the least number of frames, and smaller resolution to reduce file size
- https://i.imgur.com/shTIzbh.png
- -------------------------
- Step 1 - Generate Materials
- -------------------------
- If the defaults were not changed you should now have a structure like
- "%UNITY_PROJECT_DIRECTORY%/Assets/Shiggie/ConvertMP4/frames"
- 1. Windows -> Shiggie Image tool
- 2. Uncollapse Step 1.
- 3. Enter the location containing ".png/.jpg"’s. /Materials do not need to exist.
- 4. Press "Generate Materials"
- * Include "/" at the end of the Path entered
- * Set "Maximum Generated Materials" to a small number to test the program.
- * WARNING** Large number of materials will take a long time. This process is about 2 materials per second!
- https://i.imgur.com/xx4iRHG.png
- -------------------------
- Step 2 - Generate Animation
- -------------------------
- 1. Uncollapse Step 2.
- Make sure the path to the Generate Materials is correct.
- 2. Enter the location for the generated animation clip.
- 3. Press "Generate .anim"
- * This process should take less than 15 seconds on a high-end computer even for many materials.
- https://i.imgur.com/bznGlaz.png
- https://i.imgur.com/gnwmQtX.png
- 4. Afterwards, add the animation clip to an Animation controller and attach it to the Game Object
- -------------------------
- Recommendations
- -------------------------
- - Crunch textures
- https://i.imgur.com/lKbI6wy.png
- - Use low resolution images or in the command for FFmpeg (Step 0)
- - Remember to set Mesh Renderer/Skinned/Particle for the object you're planning on using it for.
- https://i.imgur.com/RPrQQDg.png
Advertisement
Add Comment
Please, Sign In to add comment