Weird magenta lighting hue in TGEA **SOLVED
by ChrisG · in Artist Corner · 09/11/2008 (4:20 pm) · 12 replies
I'm getting this weird magenta lighting hue in TGEA on DTS objects and DIF objects that are outside (in un-portalised areas)

With DTS objects in happens when receiveLMLighting on. (see Car and lamppost)
and with DIFs its obvious in the distance when the face is turned close to 90 deg from the viewer. (see Roads in distance)
I've tried turning environmentmaps and showenvironmentmaps off and it had no effect, I also made the sky grey, and setting the sun to a neutral color (see sun settings below) which also had no effect.

Now while I can go through the map and turn receiveLMLighting off on all outside objects (100's of them) I can't do this with the DIFs.
Does anyone have any ideas what might be causing this and how to fix it?
thanks.

With DTS objects in happens when receiveLMLighting on. (see Car and lamppost)
and with DIFs its obvious in the distance when the face is turned close to 90 deg from the viewer. (see Roads in distance)
I've tried turning environmentmaps and showenvironmentmaps off and it had no effect, I also made the sky grey, and setting the sun to a neutral color (see sun settings below) which also had no effect.

Now while I can go through the map and turn receiveLMLighting off on all outside objects (100's of them) I can't do this with the DIFs.
Does anyone have any ideas what might be causing this and how to fix it?
thanks.
About the author
Currently working on ZDay: www.zdaygame.com
#2
-Dave Calabrese
Gaslight Studios
09/14/2008 (9:26 pm)
The problem, to me, looks like it has to be the sunlight. Either that, or a glitch in a custom shader. Have you made any changes at all to the lighting system, or are you using any custom shaders?-Dave Calabrese
Gaslight Studios
#3
If it's only outside, and receiveLMLighting fixes the problem, it's gotta be the terrains ambient color. But you changed your suns ambient to be neutral. Off the top of my head, I can't think of anywhere else that adds ambient color to terrains.
Are you using Atlas or Geo? Dunno if it makes a difference, but I'd like to know where I should read.
09/14/2008 (9:35 pm)
I can't even do vague. :(If it's only outside, and receiveLMLighting fixes the problem, it's gotta be the terrains ambient color. But you changed your suns ambient to be neutral. Off the top of my head, I can't think of anywhere else that adds ambient color to terrains.
Are you using Atlas or Geo? Dunno if it makes a difference, but I'd like to know where I should read.
#4
Just curious but the building to the right in the image looks like a building from one of my content packs. The image is a little dark so I can't really tell.
The reason I'm asking is that if it is and the roadway/roadways are from one of the packs then it looks like I messed up some of the road DIFs on export. It's an old problem that has to do with a particular setting used by Map2Dif and I see it crop up occasionally -- and just occasionally enough that I can't give you a super solid answer why it happens except that it's an export issue.
Even if it's not from one of my packs (which I'm hoping it isn't, since it would indicate that I blew it somewhere), I'm almost positive it has to do with the DIF itself and not a setting in engine. I believe it is the lightmap scale in Map2Dif and I think it's perhaps different in different versions. Try using a different version of Map2Dif for TSE(A) and see if you get the same results. And if it is one of my roadways let me know which model name(s) are used and I'll re-check them and make sure I used the right version myself since I use at different times 3DWS 5.43, 3DWS 5.52 and Constructor for exporting, depending on certain factors, all of which have to do with eccentricities on my part.
BTW you can see images of DIFs that exhibit similar issues in this thread www.garagegames.com/mg/forums/result.thread.php?qt=30903 back with Cartography Shop and the solutions that were kicked around there. Like I mentioned, I belive it is the same/related problem.
Alan
09/14/2008 (10:40 pm)
Hey Chris,Just curious but the building to the right in the image looks like a building from one of my content packs. The image is a little dark so I can't really tell.
The reason I'm asking is that if it is and the roadway/roadways are from one of the packs then it looks like I messed up some of the road DIFs on export. It's an old problem that has to do with a particular setting used by Map2Dif and I see it crop up occasionally -- and just occasionally enough that I can't give you a super solid answer why it happens except that it's an export issue.
Even if it's not from one of my packs (which I'm hoping it isn't, since it would indicate that I blew it somewhere), I'm almost positive it has to do with the DIF itself and not a setting in engine. I believe it is the lightmap scale in Map2Dif and I think it's perhaps different in different versions. Try using a different version of Map2Dif for TSE(A) and see if you get the same results. And if it is one of my roadways let me know which model name(s) are used and I'll re-check them and make sure I used the right version myself since I use at different times 3DWS 5.43, 3DWS 5.52 and Constructor for exporting, depending on certain factors, all of which have to do with eccentricities on my part.
BTW you can see images of DIFs that exhibit similar issues in this thread www.garagegames.com/mg/forums/result.thread.php?qt=30903 back with Cartography Shop and the solutions that were kicked around there. Like I mentioned, I belive it is the same/related problem.
Alan
#5
@William: We're using the old terrain as-per TGE not Atlas
@Alan: the building and the wall are from your warehouse pack - the roads we made ourselves.
I checked out the thread and tried lowering the lightmap scale on the roads. I could go down to 16 before map2dif crashed. It didn't fix the problem, although I have noticed this.
Not all the difs show the pink bits, for example the the straight roads don't, but the bends and T intersections do. When you are on a road that has 'pink bits', the player model takes on the pink hue as well, when you are not on those roads - no pink hue...
Also when you 'push through' a brush and see inside it you see a solid pink face, TGE just allowed you to see though the brush. Not too sure why this is, maybe if this color can be set somewhere it might be related.
Here's our current sun settings:
09/15/2008 (12:55 am)
@Dave: we haven't made any changes to the lighting system, we're still in the process of porting from TGE. We've not used any customer shaders as far as I know, @William: We're using the old terrain as-per TGE not Atlas
@Alan: the building and the wall are from your warehouse pack - the roads we made ourselves.
I checked out the thread and tried lowering the lightmap scale on the roads. I could go down to 16 before map2dif crashed. It didn't fix the problem, although I have noticed this.
Not all the difs show the pink bits, for example the the straight roads don't, but the bends and T intersections do. When you are on a road that has 'pink bits', the player model takes on the pink hue as well, when you are not on those roads - no pink hue...
Also when you 'push through' a brush and see inside it you see a solid pink face, TGE just allowed you to see though the brush. Not too sure why this is, maybe if this color can be set somewhere it might be related.
Here's our current sun settings:
new Sun(SunObject) {
canSaveDynamicFields = "1";
Enabled = "1";
azimuth = "80";
elevation = "80";
color = "0.2 0.2 0.25 1";
ambient = "0.05 0.05 0.065 1";
castsShadows = "0";
direction = "0.57735 0.57735 -0.57735";
TypeBool locked = "true";
onGroup = "Default Value";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
};
#6
Like I mentioned I've had the exact same problem at various times but it happens just rare enough that I can't point at one single thing as as solution.
I do know that I have at least two different recent builds of Map2Dif Plus for TGEA, and one of them is prone to problems. Is yours the 1876 kb one? Again I'm clutching at straws here but just thought I'd ask.
Anyways, good luck and if you do find a solution definitely let us all know! =)
09/15/2008 (7:47 am)
Well, at least I feel better that I didn't mess anything up myself and cause you any grief, but sorry you're having trouble! Like I mentioned I've had the exact same problem at various times but it happens just rare enough that I can't point at one single thing as as solution.
I do know that I have at least two different recent builds of Map2Dif Plus for TGEA, and one of them is prone to problems. Is yours the 1876 kb one? Again I'm clutching at straws here but just thought I'd ask.
Anyways, good luck and if you do find a solution definitely let us all know! =)
#7
09/19/2008 (12:47 am)
@Alan - I'm still having issues with this and I was wondering if you could point me to where I can download a version of map2dif_plus for TGEA that you think is a safe one. I tried using the TSE one that came with your warehouse pack but it didn't work either.
#8
tdn.garagegames.com/wiki/Constructor
09/19/2008 (5:23 am)
Use the last update of constructor 1.0.51 have perfect embody map2dif.tdn.garagegames.com/wiki/Constructor
#9
Hmmm...that's the last version that I've been using, so I'm still not sure where to point you. I'd definitely try Dimitris' suggestion if it's not something you've tried so far, and with the SDK you should be able to compile a version of map2dif for the build you're working with by doing a custom compile.
I haven't really touched doing any compiling with TGEA since a couple release back, but you still "should" be able to do it...I'm definitely not strong on the source end of TGEA for sure, since most of my pretend coding was done with TGE).
If it's specific to a few particular models (and not with everything you've made across the board) I'd just try re-doing a few from scratch and changing one of the dimensions (if possible) and see what you end up with. It could be that map2dif just isn't liking a particular scale or thickness or something weird like that.
Again, good luck.
09/19/2008 (7:33 pm)
@ChrisG,Hmmm...that's the last version that I've been using, so I'm still not sure where to point you. I'd definitely try Dimitris' suggestion if it's not something you've tried so far, and with the SDK you should be able to compile a version of map2dif for the build you're working with by doing a custom compile.
I haven't really touched doing any compiling with TGEA since a couple release back, but you still "should" be able to do it...I'm definitely not strong on the source end of TGEA for sure, since most of my pretend coding was done with TGE).
If it's specific to a few particular models (and not with everything you've made across the board) I'd just try re-doing a few from scratch and changing one of the dimensions (if possible) and see what you end up with. It could be that map2dif just isn't liking a particular scale or thickness or something weird like that.
Again, good luck.
#10
BUT: After weeks of late nights and cursing I have made a break through :D
The problem occurs when on or in DIFs that have been scaled in Torque - though not all scaled DIFs. As soon as I scale the problem DIFs to 100% the magenta hue goes. I'm guessing that while the geometry gets scaled the light map doesn't.
Does anyone know if there is a fix for this?
Most of my models I can either scale to 100% or rebuild, but one took me nearly 6 months to make and I'd have to abandon it if I can't scale it.
09/29/2008 (4:42 pm)
@Dimitris: I tried the version of map2dif_plus that came with the update you suggested in quark and constructor and the difs crashed TGEA when trying to load. Not too sure what's happening there :\BUT: After weeks of late nights and cursing I have made a break through :D
The problem occurs when on or in DIFs that have been scaled in Torque - though not all scaled DIFs. As soon as I scale the problem DIFs to 100% the magenta hue goes. I'm guessing that while the geometry gets scaled the light map doesn't.
Does anyone know if there is a fix for this?
Most of my models I can either scale to 100% or rebuild, but one took me nearly 6 months to make and I'd have to abandon it if I can't scale it.
#11
09/29/2008 (6:01 pm)
Bump the Lighting Border value up or down in your Map2Dif source, or do it directly trough the .map file. Can't remember what the exact name is, but purple is the color of the border of the lightmap.
#12
The problem can solved by importing the map files (from Quark) into Constructor and then using "Export as DIF" to save the dif files. This way the files can be scaled and there is no magenta or green hue.
11/20/2008 (3:01 pm)
*** SOLUTION ***The problem can solved by importing the map files (from Quark) into Constructor and then using "Export as DIF" to save the dif files. This way the files can be scaled and there is no magenta or green hue.
Torque Owner ChrisG
Any ideas on this one... a hint, a clue, a vague direction to investigate?
...Anyone?