Forward rendering path (Translucency, Transparency + Alpha Blending)

I want to discuss on transparency and performance issues as a whole and here are the main options I know of with DR, so what it affects:

  1. Water
  2. Foliage as a whole
  3. Particles
  4. Anything else using alpha

Options that I know of since I last did engine dev:

Option 1: Have a massive G-Buffer that rips performance apart due to the number of layers required in a scene, in addition to the large amount of memory and bandwidth DR takes up anyway. Option 1 is probably the worst option to go for…

Option2: You can interlace transparent and opaque date, which is limited and causes artifacts.

Option3 : Finally you can MP with a forward rendering path, but that requires Epic to put a lot of effort into making and maintaining one… I’m not sure if the code from UE3 would be useable? But at least it’s a base.


So the primary portion of UE4 is TDS, did you look into a Tiled Forward + solution? Because you can re-use the grid and as it’s all in a single global structure it’s relatively simple to support transparency and the rest as a whole…

So that’s TDS + TFR.

It would be nice to try and find a solution on this problem as it’s next on our to do list, I’ve not yet dug my hands into the code. Thanks in advance for your help…

Martin Mittring said on stream, that he is working on Forward Rendering. But:

  1. It’s more of his personal project that he is working when he have time.
  2. It’s not high enough priority at Epic to be worked on full time.

Though it honestly should be. Realistic hair is a must and it’s just being left in the lurch. Luckily I have time to wait but not everyone does. I hope they get to this sooner rather than later!

Also, it was mentioned that the forward rendering path won’t be an old-school, legacy implementation, but instead it will use modern techniques, so perhaps it will be some version of Tiled Forward.

How is CE doing it?

Forward G-Buffer generation and Forward shading with light accumulation textures, with deferred on a separate pass. I’d love to know the reason for not considering it a “priority”, this will affect performance and base engine functionality. Every engine needs some sort of trickery or FR path to deal with this, if they are using a Deferred Tile setup then they need to look at TFR as priority number 1…

Foliage / water / hair / glass etc. will always be problematic in various ways (performance, rendering) until this gets resolved.

I can confirm translucency for water with the deferred renderer has a lot of issues, it is somewhat of a nightmare at the moment (as you pointed out in my other post).

Forward rendering, as well as the planar reflections for translucent surfaces. These are the 2 features I really want to see implemented soon.

I agree.
I don’t see why this should not be priorized for 4.6 , because there are basic needed requirements for almost all games needing transluency and alpha with a reasonnable rendering speed.

Yes and if anyone hasn’t already voted on Trello Trello, get on it… I’m surprised this wasn’t included in the engine from Alpha, as mobiles have a severely limited fill-rate… I’ve only worked on large in-house engines before so I never did much with mobile, but it wouldn’t make sense to use DR with mobile unless you’re aiming for things like Tegra.

It’d attract a lot more custom Epic…

Somehow the various major studios are fine without it at this point and it’s tough to say “almost all games need this.” Black Tusk with Gears, Epic with Fortnite + Unreal Tournament, Lionhead with Fable, Sony with RIME, Square Enix with Kingdom Hearts, and many more. Either they’re not going to need this or they’re not going to need this soon (hence the priority).

My guess would be that as Fortnite nears completion, and perhaps roughly aligned with GDC 2015, much of Epic would be free to advance the rendering tech a bit faster before settling into their next project. i.e Come back around 4.8 / 4.9 and see if it’s started. I too would like to see better glass/IoR/transulcent materials though (I had started another thread about that) but I just want to make pretty pictures :slight_smile:

Well UT is primarily an indoor shooter which hardly requires mass amounts of opacity objects in small instances this is fine, for the most part you can “work around it” limited instances of procedural foliage within frustrum Fable legends water isn’t exactly CryEngine water or foliage now is it? Also with the amount of money these guys have, who knows if they built there own? Lionhead was donating LPV tech to Epic so who knows?

Just because you can hack around it, shouldn’t mean you have to. But I get what you’re saying it’s not do or die for a lot of games, but still pretty basic thing that should be added to an engine rendering pipeline.

Also not to be confused with general performance issues, a lot of problems are due to lighting and shadows bringing GPU’s to it’s knees in which baking is the only option in some extremes…

Without decent looking foliage/water you can’t have a decent outdoor game unless it’s cartoonish (like all latest indie games for EU4 are that have outdoor).

Most of the features are being made for/from Fortnite hence the lack of water/foliage etc

So you say that vegetation in CE is rendered in FR? I think I saw a picture in some recent paper from Crytek where vegetation was indicated to be processed in Deferred pass. I think they can use smth. similar to this:
If you have more information about their approach - please share.

Totally agree. If they’ve managed to implement their own GI - they have enough knowledge to make changes in engine’s rendering pipeline.

Someone could try implement this in Unreal. It doesn’t seem that complicated if you know your way around engine rendering pipeline.

If there was code for this technique somewhere, I could at least try to backport it into unreal (it’s easier to understand code, than theoretical description of technique :D).

Here is this technique in action:
It’s looks very good.

@Shockwave, there is a presentation called a bit more deferred or something. Personally I worked on DTR’s and that doc is a bit long in the tooth now, as CE changes like the wind it could be different now. That article you specified covers what I said at the top, but goes into more detail.

@iniside, I take it you’ve never tried to run a FR path with a DR path and get it to work right? :D, it’s not simple at all. DTR and TFW+ is much simpler as stated in my original post and it’s something we can do…

Quote from Nvidia GPU gems "19.3 Forward Shading Support

Even with a deferred shading-based engine, forward shading is still required for translucent geometry (see Section 19.8 for details). We retained support for a fully forward shaded pipeline within our renderer. Our forward renderer is used for translucent geometry as well as a fallback pipeline for all geometry on lower-end hardware.

This section describes methods we used to make simultaneous support for both forward and deferred shading pipelines more manageable."

In all fairness if were talking about performance, dynamic shadows whether CSM or RT’d has much more of an impact and needs to be dealt with carefully. But this does add to the issue, must admit…

Issue with us building the solution is two fold, one upgrades… They would have to build our solution into the main branch, also Epic would have to support it. We only tackle PS4 and PC (Maybe Mac not sure yet), so we wouldn’t test our solution on any other platform. Theoretically there should be no issues, but you never know…

Technique in link is done in deferred path ;). That’s why I asked for code.

Yeah, it looks good but do note drawbacks list in Conclusion section. I’m almost 100% sure that it is not possible to develop solution which will satisfy all users and cover all cases. So you need to choose technique based on your specific needs., there you go chief knock yourself out :)…

It only mentions edge smoothing done in the deferred pass, but it’d be cool… I’d go for the FR personally it’s a bit of an old technique, still looks good though. There is still water and the rest to contend with as well hehe!.

Right. But… CE2 was forward rendering engine.
The switched to fully deffered renderer with CE3.

I think you’re not correct. Excerpt from their presentation from GDC13:
Allowed us to drop* almost** all opaque forward passes.
For more complex shading such as Hair or Skin, process forward passes*

Deferred (Red) + Forward (Green)

I think ShadowKindGames is refering to an outdated solution which has already been dropped from CE (paper which he is referring to was published in 2009).