Search this blog

03 November, 2013

You have failed

This appears also on AltDevBlogADay.

Today i was watching Mike Acton's talk at SIEGE 2013 on leadership, and it prompted me to stop the article I was working on to start drafting this. I recommend watching his talk, it's quite good and it talks about the key to leadership: responsibility.

Indeed, leading is about accepting responsibility, it's different from management and its methodologies, and I don't think really it applies only to the people who we identify as "leads". It doesn't come with a tag, really, leadership is a quality that is valuable regardless of your position and most of the good traits of leadership are the same, only the scope, or sphere of influence changes with your job. And that is exactly because leadership it is about responsibility, which is an universal value, even outside the workplace really. 

It's maybe even a pet peeve of mine, I hate when we (and we all do to a degree) think about circumstances or the faults of others, without first thinking about what we did or what we can do. Now, among all that responsibility entails there is something that people shy from talking, something very fundamental that we have to discuss, and the reason I'm writing this. Failure.

If you never failed, you didn't try hard enough really, right? To a degree I think we all agree that failure is important, it is a metric of how much you push yourself out your comfort zone but it isn't in any mean a positive thing, I won't make some hippy case for the contrary. We all want to be successful, we want our programs to work, our games to sell, our research to innovate and so on. 

Success is good, failure is bad... but on the other hand, we don't just sweep under the rug our failures, right? Failures are problems, problems... well that's something we can work on, it is information, it is learning, it is part of our job, it is part of being responsible.

I find it hard not to be defensive, we instinctively are I think, surely I can be and it requires applying quite some thought and attention to detect these instances in oneself. Even what I just wrote is an example of it, I changed into "I can be" my original "I am" because writing something negative about yourself seems to trigger some internal alarms.

Have you ever experienced a studio head coming in and saying words along the lines of "we didn't do well" and "things didn't work out as we expected" so we have to do some crunch and overtime maybe even throwing in a few hints at how that's kind-of normal in our line of business anyways? Would you not have preferred someone saying I was wrong, I approved these decisions that didn't pan out, now we have to ship and I think this is the best course of action, and of course if you want to talk about alternatives come and we will figure things out?

If that's something that you agree and experienced, then be responsible, and apply the same lesson to yourself as well... Wouldn't it be a better world if we knew for example all the interesting ways a given technique fails, not only the ways it succeeds? Why we can't be open about failures? Honesty leads to facing issues in a positive way, it leads to trust, it is a remarkable value. Managing failure is part of leadership, educating about it is part of leadership, and certainly the more influence on the studio culture you have (or should have) the more you're responsible for these aspects, but really it starts with everyone, leader or not. It's a good skill to learn.

Let go of defensive instincts, they won't make anything better.

01 November, 2013

Battlefield 4 Review (graphics)

UPDATE: I see this have been picked up by some gaming forums. All fine if we take this not -too- seriously, the disclaimer below applies, these are some limited considerations and thoughts I had by putting few hours in the game while waiting for other stuff to finish and so on. I stand to the fact that some things are interesting to think about (beware, might even be technically wrong when I say they do this, could do that, I didn't use any hack to reverse-engineer the game) for people who make games. I see people saying "it's like digital foundry on steroids". No, DF spends weeks to do a really amazing job reversing what they can reverse accurately. I spent little time and had some unsubstantiated rendering thoughts, it's at best different. Anyhow, if it doesn't end up in a flamewar that lets me take this down, I might do it again for other games or publish other stuff I did in the past and kept private. Maybe even do it seriously next time.

So... This ain't gonna buy me any friends I guess. On the other hand I have to say I would be thrilled to see people tell me even the harshest things about my work, I've learned from a great artist who once told me to seek for people that would tear my drawings to pieces. Not that there is anything to tear in DICE's excellent game, just to say, please do dissect my work :)

Also, these are just some things that I've noticed in a few hours of single-player campaign, on my PC at Ultra. It's not comprehensive. It's biased by whatever happens in the first few hours of SP, by my mood the day I played in many other ways. It's not baked by Pix captures nor by any special knowledge, so it's probably ALL WRONG I didn't take enough time to "reverse" anything.
I routinely survey games and their graphics, I consider it part of my job, but often I don't have much time for that. Worse still when the game is good and I end up actually you know, playing it, instead of just looking at rendering tech :)

I hope screenshots will survive blogspot's compression, also notice that most of them are downsized so don't pixel-peel, most images are equivalent to a supersampling AA version...

Ok, so. Let's go.

Frostbite is a great engine and I'm actually thrilled to see what all the various EA studios come up with it, truly can't wait. So as you will imagine and as everybody already will tell you, there is a lot of good stuff... That's why I'll start instead with three things that I think are -wrong-, then move to other observations:

1) J.J.Abrams actually doesn't want his lens flares back
The good: they work well, they are stable (seem even to fade behind occlusions), they are a mix of techniques I guess screenspace, art-authored particles and framebuffer readback to spawn more particles. They look very similar to Crytek ones, and they truly "blind" you.
The bad: they are fucking everywhere! BF3 did this, Crysis3 did this, please let this not spread to other games! It's a shame because they work well, and there are situations where you are blinded by lights that these could really help shape (even if they are cinematic flares, they don't try to replicate what happens with eyes), but they are always turned all the way up all the time and after a bit you'll want to rip your eyes out. It's a form of torture and a huge artistic sin.


