Unreal Engine 5, [UE5 Developer Availability 2022-04-05]

I mostly agree in that to really appreciate highly detailed complex geometry you want to have good lighting.

But the flip side is that really good light quality exposes the inadequacy of geometry in all existing released games.

Having only one or the other is inadequate.

Regards,
SB

Given for some reason the remastered GTA Trilogy skips on complex geometry, I wonder what it would look like with RT lighting. I wouldn't play that game with RT Minecraft like visuals.

Honestly, I wouldn't mind a market where different games try to maximize RT, geometry or other aspects of visuals. It would make for a more diverse market and let us see whats possible regarding certain aspects when other things aren't strongly vying for gpu performance.
 
Given for some reason the remastered GTA Trilogy skips on complex geometry, I wonder what it would look like with RT lighting. I wouldn't play that game with RT Minecraft like visuals.

Honestly, I wouldn't mind a market where different games try to maximize RT, geometry or other aspects of visuals. It would make for a more diverse market and let us see whats possible regarding certain aspects when other things aren't strongly vying for gpu performance.

Nintendo games are pretty perfect for this maybe. Games like Breath of the wild, Xenoblade Bayonetta etc would look great if they replaced their probe lights and cube maps with RT.
 
My bet is pretty soon most engines will converge into using a heavily simplified representation of the scene for RT, and deal with the mismatch by screen-space tracing a bit at ray start, and other artifact mitigation strategies...
The short screen traces seem mostly unavoidable for other reasons too. Even virtual shadow maps uses them currently because normalizing the LOD selection between different views in Nanite is both expensive and undesirable.

That said, even short screen traces have artifacts. VSMs currently trace across 2% of the screen and it's worth noting that even with that you lose some very fine detail and get some incorrect occlusion in areas. I'd love to lower that to 1% or lower which works in many scenes, but for a general engine you kinda have to keep the settings a bit more conservative due to wanting to do something semi-reasonable with bad content.

Against proxies, 10% was enough in my test scenes for proper HW RT self shadowing with double sided geometry enabled without noticeable artifacts. Second option - you can move rays starting point away from the shadow caster so that there is no false self intersections due to geometry mismatch, the same trick is used to get rid of shadow maps acne artifacts.
Unreal does both of these things in various paths (VSM, RT, etc) but again it's a tradeoff, not a panacea. I constantly evaluate how RT proxies + screen trace compares to VSMs because it would be awesome to not have to do VSMs when Lumen is enabled frankly... unfortunately while you can get away with it in some scenes, there is a significant loss of detail in high frequency surfaces like the rocky landscapes we are so fond of demonstrating of late.

