Home Technical Talk

Depth Map Shadows in Source?

Uly
polycounter lvl 17
Offline / Send Message
Uly polycounter lvl 17
I'm curious. They never *were* in there, but in the recently released images from the 'Orange' and 'Black' editions, G-Man was looking more spry than usual. Prerenders or in-game? If it's in-game, it's at least a new effect. Either way, new toys to play with when the next Hammer SDK is released.

Self-Shadowing / Depth Map Shadows?
Full list of screens.

It's particularly noticeable in the G-Man screen, that under Alyx's collar, a depth pass failed on her collar, and there's an absence of shadow where the single face is. On the curve of the collar however, there's shadow.

Replies

  • Daz
    Offline / Send Message
    Daz polycounter lvl 18
    It's interesting that there's no evidence of self shadowing models in any other shot than that one though. Perhaps they can only really afford it in cut scenes a' la Gears Of War.

    Cool that it looks to be implemented at last though. I never quite understood what all the fuss was about with Source. Its lighting model is pretty standard. Although the HDR update was cool as to be fair.

    I note they're using the screen space stipple technique for tree alphas too, 'cos weve been contemplating using it at work. BF2142 uses it, and its a neat way of avoiding the usual problems that come with prolific use of alpha. It works much better in motion than stills.

    TF is looking nice. I'd guess they're baking that AO into the models. Good stuff, thanks for sharing.
  • buddy the designer
    Self Shadowing can be clearly seen in all of those trailers Valve relased. AO is not baked afaik.
  • rooster
    Offline / Send Message
    rooster mod
    [ QUOTE ]
    screen space stipple technique for tree alphas

    [/ QUOTE ]
    what's that when it's at home?
  • Black_Dog
    Offline / Send Message
    Black_Dog polycounter lvl 17
    Stippling is a technique to fake alpha blending by drawing/not drawing pixels in dither patterns. It writes depth and doesn't blend, so it's cheap and sorts automatically.

    The downside is that at low resolutions it looks crap.
  • Uly
    Offline / Send Message
    Uly polycounter lvl 17
    [ QUOTE ]
    Self Shadowing can be clearly seen in all of those trailers Valve relased. AO is not baked afaik.

    [/ QUOTE ]

    He's right. I hadn't seen it yet. For anyone else who hasn't seen said trailer, here's a link. New Ep2 Trailer
  • Sa74n
    Offline / Send Message
    Sa74n polycounter lvl 18
    its a new addition to the source engine. realtime depth map shadows for the flashlight for example. my guess is that you can set a flag for lights to cast dynamic shadows or only prop_dynamics (and similar) will cast those shadows - it works that way at the moment. in the videos of ep2 it looks pretty sleek with the flashlight. im a big fan of the source engine visuals.. not so much of the tools though.
  • Daz
    Offline / Send Message
    Daz polycounter lvl 18
    [ QUOTE ]
    [ QUOTE ]
    Self Shadowing can be clearly seen in all of those trailers Valve relased. AO is not baked afaik.

    [/ QUOTE ]

    He's right. I hadn't seen it yet. For anyone else who hasn't seen said trailer, here's a link. New Ep2 Trailer

    [/ QUOTE ]

    "He's right."

    Um, he is? No. Look again more closely. There is no evidence of self shadowing character models in the trailers you just linked, EXCEPT the ONE scene with the Gman and Alyx surrounded by *nothing*. So I'll stick with the possibility that its only affordable in cut scenes, thanks.
    Furthermore, if you look closely at the flashlight scenes linked, you'll note that there are no shadows in those either.

    As for the Ambient Occlusion, I was talking specifically about Teamfortress, and I'd be curious to know how you know for sure that its dynamic. That would seem extremely computationally expensive, and not to mention unecessary, and groundbreaking. No game that I'm aware of has yet to implement realtime AO on character models.
  • Uly
    Offline / Send Message
    Uly polycounter lvl 17
    [ QUOTE ]
    [ QUOTE ]
    [ QUOTE ]
    Self Shadowing can be clearly seen in all of those trailers Valve relased. AO is not baked afaik.

    [/ QUOTE ]

    He's right. I hadn't seen it yet. For anyone else who hasn't seen said trailer, here's a link. New Ep2 Trailer

    [/ QUOTE ]

    "He's right."

    Um, he is? No. Look again more closely. There is no evidence of self shadowing character models in the trailers you just linked, EXCEPT the ONE scene with the Gman and Alyx surrounded by *nothing*. So I'll stick with the possibility that its only affordable in cut scenes, thanks.
    Futhermore, if you look closely at the flashlight scenes linked, you'll note that there are no shadows in those either.

    As for the Ambient Occlusion, I was talking specifically about Teamfortress, and I'd be curious to know how you know for sure that its dynamic. That would seem extremely computationally expensive, and not to mention unecessary, and groundbreaking. No game that I'm aware of has yet to implement realtime AO on character models.

    [/ QUOTE ]
    I wasn't being specific enough. All I meant was 'there is self shadowing in the latest trailer' which is, as you said, on that one scene. I'm not arguing that an engine that never supported this kind of effect could all of the sudden turn around and implement it on entire game worlds.
  • Mongrelman
    Offline / Send Message
    Mongrelman polycounter lvl 18
    Only available in cutscenes just doesn't fit though, as Valve never do cutscenes in games.
  • Daz
    Offline / Send Message
    Daz polycounter lvl 18
    Poor terminology on my part. Cut scenes should read 'scripted events'. Either way, clearly the scene with the Gman and Alyx is some kind of non or partially interactive storytelling sequence, meant to be viewed more than 'played'.
  • Mongrelman
    Offline / Send Message
    Mongrelman polycounter lvl 18
    Ah gotcha. That wouldn't really make much difference though would it? I mean you can still run around a la normal gameplay, with the scripted event ocurring. It would be pretty odd if the shadows turned on for that then off afterwards.

    Maybe it's another test of their multicore threading method. They're focusing quite a lot on that (apparently), so self shadowing would probalby be a good way of showing it off.
  • Daz
    Offline / Send Message
    Daz polycounter lvl 18
    I dunno, that scene looks to be simply two characters surrounded by nothing. My guess is that the player is in a scenario at that particular moment that gives him limited freedom to move. I expect theres a cut to blackness or something to disguise any transition back into a non self shadowing world.

    The bottom line is, I simply don't see self shadowing in any of that media other than that one scene, and that to me is pretty telling.

    I think it's pretty common to only employ certain graphical bells & whistles at times when the game can better handle it. Note that in Gears Of War for instance, character models don't self shadow, but they do in realtime cut scenes when the player doesn't have control over the camera.

    Anyway, still looking forward to Episode 2 of course. I don't mean to put a downer on this stuff. Anything remotely approaching real world in game lighting just happens to be very interesting to me personally since a) our engineers are exploring that stuff at work right now and b) I think it's still the next big frontier for videogames. Most lighting (and by that I also mean shadowing) models even on pc and xbox 360 are still very primitive and far from dynamic. A baked lightmapped world with a seperate shadow solution for characters is still generally speaking par for the course. I tend to sit up and take note when an engine appears to attempt to go beyond that. I don't think a modified Source is an example of that, but I'm up for being proven wrong.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Welcome to the 21st century valve, you now have depth map shadows. Perhaps one day vale will also figure out how to alpha blend their cainlink fences so they will stop flickering like a son of a bitch. Somewhat unrelated to this I downloaded the tf2 trailer on xbox live and watched at 720p on 37" hdtv and it looks really nice. Baked lighting still for the win, one bounce of indirect light still looks ace if you don't compress it.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    alpha-blend is so much more troubled, than alpha-test. it's more expensive than test, and to not screw up depth, you still need to run alpha test aside. you must sort, or you get those artefacts of "wrong background" on the edges where stuff fades out. using alpha-blend for everything like that just to make it smoother, simply isnt practical... besides alpha-test gets better with the alpha-to-coverage stuff, as well.
  • Joshua Stubbles
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    transparency anti-ailising FTW smile.gif

    You can use the faster alpha testing, and it makes the alpha edges smooth as butter. Not everyone has a card that supports it though frown.gif And a software solution would be horribly slow.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 20
    actually not insanely slow, there were ati demos shortly after nvidia's geforce7 pimped the feature. and those demos did the same with shaders, of course not "for free" like nvidia case, but not exactly super costly either. http://www.humus.ca/index.php?page=3D&ID=61
  • CheeseOnToast
    Offline / Send Message
    CheeseOnToast greentooth
    EP1 Alyx had an "occlusiontexture" bit in her material, which was redundant as far as I know. Maybe they've got it working now. If they do go for AO, I'm pretty sure it'll be based on a baked texture map rather than dynamically generated. The blue channel of the exponent map isn't being used for anything at the moment, so it might slot in there.
    The biggest thing for me is the lightwarptexture stuff..its soooo useful. You can do anything from an out-and-out toon shader with it, or just add some saturation to shadows (especially useful for flesh). Looking forward to seeing what they've done with the self-shadowing stuff too.
  • adam
    Offline / Send Message
    adam polycounter lvl 20
    The new update of the source engine has self-shadowing on static props, that's it. Dynamic props or characters will not self shadow as they are using light maps to create the look and its not dynamic.

    If its on the characters they could have either a.) faked it or b.) Done another update that allows it on the characters, but I doubt it.

    Also they've updated the flashlights light to use a depth map I believe, but they've done so on a low-res scale AND only from the flash light. Don't get too excited.

    And Source uses alphatest a lot due to the engines depth sorting issues, it can't handle 8-bit alphas very well.

    A good rule of thumb to have, when thinking about the Source engine, is that nothing will ever be 'dynamic' in that engine. And if it is, due to the engines capabilities, it'll be hugely costly for the engine to render it.
  • mbullister
    Offline / Send Message
    mbullister polycounter lvl 18
    The videos from Leipzig show self-shadowing. You can see it when the flashlight moves across the vortigaunt in the cave, and on Kliener when something sparks offscreen (watch the end of the trailer).

    The shadows are only generated by specific lights, and unless something's changed in the last few months they seem to be working fine.
  • claydough
    Offline / Send Message
    claydough polycounter lvl 10
    raised this from the dead because hopefully in the future everything except light and shadows will be considered fluff.



    up the self shadow max beyond the flashlight:
    http://developer.valvesoftware.com/wiki/Env_projectedtexture

    Shadowmap.jpg




    video of as much:
    http://www.moddb.com/news/dynamic-lighting-in-source-blasphemy

    2754890688_edf506da1c.jpg




    dead shadows:
    http://www.maximumpc.com/article/news/exclusive_highresolution_left4dead_screenshots_and_gritty_source_engine_upgrade_details

    l4d_new2_full.jpg






    17th century self shadowing soft shadows:

    722px-Rembrandt_-_The_Philosopher_in_Meditation.jpg
  • Eric Chadwick
    Good paper at Gamefest 2008 from Valve on their rendering techniques, How Valve Connects Art Direction to Gameplay.

    More Gamefest papers here.

    necrophilia ftw
Sign In or Register to comment.