Cheap Rendering Tricks Used in Game Industry?

Started by
16 comments, last by Mona2000 8 years, 8 months ago

Hello,

My first post here. I'm at the moment studying and trying to understand what game engines really do and what they're composed of. I was wondering if there's a list or some kind of a write up of different techniques that are used throughout game industry. (ummm ok I'm actually trying to work on simple c++/opengl game engine smile.png)

So far stumbled upon things like:
- opacity maps, i have seen these used cleverly to construct cheap trees/foliage, e.g. you can take 1 opacity texture, criss-cross at 90 degree angle and attach it to lowpoly stick. So end effect is that you save on polygon data
- lightmap, it learned of these recently, the idea behind from my understanding is that these are used where lighting is static (geometry doesn't move so there's no need to update / have dynamic light), lighmap is usually a bright texture. I saw lightmaps used in a tunnel of a race track.

- ztest/occlusion, I think these are self explanatory.

I started working on a pc driving game, all the driving will take at night time, therefore it will include lots of street lights (hence why I researched about lightmaps), it will have basic foliage, and road geometry will need to progressively get loaded. While there's much more to it, I tried to tied it back to the 3 rendering tricks above.

I would love to hear about more tricks that there exist. Please share or point me to the right resource.

Advertisement

The reason light maps are used is more because we dont have the power to shade everything in real time, however this is slowly changing with Forward+ and Deffered and more with the tiled and clustered version of these methods. These are allowing us to do hundreds of lights in complex scenes which makes the need for using a lightmap less and less.

If you are making a racing game you will want to look into motion blur techniques too.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion

I have some topics on 3d at http://www.gamedevpensieve.com/graphics/3d and i keep lots of links to reference material. Some of them might contain something new for you. Need to add lightmaps, looks like i forgot them :).

@spinningcubes | Blog: Spinningcubes.com | Gamedev notes: GameDev Pensieve | Spinningcubes on Youtube

Cheap rendering tricks might be the title of a book on the history of computer graphics :lol:

The GPU Gems, ShaderX and GPU Pro books are collections of increasingly modern techniques. Usually if it's cheap and good, it's a "trick" :)

Techniques like lightmaps are even used in offline (non-realtime) rendering. You might more accurately call them a radiance or irradiance cache. And you're choosing to compute irradiance per surfel instead of per pixel. Even high quality film renderers might make that choice, as many pixels might be able to share the same surface GI computations :)

I've played a lot of racing games over the years and seen a lot of effects overdone. Don't implement god-rays and fireworks, this isn't Grid2. No offence meant, NightCreature83 ;-)

Here's a few things I think you'll need: motion blur; environmental reflections on cars; shadowing on the track and cars from nearby objects; shadowing on the track from cars; probably some kind of tessellation for curved road and scenery sections; smoke; dynamic lighting from headlights/brake lights; very nice shading models for the track and cars.

I can't stress the last point enough. If you're making a racing game you're expecting me to spend a lot of time looking at your simulation of some tarmac. I also probably drive a car myself in real life, and I instinctively know what a real road and real cars looks like. Your textures, shading models and illumination tricks need to hold up to that standard. Take into account new/old surfaces with different material properties, patches of grease or oil, tyre rubber impregnating the asphalt in the braking and traction zones on the racing line, wet surfaces and standing water etc. And some of these need to be dynamic, i.e. cars laying down rubber as the race progresses.

I know this is a lot, and I know that even the latest racing games don't get it right, but this stuff is the target. But start small, concentrate on maybe two or three of these effects that you think are most important. I'd say get the curved surface tessellation stuff going as best you can (polygon kerbs are awful) and then a nice material model for the track that just gets the fundamental light response right for night racing. Go for a drive, take some photos.

Don't worry about foliage simulation for now. If I'm close enough to see how your trees are rendered then I've already crashed. ;-)

Visit http://www.mugsgames.com

Stroids, a retro style mini-game for Windows PC. http://barryskellern.itch.io/stroids

Mugs Games on Twitter: [twitter]MugsGames[/twitter] and Facebook: www.facebook.com/mugsgames

Me on Twitter [twitter]BarrySkellern[/twitter]

I am not a graphics programmer, but some of the neat tricks I've seen in games lately (or not so lately):

