Game Development Community

More custom light maps for DTS files

by Adrian W · 12/08/2008 (11:09 pm) · 10 comments

Well I finally have a website up with a demo mission to download showing my ATS file idea. Basically DTS files with an extra UV channel that I use for lightmapping, but which can be used for anything where you might want to input two UV channels into a shader.

Gratuitous screen shot:

www.futurenation.net/glbase/images/demo.jpg
The demo mission is archived with winrar and is about 6.25MB. Since my webhost doesn't seem to be very reliable for large file downloads its archived with winrar recovery records so winrar should be able repair any damage automatically from the Repair Archive menu option.

Try it out and let me know what you think!


BTW, the tree model is from Plants4Games.com, not my work.

BTW pt2, I would very much appreciate hearing from anyone who wants to try the DTS merger on their own models and who would be willing to do a bit of beta testing.

#1
12/09/2008 (2:30 am)
Hey, that looks really nice. Actually the textures on the models are rather good anyway, but with the ATS added they're great. It all looks so "normal" in the demo that you just don't notice it working.
#2
12/09/2008 (3:07 pm)
I'm confused is ATS a new file format for TGEA? And Are you backing the light in a 3D app or is this getting done in the mission editor?
#3
12/09/2008 (4:17 pm)
Sweet! I was thinking of doing something like this, but you beat me to it!
#4
12/09/2008 (9:46 pm)
Hi Steve,

Initially I made the shadows really dark and sharp, cos I thought the trees casting detailed shadows on the buildings would add a wow factor (see below), but it didn't look right so I toned it down and made it more subtle, which I think looks nicer and more realistic. I probably should have done a Stalker inspired demo rather than a Guild Wars inspired demo!

www.futurenation.net/glbase/images/demo2.jpg
James,

the ATS format is my attempt to get an extra UV channel into the DTS format. Since what I ended up with is like a DTS file, but isn't a DTS file, I call it an ATS file - i.e Ade's ThreeSpace format rather than Dynamix ThreeSpace format :-). I only support standard meshes (TSMesh), not skin meshes so you can't use this on Kork. But other features like detail levels, sequence animations (translation, rotation, scale animations, but not DSQ's), Col-n collision hulls, polysoup, IFL materials, etc, work as in a normal DTS file. It's explained a bit better in my previous plan.

To generate the ATS files I "merge" two DTS files together, again this is described in the previous plan and on the website. This seemed like a nice solution because it should work for all DTS exporters without having to mod the exporters.

The lightmaps in the demo are generated in a 3D app. Light mapping is the obvious use for an extra UV channel (hence the title of the post) but really you can use it for anything where you need an extra set of UV coordinates going into your shader.
#5
12/09/2008 (10:03 pm)
hmm is this something that could be toggled on and off? for instance if I was also using SSAO and wanted for the high setting in the game to use the standard single UV of the ATS file like it was a standard dts. with SSAO on but if the setting was on low it would turn off SSAO and use the custom light maps?

Second... as far as the engine is concerned is this just a dts object? are there going to be incompatibilities and reworking of other resources that will have to be done due to implementing this?
#6
12/09/2008 (11:17 pm)
Only the file format is different, once its loaded in its no different to a TSStatic or StaticShape loaded from a DTS file, except there is an extra UV coordinate in TSMesh. Also, it doesn't disable DTS files in any way, you can mix them in the same scene.

Turning off the second UV channel should be as simple as switching shader or passing a parameter into your shader. But why turn it off, there's more to lighting and shading than the ambient term ;-)
#7
12/10/2008 (3:00 am)
Because you don't want to have double the affect of the the ambient occlusion in the baked map and the ambient of the SSAO you will have super dark areas.. I understand though it will be nice to have colored lightmaps. you could simplify your light baking in you 3D application and not use GI style lighting and built in AO and just use regular lighting but then when you render without SSAO it will will reduce the the lightmaps wont have it.

Would be possible to have two sets of lightmaps? and swap them out.

one with baked in AO and one without?

Of course it would be nice if we could bake in the colored light to the tgea lightmaps right in the editor. Sux having to go Back and forth between eh 3D app and the mission editor.

there is actually a really cool article on Gamasutra about how they used maxscript and 3dsmax and their interior editor for planet side for a lot of these reasons.
#8
12/10/2008 (7:11 am)
The workflow is a definitely a pain right now because you have to compose the scene the same way in the mission editor and in your 3D app. Thanks for the pointer to the Gamasutra article, I'll have a look for that.
#9
12/10/2008 (11:15 pm)
James,

Thanks for that, a very cool article and with some downloadable resources as well:

www.gamasutra.com/view/feature/3870/an_environmental_pipeline_in_.php
www.lancethornblad.com/Downloads.shtml

To answer your questions (I was in a rush for work this morning), yes that is more or less what I was getting at. I haven't played with the SSAO plug in but from my limited understanding of SSAO in general I'm not sure that it casts shadows, or does coloured lighting and so on. At the end of the day I guess its always a trade off between how much you want to prebake into a scene and how much you want to do in real time on the GFX card.

But I don't think extra UV channels are just restricted to lightmapping, for example you could have a load of buildings tiled with the same brick texture and then use the second UV channel to give each building its own unique layer of dirt and grime.
#10
03/08/2009 (11:22 am)
Adrian,
please provide source.rar