[SOLVED] Ground with shadow and fading out

I was having a play with clay viewer, which is pretty nice to view files.

Could anyone suggest how they achieve the ground affect?

Is it just a ShapeGeometry which will then receive shadows? I especially like the way it it seems to fade into the background could anyone point my in the direction of how that is done? thanks alot

Hi!
For fading effect, just use the same colour for both fog and background.
Something like this: https://threejs.org/examples/?q=fbx#webgl_loader_fbx

Ah great thanks, I’d forgotten about fog! I guess if I just wanted just the plane to be affected by the fog that would have to go on a separate scene?

Sounds like you want to go some complex way :slight_smile:

You can use a texture with radial gragiend of desired colours for the ground plane.
You can use vertex colours, forming radial gradient.
Finally, you can write a shader for radial gradient, that interpolates colours by the distance from the current point to the center.
With all those options, there’s no need for a fog at all.
There are many ways to achieve the result you want :slight_smile:

The clay viewer is open source, so you can take a look at what they are doing here:

1 Like

ahh great thanks for the information