Walking on Snow

Hello :slight_smile:

I was working on updating some geometry, based on some Ray Casting process… And I ended up with this funny Playground, so I share :grin:

snow

It’s based on a very simple trick :

  • For each ground vertex you take a Ray from under the surface
  • You launch ray upward
  • If it collides under the snow surface (shoe), you move down the considered vertex to collided position.

Unfortunately, it’s not real time, there is some kind of lag between the animated mesh, and the updated ground… But I can ensure that this simple trick, when real time, fakes the stuff so badly well :joy:

:arrow_right: Playground

++
Tricotou

20 Likes

Fantastic!

1 Like

reminds me to the creation of Avin … writting your name into white snow! :smiley:

“Yellow snow” by Avin Lambrero | Babylon.js Playground (babylonjs.com)

3 Likes

Ahah, indeed, quite close ! :smiley:

Ok, I was really unhappy with this bad performances. It appears it came from Ray Casting on high poly mesh (dude). I optimized by Ray Casting only on some custom (invisible) shoe boxes :

snow2

Going from ~40 fps to >120 fps : Now I’m ok with this :grin:

snow3

:arrow_right: Playground

++
Tricotou

8 Likes

I love it! It’s a great field of possibilities! :slight_smile: drifting dude

1 Like

sorry, can not stop playing! :slight_smile: … a mud cure with various deep passages. (demo)

2 Likes

That is very VERY cool!

1 Like

Very cool :open_mouth:

1 Like

Cool! :smiling_face_with_three_hearts:

I can’t find my example of a similar effect… :crazy_face: I was drawing the foot prints on a texture and modifying the geometry of the ground in the vertex shader using that texture.