simple shadows
Blitz3D Forums/Blitz3D Beginners Area/simple shadows
| ||
i want to create simple shadows(just circuler blobs) for my characters i created a 1024x1024 texture to blend with my terrain then drew a black 6x6 oval on it and the players co-ords but this slows the program down visably ive seen all the shadow code in the code archives but it all deals with dynamic shadows any ideas on how to create a simple blob shadow that works fast |
| ||
The simplest method is to place a textured sprite or quad directly below the character. * Texture the shadow mesh using a texture like this ... ![]() * Set the shadow mesh entityblend to multiply. * Make the terrain pickable and each frame do a linepick straight down. Linepick entityx( character ) , entityy( character ) + 10 , entityz( character ) , 0, -20, 0 * Move the shadow mesh slight away from the terrain to avoid z fighting. positionentity shadowmesh, pickedx()+.1*pickednx(), pickedy()+.1*pickedny(), pickedz()+.1 * pickednx() * Align the shadow mesh to the landscape contour. aligntovector shadowmesh, pickednx(), pickedny(), pickednz(), 2 That should work plenty fast for quite a few characters. Stevie |