Purple Effect Rendering a Scene
by Andy Rollins · in Torque Game Engine Advanced · 08/26/2008 (4:27 am) · 13 replies
We're currently in the process of porting our game from TGE 1.5.2 to TGEA and working through the many errors and warnings... I'm struggling to track down one issue with certain parts of the mission get rendered with a purple tint as you can see in the following.

Tried relighting the scene which hasn't done anything and if I leave a "Purple area" the gun loses the purple tint again so I'm guessing it's nothing to do with the models.
Can anyone offer any suggestions on what's causing this or whereabouts to start trying to track it down as it has me stumped right now.

Tried relighting the scene which hasn't done anything and if I leave a "Purple area" the gun loses the purple tint again so I'm guessing it's nothing to do with the models.
Can anyone offer any suggestions on what's causing this or whereabouts to start trying to track it down as it has me stumped right now.
#2
Edit: Also that same car .dts model is in about 5 places on the map and it's only this version that's purple and not any of the others.
08/27/2008 (3:50 am)
Surge - which materials.cs at the moment I've only got the ones that get auto-generated in various folders?Edit: Also that same car .dts model is in about 5 places on the map and it's only this version that's purple and not any of the others.
#3
That way you can define all the materials properties.
At least thats how Ive been doing it.
Ive reviewed the TGEA materials.cs files, that are in the various demos. This helps me
figure out what to do with my own objects.
Best of luck.
08/27/2008 (5:46 am)
I'm pretty sure, you should setup a material.cs file for every shape you bring into the engine.That way you can define all the materials properties.
At least thats how Ive been doing it.
Ive reviewed the TGEA materials.cs files, that are in the various demos. This helps me
figure out what to do with my own objects.
Best of luck.
#4
08/27/2008 (8:27 am)
@Andy - Is that a dif that is under the car? If so, Are there any hard coded lights in it?
#5
The odd thing though is that I haven't got any lights defined in the dif so I'm not sure where it's coming from right now - the hunt continues for why the game thinks there is a light defined in the dif.
08/27/2008 (6:12 pm)
Jaimi - yes it is a DIF under the car... I've found that the car has the "receiveLMLighting" flag switched on and that's what is causing the purple tint as I believe that flag switches on lighting from interiors, terrain, etc to be applied to the object. The odd thing though is that I haven't got any lights defined in the dif so I'm not sure where it's coming from right now - the hunt continues for why the game thinks there is a light defined in the dif.
#6
I don't know if anyone has tried to fix it yet, but some well placed breakpoints should help you find the bug and fix it.
08/27/2008 (7:55 pm)
Yea... there has been a bug i've seen before where DIF can report a badly colored light which other models then use for ambient lighting.I don't know if anyone has tried to fix it yet, but some well placed breakpoints should help you find the bug and fix it.
#7

Check out the skies color, same purple.
I remember having a similar error, it had to do with the dif/lighting setups. I believe i had accidently recompiled a rendering change using the Modernization kit, basically adding shaders to interiors and such. It looks remarkable similar.
man, this is a old pic from almost 2 years ago, good times.
08/27/2008 (8:26 pm)

Check out the skies color, same purple.
I remember having a similar error, it had to do with the dif/lighting setups. I believe i had accidently recompiled a rendering change using the Modernization kit, basically adding shaders to interiors and such. It looks remarkable similar.
man, this is a old pic from almost 2 years ago, good times.
#8
I'm not sure why we never saw this in TGE? Remodelling all the DIFs would take a long time (especially the complex office block) so I could really do with finding a solution.
Any ideas?
10/02/2008 (7:54 am)
To update this on progress just in case this triggers anyones thoughts to offer some help. After a lot of digging & debugging we've narrowed it down to it being caused by scaling DIFs inside of TGEA - I am guessing that although the model scales correctly the lightmaps are not being scaled properly which is leading to bleeding.I'm not sure why we never saw this in TGE? Remodelling all the DIFs would take a long time (especially the complex office block) so I could really do with finding a solution.
Any ideas?
#9
How about setting the whole scene up in constructor while importing your
character for scale, saving one master file.
Then delete all the items and export one item out of constructor at a time?
10/02/2008 (9:07 am)
Is it worth a try to scale your model in constructor , then export it?How about setting the whole scene up in constructor while importing your
character for scale, saving one master file.
Then delete all the items and export one item out of constructor at a time?
#10
Any help please?
10/07/2008 (3:36 am)
Unfortunately Surge there are far too many models and detail in the city to go through that as a process... need to understand how to compile map2dif for TGEA and then I can have a go at debugging what's causing the issues.Any help please?
#12
10/13/2008 (3:50 am)
Thanks Hewster - nice to know we're not the only ones, unfortunately it doesn't help much as we don't get the map2dif source code for TGEA anymore to be able to recompile it and look at where this error is being caused.
#13
Not ideal as our artists use Quark but it keeps us moving for now.... unfortunately the map2dif source isn't provided with TGEA so no chance to debug that we can only hope that someone at GG can resolve. I've flagged it as a bug over in this thread
10/23/2008 (7:35 am)
I'm convinced this is a problem with map2dif also as opening the .MAP files in constructor and exporting using "export as legacy tgea dif" resolves the issue..Not ideal as our artists use Quark but it keeps us moving for now.... unfortunately the map2dif source isn't provided with TGEA so no chance to debug that we can only hope that someone at GG can resolve. I've flagged it as a bug over in this thread
Torque Owner Surge
MDNAMEDIA
I found at first , that my material was not properly setup, and I was getting
the same color you are, just not as strong. Once I figured it out. The purple tint
went away.