- Home /
Blender Ocean Animation
I spent a ton of time trying to do this so any help is appreciated. I'm making a pirate game so of course I need an ocean. I made one in blender and I finally got it to pretty much loop seamlessly. I'm new to unity and I've only imported an animation from blender once(it was a box moving up and down) I just can't get this to work. I exported the Armature and Mesh as a .fbx and attached the animation to the object in unity but when I hit play the ocean just goes to the center and stays still. I don't know what I'm doing wrong as this worked when I did it before with the box moving. I'll be glad to give any more info or screenshots, I'm just looking to get past this so I can work on the rest of the game. Thanks tons!
Are you using the blender ocean modifier? I remember I had this problem. Someone said you cannot export modifiers without applying them because they are essentially shaders or something, it was a long time ago. Point is you need to apply a modifier to be able to export it from blender. Unfortunatley you cannot apply an ocean modifier, because as you might notice, it just applies for that specific frame, and there isn't really a workaround.
If you want an ocean you need to write a vertex shader or manually animate it. I think the ocean modifier in blender is a vertex shader made for the houdini engine or something like that. Again, long time ago.
This won't help the Blender part, but you may enjoy this and peek at its methods
I was thinking of creating a shapekey for the time at 1 and a shapekey for the time at 3, but then I realized I can't apply modifiers when there's shapekeys... So the only solution I can see here is manually moving everything to create shapekeys, but thats a lot of work and I don't think it'd look that great so right now at this point I'll stick with a static ocean. But if I do find a solution I'll post it here for any future readers. Thanks guys!
if you are using the Ocean $$anonymous$$odifier, this creates a vertex animation. Sadly, Unity does not support vertex animation. http://answers.unity3d.com/questions/256718/how-do-you-import-blender-water-into-unity-3d.html
Good luck with your game and I hope you find a work-around to this issue. Try what is suggested here. I have not tried it myself but it is claimed to have worked. http://forum.unity3d.com/threads/modifier-animation-from-blender-to-unity-a-bit-stuck.29041/
Answer by SamuelEbert · Mar 30, 2020 at 04:59 PM
Hi @Selenor,
I know this answer is very late (almost 5 years! :O) Anyways, in case you or somebody else bumps into a similar problem, here's my solution. :)
Step 1 - Enable NewTek MDD format
I found an answer over at the Blender Stack Exchange that explains how to "bake" animated modifiers. So, enable the addon "Import-Export: NewTek MDD format." (Edit > Preferences... > Add-ons)
Step 2 - Export keyframes
Select the object and export the animation as keyframes (File > Export > Lightwave Point Cache (.mdd) > Export MDD)
Step 3 - Remove modifiers
Make sure you make a backup before this step, otherwise don't save the .blend afterwards (obviously :P). Remove all modifiers from the object.
Step 4 - Import keyframes
Make sure the object is still selected an import the keyframes (File > Import > Lightwave Point Cache (.mdd) > Import MDD)
That's it, you can now go ahead and export it as .fbx (or whatever) and import it into Unity.
God bless,
Samuel
Your answer
![](https://koobas.hobune.stream/wayback/20220611234917im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Importing Ocean Animation from Blender 1 Answer
Fps animations 0 Answers
Blender animations moves my object 4 Answers
Base Model Animation 1 Answer
How do i fix these misconfiguration errors on humanoid rigs? 0 Answers