point lamp shadows in upbge 0.2.5

Опубликовано: 11 Март 2026
на канале: lopas
147
9

A few days ago a guy asked me how he could build a point lamp in upbge 0.2.5 that generates shadows.
My advice is to use nodes and build a special point lamp taking advantage of the ability of spot lamps to generate shadows.
6 shadow maps are needed to generate shadows in all directions without having strange deformations, so we have to use 6 spot lamps!

Tips for better performances:
If we know that the point lamp will never generate shadows in a certain direction, we could reduce the number of spot lamps that generate the shadow maps needed.
otherwise we can reduce the number of spot lamps if we want only a limited number of objects (less than 6 objects) to generate shadows. In this case, assuming for example that only 3 objects generate shadows when passing near the point lamp, then I will use only 3 spot lamps, each of which will, through logic, be kept oriented towards its target object.
Download blend file here:
https://1drv.ms/u/s!AtQt7q2C9xBymF1by...