A fish of splines

Hi community!

Here is a picture with the latest result of what I could create (links to codepen are below):

The idea is to use splines (curves) to build fish’s body.
All you need is two things:

  1. Build splines, that define a half of a fish.
  2. Build a full fish, having those splines.

I used CatmullRomCurve3, defining top (fish’s back), bottom (fish’s stomach) and side.

Having them, I “sliced” the result set of points, getting control points for frames, where each frame has the same amount of points.
изображение

Now, when we have those frames and their points, we can create an array, that we’ll use for PlaneGeometry. It means, we substitute plane’s vertices with our set, keeping index and uv intact.
изображение

Fins are separate distorted plane geometries, that merged all together in a single geometry with the body.

Codepen with the prototype: https://codepen.io/prisoner849/pen/WNRMppX

Codepen with the final result: https://codepen.io/prisoner849/full/bGgQmrX

PS Directly related to this topic: Create custom Fish Geometry - #2 by prisoner849
PPS Thanks @hofk for inspiration with visuals from Texture from distorted image, what is the best way to do it?

17 Likes