SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: AnthonyBF2 on July 11, 2018, 01:27:47 AM

Title: Can't find lighting values in the swbf1 assets
Post by: AnthonyBF2 on July 11, 2018, 01:27:47 AM
Greetings. I am working on my own swbf1 to swbf2 conversions for psp/ps2 and I would like the world lighting to match what they are in swbf1.

In the swbf2 mod tools, all maps have a ".lgt" file where light settings go but I cannot find this in the swbf1 assets.

Any solutions besides copying light data from original swbf2 maps?
Title: Re: Can't find lighting values in the swbf1 assets
Post by: Giftheck on July 11, 2018, 03:13:30 AM
.LGT files are unique to SWBF2 and were not used in SWBF1.
Title: Re: Can't find lighting values in the swbf1 assets
Post by: SleepKiller on July 11, 2018, 03:35:44 AM
The ambient lighting and directional lights are defined in the `.sky` file in SWBF1.

The ambient lighting is set under `SkyInfo`.
SkyInfo()
{
Enable(1559);
PS2()
{
FogColor(255, 0, 0);
FogRange(0.000000, 2700.000000);
NearSceneRange(0.5, 200.0, 500.0);
FarSceneRange(2000.000000);
AmbientColor(90, 90, 135);
CharacterAmbientColor(90, 90, 135);
VehicleAmbientColor(70, 70, 115);
FogRamp(3);

}
XBOX()
{
FogColor(255, 0, 0);
FogRange(0.000000, 2700.000000);
NearSceneRange(0.5, 200.0, 500.0);
FarSceneRange(2000.000000);
AmbientColor(130, 130, 160);
TopDirectionalAmbientColor(140, 140, 150);
BottomDirectionalAmbientColor(70, 70, 70);
}
PC()
{
FogColor(255, 0, 0);
FogRange(0.000000, 2700.000000);
NearSceneRange(90.0, 240.0, 120.0, 280.0);
FarSceneRange(300.000000, 1500.0);
AmbientColor(93, 77, 78);
TopDirectionalAmbientColor(140, 140, 150);
BottomDirectionalAmbientColor(70, 70, 70);
}
}


And the directional lights under `SunInfo`.



SunInfo()
{

PS2()
{
Angle(170.000000, -55.000000);
Color(255, 170, 100);
}
XBOX()
{
Angle(150.000000, -55.000000);
Color(255, 170, 100);
ShadowColor(255, 170, 100);
}
PC()
{
Angle(120.000000, -55.000000);
Color(255, 170, 100);
ShadowColor(255, 170, 100);
}

Degree(-50.000035);
BackAngle(180.000022, 0.000000);
BackColor(150, 150, 150);
BackDegree(0.000000);
}


With the `Back*` values setting the properties of the second directional light and the others setting the properties of the sun. (First directional light.)

Other world lights will likely be attached to models through ODFs, which I believe will continue to work in SWBFII without change. Shadow regions may however need updating to SWBFII's.
Title: Re: Can't find lighting values in the swbf1 assets
Post by: AnthonyBF2 on July 11, 2018, 08:03:07 AM
Quote from: SleepKiller on July 11, 2018, 03:35:44 AM
The ambient lighting and directional lights are defined in the `.sky` file in SWBF1.

The ambient lighting is set under `SkyInfo`.
SkyInfo()
{
Enable(1559);
PS2()
{
FogColor(255, 0, 0);
FogRange(0.000000, 2700.000000);
NearSceneRange(0.5, 200.0, 500.0);
FarSceneRange(2000.000000);
AmbientColor(90, 90, 135);
CharacterAmbientColor(90, 90, 135);
VehicleAmbientColor(70, 70, 115);
FogRamp(3);

}
XBOX()
{
FogColor(255, 0, 0);
FogRange(0.000000, 2700.000000);
NearSceneRange(0.5, 200.0, 500.0);
FarSceneRange(2000.000000);
AmbientColor(130, 130, 160);
TopDirectionalAmbientColor(140, 140, 150);
BottomDirectionalAmbientColor(70, 70, 70);
}
PC()
{
FogColor(255, 0, 0);
FogRange(0.000000, 2700.000000);
NearSceneRange(90.0, 240.0, 120.0, 280.0);
FarSceneRange(300.000000, 1500.0);
AmbientColor(93, 77, 78);
TopDirectionalAmbientColor(140, 140, 150);
BottomDirectionalAmbientColor(70, 70, 70);
}
}


And the directional lights under `SunInfo`.



SunInfo()
{

PS2()
{
Angle(170.000000, -55.000000);
Color(255, 170, 100);
}
XBOX()
{
Angle(150.000000, -55.000000);
Color(255, 170, 100);
ShadowColor(255, 170, 100);
}
PC()
{
Angle(120.000000, -55.000000);
Color(255, 170, 100);
ShadowColor(255, 170, 100);
}

Degree(-50.000035);
BackAngle(180.000022, 0.000000);
BackColor(150, 150, 150);
BackDegree(0.000000);
}


With the `Back*` values setting the properties of the second directional light and the others setting the properties of the sun. (First directional light.)

Other world lights will likely be attached to models through ODFs, which I believe will continue to work in SWBFII without change. Shadow regions may however need updating to SWBFII's.

Do we have any confirmation that these functions work if copied into the SWBF2 sky files?
Title: Re: Can't find lighting values in the swbf1 assets
Post by: SleepKiller on July 11, 2018, 07:23:49 PM
I do not believe they will, you'll likely have to input them into their inequivalent values in the `.lgt` file.
EhPortal 1.34 © 2024, WebDev