Start a new topic

Can i put a GIF in a STYLY Scene?

 Hello, I've been trying to find a way to put a GIF animation into a STYLY Scene, is there any way of achieving this? 

1 Comment

Hi there

I've found a workflow that achieves this effect, however it will be easiest to achieve with animations that have a small amount of frames. For longer animations, you might want to try using the add video function in the STYLY Studio.

Step 1: Create a frame stack from your gif
 you need to break up your animation into a stack of frames. I do this by opening up my gif in Photoshop, as a frame animation. Then go to File>Export>Layers to Files, then save out your gif as a series of jpegs (ie Animation001.jpg, Animation002.jpg, animation003.jpg, etc)

Step 2: Import frames as materials
Create a new scene in Unity. Drop your frames into your projects asset folder. Create a new material for each one of your frames (ie if you have 20 frames, create 20 materials.) Next assign your frames to the albedo of its corresponding material

Step 3: Add object + Animate
Next you need to use Unity's animation feature to cycle through each of the materials you just created. First add the object you want your gif to play on... I'd recommend a plane. Next bring up the animation window Window>animation>animation. Then select your plane and click on the create button in the animation window. It will ask you to save the new animation file your creating, do so in your assets folder. Next click on the record button in the animation window, and drop your first material onto your object. Then advance forward in your timeline and drop your second material onto your object. Keep doing this till you have your entire animation added. 

Step 4: upload
After you're finished animating save your scene. Now you can either drag your animated object into the assets folder, create a prefab and upload with the STYLY plugin. Or your could upload your whole scene. 

As you can see, this process might be a little too laborious for long animations, but it works great for animations that only have a few frames

Login or Signup to post a comment