Guest User

Untitled

a guest
Jan 25th, 2019
1,259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. =================================================
  2.  
  3. ENG
  4.  
  5. # Movie-Material-Animation Tool
  6. Extract to /Assets folder.
  7.  
  8. ## Summary
  9.  
  10. This package provides means of converting Image data into an Animation clip inside Unity 2017.
  11.  
  12. ### mp4/.mkv (Third party) → (*).jpg/.png → .anim
  13.  
  14. https://i.imgur.com/6lckxDr.gif
  15.  
  16. Supported Platform: Windows 10, Unity 2017.4.15f1 (Current VRChat recommended version of Unity)
  17.  
  18. Untested Platforms: Mac, Linux
  19.  
  20.  
  21. Supported Video Types: (.mp4/.mkv)
  22. Supported Image Types: (.png/.jpg)
  23. Dependent on FFmpeg. Other supported filetypes can be gained by modifying the script directly.
  24.  
  25.  
  26. See Assets/Shiggie/MovieTool/Demo for a completed Demo.
  27.  
  28.  
  29. ## Purpose
  30.  
  31. 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.
  32.  
  33.  
  34. ## Usage
  35. <br />
  36. -------------------------
  37. Step 0 - Image data from Video
  38. -------------------------
  39.  
  40.  
  41. 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:
  42.  
  43. https://www.ffmpeg.org/download.html
  44.  
  45. 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.
  46.  
  47. For Linux/Mac, a similar process must be used.
  48. ![alt](https://i.imgur.com/BZ6Omh0.png)
  49.  
  50.  
  51. -------------------------
  52. Provided scripts
  53. -------------------------
  54. Windows:
  55. "./CreateImagesFromMovie.bat"
  56. Run this to convert "movie.mp4" to "png" data in "frames/" folder.
  57.  
  58. Linux/Mac/Windows:
  59. "./Script.txt"
  60. Modify and run this command in Bash to convert "movie.mp4" to "png" data in "frames/" folder.
  61.  
  62. * Modify the .bat on windows, or the command directly in Linux.
  63. * Set the scale to adjust resolution, and fps for frames
  64. * It is recommended to use the least number of frames, and smaller resolution to reduce file size
  65.  
  66.  
  67. https://i.imgur.com/shTIzbh.png
  68.  
  69. -------------------------
  70. Step 1 - Generate Materials
  71. -------------------------
  72.  
  73. If the defaults were not changed you should now have a structure like
  74. "%UNITY_PROJECT_DIRECTORY%/Assets/Shiggie/ConvertMP4/frames"
  75.  
  76.  
  77. 1. Windows -> Shiggie Image tool
  78.  
  79. 2. Uncollapse Step 1.
  80.  
  81. 3. Enter the location containing ".png/.jpg"’s. /Materials do not need to exist.
  82.  
  83. 4. Press "Generate Materials"
  84.  
  85. * Include "/" at the end of the Path entered
  86. * Set "Maximum Generated Materials" to a small number to test the program.
  87. * WARNING** Large number of materials will take a long time. This process is about 2 materials per second!
  88.  
  89. https://i.imgur.com/xx4iRHG.png
  90.  
  91.  
  92.  
  93. -------------------------
  94. Step 2 - Generate Animation
  95. -------------------------
  96.  
  97. 1. Uncollapse Step 2.
  98. Make sure the path to the Generate Materials is correct.
  99.  
  100. 2. Enter the location for the generated animation clip.
  101.  
  102. 3. Press "Generate .anim"
  103.  
  104. * This process should take less than 15 seconds on a high-end computer even for many materials.
  105.  
  106. https://i.imgur.com/bznGlaz.png
  107.  
  108. https://i.imgur.com/gnwmQtX.png
  109.  
  110. 4. Afterwards, add the animation clip to an Animation controller and attach it to the Game Object
  111.  
  112.  
  113. -------------------------
  114. Recommendations
  115. -------------------------
  116. - Crunch textures
  117.  
  118. https://i.imgur.com/lKbI6wy.png
  119.  
  120. - Use low resolution images or in the command for FFmpeg (Step 0)
  121. - Remember to set Mesh Renderer/Skinned/Particle for the object you're planning on using it for.
  122. https://i.imgur.com/RPrQQDg.png
Advertisement
Add Comment
Please, Sign In to add comment