jPCT-AE - a 3d engine for Android > Support

fake shadows

<< < (2/3) > >>

EgonOlsen:
Some ideas:


* ignore it
* make the shadow small enough, so that ignoring the problems doesn't hurt much. May not work too well, if the shadow's size changes, which is most likely to illustrate the height...
* create a kind of small border that surrounds the tiles and that is slightly higher then the tiles, so that the shadow is hidden by it when leaving the tile. It can be visible or invisible if the background color is fixed. I did this in Paradroidz to hide that the fog of war actually wasn't clipped at the levels' borders.
* maybe its possible to do something with a border and some weird blending modes combined...but i'm not really sure about this...maybe that's just complete nonsense...
* do something on the geometry level of a more detailed shadow plane (not just one quad)...might be slow and a pain in the a... to code.

raft:
thank you, you are full of ideas ;D i will consider these in detail..

EgonOlsen:
Another idea (untested...like the others): Attach an IRenderHook to the shadow, disable depthbuffer writes before rendering via gl, enable them afterwards. After drawing the game world, render the background as a seperate object/world. That way, the background will overwrite the overlapping parts of the shadow. This won't work with a blitted or unicolored background though. But with something like in ballbox, it actually should.

EgonOlsen:
Thinking about this, i'm not sure if transparent objects write into the depth buffer at all. I've changed this behaviour one or two times, so i'm not sure what the current state is. I'll check this later...if they don't, the renderhook-step can be left out.

EgonOlsen:
I've checked it...transparent objects don't write into the depth buffer. So if you are playing around with the idea mentioned above, you can simply leave out the IRenderHook part.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version