VSMs w/ SMRT filtering are starting to behave a lot more like RT in many regards than conventional shadow maps. The primary cases where RT still wins are currently more to do with large area lights (that just can't be accurately represented with the single point projection) than precision or detail (which VSMs can match and sometimes even exceed due to RT using larger normal biases). There's some edge cases around very narrow camera FOVs that don't mesh well with the clipmap structure too, but that's not as common as people wanting to put giant rect lights beside everything.

I think the mid-term future is definitely a hybrid of a lot of these things... unfortunately for me and engine complexity :p Short screen space trace, into some hybrid of VSM/SMRT and RT sampling depending on various heuristics and the light configuration. Possibly even falling back to something like distance field shadows for small distant lights, TBD.
 
Last edited:
I think the mid-term future is definitely a hybrid of a lot of these things... unfortunately for me and engine complexity :p Short screen space trace, into some hybrid of VSM/SMRT and RT sampling depending on various heuristics and the light configuration. Possibly even falling back to something like distance field shadows for small distant lights, TBD.
What about the state of hardware RT acceleration into that mix? Will it be anything useful?
 
The short screen traces seem mostly unavoidable for other reasons too. Even virtual shadow maps uses them currently because normalizing the LOD selection between different views in Nanite is both expensive and undesirable.

That said, even short screen traces have artifacts. VSMs currently trace across 2% of the screen and it's worth noting that even with that you lose some very fine detail and get some incorrect occlusion in areas. I'd love to lower that to 1% or lower which works in many scenes, but for a general engine you kinda have to keep the settings a bit more conservative due to wanting to do something semi-reasonable with bad content.


Unreal does both of these things in various paths (VSM, RT, etc) but again it's a tradeoff, not a panacea. I constantly evaluate how RT proxies + screen trace compares to VSMs because it would be awesome to not have to do VSMs when Lumen is enabled frankly... unfortunately while you can get away with it in some scenes, there is a significant loss of detail in high frequency surfaces like the rocky landscapes we are so fond of demonstrating of late.

VSMs w/ SMRT filtering are starting to behave a lot more like RT in many regards than conventional shadow maps. The primary cases where RT still wins are currently more to do with large area lights (that just can't be accurately represented with the single point projection) than precision or detail (which VSMs can match and sometimes even exceed due to RT using larger normal biases). There's some edge cases around very narrow camera FOVs that don't mesh well with the clipmap structure too, but that's not as common as people wanting to put giant rect lights beside everything.

I think the mid-term future is definitely a hybrid of a lot of these things... unfortunately for me and engine complexity :p Short screen space trace, into some hybrid of VSM/SMRT and RT sampling depending on various heuristics and the light configuration. Possibly even falling back to something like distance field shadows for small distant lights, TBD.

Thanks for the insight. Can you elaborate on the scenarios where VSMs match or exceed RT accuracy? I haven’t seen a recent paper on VSMs but I’m sure the tech has advanced a lot in the past few years.
 
I think the mid-term future is definitely a hybrid of a lot of these things... unfortunately for me and engine complexity :p Short screen space trace, into some hybrid of VSM/SMRT and RT sampling depending on various heuristics and the light configuration. Possibly even falling back to something like distance field shadows for small distant lights, TBD.

I mean, maybe let Lumen handle distant lights? If their contribution is low enough you might not notice artefacts if you splat lights into the distance trace gather after a certain cutoff, use something like restir to estimate occlusion, or dedicate a ray to trace directly? Anyway.

But then, maybe large area lights could use hybrid distance field shadows? I dunno, either way don't show this video to any artists:
Because frankly I already want to see stuff like the orange giant used in some space game, but that definitely looks like it'd break RTVSM area light limits.
 
Thanks for the insight. Can you elaborate on the scenarios where VSMs match or exceed RT accuracy? I haven’t seen a recent paper on VSMs but I’m sure the tech has advanced a lot in the past few years.

I could swear Andrew was referring to Variance shadow maps (VSMs) given his prior work. Just realized he’s talking about UE’s Virtual shadow maps (also called VSMs).

Oops.

It’s pretty wild that it’s still more desirable to rasterize and sample multiple cascades of 16k shadow maps per light than it is to cast shadow rays at geometry with importance sampling. I had thought we were at an inflection point where RT would be the more efficient choice for non-trivial lighting scenarios.
 
I would say it’s actually the opposite. Techniques like VSM are viable if you stay within strict bounds of scene complexity. I suspect RT scales more efficiently with the number of shadow casting lights for example so is more flexible from that perspective. Given UE5 supports both methods it would be cool if someone did a benchmark for a head to head comparison.
 
I didn't say it wasn't a contest now, but for now accelerated RT simply can't innovate for shit to deal with geometry complexity.

The future is multiresolution and prefiltering, the far future of pure monte carlo will have to wait a little bit longer. Currently RT acceleration is stuck in the past.
 
I didn't say it wasn't a contest now, but for now accelerated RT simply can't innovate for shit to deal with geometry complexity.
... Currently RT acceleration is stuck in the past.
Just because hardware accelerated RT cannot map perfectly to one form (and one of the only forms) of micro geometry on the market that has yet to make it into production games... it is stuck in the past?

That sounds like an overappraisal.
 
It fails by not letting you directly trace to an adaptive level into the Nanite geometry representation for one.
 
It fails by not letting you directly trace to an adaptive level into the Nanite geometry representation for one.

That would be nice but would still be subject to Nanite’s significant limitations regarding which assets are supported. We need a general purpose geometry representation. Nanite isn’t that.

In general though, is there evidence that geometry detail is already maxed out on current RT hardware? Ampere’s doubled triangle intersection performance doesn’t really show up in benchmarks so it seems the bottleneck is elsewhere.
 
For now (like, the next 3 years) ue5 looks awesome and the vsms and lumen seem better result for performance than rt will achieve. As nanite is improved to handle more cases and as rt hardware supports more flexible bvh updating (or whatever elss it is that makes it impractical to trace against nanite) that will probably change.

I think nanite is an impressive step and a reminder that "more geo" is very valuable and has often been discounted as a path forward, but i doubt "good datastructures for putting tris on screen" and "tracing against bvh trees" are actually fundamentally at odds in the medium term.
 
but i doubt "good datastructures for putting tris on screen" and "tracing against bvh trees" are actually fundamentally at odds in the medium term.

Not at all. But hard coding one specific way of encoding and tracing against a data-structure in hardware is indeed at odds with dev experimentation and unorthodox but potentially better solutions. The fact that devs are not going all-in on pure RT, without trying out other alternatives aproaches is a blessing. I hope it continues.
 
In general though, is there evidence that geometry detail is already maxed out on current RT hardware?
NVIDIA still seems to push hybrid rendering with rasterization for primary rays.

Even ignoring geometry density, prefiltered geometry representation for things like foliage and fur aren't efficiently doable either. Possibly all that could be handled generically in the not so distant future with flexible RT, instead of still needing purpose designed shaders.
 
What do you mean by multi-resolution and where do the current fixed-function solutions fail?
I don't see the problem at fixed function units, nor would Intels proposed traversal shaders be an effcient solution to the problem. (Made many posts about this, but repeating it once more for you, as you where inactive for some time :) )
The problem is that any continuous LOD solution requires dynamic gemoetry. Triangles subivide or join depending on camerea distance, so our mesh has no longer static topology even if it's just static background. In other words: The whole scene becomes dynamic geometry.
Current RT APIs don't support this. They assume topology to be static even for skinned characters. Refitting BVH instead rebuilding only works with static topology.

Cosnequently, even if only a small patch of triangles on a model changes its resolution, we need a full BVH rebuild for the entire model. Continuous LOD requires to adapt all models detail as we move the camerea through the scene, se we end up rebuilding BVH for the entire scene every frame, which can't be efficient or realtime at all.
Thus we have to choose: Either continuous LOD, or DXR. The latter currently prevents any solution and progress of the former. (Epic supports DXR by using static low poly proxies for RT, which reduces detail, but worse: It disables their nice LOD solution resulting in wasted memory and performance again.)

To fix the problem, we need to update BVH together with the geometry, so a BVH API is required. Continuous LOD and raytrcing can even share the same hierarchy. We need options to dynamically add and remove BVH levels and triangles.
On consoles this would be already possible, becasue BVH isn't blackboxed.
On PC it's more difficult. NV might use treelets for BVH compression, Intel might use who knows what, AMD keeps it simple til yet but we don't know what's next.
So a BVH API needs to respect and allow specific HW optimizations, while still giving full flexibility to devs. I don't expect to get this anytime soon.
It would be nice if GPU vendors would instead relase extensions and specifications to expose their custom data structures for their chip generations. No easy solution for devs, but at least a solution would become possible without waiting a decade. As people use it, it would turn out how such API has to look like in detail more easily.

As a bonus, all runtime BVH generation cost while streaming open world can be replaced with a much faster conversation process (custom engien data to RT BVH). So we could stream BVH instead building it during gameplay, which is a pretty ridiculous state of the art currently, imo.
 
Thanks for the insight. Can you elaborate on the scenarios where VSMs match or exceed RT accuracy? I haven’t seen a recent paper on VSMs but I’m sure the tech has advanced a lot in the past few years.
The concept of virtual shadow maps (sorry about the acronym... yes it's endlessly confusing but eventually you just give up :p) has not changed a lot, mainly just the "other 90%" of the work/details to make them actually usable in a general purpose engine. We're not there yet for all workloads, but it's getting better over time.

In terms of what they tend to do better from a production point of view right now: large scenes with lots of geometric detail. Will get it into it a bit more below but fundamentally RT runs into various walls with building and updating sufficiently large BVHs.

I mean, maybe let Lumen handle distant lights? If their contribution is low enough you might not notice artefacts if you splat lights into the distance trace gather after a certain cutoff, use something like restir to estimate occlusion, or dedicate a ray to trace directly? Anyway.
Yes indeed, that is something we are exploring but we need solutions for when Lumen is disabled as well. Falling back to screen-space traces only may be a reasonable compromise for some scenes but I imagine we'll need a middle ground too. We've also thought about DF shadows as well, but again mesh distance fields are not enabled in all projects. The joys of giving the users tons of options and then trying to make all the paths as orthogonal as possible I guess :)

It’s pretty wild that it’s still more desirable to rasterize and sample multiple cascades of 16k shadow maps per light than it is to cast shadow rays at geometry with importance sampling. I had thought we were at an inflection point where RT would be the more efficient choice for non-trivial lighting scenarios.
So the key is that we're not actually rasterizing 16k shadow maps... we're rasterizing in general comparable or less resolution even than conventional 2k * 4 shadow cascades would have done. We're just doing it in much smarter places with a lot less waste. As long as you can keep the culling aspect fine-grained enough (as we can with Nanite), it is almost a pure win.

I would say it’s actually the opposite. Techniques like VSM are viable if you stay within strict bounds of scene complexity. I suspect RT scales more efficiently with the number of shadow casting lights for example so is more flexible from that perspective. Given UE5 supports both methods it would be cool if someone did a benchmark for a head to head comparison.
As usual, it just depends on how you define "complexity". Naively, RT lights more easily deal with higher shadow casting light counts but they run into significant bottlenecks with denoising that undercuts that benefit. There are ways around this of course, but all with their own tradeoffs. Virtual shadow maps and Nanite on the other hand deal far better with highly complex geometry and large worlds than does RT currently. Sure you can create entirely static scenes with the BVH precomputed and fully in VRAM where it works, but these are not realistic for many games, or even most of our largely-static demos to date.

Ultimately the real limiting factor for RT is not how efficient it is to trace rays into a precomputed tight BVH, but how efficient it is to maintain and update non-trivial amounts of a BVH to the required level of accuracy. Building a BVH is similar complexity to rasterization, and generally with higher constant factors. Thus I think the comparison going forward should be more around how does rasterizing something with Nanite compare to building/updating a BVH of that geometry as the camera/lights move around.

Cached virtual shadow maps sit in this sort of interesting middle-ground between rasterization and raytracing. They are relatively efficient with nanite geometry, which precomputes some aspects of the topology and so on to allow finer-grained culling, but supports efficient streaming and LOD. They are less efficient with stuff stuff like foliage using vertex animation and heavy alpha test.

But of course those things are *even worse* with raytracing, as the cost of rebuilding a reasonable BVH is even higher than the cost of re-rendering appropriate virtual shadow map pages or similar. Indeed everything that is bad for nanite + virtual shadow maps is bad for raytracing as well, and more.

The problem is that any continuous LOD solution requires dynamic gemoetry. Triangles subivide or join depending on camerea distance, so our mesh has no longer static topology even if it's just static background. In other words: The whole scene becomes dynamic geometry.
Current RT APIs don't support this. They assume topology to be static even for skinned characters. Refitting BVH instead rebuilding only works with static topology.
I'm not even willing to go so far as to say that we require continuous LOD in a topology-altering fashion in the future. Nanite fixes topology after all and still maintains watertight rasterization via other cleverness and avoids popping by achieving a low enough error threshold. Whether achieving error thresholds of that order is viable for raytracing remains to be seen, but I'm not yet willing to put my hat down on "definitely no".

That said you've definitely pointed at the core issue here: RT needs *some* good solutions for streaming and LOD that are much finer-grained than the current APIs (and possibly hardware) support. I worry that the cost of recreating or streaming BVH nodes at the granularity that is required might be too expensive even if APIs weren't in the way, but that remains to be seen.

The tracing part of the equation is almost irrelevant to me at this point, other than the vague notion that we'll likely have to make it more expensive by sacrificing the quality of BVHs to solve the real problem. The real problem that is preventing people from shipping this stuff without resorting to lower detail proxy-style stuff for secondary rays is the BVH streaming/update/LOD part of it. Certainly there are going to be cases where you can just preload a static BVH for the whole scene in which case you can get some really nice area lighting and soft shadows and so on. But in terms of being an end to end replacement solution that can service high frequency lookups like direct shadowing in large open worlds, there are many unknowns and problems to be solved there yet.
 
Back
Top