Can 100% real-time lighting setup be as fast as Doom 3 ?

I am wondering if there is a way to setup lighting on the map to be 100% real-time, and yet be as fast is Doom 3 BFG on average PC ? (perhaps stuff like real-time GI and AO would have to be either toned down or turned off)

On the other hand, Crysis 3 had 100% real-time lighting and ran decently (although I recall playing some parts with really low fps) with all the bells and whistles on my PC (which is like 10 years old).

There’s many other advanced graphical features you would also need to turn off to achieve that level.

That’s fine. I’d like to know how I can set it up so I could do some R&D with such approach :slight_smile:

So, this little engine do it all real-time, with seemingly smooth performance (engine is written by 1! person):

I am positive UE4 can do that with the same kind performance. Is that a correct assumption?

Are there any tutorials explaining how to setup a scene with 100% real-time lighting, no lightmaps at all ?

Realtime lighting is achieved in UE4 if you just set every light to movable.
Doom 3 does not have real-time global illumination or ambient occlusion by standard so the comparison is quite far fetched!
The dynamic shadows in Doom 3 are created by a technique called stencil shadowing - a way of calculating shadows that only stays extremely cheap given the tight and small interior leveldesign that mostly present in the game.

You should have a read around here and see if the lighting solution you want is really want you optimally want to be looking for!

I didn’t say it has it. However, Tesseract does.

Shadow volumes is what Doom 3 uses. Not quite as simple as stencil shadows. And Doom 3 BFG fork (including our own fork) does shadow mapping for omni lights and cascaded shadow mapping for sun light. Regardless, the point I was making that it runs very fast on average PC. Crysis 3 runs okay’ish on my PC. So I was hoping UE4 can do better than Crysis 3, performance wise. People with decent gaming rigs could use real-time GI and people like me would have to use IBL and regular real-time lighting. Nothing too fancy.

I saw that link and skimmed through it in the past. I was just hoping for a tutorial where someone explains how to set up scalable, decent looking and fast real-time lighting in UE4. That link to UE4 docs is just a reference, not really that kind of tutorial. Thanks anyway.

I think it would not be too hard to have doom-sized environment lit only by dynamic lights. It’s just a succession of tiny rooms and corridors. Can’t be too demanding performance-wise.

I am sorry, I am perhaps missing something. Where does this come from - the need to have small enclosed environments to be able to have fully dynamic lighting ?!

It’s not a need…but it helps because big open levels with tons of objects + dynamic lighting is expensive that’s all…

From what I can see there’s nothing Tessaract can do that Unreal can’t. No engine on the planet will give you inexpensive real-time G.I. It’s all faked!!!

True that, but if you stop drawing shadows after certain distance - you can have open world level with fully dynamic shadows :slight_smile: (in our Doom 3 BFG fork we have a cvar that defines how far from the camera shadows stop being calculated and drawn) Does UE4 have such option out of the box? I mean, why draw shadows miles away from the cam ?!

I am good with fake as long as it’s fast and looks alright :slight_smile: After all, my art style isn’t going to be photorealistic. How would I tweak real-time GI to look okay’ish, but perform fast?

With the harsh Lit v Unlit shadowing, having shadows only render before a distance would look REALLY terrible. Unlike an environment like UE4 where shadows are broken up either with baked bounced light or a skylight baked/mobile, where any shadows that are disabled after a distance won’t be an eye sore. There’s a reason why the Doom 3 lighting system only last 4 years (Deus Ex: Invisible War, Thief 3, Doom 3, Chronicles of Riddick) and went with a new more visually acceptable look.

So in the real world, you either go really ugly with the Doom 3 style stencil shadows or you just live with what UE4 has to offer. You can have on or the other will out making terrible sacrifices.

[QUOTE=sbnewsom;478038]
With the harsh Lit v Unlit shadowing, having shadows only render before a distance would look REALLY terrible.

Everyone is entitled to have an opinion. If you drool over perfect visuals, doesn’t mean everyone else does. I am personally fine with imperfection if a game is about the game, not just walkaround-look-at-things “gameplay”.

Where do you even see me talking about stencil shadows (and they aren’t stencil) when it comes to real-time lighting ? Here is a piece where you can see cascaded LOD’ed shadowmapping using modified Doom 3 BFG engine:

So far, no one(!) has answered my question. It’s a very simple question - can I have 100% real-time lighting with UE4 with any style of environment (ranging from outdoor levels to small indoor levels) without major performance impact (e.g. never dropping below 30 fps). Doom 3 was brought up as a reference, since I personally know of only 2 games that use 100% real-time lighting - Doom 3 and Crysis 3. It has nothing to do with shadowing technique in Doom 3 - see my video (modified Doom 3 BFG engine using omnidirectional and cascaded shadow maps).

