Decals

Published July 13, 2005
Advertisement
Decals

Next, I'll take a break from the navigation, and I'll add decal support to the level editor. My engine has fairly advanced support for decals right now. I am using a variant on deferred shading, where you composite your diffuse textures first, including any terrain layers, decals like scorch marks, dirt, etc., then composite your tangent space normal maps, then once all is composited, lighting & shadows are applied. This has the advantage that decals are correctly lit, shadowed and fogged, including bump mapping.

Right now decals are only applied in the engine dynamically, when a laser bolt hits a wall or floor or other static obstacle. My plan is to use decals to spice up the levels as well. I will add the ability to apply decals to any static geometry, which will be useful for adding scratch marks, scorch marks to represent an earlier battle, cracks, blood, dirt, and even carved writing, murals, and bas-relief.

The decals can be diffuse, normal map, or both. Applying just a normal map decal will be a great way to make the stone walls & floors look carved.

Here an older shot of the level editor, and the in-game level, showing some scorch-mark decals.

Sarcophagus In Level Editor


Decals Zoomed Out


Decals Close Up
Previous Entry More Navigation
Next Entry More Decals
0 likes 6 comments

Comments

Daerax
Wow thats quite cool. The first screenshot is a bit wide on my resolution though, it breaks layout for me.
July 13, 2005 10:15 AM
jollyjeffers
As a general aside ... deferred shading over a multi-pass buildup for lighting/shadows?

I have to admit that I've only had a cursory glance over the details of deferred shading (looks quite cool).

I'm quite keen to redo some of my multi-pass lighting code, and wondering whether to rip it out and stick some deferred shading in there - given that a lot of people seem to like it [grin]

cheers,
Jack
July 13, 2005 10:24 AM
SimmerD
I actually don't like classic deferred shading. I should do an article on this at some point.

Classic deferred shading typically has three aspects.

1) Compositing. Putting down the lighting parameters into off-screen buffers, before lighting happens. This is the essential part. This corresponds to the RenderMan concept of 'Material Shaders'.

2) Multiple Render Targets. This is often employed to accomplish #1, and do write out depth from to a buffer, but it is only an optimization, not a requirement, plus it breaks hw anti-aliasing, so I don't like this portion.

3) Drawing the light geometry instead of the world geometry. This also has problems with AA. Again, this is an optimization, and is not needed, and can cause problems with light volume capping. Has the advantage of reducing draw calls over per-geometry chunk draw calls.

I just use #1 in my engine - that way it works with AA, and works on GeForce3 and above, rather than only on the highest-end cards.
July 13, 2005 10:33 AM
The Forgotten Mindset
I don't have much to say, but keep up the excellent work. It looks great :)
July 13, 2005 07:12 PM
TraderJack
My editor is bigger than your editor.
July 14, 2005 08:35 AM
Myopic Rhino
Quote:I actually don't like classic deferred shading. I should do an article on this at some point.
Consider this an open invitation to write for us any time you want.
July 14, 2005 12:51 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

1.2 Almost ready...

1114 views

Sound Paths

1332 views

Stately Progress

1134 views

State Lines

1284 views

Pulsing

867 views

Return to The Ship!

1008 views

Cameras & Boxes

1125 views
Advertisement