2) Everything has specular. In your face! (a.k.a. Rise and Shine)
Specular reflections seem to be turned always (well, very often) to 11. Now, while there are some situations where the intensity of it probably wouldn't be far off (i.e. really wet environments, pouring rain), we can't do perfect reflections yet.
The good: DICE guys being smart as they are do a number of interesting things, there are cubemap reflections but I think these are augmented with reflected "cards" or simple proxy geometry, I guess the latter only for planar reflections (rendered in a prepass, mirrored) but there's more to it, I think I've seen cards "fade" in and out and sometimes I think I've seen faint artifacts from a screenspace reflection method... Not sure, warrants more investigation
The bad: Specular aliasing everywhere, all forms of it (geometry, normalmaps, planar reflections), and I played on PC at very high-res, MSAA and post-AA filters.
From what I can see, analytic lights suffer mostly because textures even when looked up close have many discontinuities with the specular, I know that certain blending tricks help giving you detail, but seems overdone. Quite surprisingly as well, as we know by now many ways to circumvent texture/shader aliasing.


For planar reflections where aliasing is most offensive honestly it almost seems like if they did blur a bit the "cards" buffer (maybe I'm wrong and they don't have one...) it would solve a lot of issues. Still the effect should be applied sparingly, really in CG if you can't do it well, don't do it, sweep it under the rug. Planar reflections are a hack, they work only on some surfaces and this alone is an issue. Plus we can't really occlude too well sharp specular reflections, and occlusion is the key to believable lighting. In some levels, I just wish I had a multiplier I could tune down globally...
Lastly, specular seems always monochromatic, maybe I'm wrong, in real life it's often so, but I remember thinking for some materials to be wrong, could have been art or maybe to save on deferred GBuffer space...


3) Faces
This is the last thing I'll really bitch about. Characters aren't bad, animations are good too, but the shading is off, and again this is quite a surprise. Sometimes faces remind me of L.A.Noire weird low-frequency normalmaps. I wonder if that is indeed because of similar compression of acquired data, DICE has the tech and they used it in previous games... Anyhow, you can still blend that with detail maps driven by skin stretching or so, it's quite "common" tech nowadays. Also, specular. No, this time, the lack of it, which further causes the detail to be quite lacking, if only they had that they would be I think much better, as in general the SSS-ish effects are not bad and tastefully kept "in check" not going into "wax" looks. Looking at the ear edges, it seems a screenspace filter of some sort for SSS, but honestly it could be as well pre-integrated SSS. I don't love the over-bleeding in certain facial expression (normalmap wrinkles), eyes and lips are all "wrong" too. Now, mind you, especially in a deferred renderer doing skin, which is a fairly special material, is hard, but the lack of specular and detail is a mystery.


Texture detail
Now on some of the truly great stuff. On PC, details are amazing, especially textures and particles. Aliasing aside, materials are impressive, even more than Crysis 3 where everything had detail but mostly due to tiled detail textures used everywhere, especially I think to modify specular and give materials an unique microdetail. Here, I couldn't really see tiling, which means either they use very big textures or they do tiled details with some sort of distortion/blending tricks to hide it, or I'm not good at this :) Also material variation on the surfaces is great, you can't really see decals or layers, if they are doing them (which I'm sure they are) everything blends very, very well.


Geometric detail
Geometric detail is mostly due to having a lot of objects :) They don't seem to be doing tessellation, at least for displacement mapping, at all (which is not a bad choice), and I'm not sure if some surfaces do POM or not, honestly I'm not good at spotting that (especially certain techniques that don't simulate reliefs very well can be subtle).
Debris is everywhere, both authored in the level and due to destruction and particles. It's really great, things fly around all the time and it doesn't look unnatural. Also, no shimmer, no aliasing, small particles seem to be pre-blurred when depth of field is on (I think). It's actually easier (even if might not matter in a deferred, non baked renderer) to light correctly small instanced objects that large ones.
I couldn't see any particular shading trick applied to the vegetation (but I didn't look very hard, the levels I've played weren't very lush) but one thing it does great is that grass always bends out of the way and it's really hard to "clip" into it.

Destruction is everywhere and it seems mostly precomputed. At least in the campaign, some objects always shatter in the same way, while others shatter progressively, and other events seem scripted, like some cars always explode with a granade and some other never. All in all, it works great. Also the fact that there is always something that moves, cloth, paper, dust, foliage and so on really helps to sell the world as “living”, it’s really a perfect“touch”.
Lastly, I couldn't really see LODs crossfading or dissolving, small objects stay around long enough you won't notice they were gone, but that's also expected on PC on Ultra, I should try consoles...


