top of page

Frog Demo Logs

A few little projects I've made that I may use in something at some point.

2. Magnifying Glass

FrogMagnifyDemo
Play Video

This was a test for something I'd like to put into a detective puzzle game. It could be used to find hidden details or codes in a note or even to see the fingerprints on a keypad that would make a connection to another clue.

 

For this, I made a shader for the first time, in shader graph. I knew what I wanted to achieve and I experimented until I worked out each step.

The magnifying glass hovering over the blurry image will reveal an image underneath and zoom in.

To reveal another image underneath, the shader uses different camera inputs that can only see certain layers. 

I cut out the section of the second image I need and overlay it onto the first, and then do the same for the magnifying glass. this way the magnifying glass could be 3d or have a glass tint or scratches above the magnified image.

This approach also involves no moving cameras. 

The zoom is achieved by transforming the UV of the image underneath around the midpoint of the lens which is passed in from the magnifying glass' movement script.. 

Cadfpture.PNG

1. Frog Jump

FrogJumpDemo
Play Video

I created this little example to demonstrate a few things. I wanted to create a somewhat realistic frog jumping movement in unity. I started with coding the movement. 

A semicircular arc is defined by Pythagoras' Theorem if you look at it

right. To calculate the frog's height(x) throughout the jump, you just

need the horizontal distance(d) to the middle, and the radius(r) of the

semicircle(aka, the distance from the start, to the middle.)

If you don't want a full semicircle, you can squish it down by

dividing the frog's height by the radius and multiplying by the

height of a movable marker so that you can control the peak height of the jump to be that of the marker.

After programming the arc and the mouse control, I wanted something better than a cube to represent my frog.

Since 3DS Max (what I kinda know how to model in), is rather expensive, I decided to learn a little bit of Blender to create a rather blocky frog, attach each separate section to a bone, and create a small animation of the jump.

jump.png
ezgif-1-7fb02235ee (1).gif
ezgif-1-2790448e56.gif
bottom of page