Tag Archives: jellyfish

Week 4: Jellyfish Toy

Didn’t really have enough time to make a game this week, but I made this little jellyfish toy thing:

You just move the jellyfish by hovering your mouse over a spot and it will come to it. Hovering over the jellyfish will make it face upwards.

I wanted to experiment with physics systems in Unity. The tentacle things are Character Joints (although I tried out Interactive Cloth and Fixed Joints – eh, none of them are great for this) and driven by the first one in the chain rotating. I’m adding slightly random forces to each part of the tentacle every frame to suggest water turbulence, and make them tend away from the main part of the jellyfish. There are interactive cloth parts on every other part of the jellyfish apart from the top bit. (I have no¬†vocabulary for jellyfish parts!) The cloth was the hardest thing to get right probably, it just screws up with 99.99 percent of the available settings.

The vertex shader on the jellyfish distorts it according to its world space position, so it looks like it is being buffeted by turbulence. The fragment shader is various rim lighting effects composited together with some noise and a lambert shader.

The sea background is another weird shader I chucked together with a couple of input colours and using a quad’s UVs (I used some of¬†Shaderlab’s awesome examples again for a few noise functions). The light shafts are basically cubes extruded and distorted with a vertex shader, blended additively. There are some basic 3D particles floating around to make it look like the sea.

Here’s a screenshot from the editor (with none of the image effects making it look nice!):