[Fruit Boom] VFX Technique

Solving the technique problem

This is my first time attempting to build a fluid simulation for visual effects. At the beginning, I didn’t know how to do it, so I searched on YouTube and found many tutorials about how to create water in Blender. The output of the water simulation in Blender is an Alembic model.

While Blender was the first key part of the process, I didn’t know how to import the output into Unity. After some searching, I found only one video that talked about how to import Alembic models into Unreal Engine. After studying that video, I realized that importing Alembic models into Unity was likely to be similar.

To solve all of the technical problems, I decided to work on them first before designing my own juicy visual effects for our game.

First, I studied on the video tutiorial and make this in blender:

After exporting the Alembic model from Blender, I imported it into Unity. To import it into Unity, I had to install the Alembic package first. This package allows Unity to support this special type of file. To play the animation in Unity, I used the Timeline function. This allowed me to control the timing and duration of the Alembic model animation.

With the help of ChatGpt, I wrote a script. This script instantiates the liquid prefab at a random position and rotation when the “P” key is pressed, which simulates the situation when the characters are shot. Then the liquid prefab is destroyed as the alembic animation end.

The particles set in blender cannot import to unity through Alembic files.

Blue dots are the particles in blender

Using Timeline Asset to achieve the animation of the alembic mesh

Export Alembic file in blender

Install ‘Alembic’ package in unity package manager

Create a ‘Timeline’ asset and drag this timeline asset to the Alembic gameobject

Create a ‘Alembic Track’ in Timeline window &   Paste this time period to the timeline

The material missing problem when using Alembic file

Improved Solution: Using Animator component to play the animation

I encountered some bugs with the Timeline method I previously used to play the animation, which prevented it from playing correctly. After consulting the Unity documentation, I decided to use the Animator component instead.

Using the Animator component was straightforward since I had already studied it when making video games. In the Alembic model prefab, there is a time variable that controls the animation’s current time. When you change this variable, the model’s animation will play.

To create a new animation clip, I set the time variable as one of its properties. I set the time variable to 0 at frame 0 of the animation and set it to the animation’s duration at the end of the animation. With this setup, the animation played smoothly using the Animator component.

3人评论了“[Fruit Boom] VFX Technique”

发表评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注

Scroll to Top