Fish Motion! My #1 graphical request.

moultanomoultano Creator of ns_shiva. Join Date: 2002-12-14 Member: 10806Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Gold, NS2 Community Developer, Pistachionauts
The subnautica creatures all look great, until they move! The ones swimming in a straight line look decent enough, but nothing breaks my immersion more than seeing a fish pivot in place around it's model axis.

From what I can tell, when a real fish is turning, they lead with their "torso" and pectoral fins, with the tail limp until it's in position, then they thrust to power themselves. Subnautica's fish need some way for their parts to alternately drift and be powered.

I looked for some papers, and haven't found anything super interesting. The videos in part 4 of this are really nice http://courses.cs.washington.edu/courses/cse557/04wi/projects/final-project/artifacts/noah_masa/ but they don't work for turning. I'll see what I can find! :)

Comments

  • moultanomoultano Creator of ns_shiva. Join Date: 2002-12-14 Member: 10806Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Gold, NS2 Community Developer, Pistachionauts
    I found a decent looking paper. This looks like something you could implement! http://paper.ijcsns.org/07_book/200710/20071007.pdf
  • Squeal_Like_A_PigSqueal_Like_A_Pig Janitor Join Date: 2002-01-25 Member: 66Members, Super Administrators, NS1 Playtester, NS2 Developer, Reinforced - Supporter, WC 2013 - Silver, Subnautica Developer
    Oh, we definitely are very well aware that the fish movement is in need of work, and in particular the very noticeable pivoting in place. Our animators have done some great work creating very nice swim and turn animations, and are now working closely with the programmers to make sure those are implemented properly in game.
  • moultanomoultano Creator of ns_shiva. Join Date: 2002-12-14 Member: 10806Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Gold, NS2 Community Developer, Pistachionauts
    Great! I hope they are at least a little physically based. The shape of the body has to be so coordinated with the direction of turning to look right that I don't know how well a premade animation will work. Maybe the programmer can define a spline for the central line, and the animation can be relative to that?
  • BandersaurBandersaur Australia Join Date: 2014-10-25 Member: 199120Members
    They already have some degree of physics based animation, I think. They just need to implement it.
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    right now we just pass a pose paramter to the fishes (tilt left, tilt right, -1.0 to 1.0) which is sufficient to look ok. for bigger fishes we could have that physics driven, but looking at performance, i wouldnt do that for small fishes.

    a problem is though, there seems to be a conflict between code and some of the set up pose parameters (some models think -1.0 is left, others think -1.0 is right). that has to be resolved first.

    second issue is (which im fixing now atm) is the basic swim script (its literally called SwimRandom.cs) does not have some "target direction". it applies every x seconds (0.4 by default) an impulse, in a random direction, which explains why many fishes swim very unrealistic (velocity vectors just cancel each other by chance, which let the fishes appear to rotate at the same place sometimes). this is not difficult to fix, and i will do some experimenting for the build today or either tomorrow.
  • moultanomoultano Creator of ns_shiva. Join Date: 2002-12-14 Member: 10806Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Gold, NS2 Community Developer, Pistachionauts
    I'm trying to think of something you can do that would be somewhere in between physics based and conventional animation blending. What if you defined a "spine" for each fish, and defined the motion of the fish by a spline. You could slide the spine along the spline (say that three times fast), and parameterize the animations relative to the plane of the spine. This could give you really smooth and coordinated turns, while still letting the fins flipping and the eel like motions be defined by the animator. (Keeping the length of the fish constant might be hard though, but maybe not necessary to be exact about it?)

    The way fish move is so important to their beauty, and making it really smooth and coordinated is a big part of it I think.
Sign In or Register to comment.