Here's a guide on how to animate using modifiers in Blender and export to Unity:
Creating the Animation in Blender:
code
a) Using Wave Modifier:
- Select your object
- Add Wave modifier
- Adjust parameters (height, width, speed, etc.)
- Animate the parameters using keyframes (I key)
b) Using Simple Deform:
- Add Simple Deform modifier
- Keyframe the Deform Factor
c) Using Array Modifier:
- Add Array modifier
- Animate offset values
d) Using Build Modifier:
- Add Build modifier
- Keyframe the Start/End frames
Baking the Animation:
code
- Select your object
- Go to Object menu > Animation > Bake Action
- In the popup menu:
* Check "Visual Keying"
* Check "Clear Constraints"
* Set Frame Start/End
* Click "Bake Action"
Exporting to Unity:
code
a) FBX Export:
- File > Export > FBX
- In export settings:
* Check "Selected Objects"
* Under Animation:
- Check "Animation"
- Check "Bake Animation"
- Set "Sampling Rate" (usually 30)
* Apply Scale: "FBX Unit Scale"
* Forward: "-Z Forward"
* Up: "Y Up"
b) Alternative - Export as Alembic:
- File > Export > Alembic (.abc)
- Check appropriate settings
- Set frame range
Importing to Unity:
code
- Drag the FBX/Alembic file into your Unity project
- Select the imported file
- In the Inspector:
* Check Animation settings
* Set appropriate Import Settings
* Apply
Important Tips:
Always bake your animations before exporting
Keep your mesh topology consistent
Apply all modifiers if you want to ensure exact reproduction
Test the animation in Unity to ensure it imported correctly
If animation doesn't appear in Unity:
1. Check if animation was properly baked in Blender
2. Verify export settings
3. Check Unity import settings
4. Try re-importing with different settings
Additional Notes:
code
- Some complex modifier animations might not transfer perfectly
- Consider using Alembic for complex deformations
- Unity's animation system might handle some modifications differently
- Back up your file before baking animations
This method is particularly useful for:
Simple object deformations
Procedural animations
Non-character animations
Motion graphics
Environmental animations
Remember that while this method works, bone-based animations generally offer more control and are industry standard for character animation. Use modifier-based animation when it suits your specific needs.