5
$\begingroup$

How do I fix the anti-aliasing in edges of shadows in BGE?

image of bad shadow

$\endgroup$
1
  • $\begingroup$ shouldnt that be "Remove Aliasing from Shadows in the BGE" ? $\endgroup$ Commented Oct 11, 2015 at 17:38

1 Answer 1

10
$\begingroup$

This can be solved relatively easily, but you may have to make minor changes elsewhere to keep the crisp shadow edge as pictured here, only without the anti-aliasing

This is the type of shadow that you have now.

A blue cube with a bad looking shadow

and I assume this is closer to what you want.

A blue cube with a softer, better looking shadow

You can achieve this simply be changing the shadow casting setting on your shadow emitting lamps from Simple to Variance

a gif showing the setting change

of course, now you can tweak the settings to restore the crisp shadow edge. I found that by squashing the Bias, the shadow looked much better.

a gif showing more settings changing to make the shadow look even better

You will need to make all your shadow lamps have the same settings for the final result to look good. It is usually a good idea to only have a few shadow lamps, one main lamp for everything, and then extra spotlights as needed. A better approach is baking on the shadows for the environment, and then use a spotlight parented to the character to give your character dynamic shadows.

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .