Game Development Community

dev|Pro Game Development Curriculum

TGE normalmapping take 2 (image heavy)

by Koushik · 04/07/2008 (7:07 pm) · 8 comments

Well, I finally got around to get a few things going in life.... after a very hectic past week in university...

Apart from a history presentation, and another pending presentation on convection and two phase flows (yeah, I take great pleasure in doing random-unrelated-things... I have a course in nanotechnology waiting as well), I have had little time to devote to TGE normal-mapping over the past week. After next week, that should change I hope...

Anyway, for those of you who have been following my posts so far, I posted about normal-mapping in my last post. I have come a fair distance since then. This new shader supports multiple-lights per scene and a multi-light type attenuation. So, now point lights work like point lights and spot lights work like spot lights, and it helps the realism a great deal.

I thought I'd do a quick breakdown to show you guys how the normal-mapping shader works. The various passes are described below. Please note that all these passes are done in the same fragment shader, not in a multi-pass rendering algorithm.

On a side note, in the following images, please ignore the grainy looks on the interiors, it was a fall-off from a previous test. Let the shininess begin!!

1. Normal vertex-lighting

cowness.forever.googlepages.com/per-vertex1.jpg
cowness.forever.googlepages.com/per-vertex3.jpg
cowness.forever.googlepages.com/per-vertex4.jpg
2. Normal-map based lighting

cowness.forever.googlepages.com/normal-map1.jpg
cowness.forever.googlepages.com/normal-map2.jpg
cowness.forever.googlepages.com/normal-map3.jpg
cowness.forever.googlepages.com/normal-map4.jpg
3. Occlusion-map corrected ambient lighting

cowness.forever.googlepages.com/amb-map1.jpg
cowness.forever.googlepages.com/amb-map2.jpg
4. Final texture pass

cowness.forever.googlepages.com/final-map1.jpg
cowness.forever.googlepages.com/final-map2.jpg

Mandatory video (as always)

The occlusion map was generated from the texture. It is actually meant for static meshes, but as seen here, it does a pretty good job. The problem with the default torque orc model is that the normal-mapping effects are not so profound when seen with the base texture turned on. I am currently running some tests on another model and will get around to posting more results soon ( I hope)

Meanwhile, wish me luck on analyzing pipe-flows with varying Nusselt numbers and undetermined skin-friction coefficients!!

#1
04/07/2008 (7:27 pm)
That's a very nice bit of normal/occlusion mapping.

I daren't ask what undetermined skin-friction coefficients are. ;o)
#2
04/07/2008 (8:23 pm)
Looking great, Koushik I sometimes wish I understood a single thing about the whole Torque render pipeline thing...I guess some of us are just meant to use them and not understand them!

oh, and regarding undetermined skin-friction coefficients...I stopped that in my early teens...ahem...
#3
04/07/2008 (8:43 pm)
Awesome work Koushik!
#4
04/08/2008 (3:13 pm)
Very good job. 8-)

hahah! undetermined skin-friction coefficients!! don't exist, nice joke!
What do you mean by they do exist? that can't be!!!
#5
05/09/2008 (8:45 am)
Looks great so far. Im Interested to know if you will implement your shader coder for TGE and share with the rest of the community. This I feel would benefit everyone and make TGE probably the best engine in its class. DL out.
#6
05/09/2008 (9:48 am)
@DL

Well, this IS in TGE actually. I actually have a whole slew of things on my to-do list for TGE as far as rendering/ graphics goes. I might just release this as a standalone first... might take a bit of time though...
#7
05/17/2008 (8:34 am)
Thanks Koushik,

My team and I are planning on using Torque for our game. We had also wanted to step up to TGEA, but after checking it out a little and finding out it doesnt support as many platforms as TGE I believe we will stick with TGE. I look forward to some updated screens and a mod resource from you real soon! BTW... I have seen where the lights in TGE can fake like bump and specular mapping, how can you do this? DL out.
#8
05/23/2008 (4:30 am)
@DL:

I haven't come across that, honestly. Fake bump-mapping is seen on the terrain - fake in the sense that it isn't really of much use, only alters the lighting co-efficients and the brightness and looks a little vague compared to normal-mapping. Not sure how you could fake specular mapping in stock TGE though, the lighting would be done per-vertex and specular highlighting would be difficult.