If I can have that, could please someone point me to a tutorial that shows how to setup tweakable distance to render shadows, tweakable real-time GI, etc. In other words, of PC is not top notch, maybe 1-2 bounces for GI would be enough, or maybe it should be off and scene should use IBL and/or skylight. Stuff like that.

Yes you can. For GI you just need settle for LPV. One example that use dynamic lighting and run with slower hardware(xbox one) is Fable legends. http://www.lionhead.com/blog/2014/april/17/dynamic-global-illumination-in-fable-legends/

Wow, that looks stunning! Sounds like it’s a standard feature of UE4 already: Lighting the Environment in Unreal Engine | Unreal Engine 5.3 Documentation , but can it be turned off and on on the fly? The doc says “At the moment, this console variable cannot be changed at runtime.”, however, how true is that for 4.11 ?

I think LPV has not being improved in a lonnnng time… the quality is not super dooper iirc!

Well, if it’s not worse than what Tesseract has, it’s fine :wink:

OK, here’s what you need to do: switch to Mobile rendering. I’m serious. All of the fancy post-process effects and intense graphical features get stripped down in the mobile feature set of the engine. If you want fast, dirty, and cheap, that’s the easiest way to do it. It’s already pre-set and optimized for efficiency.

However, if you want to use the full feature set of the engine, just not everything all at once, there’s a few things you need to do: first, you need to disable practically all of the post process settings: no lens flares, no motion blur, no eye adaptation, no DoF effects. I think if you just use a disabling value in the post process settings it will effectively remove that aspect of post process from the render thread, freeing you up to do other things. Second, you need to disable the reflection environment from your materials. Plugging a “0” in the specular for all the materials you don’t want’ specular reflections on would be a great way to get rid of it. Screen space reflections still run in the background, though: I think these can be effectively disabled under the Screen Space Reflections in the Post Process Settings, but I’m not entirely sure. I know you can access the engine settings and bring the samples of screenspace reflections so low they are practically non-existent, so try both methods, and hopefully that removes the overhead of running the reflection environment. Third, it would be a great idea to use lightmass for precomputed lighting: placing a lightmass importance volume will build lighting caches for dynamic objects as well. It looks great, it’s not very expensive, and you get your whole GI out of it. You can place a stationary skylight to provide the ambient lighting in your level, or change the Environment intensity/color settings in the world settings (that all feeds into lightmass), along with a sun. You can place as many lights as you want, as long as they’re all static, then you’re done!

If you NEED to go all-dynamic, you can use a movable skylight to basically provide ALL of your GI lighting. If you want a moving sun, that will require a dynamic light. Just keep in mind dynamic lights (besides the skylight) use the GGX specular model for specular lighting, and it’s a fairly expensive lighting model compared to Phong shading in UDK and Gourard shading in old, old, old school engines. Plus, any dynamic specular lights not only kicks on the fairly expensive GGX specularity, but it also RE-EVALUATES the entire material of every pixel the light touches! You’re basically rendering the entire scene’s materials twice in order to have a specular sun. Once you remove the post processing, disable the reflections, and go all static GI or a basic dynamic solution, you should be running smooth. The only other way to make your game cheaper than this is to not use lighting at all and only use emissive lighting for the materials on all the objects you make, but now we’re approaching very sad levels of graphics.

Keep in mind too, the N64 had trouble pumping 30 FPS at 320x240 resolutions, interlaced! The Gamecube/PS2 were both standard definition at 640x480i, so it only renders half the screen in any given frame. Old school PC games probably ran at 1024x768, with 1280x1024 being the highest supported resolution. Running something at full 1080p or worse, 1440p, or worse, 4K, would be really bad. By default, the editor and Play in Editor both run at the maximum resolution possible. You can just run your game at those lower resolutions or use the screen percentage post process to cut back on the resolution and save from having to render such ridiculously detailed graphics all the time.

I had an old GT 640 that ran a very nice church scene, complete with stained glass windows casting colors onto the environment through lightmass, at 85 frames per second. The only thing I did was make the lighting completely static. That scene had some heavy post processing as well. This was in 1080p. Chances are your framerate is going to be GPU bound, so taking out the screen space reflections, the specularity, the fancy motion blur, the lens flares, the ambient occlusion, and cutting back on the resolution will get you a much better framerate. It will be sad to let those things go, but your game will run well on basically any computer made in the past 4 years!