As we know, in render internal in spotlight shadow there is buffer shadows which looks way much better and, as described in one article, renders faster. I’ve got a question: Why there’s no buffer shadows in BGE and why sun can’t have a buffer shadows?
Eh? Buffer shadows looking better and rendering faster? The BGE does have buffer shadows (known as Simple shadows), as well as Variance (smooth) shadows.
I though they are the ray shadows! A texture calculated using rays from sky!
As far as I know, no, it’s a texture that’s rendered from the light’s perspective. That texture is used to draw the shadow over objects, making them appear to be in the shade. Raycasting for lighting is a much slower process than rendering the scene to a texture and using that to determine where shadows fall.
Variance shadows should use the same concept, but might filter the texture to make the shadows smooth. I don’t really know much about the specifics, but I’m pretty sure the BGE’s not doing raycasting for shadowing.
Actually it’s not slower, 1 ray per pixel uses wayyy less processing power than a buffer shadow almost as good looking.
The problem with gpu ray tracing is passing the scene to your shader, which can’t be done without nasty texture hacks. Though now it’s doable in a clean way with compute shaders, which requires modern opengl architecture. Check out hybrid ray tracing running on a mobile gpu.
Well, yeah! I know raycast is way much better. I have a Blender example(which doesn’t use Blender shaders, but just uses Blender for output) with raycast + animated spheres. has a relatime reflections + reflections inside of reflections making a loop. Very small scene, not made by me, however, runs on 30 FPS in 1080p for my GT 610. I think it’s a good score, right?
I was wondering when Blender will have a better, more powerful shadow casting method. Current one has bugs and low performance. I’d like to see soft shadows and shadows like in Unity
Buffer shadows are shadows that are rendered in a depth buffer (basically an image texture used to store data) and then projected onto the geometry- ray shadows are shadows that are processed at the time of rendering each pixel of the viewport, which costs a lot more processing power- that technique is not used in any game engines other than experimental raytraced engines. Essentially, a buffer shadow renders the scene as though the light were a camera, and then projects that render on the scenery. A raytraced shadow casts a ray from each pixel of the player’s camera, and then where that ray hits, another ray is cast to each light to check if the light is touching that spot or if it’s blocked by something.
Variance shadows are a form of buffer shadow, that uses a more advanced buffer and processing, to give smoother results (and depending on the hardware you can get a performance boost or a performance loss, it’s different on a case-by-case basis as far as I’ve seen). If I’m not mistaken simple shadows support projecting through alpha maps (EG so you could have the leaves of a tree cast correct shadows instead of the transparent parts of that texture still casting a shadow) while variance shadows don’t support that.
Engines like Unity or Unreal or Cry Engine also use Buffer shadows, just with different processing (and in the case of sun shadows they have things like cascaded shadow maps that render at different resolutions depending on the distance from the camera, so you can have very detailed shadows close to the camera and faster-rendering shadows further away where it’s harder to see the loss of detail).
I’m fairly sure that early games that had shadows, such as Doom 3 and Prey, used another different method of casting shadows that involved actually projecting geometry (I think it’s called stencil shadows?) that gave very accurate results, but also couldn’t take advantage of video card acceleration and was limited in its ability to look good (you can’t really factor in alpha planes or do any post-processing to make soft edges so the shadows all looked very hard and fake)
Um… The Unity, Unreal and Cry Engine shadows doesn’t eat framerate so much. Any ideas why? They look better, they don’t have so much bugs, but they also don’t make the game slower! I am just wondering what’s the secret. Also, there are a lot of shadow types that ain’t included in BGE(and many other game engines). Also, take a look at this:
First image shows some shadow types and theyr appearance, but second one shows a very advanced and good looking real-time shadow method called PCSS(Percentage Closer Soft Shadows). I would like to know if blender game engine can have something like PCSS