Graphics Are Sometimes Hard

Graphics Are Sometimes Hard

It's time for some reader mail, and Shamus answers questions about game graphics.

Read Full Article

Something that Shamus didn't get into about that last question, 4 times the scenery usually does not equal 4 times the number of polygons to be rendered. Most engines (to my knowledge) use some degree of level of detail, as well as a degree of occlusion culling.

Level of detail just means that you get more detailed meshes close up, and less detailed meshes as they go further away. This isn't exactly without cost though, there's a decent amount of overhead to use this as well as the fact that it's usually not completely seamless. If done poorly there can be very obvious transitions. Even with this though, it's benefit is pretty damn impressive. I was writing a program for rendering a field of mountains this summer and if I wasn't using a level of detail scheme I'd have had almost billions of polygons on hand for the range and detail I was shooting for.

Occlusion culling is the method of only drawing objects that aren't blocked by other objects. It doesn't help to the same degree, and its benefit is very situational, but it can still impose a substantial decrease to the number of polygons you need to render.

The principle of what Shamus said is still true, but there are a lot of methods around for minimizing the increase.

One cool demonstration of level of detail is the Outerra Engine: https://www.youtube.com/watch?v=iNgWwvSaTZ0

I'm not a programmer at all, only a gamer, but I found this very interesting to read. Moar please :)

heh. Viewing distance is an interesting problem. I fired up my flight sim and had a look at what it does with viewing distance and detail set to maximum. That's some 50 nautical miles of terrain, at the least, but flight sims have a long history of employing creative tricks to make this managable to render.

