Adding animation to Particles? (3D)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dumuz

I want to try to follow this tutorial on making a bunch of animated fish: Tutorial but it doesn’t say exactly how to call the animated fish, or put it in the node.

The Particles node does have the Draw Passes/Pass1 (and more if you need it), but the mesh’s it receives are .obj’s and (I don’t think) obj’s can have animations on them. So how does this tutorial have fish that are swimming?

I’m trying to figure out how to apply the actual animation onto the mesh that particles are instancing.

:bust_in_silhouette: Reply From:

Couldn’t you just use skeleton3D nodes in order to animated the fish? There are tutorials for this both on YouTube and on the main Godot website.

To the best of my knowledge, importing animations from a 3rd party program like blender, as I’m doing, requires exporting all of these things together in a file like .GLB. The Particles node only takes static meshes like .OBJ’s.
In order to apply an animation via the Skeleton3d node, the mesh needs to be weighted and have that information in a Skin node, which from the tutorials I’ve seen cannot be auto compiled from an OBJ, since this file type cannot hold that type of information.

What I’m trying to figure out is how the Particles node - ParticleMaterials (Which has an Animation tab) references the potential animations for the static mesh you apply in the Draw Pass.

I’m having a hard time finding the correct tutorials on this. If you happen to have some links that would be very helpful.

Dumuz | 2020-08-17 20:08

:bust_in_silhouette: Reply From: rredesigns

That tutorial uses shaders to deform the meshes. The vertex shader moves the vertices in space forward and then sideways to simulate swimming.

Just do what the tutorial says and you should get the same result (and use a mesh with similar shape to actually notice).