Yet more custom light maps for DTS files (now with TGE support)
by Adrian W · 01/03/2009 (8:12 pm) · 28 comments
First things first: Best Wishes to everyone for 2009!
I managed to get quite a bit done on the DTS merger (see Custom light maps for DTS files and More custom light maps for DTS files) over the Xmas break, so if all goes to plan this will be packaged up with some documentation and made available as a resource in the next few days. The main changes since I last posted are:
Standard TGEA materials are now supported. This means it no longer relies on a custom shader to work, which should hopefully make it a lot more user friendly. Custom materials and custom shaders are still supported as well.
TGE is now supported (it turned out that the engine already supports multiple UV channels in TSMesh, even though the DTS format doesn't use it).
There is now a GUI front end, again should make it a lot easier to use.
Anyway a picture is worth a thousand words so here here are plenty of screen shots (very image intensive):
This is the original courtyard model textured and lit in Max:

This is the model exported as DTS with diffuse textures, in ShowPro:

This is the model exported again as DTS, with lightmap texture, completely different UV channel to the first export, in ShowPro:

Then run the two models through the DTS merger:

And load into a TGEA mission:

or a TGE mission (note that Kork is very tactfully not standing on the model in this shot as it doesn't have a collision hull yet and polysoup collision isn't supported in stock TGE):

and finally, for TGEA only, edit the material script and put some bump maps and specular power on everything:

Many thanks to everyone who has given feedback on this or helped out with some testing.
I managed to get quite a bit done on the DTS merger (see Custom light maps for DTS files and More custom light maps for DTS files) over the Xmas break, so if all goes to plan this will be packaged up with some documentation and made available as a resource in the next few days. The main changes since I last posted are:
Standard TGEA materials are now supported. This means it no longer relies on a custom shader to work, which should hopefully make it a lot more user friendly. Custom materials and custom shaders are still supported as well.
TGE is now supported (it turned out that the engine already supports multiple UV channels in TSMesh, even though the DTS format doesn't use it).
There is now a GUI front end, again should make it a lot easier to use.
Anyway a picture is worth a thousand words so here here are plenty of screen shots (very image intensive):
This is the original courtyard model textured and lit in Max:

This is the model exported as DTS with diffuse textures, in ShowPro:

This is the model exported again as DTS, with lightmap texture, completely different UV channel to the first export, in ShowPro:

Then run the two models through the DTS merger:

And load into a TGEA mission:

or a TGE mission (note that Kork is very tactfully not standing on the model in this shot as it doesn't have a collision hull yet and polysoup collision isn't supported in stock TGE):

and finally, for TGEA only, edit the material script and put some bump maps and specular power on everything:

Many thanks to everyone who has given feedback on this or helped out with some testing.
#22
Possibly a bug in TGEA as it happens on the DTS in the original (unmodified) version of Stronghold as well.
Edit:
OK fixed it. It was a bug in the polysoup shadow casting, nothing to do with ATS files :-)
In TSShapeInstance::buildPolyListOpcode, in the inner loop, the code that reads
should be changed to
01/10/2009 (9:58 am)
Cool, I hadn't spotted that. Possibly a bug in TGEA as it happens on the DTS in the original (unmodified) version of Stronghold as well.
Edit:
OK fixed it. It was a bug in the polysoup shadow casting, nothing to do with ATS files :-)
In TSShapeInstance::buildPolyListOpcode, in the inner loop, the code that reads
// Update our bounding box...
localBox = box;
mat.mul(localBox);should be changed to
// Update our bounding box...
otherMat = mat;
otherMat.inverse();
localBox = box;
otherMat.mul(localBox);
#23
01/10/2009 (4:50 pm)
Cool, I was going to say it's probably something in buildPolyListOpcode, there are a bunch of little bugs in the polysoup code in the engine. Nice work.
#24
www.futurenation.net/dtsMerger/tiki-list_file_gallery.php?galleryId=6
Phew!
01/11/2009 (11:42 am)
Just a quick note to say that TGE demo and engine mods are now posted as well.www.futurenation.net/dtsMerger/tiki-list_file_gallery.php?galleryId=6
Phew!
#25
I've download the file for TGE 1.5.2 and repair the rar but didn't manage to install it. I get message saying that "disk1.cab" is corrupted.
01/29/2009 (6:31 am)
Adrian,I've download the file for TGE 1.5.2 and repair the rar but didn't manage to install it. I get message saying that "disk1.cab" is corrupted.
#26
What's happened to this stuff, I can't find the source.rar mentioned in the Start_Here_TGEA_171.html document. I've looked at all the downloads available from the site and can't find the loader mods. I'm working on a virtual heritage education display and I was hoping to use this approach to pre-bake lighting for the building interior. It's way to complex to model and texture using constructor.
I know GG are probably aiming away from DTS for Torque3D but I need to produce a product in two months and the only thing stopping me from making it look good is a lake of multiple UV support. I'm not one to criticise the efforts of GG because on the whole they do an excellent job but the lack of this support has gone on two long. I've been using torque for about five years now, mainly to utilize the community and variety of functionality it offers but I find my self missing the flexibility of texturing and ease of exporting I had with Bitmanagements VRML player that I used for years before switching. In many ways my content quality has been stagnant all that time while I became a much better programmer. The thing is I always though that it was the one thing that would get addressed by GG because it is such an obvious limitation and one not present in most of the completion.
The great thing about what you've done is that it solves the problem without having to rewrite all the exporters or go through a lengthy bug ridden transition to a new format. It sure would be great to have this out of the box, with TGEA at least.
02/18/2009 (2:21 pm)
Hi Adrian,What's happened to this stuff, I can't find the source.rar mentioned in the Start_Here_TGEA_171.html document. I've looked at all the downloads available from the site and can't find the loader mods. I'm working on a virtual heritage education display and I was hoping to use this approach to pre-bake lighting for the building interior. It's way to complex to model and texture using constructor.
I know GG are probably aiming away from DTS for Torque3D but I need to produce a product in two months and the only thing stopping me from making it look good is a lake of multiple UV support. I'm not one to criticise the efforts of GG because on the whole they do an excellent job but the lack of this support has gone on two long. I've been using torque for about five years now, mainly to utilize the community and variety of functionality it offers but I find my self missing the flexibility of texturing and ease of exporting I had with Bitmanagements VRML player that I used for years before switching. In many ways my content quality has been stagnant all that time while I became a much better programmer. The thing is I always though that it was the one thing that would get addressed by GG because it is such an obvious limitation and one not present in most of the completion.
The great thing about what you've done is that it solves the problem without having to rewrite all the exporters or go through a lengthy bug ridden transition to a new format. It sure would be great to have this out of the box, with TGEA at least.
#27
I'm sorry that my downloads page is a bit misleading at the moment. The source rars you mention were available for quite a while. However, where I had changed TGE or TGEA source files I had put the complete files in the rar. It was pointed out to me, quite rightly, that I was violating the EULA by doing this (not by GG but by another community member) because I was making GG source code publicly available. So I took the files down temporarily. It was my intention to put the source changes back up as .patch files (which just contain the differences), like I did with my multi-pass custom materials resource, but pressure of work has taken over for a while and I just haven't got around to it yet.
The quickest solution at the moment is if you just email me on adrianw.uk at googlemail.com and I will send you the rar as I can see above that you are a Torque licensee so its not a problem. Also it would be great to hear from you afterwards to find out whether it actually proves to be useful or not.
02/18/2009 (7:13 pm)
Hi Joti,I'm sorry that my downloads page is a bit misleading at the moment. The source rars you mention were available for quite a while. However, where I had changed TGE or TGEA source files I had put the complete files in the rar. It was pointed out to me, quite rightly, that I was violating the EULA by doing this (not by GG but by another community member) because I was making GG source code publicly available. So I took the files down temporarily. It was my intention to put the source changes back up as .patch files (which just contain the differences), like I did with my multi-pass custom materials resource, but pressure of work has taken over for a while and I just haven't got around to it yet.
The quickest solution at the moment is if you just email me on adrianw.uk at googlemail.com and I will send you the rar as I can see above that you are a Torque licensee so its not a problem. Also it would be great to hear from you afterwards to find out whether it actually proves to be useful or not.
#28
03/08/2009 (11:33 am)
This is something extremely useful. It extends the engine possibilities and is perfectly to have it integrated in everyone's project. Many thanks to Adrian. Good luck and continue in this spirit!
Torque 3D Owner Gerald Fishel