Why aren't these dynamic shadows UV-mapping right?

Blitz3D Forums/Blitz3D Programming/Why aren't these dynamic shadows UV-mapping right?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

"Well doesn't Shawn's shadow routine do perspective shadows, not just directional light, like orthographics projection would give?"


I beleive that the problem with your system is stemming from the facts that:

A) You are trying to render an image from the camera's point of view and then project that onto the locations which the vertices map to on the screen. I do not do that, there could be unforseen problems.

Such as:

B) What about those vertcies oout of the camera's view? If yuou try to render with all receivers in view, then you're gonna have awfully low res shadows, rather than rendering a view just large enough for the shadow and then projecting that.

And what about:

C) If I'm not mistaken, you're rendering the shadow map, texturing the entities with it, and then rendering the shadow map again with those entities... Which you textured with the shadow map already... Which is probably modulating the entity color in the new shadow map. Or maybe it's not. Hard to say. Your code is confusing.


And no, my system doesn't do perspective shadows. It cheats to save polygons. It uses hybrid point lights. In other words, shadows do not get wider as they receed from the object casting them.

I did this only because I wished to. It's not a limitation. I just didn't want all the polygons in all the meshes inside an expanding 4 sided cone that extends infinitely into the distance to get put into the potentially visible set.

However even if I chose to do this there is absolutely no need to render the shadows with perspective. I render the object casting the shadow by itself scaled to a size of 1,1,1 fit so that it almost touches the corners of the rendered texture. A shadow map is a 2D thing. No perspective is needed to scale it to be larger as it receeds into the distance.


Anyhow Halo, even if you implement that exactly right it still won't be as fast as my shadow system, which has tons of optimiations. :-)

But just think... for one copy of Chsop 3, which I can't buy anyhow cause I'm broke, you could sneak a peek at how I optimized the thing, and see how I did all this using math and no camera tricks like you're trying to do. :-)

Halo, what would you do without me? :-)