Random Topic of the Week - Rendering Path

Hi Everyone,

So this week I chose something that I don't even know what it means. But there's a setting for it in unity so it has to have something to do with games, right? :P

Ok, so the only thing I could find on short notice(I forget to look up stuff :P) is this [url = http://en.wikipedia.org/wiki/Path_tracing]Wiki reference[/url].

So this might be a short discussion because the only question I really want to ask is : "Is this even important?"

I promise to do better next week :), but in the mean time...have at it!

[url = http://www.makegamessa.com/discussion/568/random-topic-of-the-week-behavior-trees#Item_1]<- Previous Topic(Behavior Trees)[/url]


  • Let's start with getting some better definitions to work with (from the Unity Docs) :)

    Vertex Lit:
    Vertex Lit is the rendering path with the lowest lighting fidelity and no support for realtime shadows. It is best used on old machines or limited mobile platforms.
    Forward Rendering:
    Forward is a shader-based rendering path. It supports per-pixel lighting (including normal maps & light Cookies) and realtime shadows from one directional light. In the default settings, a small number of the brightest lights are rendered in per-pixel lighting mode. The rest of the lights are calculated at object vertices.
    Deferred Rendering:
    Deferred Lighting is the rendering path with the most lighting and shadow fidelity. It is best used if you have many realtime lights. It requires a certain level of hardware support, is for Unity Pro only and is not supported on Mobile Devices.

    To answer @Rigormortis's question:
    "Is this even important?"
    Short answer: No.

    Long answer: Depends.

    Generally speaking, unless you are trying to do very advanced lighting and shadowing effects in your game, you're going to want to stick with Forward Rendering. This is the traditional way of rendering things in computer graphics. It has the largest bang-for-buck and is pretty much the standard for all Unity games.

    Vertex Lit is for most purposes a more simple version of Forward Rendering, as defined by Unity. You're probably going to be fine just sticking with FR for any game that you make in Unity, but if you have simple graphics and don't need any sort of per pixel effects or shadows, you could probably go with VL if you want to support super-simple older onboard GPUs, or are trying to support DX7-type hardware.

    Deferred Rendering is really great when you have a ton of realtime lights and are only worried about looking good on beefy GPUs. In simple terms, DR does a pre-pass render on your scene, storing the normals and depth values for all pixels on the screen, then it does a lighting pass on this information using all of the lights in the scene, and finally, all objects are rendered again while applying this pre-calculated lighting info. This method reduces the lighting costs in cases where you may want to have a large number (ie. dozens or hundreds) of lights compared to traditional Forward Rendering, at the cost of having to render the scene multiple times. As well, DR doesn't allow for hardware anti-aliasing, nor can you use alpha blended objects with it (they need to be rendered after the scene has been DR scene has been completed, using standard FR rendering).

    95% of the time, if you're using Unity, just stick to Forward Rendering for all of your cameras... if you leave it as Use Player Settings, users may muck around with them and end up making your game look or run worse than you intended it to :)
  • This is one of my favorite reads from GPU Gems 2: Deferred Shading in S.T.A.L.K.E.R.

    It might take some digesting, but it builds on the basics that @AngryMoose laid down and starts talking about optimisations and other neat things you can do with the idea. Personally, I haven't used deferred rendering for anything, but I have a pretty strong feeling that once someone comes up with neat ways to approach more surrealist scenes via DR, we'll see some cool games emerge that use it.

    That said, Antichamber looks totally crazy and unique and that's bog-standard FR, although Alex Bruce says it's using subtractive lighting, which sounds like tech pron ;)
  • @dislekcia, I'm not sure if I should thank you for linking that article...it's so long and now I have to read it :P.

    @AngryMoose & @dislekcia, thanks for contributing :)
  • edited
    I devoured the STALKER Deferred Shading article,

    Read some more papers on the topic, and ended up at Deferred Irradiance Volumes which was awesome.

    Reading through that culminated in a mixture of respect, amazement and envy.

    That then branched off into this paper on Spherical Harmonics, which was a *bit* tough to follow (aka extremely) but good mind excercise!

Sign In or Register to comment.