Maujoe's Playground - for BGE Projects [02.01.2017: Fake collision shader]

Often I work on little projects, tests or other things that don’t need a own thread. So I want to start this thread to show you all the stuff on one place.

Last Project:

#2 “Fake collision shader”

Maybe some of you have seen my Wind shader.
Now I have another custom shader project where I try to achieve interactions with foliage.

It’s not very realistic but the visual effect is already there because you can see that something happens if the object is moving through the grass.

It isn’t very complex. Basically I only check if the vertex is inside the object range and then I give it a simple motion via a sine function. To make it a little bit smoother I can fade the movement strength to the outside.

Currently there are two ways to detect the object range. The first one is to give the shader a position and a radius to detect a spherical range around the object position.

The other one use length informations to detect a rectangular box around the object position but currently it only can use the global axis so it doesn’t work with rotatet objects.

All my Projects:

Custom GLSL Shaders:
Wind-Shader: https://blenderartists.org/forum/showthread.php?413060-GLSL-Wind-Shader-v0-1Fake Collision-Shader: Post: #2

Addons:
Copy LOD Addon: https://blenderartists.org/forum/sho...light=copy+lod

1 Like

Maybe some of you have seen my Wind shader.
Now I have another custom shader project where I try to achieve interactions with foliage.

It’s not very realistic but the visual effect is already there because you can see that something happens if the object is moving through the grass.

It isn’t very complex. Basically I only check if the vertex is inside the object range and then I give it a simple motion via a sine function. To make it a little bit smoother I can fade the movement strength to the outside.

Currently there are two ways to detect the object range. The first one is to give the shader a position and a radius to detect a spherical range around the object position.

The other one use length informations to detect a rectangular box around the object position but currently it only can use the global axis so it doesn’t work with rotatet objects.

nice work! it’s subtle, and thank you for your wind shader, it’s awesome and well documented.

@MORNAT Thanks, nice to hear that you like it. I hope that I can post new updates soon. :slight_smile:

Hi Maujoe, I don’t see a link to the collision shader? I use your wind shader in almost every blend I make and was hoping to try this out.