As a point of comparison, my current sim includes terrain data, roads, rivers, airports, city buildings, cars boats and trains and more, and lets you roam freely over the entire planet if you install all the scenery. (40 gigs worth of scenery data, if you're curious)

though initial loading is long, once loaded, flying from anywhere on the planet to anywhere else is seamless, and if your altitude is sufficient, and your pc powerful enough to run it with the settings maxed out, visibility is 200+ km if your altitude is high enough to see that far given the earth's curvature.
Not only that, but it can do all this quickly enough to simulate deorbiting a space shuttle, and several mach 3+ aircraft designs.

The many level of detail techniques that make this possible are truly amazing if you really stop to think about it...

How you can go from low complexity textured geometry to a city with individual buildings and traffic on the roads abd back without noticing the transitions is an almost miraculous feat...

CrystalShadow:
How you can go from low complexity textured geometry to a city with individual buildings and traffic on the roads abd back without noticing the transitions is an almost miraculous feat...

And then there's Fallout: New Vegas where you're walking along and suddenly a large building materializes from thin air a short distance in front of you. XD

"Secondly, there are concerns over game balance. If we do super-accurate hit detection, then anything that changes the shape of a character becomes a game balance issue. If the artists decide to give this guy a beard, we now have to run the design by a bunch of other people to see if the beard will make it too easy to hit the head, thus giving this particular character model a disadvantage."

Did anyone else read this and immediate have the words "Nali WarCow" come to mind?

android927:
"Secondly, there are concerns over game balance. If we do super-accurate hit detection, then anything that changes the shape of a character becomes a game balance issue. If the artists decide to give this guy a beard, we now have to run the design by a bunch of other people to see if the beard will make it too easy to hit the head, thus giving this particular character model a disadvantage."

Did anyone else read this and immediate have the words "Nali WarCow" come to mind?

You mean those player models in the Unreal Tournament Bonus Pack that were a completely different shape to the regular human models but had the same hitboxes? The ones that you would headshot by aiming at a metal object sticking out of their back that was nowhere near their head?

They did not immediately spring to mind, but now you mention it, they were pretty bad.

Well done, Shamus. Although I have yet to see numbers that state the consoles are where the action is. Just considering Steam by itself consoles hardly compare to the PC world. The two newest ones are even driven with an APU designed for tablets. Shudder.

The weird bit for me, being a non-graphics oriented software programmer, is the graphics work is sheer and total drudgery. Grinding through GBs of artist spew, stored by some arbitrary OS with its own bizarre limitations and perverse logic simply to read the data, push it to the GPU and use the GPU to determine if the spew is overlapping. Ugly coding, all in C++ and thus difficult to get right because every programmer on the project ends nearly every routine with Render();, Ick.

tzimize:
I'm not a programmer at all, only a gamer, but I found this very interesting to read. Moar please :)

Shamus' blog is full of this sort of thing.

Pyrian:

CrystalShadow:
How you can go from low complexity textured geometry to a city with individual buildings and traffic on the roads abd back without noticing the transitions is an almost miraculous feat...

And then there's Fallout: New Vegas where you're walking along and suddenly a large building materializes from thin air a short distance in front of you. XD

lol. to be fair, the 'maximum' level of detail in a flight sim isn't nessesarily that high. Probably the most detailed things at ground level are still relatively minimalist compared to most games that spend their entire time at ground level.
But still, it does make you wonder.

Then again, I did see terrain popin on the flight sim too. With the settings turned down, anyway. Flying at 28000 feet with no cloud cover, 30 mile visibility, and the draw distance on minimum in the settings, I could see the terrain appear... Even with that though, I would say the terrain was 'popping in' at about 25 miles from my position. It was only because I was nearly 30,000 feet above the ground that I even noticed...

Darkness665:
Well done, Shamus. Although I have yet to see numbers that state the consoles are where the action is. Just considering Steam by itself consoles hardly compare to the PC world. The two newest ones are even driven with an APU designed for tablets. Shudder.

The weird bit for me, being a non-graphics oriented software programmer, is the graphics work is sheer and total drudgery. Grinding through GBs of artist spew, stored by some arbitrary OS with its own bizarre limitations and perverse logic simply to read the data, push it to the GPU and use the GPU to determine if the spew is overlapping. Ugly coding, all in C++ and thus difficult to get right because every programmer on the project ends nearly every routine with Render();, Ick.

Well, as an 'amateur' game developer with most of my knowledge being about graphics routines, I can say it's pretty heavy stuff usually.

Though in terms of sheer convoluted messed up, lengthy code, nothing quite beats UI programming.

Every seemingly simple thing you can do with a user interface always seems to end up taking 60 million lines of code to get it working.
And no matter what you do, you never seem to be able to make that look like anything other than a mess of definitions, system calls, sdk functions and other assorted rubbish...

It's enough to drive someone completely loopy... XD

The biggest thing that annoys me about LoD in many games is how sharp the transition is from what's near enough to draw vegetation/clutter and what isn't. It goes from a medium-detail "dirt/grass" texture with things like grass, shrubs, trees, etc. to a low-detail "dirt/grass" texture with no added content. If the texture is brown and the vegetation is green, that means there's a perfectly straight line across the terrain where it changes from green to brown. What I'd like to see is for the developers to bake the clutter into the LoD texture so when terrain moves out of range and it's not drawing the added detail, it will still look reasonably similar. Otherwise that forest you're flying over miraculously appears out of grassland as you move along.

I seem to remember reading that Doom 3 had per-polygon hit detection instead of bounding boxes. As for why you want all your characters to have the same hit detection, you can explain that in one word:

Oddjob.

Graphics are often harder on the developer than the gamer...

"Per-pixel hit detection was a cool idea, but it's really only useful and practical on high-framerate, low-latency multiplayer shooters on the PC. And that's a pretty niche market."

tl;dr Baseless claim as there are a very large number of pc fps titles (in this context) from COD and BF to Blacklight, insurgency and ARMAs and more that all have this hitbox 'issue'. PC is not a niche market. Consoles aren't even close.

I'm sorry, but what? Most of what I read in this article actually made sense and seemed completely logical, even from a PC gaming standpoint where the argument that processing power is not increasing as quickly as graphic power (for lack of a better term) can still be made, but perhaps with a much smaller discrepancy than consoles (whose graphics are a joke by the way but that's more of an opinion). Yes it is easier to code, it does reduce processing draw, especially in busy enviroments but making the claim that it is due to an higher console market than pc market, even for multiplayer FPS is simply wrong. Call of Duty and Battlefield hold quite a portion in FPS sales and then there's the Counter Strike series, especially GO of late. There are the more involved tactical shooters like Insurgency and the (more or less) simulators with the ARMA series topping that list (at least for me). And throughout even the latter group, it is still a fixed hitbox simply because they are very large, very processing and graphic intesive games for anything short of high-end gaming rigs. Not to mention the more seldom played games, or the smaller titles and the F2P/P2W types (Blacklight comes to mind - very large following last I checked) and just numerous others, PC has by far the largest share of titles, both exclusives and not. The limitations are very often the same because of the same reasons.

serban1703:
"Per-pixel hit detection was a cool idea, but it's really only useful and practical on high-framerate, low-latency multiplayer shooters on the PC. And that's a pretty niche market."

tl;dr Baseless claim as there are a very large number of pc fps titles (in this context) from COD and BF to Blacklight, insurgency and ARMAs and more that all have this hitbox 'issue'. PC is not a niche market. Consoles aren't even close.

...

By "low-latency", I got the impression that Shamus was referring to the type of latency typical of a LAN connection, not anything that would be going out through the internet. Seeing as PC FPS games these days are pretty much designed and intended for online play, I can definitely see the argument that the requirements Shamus lists would constitute a niche market.

Man, I miss the days when we would put 16 computers together in a barn and play Quake and StarCraft all night long...

 

Reply to Thread

Posting on this forum is disabled.