FarSceneRange and NearSceneRange for PSP maps

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

FarSceneRange and NearSceneRange for PSP maps

Post by AnthonyBF2 »

I have concluded the sky file values are the main culprit for graphical issues when making new PSP maps or rebuilding old maps using PC assets. Some maps work perfectly but some maps are visually buggy. I do not understand or know anything about those far and near commands. I am hoping someone can chime in on this (who knows what the values do and how to set them right for different maps).

So far I've converted several Battlefront 1 maps and some still present graphic issues (terrain or objects not appearing) due to I cannot guess the right values for far and near sky file values.

Here are values from maps that do not have issues;

Bespin Platforms and Bespin Cloud City

Code: Select all

NearSceneRange(0.5, 60.0, 110.0);
FarSceneRange(150.000000);
SWBF1 Kamino

Code: Select all

NearSceneRange(0.8, 60.0, 90.0);
FarSceneRange(800.0);
Dune Sea

Code: Select all

NearSceneRange(1.0, 100.0, 200.0);
FarSceneRange(200.0);
And here are some sky values from maps that still present graphic issues;

SWBF1 Hoth

Code: Select all

NearSceneRange(0.2, 170.0, 200.0);
FarSceneRange(1000.000000);
Kashyyyk Docks

Code: Select all

NearSceneRange(0.2, 170.0, 200.0);
FarSceneRange(1000.000000);
SWBF2 Feluica

Code: Select all

NearSceneRange(0.2, 170.0, 200.0);
FarSceneRange(1000.000000);
Naboo Prototype

Code: Select all

NearSceneRange(250.0, 700.0, 530.0, 750.0);
FarSceneRange(1000.0, 1000.0);
I am hoping someone can look at the working map values and determine how to combine them to get good values for the bad maps. Thanks very much for any help! :P
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: FarSceneRange and NearSceneRange for PSP maps

Post by Teancum »

This documentation by GAB should prove helpful: viewtopic.php?p=507810#p507810
GAB wrote:These things are all setup in the world's .sky file, located in your world1 folder.

If you open the file you will find a SkyInfo() section right at the top, which may or may not contain the following:

EnableFadeAdjustWithZoom(1): If included, it increases the view distance when you zoom.

FogRange(10.0, 450.0): If included, it applies fog to the scene. The two values are there so that you can create a smooth fog intensification. In this example, the fog would start 10 meters in front of the camera and would be fully intense at 450 meters away from it.

FogColor(Red, Green, Blue, Alpha): If included, it tints the the fog mentioned above with the specified color.

NearSceneRange(60.0, 150.0, 75.0, 200.0): Most important part of the sky file. It controls when the game stops rendering high resolution models and starts rendering low resolution ones instead. It is used for performance purposes.

> The first value represents when the lowrez starts fading into the scene (in this case, 60 meters away from the camera)
> The second value represents when the lowrez finishes fading into the scene (in this case, 150 meters away from the camera)
> The third value represents when the hirez starts fading out of the scene (in this case, 75 meters away from the camera)
> And the last value represents when the hirez finishes fading out of the scene (in this case, 200 meters away from the camera)

There are four values so that the hirez models doesn't suddenly disappear and lowrez one doesn't suddenly appear. This results in objects transitioning between the two in a smooth fashion.

FarSceneRange(800.0, 1000.0): This controls when the whole scene starts to fade out, which in this case, would begin at 800 meters from the camera and would finish at 1000 meters away from it.

WorldFogRange(0.0, -10.0): This adds a fixed fog coming from below of the map. -10 is the height where the fog is the most intense. 0 is the height where it ends. The color of this type of fog is set by the FogColor parameter.

And I think those are the parameters that cover you issue with a few bonus ones just for the record.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: FarSceneRange and NearSceneRange for PSP maps

Post by AnthonyBF2 »

Okay, objects and troops are looking better. Is there anything in the sky file that determines how terrain comes out? Terrain is still visually buggy on some maps. It only shows up in partial angles, or cuts off randomly and becomes invisible.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: FarSceneRange and NearSceneRange for PSP maps

Post by Teancum »

FarSceneRange determines that. It's how far before things as a whole "fog out". I'd say you need to shorten visibility there drastically.
Post Reply