4 ms·
I want a lighting algorithm that handles static and dynamic geometry uniformly, with respect to lighting and shadows, and still manages to look "good enough", i
by cousin_it 13y ago
I want a lighting algorithm that handles static and dynamic geometry uniformly, with respect to lighting and shadows, and still manages to look "good enough", if not necessarily cutting edge. Does such a thing exist?
The last such approach that I remember was Doom 3's stencil shadows, but it handled only direct lighting. Now that people are used to approximate indirect lighting, we get these huge piles of hacks and we have to reinvent them for every new art style...
- wlesieutre 13y agoCrassin's "Interactive Indirect Illumination Using Voxel Cone Tracing" [1] might be of interest. A snippet from the second page: > We handle fully dynamic scenes, thanks to a new real-time mesh voxelization and octree building and filtering algorithm that efficiently exploits the GPU rasterization pipeline. This octree representation is built once for the static part of the scene, and is then updated interactively with moving objects or dynamic modifications on the environment (like breaking a wall or opening a door). It takes a somewhat beefy computer to run, but the results are impressive. I don't have a link handy, but there was a UE4 editor demo showing some of it a few months ago. IIRC it's been axed as a feature because it wouldn't have run well enough across all of the platforms they were targeting. [1] https://research.nvidia.com/publication/interactive-indirect-illumination-using-voxel-cone-tracing https://research.nvidia.com/publication/interactive-indirect...
- flipgimble 13y agoI'm a big fan of the paper you cite and Crassin's work in general. However that algorithm is only viable in my opinion on current high-end PC GPUs and it remains to be seen how useful it can be on the latest console that also want to support large dynamic worlds. The original article describes the careful technical tradeoffs and mixing/matching of techniques that is required to pull off a game like Bioshock Infinite on ancient hardware (at least as relative to current PCs and high-end GPUs). Interestingly when Unreal Engine 3 was first being demonstrated to potential licensees and in the media, it was using a very high quality and elegant one-pass per light rendering algorithm. The demo scenes were basically a room or hallway with several colored lights, and the resulting multicolored shadows cast by an animated character. In 2004/5 this blew people away and a lot of game executives signed expensive licensing deals with Epic. No games to my knowledge actually shipped with that type of lighting, at least on a console. Then Epic and engineers like the author of the article spend the next several years (an entire console generation really) retrofitting UE3 with actually practical rendering technology that involved a lot of sacrifices, careful balancing, and artist headaches. This generation Epic is showing a mind blowing UE4 demo with Voxel Cone Tracing and the cycle starts again. One thing is very clear to me, Irrational threw out a ton of invaluable institutional knowledge when they laid off that team. I suspect competing studios, especially those using Unreal, are scrambling and having a bidding war trying to hire them.
- Argorak 13y agoYou mean that one? (second video into the article, first of the second block) http://www.joystiq.com/2012/06/08/unreal-engine-4-demo-deconstructed/ http://www.joystiq.com/2012/06/08/unreal-engine-4-demo-decon...
- Arelius 13y agoSo, Voxel Cone Tracing doesn't actually treat static and dynamic geometry as the same. It makes two hierarchical voxel trees, one static, and pre-built. and the other dynamic, and generated per frame. This is really the only way it can stay performant.
- wlesieutre 13y agoNot quite. They're all the same to the lighting/shadowing calculations, but it doesn't re-voxelize geometry that didn't change between frames. From section 4.2: > Both semi-static and fully dynamic objects are stored in the same octree structure for an easy traversal and a unified filtering. A time-stamp mechanism is used to differentiate both types, in order to prevent semi-static parts of the scene to be destructed in each frame. Our structure construction algorithm performs in two steps: octree building and MIP-mapping of the values.
- angersock 13y agoThat was probably the biggest part of the idTech4 legacy--unified lighting and shadows, no bullshit, no takesybacksies.
- flipgimble 13y agoExcept with one intractable draw back that shadow volumes could eat up an unbounded amount of GPU fill rate, based on shadow caster geometry and your camera position. As a thought experiment, imagine trying to use stencil shadows in a jungle scene, something Crysis does just fine with shadow maps. Everything is a tradeoff, smoke and mirrors, tons of bullshit and often due to schedule pressure, a lot of takesybacksies.
- angersock 13y agoYep. But we can dream, can't we? :(
- Keyframe 13y agoWell, Whitted's ray tracing. Trouble is that it gets exponentially slower the more pixels you have.
- Arelius 13y agoI mean, you can just use shadow buffers on everything. And something like a screen-space AO to get a little bit of GI effect. It'll look good enough.
- jheriko 13y agoactually a lot of games still use direct lighting in the same style as Doom 3 but with an added ambient term (like Quake 4) and using shadow maps because somehow (I don't agree) the artefacts of shadow maps are considered more tolerable than the hardness of stencil shadows. a lot will only allow a single shadowing light source as well... there is an argument that high quality shadow maps can encode the penumbra, but current gen console hardware is miles away from that quality (top end PC hardware is not). nowadays with stencil shadows there are performance arguments - we would rather use our fill rate on HD resolutions, deferred passes and post effects. there is also the potential patent issue (is that still a thing? its embarrassing really for such a trivial algorithm :( )