Parallax mapping - using a normal map and/or height map to shift pixels around in the texture based on perceived "distance" to the camera with a parallax effect, causing a surface to look 3d even as the camera moves around. Effect breaks down at extreme angles, and obviously doesn't change the geometry, so the edges are still flat.

Using light casting algorithms for non-lights. One game I know of renders a fake "light" into the world in the sky in the rough direction rain would be coming from. It then uses the resulting "illumination" to determine where to draw rain, which prevents the rain from falling through roofs, overhangs, or other surfaces. (Course, you want to tweak things slightly so your "light" doesn't shine through windows ;) )

An older technique I always thought was neat was imposters. Basically rendering part of the scene onto a 2d billboard and then showing the billboard instead of the actual geometry, allowing you to render more complex scenes then you otherwise would have. Of course, you need to keep track of how much the camera is moving so you can update the billboard if the perspective changes too much.

Phong Shading/Lighting is nothing more than a relatively good and cheap approximation of the way surfaces actually react to light.

Bump maps are a way of cheaply creating the impression that a surface or model is more complex than it actually is.

The infamous "fast inverse-square-root hack" - great explanation here, btw.

LOD schemes that use progressively simpler geometry the farther objects are from the camera, or just billboarded-sprites.

Eric Richards

SlimDX tutorials - http://www.richardssoftware.net/

Twitter - @EricRichards22

The reason light maps are...

Hi, thanks for your input, I totally overlooked blur techniques, I will look into these, and I see that you took part in some Codemaster projects, very cool!

I have some topics on 3d at http://www.gamedevpensieve.com/graphics/3d and...

I took a good look at your site the other day, it was really helpful for me to get some of the physics terminology down and gave me good idea what to look for. Thanks.

Cheap rendering tricks might be the title of a book on the history of computer graphics laugh.png
...

I did own GPU Gems book(s) few years ago but never really read them instead I focused on code. Sounds like it might be useful at least to skim through some of them smile.png. Thanks.

I've played a lot of racing games over the years and seen a lot of effects overdone. Don't implement...

Hello thanks for your lengthy reply, I know exactly how you feel smile.png, keep in mind I'm one man army so far and I don't plan on making anything big. I have good idea of what I'm trying to shoot for and that always helps. It might be too early to talk about details of my projects, but all racing would take place at night, no dynamic weather or changing road conditions. Graphically wise my focus will be on getting good looking cheap reflections on cars and creating nice atmosphere of street lights passing you as you roll race on a highway. I drive a turbocharged vehicle myself and have tuned the ECU (fuel ratios/boost/ignition timing) for few years so in my game I would like to see basic dynamometer and ability to tweak these settings, and I will also focus on getting good sfx for things like engine sounds, turbo spool sounds, external wastegate scream, blow off valve etc. So for example mashing full throttle in 2nd gear at low rpm in 4 cylinder big turbo vehicle would bog down and shake a car and it would not accelerate in my game or even cause misfire and flash check engine few times if tuned improperly.

I am not a graphics programmer, but...

Hello, thanks, I added parallax mapping to my research list!

A "modern" trick is PBR, which is currently free to use in Unity 5 and Unreal Engine 4. I haven't used it extensively, but it looks like it is going to be a really quick way to get good results once you learn the system. The same texture set can be used on objects, regardless of whether they are in dark or light situations, as the lighting calculation is "based on realism" as they say. Reflection probes(in both engines) let you have nice reflections at a somewhat cheap rendering cost, and work great for things like have the cars outside reflect/mirror the street lamps, but when in tunnels, reflect the tunnel lighting(which may be on the sides instead of the top). I mean the actual geometry though, not just the lighting/shading part.

I know this isn't the same type of trick as what started this topic. But I find PBR to be pretty exciting.




LOD schemes that use progressively simpler geometry the farther objects are from the camera, or just billboarded-sprites.

Be careful with LOD in fast moving games. Combined with streaming, you can get "popping" as models change in detail in obvious ways as you barrel down upon them. Having lots and lots of LOD levels can help with this.

If you can, use a program like simplygon to auto generate them and then fine tune them in your 3d modelling program.

This topic is closed to new replies.

Advertisement