Interiors used to be initially lighted
by Jari · in Torque Game Engine · 01/13/2007 (11:46 am) · 13 replies
I remember using the older versions of TGE (1.3 I think) that lighted the interiors initially so that it wasnt all black after you placed the interiors on the scene. Does any one know if this would be possible to restore for 1.5 version of the engine?
Placing buildings is really difficult when they get dark.
Thanks!
Placing buildings is really difficult when they get dark.
Thanks!
#2
I mean, you have been here a long time Stefan, but im kinda sure this did not used to happen in the extremes it does now. They had some mono even lighting applied to them. Not technically "Lit" as they would be when the scene is relighted.
01/13/2007 (1:04 pm)
No i think hes right, they didn't used to go all "Black void" before when you moved them. IIRCC they were dark, but not black.I mean, you have been here a long time Stefan, but im kinda sure this did not used to happen in the extremes it does now. They had some mono even lighting applied to them. Not technically "Lit" as they would be when the scene is relighted.
#3
By "lighted" I assumed the OP meant there was no need to relight in previous versions. Just because the interior is now darker than before, doesn't mean it was lighted previously.
Is the mission in 1.3 identical to the one in 1.5? Because if you set ambient lighting lower, then you will get a darker interior before you relight.
01/13/2007 (1:31 pm)
No problem, just said I haven't seen it before. :)By "lighted" I assumed the OP meant there was no need to relight in previous versions. Just because the interior is now darker than before, doesn't mean it was lighted previously.
Is the mission in 1.3 identical to the one in 1.5? Because if you set ambient lighting lower, then you will get a darker interior before you relight.
#4
01/13/2007 (2:51 pm)
I don't know. In my 1.3 version and 1.5 im using custom lighting. but i don't think it was till 1.5 that things went "Void black" regardless of light settings
#5
01/13/2007 (3:12 pm)
You've always had to relight your mission, AFAIK. I do remember seeing a couple of posts about moving interiors causing a need for relight, though. I do not remember why it occurred.
#6
01/13/2007 (3:18 pm)
Blake, I think the OP means that the interior is darker than usually without a relight. This could be because his ambient values are low, or simply because TLK changed something.
#7
01/13/2007 (3:39 pm)
Ah, okay. I do remember a couple of posts regarding moving interiors around requiring a relight, which was prompted by the comment "they didn't used to go all "Black void" before when you moved them." I do believe the ambient light values did change so as to not overexpose the starter.fps level, though.
#8
So it seems we are along the same lines now, something has changed and it could be the ambient lightning. If they wouldnt go entirely black it would help a lot when placing/moving them.
Ok just trying to clear this out, if any one knows how to fix this then please let us know.
01/14/2007 (4:47 am)
Thanks for all the replies. So it seems we are along the same lines now, something has changed and it could be the ambient lightning. If they wouldnt go entirely black it would help a lot when placing/moving them.
Ok just trying to clear this out, if any one knows how to fix this then please let us know.
#9
01/14/2007 (7:06 am)
Sooooo, are you comparing the same mission on both versions or not?
#10
01/14/2007 (8:40 am)
The problem with the black void is you have to relight once (a painful process, btw) to figure out the orientation of your interiors, then you place or adjust the interior and you have to relight again. If you were just working on an adjustment you need to repeat the process again. The relighting takes a lot longer than it used to... by starting out in black void the mapping / mission design process takes a lot longer than it used to.
#11
01/14/2007 (8:53 am)
Joe said it well there, that's the exact problem. :)
#12
I really don't like having the lighting dropped on moved interiors, and considered removing this from TGE 1.5, but I didn't want to take out any existing features.
I think it's cool that interiors added to the mission are lit without needing a full relight cycle, but I don't like losing an interior's lighting (including embedded light maps from map2dif) after moving it.
This thread points out a bug when adding interiors too - these are also unlit.
Here's a fix that will light newly created interiors with basic ambient lighting until a relight is performed, and do the same for moved objects if you're keeping that feature intact.
In interiorInstance.cc line162, change getLightingAmbientColor's definition to:
Let me know if this fix works for you guys - I'll add it to the TGE 1.5 repo, so it's available in the next release.
01/14/2007 (12:45 pm)
That feature was added in either TGE 1.4 or 1.4.2 - you can disable it in worldEditor.cc on line 471 by commenting out the following highlighted line of code:void WorldEditor::updateClientTransforms(Selection & sel)
{
for(U32 i = 0; i < sel.size(); i++)
{
SceneObject * clientObj = getClientObj(sel[i]);
if(!clientObj)
continue;
// If it's an interior we're going to need to relight the scene
// since we've moved it, so notify script of this. Don't bother
// ourselves with dynamic lit interiors, of course.
InteriorInstance *ii = dynamic_cast<InteriorInstance*>(clientObj);
if(ii != NULL && ii->mUseGLLighting == false)
{
// Set it to be dynamically lit as well.
[b]//ii->mDoSimpleDynamicRender = true;[/b]
Con::executef( 1, "onNeedRelight" );
}
clientObj->setTransform(sel[i]->getTransform());
clientObj->setScale(sel[i]->getScale());
}
}I really don't like having the lighting dropped on moved interiors, and considered removing this from TGE 1.5, but I didn't want to take out any existing features.
I think it's cool that interiors added to the mission are lit without needing a full relight cycle, but I don't like losing an interior's lighting (including embedded light maps from map2dif) after moving it.
This thread points out a bug when adding interiors too - these are also unlit.
Here's a fix that will light newly created interiors with basic ambient lighting until a relight is performed, and do the same for moved objects if you're keeping that feature intact.
In interiorInstance.cc line162, change getLightingAmbientColor's definition to:
bool getLightingAmbientColor(ColorF * col)
{
*col = ColorF(1.0, 1.0, 1.0);
return true;
}Let me know if this fix works for you guys - I'll add it to the TGE 1.5 repo, so it's available in the next release.
#13
The interiors are now lighted from inside and even the outside is still black this helps alot already. That's only if your interior has lightning, I suppose.
01/15/2007 (3:45 am)
Thanks John! The interiors are now lighted from inside and even the outside is still black this helps alot already. That's only if your interior has lightning, I suppose.
Torque Owner Stefan Lundmark