Home Technical Talk

RAGE lighting and shadows?

This question spawned from a discussion about baked radiosity and texture shadows (Mirror’s Edge style) VS shadow mapping and indirect lightmaps (COD4 Style) and their respective aesthetic and performance merits.

It got me wondering what id’s RAGE uses, judging from released media there seems to be high quality indirect lighting and shadows which suggests baked radiosity lightmaps, this makes sense because if their megatexture gives them “infinite” textures then there’s no reason they wouldn’t bake their lighting into it. Secondly they are aiming for a 60fps game and baked lighting is good on performance.

So that part is kind of obvious, what REALLY I’m curious to know is what sort of shadows they could be using. I could be totally wrong but I think texture shadows wouldn’t work for self-shadowing characters (think HL2) and shadow mapping on dynamic meshes but not static would cause errors as some surfaces would be only receiving shadows and not casting. So that leaves me wondering what they could be using...

Do you guys have any ideas?

Replies

  • glib
    TheSplash wrote: »
    This question spawned from a discussion about baked radiosity and texture shadows (Mirror’s Edge style) VS shadow mapping and indirect lightmaps (COD4 Style) and their respective aesthetic and performance merits.

    Baked radiosity is just baked indirect + direct light, and texture shadows are the same thing as lightmaps, are they not?

    I know Mirror's Edge took advantage of beast, which allows indirect light bouncing calculations into the normal direct-illumination shadow map generation. I don't know much about COD4's system, I never dug into their level editor. Are you saying they had baked AO on their textures (either multiplied into the diffuse or as a separate map) and used only real-time shadows?
    TheSplash wrote: »
    So that part is kind of obvious, what REALLY I’m curious to know is what sort of shadows they could be using. I could be totally wrong but I think texture shadows wouldn’t work for self-shadowing characters (think HL2) and shadow mapping on dynamic meshes but not static would cause errors as some surfaces would be only receiving shadows and not casting. So that leaves me wondering what they could be using...
    I'm not sure what your question is here. From what I'd seen of RAGE, I'd guess they're doing much the same thing that newer versions of UE3 allow, which is doing more advanced indirect illumination when they generate their lightmaps. A select few of the lights that are used for this baking are then tagged as 'dynamic' and thus cast dynamic shadows (be it cascaded, stencil etc) on moving objects.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    how you combine your real-time shadows with your baked lighting information is up to your implementation. Hence you can invest a bit into getting rid of / lower the errors you mention when both systems are active at same time, and for many games they are. (e.g halo3 has baked light as well)

    also what you store in your baked maps is up to you. Different mix of possibilities. Recent implementations are using directional lightmaps / radiosity normal maps, which allow better lighting of normalmapped assets.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    I imagine if they are taking advantage of megatexture stuff (which they have shown in some videos and screenshots) then they'd almost certainly be baking nearly 100% of the lighting in, at which point they can do pretty much whatever they like with the lighting solution (radiosity, ambient occlusion, soft shadows etc.) without incurring any extra run-time cost. The only limiting factor would be how long you want to wait for your lighting for a whole level to bake.
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    MoP- there is an extra cost, not from lighting the environment, but from lighting players and props, if you want them to sit propperly you need to store lighting info into a light grid, or spherical harmonic or something else. at the cheapest in memory but at the cost of draw a fuck load of bounce lights
  • TheSplash
    @glib.
    Yes baked radiosity is baked indirect and direct lighting into lightmaps. Texture shadows are not the same thing as lightmaps, I am referring to dynamic shadows like they have in HL2 and mirrors edge also be called render-to-texture (RTT) shadows and don’t lend themselves to self-shadowing.
    COD 4 seems to have baked indirect light only and uses shadow mapping across the whole scene, they don’t appear to have AO as a separate term or anything.

    @Crazybutcher
    Looking at halo 3, their characters self-shadow and also the shadows overlap the baked lighting which leads me to believe they have baked radiosity and I suspect that their real-time shadows are a form of shadow mapping on dynamic objects with some extra tricks to stop things like shadows casting through objects.
    I think this is what RAGE is doing.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    good point shepeiro, but we dont know if they do lit dynamic objects that accurately or if they use something more simple...

    thesplash, thats what I tried to say. If you have shadowmap info, you can apply it on what surfaces you want, how you want. You will need depth rendered from "sun" with the current scene (dynamic and static objects), but you can apply the shadow effect as such with full control, as you have to code every bit yourself ;) So you could take a static object sample your lightmap and fade in the realtime shadow, and for a dynamic object you wouldnt nave a lightmap but other lights' contributions.

    many ways to get to Rome here ;) However for real-time shadows you will always need depth from lightsource of all geometry that casts shadows.
  • kite212
    Offline / Send Message
    kite212 polycounter lvl 16
    i know halo 3 uses spherical harmonics, i have a presentation they did on their lighting set up, its a powerpoint, i could email it to you if you want it
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    having another look at it,i would guess that they are using baked in global illumination simulation, with the main light and other realtime shadow casting lights taken out of the direct lighting solution, but left in the in-direct solution, thus you get the pretty effects like colour bleed off the main lights but you still get nice shadows that interact with the scene, and not just the shadows pasted on-top of the lightmapped scene which can look like arse when you get characters and props standing on a balcony casting shadows on the floor beneath the balcony aswell as the balcony surface.
    for characters using a directional light grid for the ambeint then realtimes on top can give real nice effects
  • glib
    I just took another look at it too, and it looks like baked lighting incl shadows, with realtime shadows on moving objects. Find sections where the cart is going through shadows on the ground. It will be half in, but the entire object will be fully illuminated still. The shadow it casts is much lighter than the shadow the environment casts, and is also much sharper. It pops to a darker versions once it's completely in shadow, but IMO not quite dark enough. It looks like just a gamma adjustment instead of a reduction of the value of the whites as well. I'd guess it's something like (if in shadow completely, run postprocessing effect 'levels 2' on object).
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    interesting, i would have expected more, gonna download a better Quality vid and take another look
  • cptincognito
    I think on of the interviews (or maybe a quakecon keynote) references the buggy's weird dynamic shadow as being WIP, so i think they've since worked on the blending of the baked stuff vs. dynamic shading.

    The most recent multi-pass pics i've seen are from Seneca's interview for Luxology:
    http://www.luxology.com/community/blog/entry.aspx?id=136

    You can see a couple different shadowmap looking shadows coming off that little pillar in the center. Differing qualities (probably taken from the editor, i know they have a faster 'preview' shadowing mode). Also, I wouldn't be surprised if they have different solutions for their indoor stuff vs. outdoors.
  • michi.be
    Offline / Send Message
    michi.be polycounter lvl 17
    Secondly they are aiming for a 60fps game and baked lighting is good on performance

    They are doing a 30fps game this time. I read it in an article some time ago. so they can get more details in it.
  • [HP]
    Offline / Send Message
    [HP] polycounter lvl 17
    Yeah, I believe It's going to be 30fps running at 720p, in ALL platforms!

    Carmack is a genius, trust him... :P
  • cptincognito
    http://www.maximumpc.com/article/features/e3_2008_the_john_carmack_interview_rage_id_tech_6_doom_4_details_and_more

    RAGE is 60hz, all platforms. Doom4 is 30hz. That article also has a few rarely seen concept sketches too, for the (Sparth?) connoisseur.
Sign In or Register to comment.