Lighting
Pure deferred has its pros and cons, of course it's hard to bake much when things are always shattering and changing. Overall business as usual, does a good job with many lights on screen, and the analytic BRDF used seems quite "physically based".
They seem to use sparingly SSAO (Nvidia's HBAO I guess at ultra), really just a touch and with quite a huge radius, so you won't see "cartoon shading" silhouettes. It seems almost not randomized at all so you get sometimes the "stadium lights" effect (which I prefer to low-freq noise of some randomized AOs), if you look closely though sometimes there seems to be a 2x2 pattern that survives blurring. Blurring is detectable by the halos sometimes you get. There is a certain trade-off between large radius of occlusion and artifacts around characters, legs and so on, but most of the times it's not detectable so, good work there.
Honestly is great that we don't see SSAO-horrors like on Far Cry 3 or worse Deus Ex human revolution, but I wish sometimes it was used more, for "arealight" contact shadow kind of effects (bias it towards the sky! don't do radial SSAOs) and to shadows lights that are not dynamically shadowed, I wonder if they encode directional occlusion at all.


As far as scene lighting goes, I couldn't really see any dynamic GI going on (e.g. in the prison scene where there are large floodlights rotating around) and sometimes, especially in interior scenes it kind-of suffers from "deferred flatness", which is also a product I think of not having enough specular occlusion (i.e. on cubemap specular). If you can I'd say, always bake a good occlusion term, possibly directional, offline, or really invest in great directional SSAO or other methods, occlusion is fundamental.
Sometimes, rarely I have to say, things fail more spectacularly than others and you can see a lot of environment/ambient lighting going wrong. This of course is not aided by the fact that often scenes are so shiny...


There appear to be linear (tube) lights, and they seem to have no specular (but might be that it was just an artistic choice), other than that it seems we still have point, spots and directional sun, which is a shame. I think any deferred renderer nowadays has to invest in more "exotic" lights, lights always come with some sort of "shaping" device and in real world you won't easily see a perfect "spot" with a perfect falloff, things are weird, broken, spill, focus and so on. Also, it's really hard to fake ambient lighting with points.
Sometimes there seems to be "scattering", but I think it's mostly due to either placed flares or tuning up the bloom to a very large radius (I might be totally wrong). Both methods work well, but it's not the lovely scatter The Order 1886 is showing us, especially the idea of using bloom means also that sometimes the light is very softly spilled indoors, but overall again, well enough. God rays from the sun are also well done. Sometimes it's possible to go through a door and see the fog on the other side disappear, probably it's due to these settings having "volumes" of tuning, hard to say and to spot. Underwater adds DOF and grain.


Non occluded lights
This I want to remark. If you don't have a source of occlusion for a given light or BRDF piece, prefer not have that part at all (or be subtle). It is amazing how much difference it makes, I already wrote it, I'll do it again, occlusion is fundamental. Specular occlusion is fundamental. At least around silhouette edges, just "cast a ray".


Other stuff
I think it might have "thin wire" AA of sorts on rods and small branches and so on. Not sure if it's there or I just want it to be there because I really think is a good idea. Seems though strange that a lot of rods don't shimmer much and often become exactly pixel sized. I don't know, I disabled AA, changed resolutions, still not sure. If it's there, it doesn't fade-to-alpha, so what I would do is to increase the diameter or wires to keep them pixel-sized until they're far enough they can quicky fade into not-existing.
Sky sometimes seems to be "tacked on" and too low-res. In most games sky seems fake. I'm not yet entirely sure why.
Smoke. Sometimes it seems almost to be accumulated/blurred in a separate buffer and then composited on top, I didn't spot any particularly fancy volumetric lighting either. It warrants more investigation. On ultra, I couldn't detect any artifact from subsampling particles, I guess that's not done or if it is, it's done very well (which is hard).


Water. On average great, worse if higher waves/interaction with objects. Sometimes just fucking AMAZING.


DOF blur is smart, I almost never see it "before the focal plane", which is ok, that is harder to do, and as I wrote, better to hide an effect than show artifacts. On ultra it's "sprite DOF" so I guess it uses compute and append buffers to create lists of particles. Which makes it surprising that the artists chose a "catadioptric lens" kind-of bokeh shape, which would be nice in "sampling" kind of DOFs (as you sample around a circle, not inside a disc) but seems unnecessary here. I guess it's there to make a "statement", kind of like the lens flares... We'll grow past these effects and start using them with taste as now we see done with SSAO (more often). On lower settings it goes towards a simple "blur based" DOF which unfortunately bleeds quite a bit :/ Motion blur, pretty standard stuff, doesn't bleed out of silhouettes it seems so nothing particularly fancy.

Final score: great!
Sometimes really unbelievably good. I wish on PC it had a supersampling AA mode, as with proper supersampling some scenes are really amazing. It does: resolution scale > 100%