Shadows

Blitz3D Forums/Blitz3D Programming/Shadows

Ashley - I sent you the FLEX Combination - what's wrong with it?

Maybe one general word about shadows: If you're relatively new to game dev then shadows might be the wrong thing to start with, cause they are difficult even for advanced Programmers. If you once know what each Command is doing then it's easy to read through the Source and understand what happens when you have a logical description such as "position camera above scene and ENtityFX 1 the Character in a Grey-Tone". (Btw. I had some troubles with textured Models, so I just use a grey Texture and ENtityFX 1 for the Shadow Rendering.)

Your last Screenshot is looking good so far. But you have the wrong Scaling on the texture. The Problem is you should use a Texture which covers the whole Building without repetition. That means your Building Floor Texture can have max. screensize. not a good idea

A second method would be to Render the Shadow to the backbuffer and copy that rectangle to the xz location inside a huge Shadow/Floor texture. (thanks the new bit256 this is an option)

And there's the FLEX Method which is my favorite. It's a bit tricky to handle all kinds of slopes and I'm working on a solution for Stairways etc. but it's the fastest and the most flexible. You can put the shadow on multiple objects without to waste a single second to think about howto do that.