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

17 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

6 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)

1 Like