Oct 12, 2012

[Siggraph 2012] Screen Space Decals in Warhammer 40,000: Space Marine

As I promised, here are the slides I presented at Siggraph 2012.  It's about Screen Space Decal technique I developed for Space Marine

Although it was independently developed, it's very similar to other techniques. such as Deferred Decals. However, I believe we were the only game who used this tech very extensively in a game.  So I focused more on the problems we had, and the solutions we used to solve or avoid them.


8 comments:

  1. Slides 83-86: What exactly are you referring to when you say "this"? I've never played the game so it's not obvious to me what's going on in the screen shot.

    ReplyDelete
    Replies
    1. Damage status ui overlay that actually hides the screen almost completely. Also lots of smoke particles too.

      Since there r too many things going on screen u can't even see its running slow.

      So basically we didn't have to solve the problem thanks to ui artists' independent(we didn't ask for it for performance reasons) decision to add that in.

      Delete
  2. Great presentation, thanks for sharing! I'm curious if at some point you tried detecting huge overdraw and substituting a single full-screen pass instead, that could handle up to N decals in its pixelshader? It would still have to do an awful lot of math, but it would at least save G-buffer and rasterization traffic? Thanks!

    ReplyDelete
    Replies
    1. hey! that's a great idea.

      Rasterization traffic was not a bottleneck for us at last on x360, the first platform I optimize usually: pixel shader op was the bottleneck. but it is probably becuz xbox 360 has edram and PS3 might have been different story.


      Delete
  3. That was a great presentation and technique for screen space decals! I particularly liked the trick on slide 51 that allows blending of normals and specular power. Does this mean though that the specular power of the decal has to be constant over the whole decal?

    Also, how were decals that modified all normal, specularpower and albedo handled, was there a problem with using this specularPower-based BlendFactor?

    ReplyDelete
    Replies
    1. thanks :) And here are the answers for your questions.

      1) Yes, our spec power was constant for the whole decal, which was not a big problem because artists could still attach a separate specular map(specular scale per pixel) for each decal. Not perfect, but worked fine.

      2) No there was no problem. In our deferred lighting pipeline, we write a) normal and spec power in the gbuffer pass, and b) final colour(albedo + lighting result combined) in the combiner pass. So albedo blending was no problem at all... for normal/spec, we used separate blending for rgb and alpha. So specpower blending(alpha channel) doesn't affect normal vector blending(rgb channel) at all. Please note that specularPower-based blending is only for the alpha channel in the gbuffer pass as shown in slide 51.

      Delete
    2. Yes, it makes sense now. I missed the part where the renderer was deferred-lighting. Thanks! :-)

      Delete
    3. you are welcome! everyone(including me) skims through presentations :)

      Delete