How to animate fish meshes
How to animate fish meshes
To make a virtual fish tank, there are sources of good fish models, but all are unamimated.
NVidia have a sample that modifies the meshes of the fish, applying a Sin function along the axis to make them "swim".
What would be the best way to do this using Irrlicht?
NVidia have a sample that modifies the meshes of the fish, applying a Sin function along the axis to make them "swim".
What would be the best way to do this using Irrlicht?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: How to animate fish meshes
Check the water scene node. It's the same idea, but a simpler mesh structure. I guess you need to find a good way to assign to each vertex a "normalized" position. Applying the offset is notmuch of a problem then. Same goes for vertex shader of course, doesn't really matter which way you apply the offset.
Re: How to animate fish meshes
Thanks for the tip, I´ll do that. I´m really not up to speed at all on mesh manipulation coding. I looked at the NVidia fish sample, but the mesh manipulations were done using functions I wasn´t familiar with, sort of looked complicated!
Re: How to animate fish meshes
By the way, have you seen the OGRE water demo? It deforms the water mesh to simulate the wave buffeting caused when an objects swims across the surface. Do you think it would be fairly easy to translate these OGRE demos to Irrlicht? I know OGRE might seem to be the competition, but it might be interesting to see the speed difference running them on Irrlicht.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: How to animate fish meshes
Yeah, the demo uses a very similar approach, just with more complex functions and the ability to touch at a certain position into the water. this is then updated every frame and the effect reduces. Hence, if you always touch at the position the object is, you get the effect of driving waves. The functions are all in, would probably only need a few minor adaptions.
Re: How to animate fish meshes
thats what I thought. would be useful to a lot of game developers if it was incorporated. (OGRE and Irrlicht at first glance seem quite similar, both have the same philosophy of open platform, even have the same version number, is there a key difference I wonder...)
Re: How to animate fish meshes
I've had a look at both of them and to me ogre seams a bit more evolved. And it's not because they have pretty/shiny demos. For example the material system in ogre looks really much better. But irrlicht has its advantages too. It's fairly easy to customize and is quite easy to use even for a beginner.robmar wrote:thats what I thought. would be useful to a lot of game developers if it was incorporated. (OGRE and Irrlicht at first glance seem quite similar, both have the same philosophy of open platform, even have the same version number, is there a key difference I wonder...)
Working on game: Marrbles (Currently stopped).
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: How to animate fish meshes
I don't think that this is the topic of this thread - there are more useless threads where these discussions take place.
Re: How to animate fish meshes
Well, if I can sort out the fish mesh manipulations, I´ll post it if anyone is interested.
Re: How to animate fish meshes
Just wanted to share my opinion on that matter.hybrid wrote:I don't think that this is the topic of this thread - there are more useless threads where these discussions take place.
@robmar: you could probably add some bones in modeling software and create some animations yourself. Shouldn't be too hard to do as fishes aren't very complex (are they?).
As for swimming, you could try doing some random paths, with some checking of course(so they wouldn't swim through the aquarium). Maybe apply some functions that would make them go in more of a curvy motion from start to end point of the path.
Or instead of using random paths you could probably predefine lots of points in the aquarium from which the fishes could choose where to go next.
Working on game: Marrbles (Currently stopped).
Re: How to animate fish meshes
Thanks, the paths I have sorted, using the spline path animator, etc., a friend is trying to animate the fish in blender, but she is really having problems, her fish are all upside down and she can´t figure how to define the centre for rotation, etc. As I haven´t time to learn blender, I thought I´d look for an Irrlicht-friendly mesh manipulation... there is a good sample from NVidia, but it uses their API, so I need to convert it if no one has a better reference. No pain no gain I guess!
Re: How to animate fish meshes
You need to center mesh at (0,0,0) cordinates to make it rotate around its center.
Working on game: Marrbles (Currently stopped).
Re: How to animate fish meshes
yes, I know, but the friend that´s helping me with blender seems unable to do it. curious as to why, how difficult can it be! she´s been on it for days, sent mw about 10 versions, all are wrong!