FishSim - Fish Simulator

add-ons

(Nerk) #1

** Edit - Version 0.2.0 - the ‘Goldfish’ version is now available **
**Edit - Version v0.2.1 has a slight improvement to the pectoral fin action
**Edit - Version v0.3.0 is a first pass at a Blender 2.8 version

Rigify in Blender 2.79 now has a ‘Shark’ metarig. It’s easy to adapt to most fish meshes. (Fishsim also adds a goldfish metarig to the rigify ‘Add Armature’ menu for more control of the fins.)

For fun I’ve written an addon that works with the Rigify Shark rig, and allows you to create a target that you can then animate. Clicking ‘Simulate’ causes the fish to swim after the target, baking keyframes as it goes.

https://github.com/nerk987/FishSim/releases/download/V0.0.1/FishSim.gif

There are also tools to help copy and animate multiple rigs and meshes if the targets are generated and animated by one of the powerful tools available like CrowdMaster or Animation Tools.

Download the 2.79 addon: https://github.com/nerk987/FishSim/releases/download/v0.2.1/FishSim.zip
Download the 2.80 addon: https://github.com/nerk987/FishSim/releases/download/v0.3.0/FishSim.zip

Documentation: https://github.com/nerk987/FishSim

Rigged Shark Model: https://github.com/nerk987/FishSim/releases/tag/V0.1.5/BullShark.blend
(or on BlendSwap: https://www.blendswap.com/blends/view/89811)

Rigged Archer Fish Model: https://github.com/nerk987/FishSim/releases/tag/V0.1.5/ArcherFish.blend
(or on BlendSwap: https://www.blendswap.com/blends/view/89817)

Rigged Goldfish on Blendswap: https://www.blendswap.com/blends/view/90712
(and a 2.8 Eevee version on the Github page)

A tutorial also

Extra information for the 'Goldfish version:

I’d be interested in any comments on the general philosophy of this addon. ie Rigify to create a rig with uniform controls, an addon like CrowdMaster to provide the ‘AI’, and an addon like FishSim to provide the link between the two. Version 2 of FishSim is underway to handle fish that ‘hover’ using pectoral fins and air bladder. Then maybe birds, bees, butterflies, planes, cars, bison - who knows?


(özgür) #2

Thanks for sharing.


(Toudou) #3

Interesting!


(kabu) #4

Absolutely a good idea.
Moreover it’s totally funny…
Dragons please!


(malc615) #5

Great work Nerk.

I think this is awesome.


(Hammers) #6

This looks great mate! Look forward to trying it out soon.


(Nerk) #7

Thanks for the comments! Version 2 - the ‘Goldfish’ version is coming along. After that my vague roadmap says ‘FlySim’, so @kabu, I don’t see why dragons shouldn’t fit that category.


(Hammers) #8

Goldfish would be great. I’ve got a project that could be completely useful for!
And yes I think this is probably most useful for schools of fish, to get them animated quickly, otherwise I’d probably rather have the control over animation.
I still haven’t tried it out. Are the actions animator friendly after they’re created?
Keep up the good work!


(Nerk) #9

Hi @Hammers, I have a couple of little projects planned myself.

I would use the CrowdMaster animated targets for background fish, and for the ‘hero’ character, animate the target directly to get a base swimming action. After that, they’re just keyframes - you can scale them, simplify them, bake to NLA strips and fade from auto generated keyframes to customised animation for key scenes. The auto generated keyframes affect the spine, tail fin and pectoral fins, but other parts of the rig like eyes and mouth can be animated separately.


(urkokul) #10

Thanks for this great work


(Safetyman) #11

This is really neat… thanks for sharing.


(Nerk) #12

I’m now finished with version 0.2 of the FishSim addon - the ‘Goldfish’ version.

https://github.com/nerk987/FishSim/releases/download/0.2.0/GF_Gif.gif

This version includes a new Rigify Goldish metarig, which is available at the ‘Add Amature’ menu with the other Rigify metarigs as long as both FishSim and Rigify are enabled. It is basically the same as the shark rig, but with the shark dorsal fins moved back and new, more flexible dorsal fins added. The original shark metarig can still be used, but the new features are disabled.

The new version adds a ‘hover’ function, where the fish will hold it’s place with dorsal fin movement and air bladder. Of course this isn’t only relevant to goldfish - it applies to most aquarium and reef fish, and basically most fish you’re likely to model.

The Github site with the addon download and documentation can be found here:

Github site: https://github.com/nerk987/FishSim

The goldfish model is on Blendswap here:

Goldfish model: https://www.blendswap.com/blends/view/90712

A Youtube guide to the extra features (The orignal guide is still relevant - you should watch that first if you haven’t seen it):

Hopefully someone finds a use for this! I know it’s not something you use every day, but it’s nice to know it’s there if you ever need it. I don’t have any more specific development in mind, at least for fish, but let me know if you find any problems with it.


(cortesffm) #13

i am always getting this error while installing

Exception in module register(): ‘C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master\init.py’
Traceback (most recent call last):
File “C:\Program Files\Blender Foundation\Blender\2.79\scripts\modules\addon_utils.py”, line 350, in enable
mod.register()
File “C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master_init_.py”, line 534, in register
from . import metarig_menu
File “C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master\metarig_menu.py”, line 193, in
metarigs_dict = get_metarig_list("")
File “C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master\metarig_menu.py”, line 131, in get_metarig_list
metarigs_dict[f] = get_metarig_list(f, depth=1)
File “C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master\metarig_menu.py”, line 142, in get_metarig_list
metarigs += [get_metarig_module(module_name, METARIG_DIR + ‘.’ + path)]
File “C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master\metarig_menu.py”, line 92, in get_metarig_module
submod = importlib.import_module(name, package=MODULE_NAME)
File “C:\Program Files\Blender Foundation\Blender\2.79\python\lib\importlib_init_.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 981, in _gcd_import
File “”, line 931, in _sanity_check
SystemError: Parent module ‘FishSim’ not loaded, cannot perform relative import

Exception in module register(): ‘C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master\init.py’
Traceback (most recent call last):
File “C:\Program Files\Blender Foundation\Blender\2.79\scripts\modules\addon_utils.py”, line 350, in enable
mod.register()
File “C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master_init_.py”, line 533, in register
FishSim.registerTypes()
File “C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FishSim-master\FishSim.py”, line 647, in registerTypes
bpy.utils.register_class(FSimProps)
ValueError: register_class(…): already registered as a subclass


(Nerk) #14

Hi @cortesffm,

From the error messages, I think perhaps you have downloaded the wrong file from the github site. (The addon directory should be addons\FishSim, not addons\FishSim-master)

The latest zip file can be downloaded here:
https://github.com/nerk987/FishSim/releases/download/v0.2.1/FishSim.zip

I suggest you close Blender, delete the directory at FishSim-master directory under C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons as well as any FishSim directory and then try installing the FishSim.zip file in the usual way.

By the way, version v0.2.1 is a slightly improved version. I’ll update the link on the first entry.


(cortesffm) #15

Fine, yes i got the wrong one. Everything is ok now. Thanks


(mistercliff) #16

This is exactly what I need! Wow, thanks so much! I am looking forward to using this and will share my project with you when I’m done.


(Nerk) #17

Hope it works for you. I’ll be interested to see how it goes!


(mistercliff) #18

I was checking out your other projects and they’re all fantastic. You are doing some great work, keep it up and let me know if you come up with something new!


(Miss Bad Wolf) #19

Looks great once I figure out how to install plugins. Can we suggest fish like Guppies?


(uruburei) #20

good work. Thank you