'Marvel's Spider-Man' Designer Reveals The Wizardry Behind The Game's Lighting
Sure, Marvel's Spider-Man gameplay and narrative are impressive, but the technical aspects of the [...]
Sure, Marvel's Spider-Man gameplay and narrative are impressive, but the technical aspects of the game often get overlooked, despite being equally excellent, if not better. Well, at least by most people.
One player recently took to Twitter to praise the game's lighting and shadow work, and as an inspiring tech artist, also figure out how the heck Insomniac Games did what it did in the PlayStation 4 exclusive.
OMG @insomniacgames did the halftone/hatching lighting/texture stuff I'm still trying to figure out!!! Please, as a budding tech artist, I must ask: HOW???— Glen M. (@gfmanalo) December 22, 2018
I've only got the basics of shader programming so far but want to do this in UE4. pic.twitter.com/rnsLQ2Mbh4
Not long after the above tweet went live, a technical and graphics artist on the game chimed in with exactly how, revealing some interesting tidbits and dropping some valuable knowledge in the process.
not sure how familiar you are with lighting but you start creating the mask with "saturate(N dot L)" where N is the surface normal and L is the light direction. this is a standard shading where surface values facing light are 1 and range to perpendicular surfaces which are 0 pic.twitter.com/nTPRT9zhbN— J 🌿 (@jbtuason) December 23, 2018
obviously, bad drawing for demonstrating smoothstep but this is a really great introduction and resource for shaping functions in shaders that can explain it better than i can and includes interactive examples: //t.co/TDOds06nPz— J 🌿 (@jbtuason) December 23, 2018
the hatching is tiled based on distance from the camera to keep the size of the hatching *mostly proportional* to the size of the character on the screen. it bends a bit but most ppl wont notice/care. the halftone tiling is locked, however, because the stretching was distracting.— J 🌿 (@jbtuason) December 23, 2018
for the tech artists + gr programmers: the shader uses ggx lighting model! the texture masking uses the remapped lambertian explained here. rewriting the lighting model to match the movie was Very out of scope but something id be curious to see 🤔🤔🤔— J 🌿 (@jbtuason) December 23, 2018
Of course, much of this sounds like alien language -- at least to me -- but it's interesting insight into the development process, and shows just how complex and technical making games is.
Marvel's Spider-Man is available exclusively for PlayStation 4. And remember, the next time you're playing, be sure to slow down and appreciate the ggx lighting model.