PDA

View Full Version : SW3 - remove dust clouds and/or further reduce the graphics


lanelor
05-27-2010, 07:21 AM
I've played SW1 several years ago and several days ago I tried SW3. The problem is that my laptop meets the requirements and everything runs ok .. unless I get near or into those *** clouds of space dust. When this happens, the FPS drops to 5-7-10. I can hardly point to the enemy :)

I edited the main configuration file: forced 16bit graphics, lowest level of detail, the resolution is 1024x768. What I noticed is the options for background, planets, reflection, etc.

Can anyone help me with adjusting the four Z..... options so I can remove the dust clouds or at least preserve some background and lights, because till now every my setting results in pitch black space.

Thank you!

Goblin Wizard
05-27-2010, 08:20 AM
Can anyone help me with adjusting the four Z..... options so I can remove the dust clouds or at least preserve some background and lights, because till now every my setting results in pitch black space.
What is "four Z"?
You can remove clouds but you have to change location script file for each sector separately. Look into ../Data/Scripts/Locations. Inside location.script you will find LoadCloud function. Disable it and you won't see clouds any more.

Trucidation
05-27-2010, 08:42 AM
Hmm, that should help me too. Same story as lanelor, my laptop plays the game quite well for most of the time, except for the fog/clouds.

Big battles are a pain too, but oh well.

lanelor
05-27-2010, 09:36 AM
Thanks, Goblin Wizard, but there is a problem. I deleted every line in the scrips and the game still renders the cloud. Could it be that because I use a save the game remembers the original map?

These are are "four Zs'" I mentioned in the configuration file "main". I still try to find a good set for those, but with the clouds things should be fine.

ZBufferBPP = 32
ZFarPlane = 800.0f
zTransparLenght = 200.0f
ZTranspar = 400.0f
ZNearPlane = 0.1f

Goblin Wizard
05-27-2010, 11:22 AM
Thanks, Goblin Wizard, but there is a problem. I deleted every line in the scrips and the game still renders the cloud. Could it be that because I use a save the game remembers the original map?
Yes. Saves contain information about sectors you visited.

lanelor
05-27-2010, 01:47 PM
http://rapidshare.com/files/392123943/Locations_no_clouds.exe.html

This is the Locations folder from SW3->Data->Scripts->Locations. All clouds are deleted. Just make a back up copy and replace the Locations folder.

Trucidation
05-27-2010, 02:30 PM
I don't suppose we could fix the root cause and mod the actual LoadCloud() function itself?

Goblin Wizard
05-27-2010, 03:45 PM
LoadCloud() function is a base function, fixed in exe. You can't change it.
---- EDIT ----
It's not entirely true. In the Main.ini there is EditClouds = 0 parameter. When changed to 1 editor should start but I've never tried this. There is full guide inside ../Data/PFX/DustFX/Editor Description - Russian.zip. Disabling LoadCloud function is probably faster and easier than modifying all those cloud files.

lanelor
05-27-2010, 05:30 PM
Manual edit of each location was the best I could do.

In Data\Scripts there is a file - system.lst. This is a list of scripts to be run (I think) and there is a line "create_clouds.script". Deleting it didn't do anything.

Goblin Wizard
05-27-2010, 05:54 PM
You are lucky. "create_clouds.script" contains two external functions which are not used in the game. If you try this with other scripts you'll get a lot of errors/CTDs.

Trucidation
05-28-2010, 07:25 AM
LoadCloud() function is a base function, fixed in exe. You can't change it.
---- EDIT ----
It's not entirely true. In the Main.ini there is EditClouds = 0 parameter. When changed to 1 editor should start but I've never tried this. There is full guide inside ../Data/PFX/DustFX/Editor Description - Russian.zip. Disabling LoadCloud function is probably faster and easier than modifying all those cloud files.
I set EditClouds = 1, but that didn't seem to do anything (unless there are editing hotkeys).

We need [spoiler] tags so that long posts don't stretch the page too much. Oh well. The guide is in Russian, running it through lolgoogletranslate produced:
Description editor of clouds.

Editor starts by setting EditClouds = 1 in the section
[START_OPTION] file Main.INI.

After starting the editor you can create clouds. By default loaded texture dust1.bmp. Center of the cloud shown in yellow box.

Office of the keyboard and mouse:
Mouse to turn the camera, with clenched right-wheel - move on
vector surveillance.
The cursor to move the camera in the plane of the camera.
A / D - me, the size of the particle.
W / S - my number particle in texture (see command cl_side_count).

Management console:
cl_glow_factor <move (INT)> <koef.uvelicheniya distance (FLOAT)> -
installation of automatic increase of particle size on the distance to camera. The increase is the formula: size = size_bazovy coefficient.
increase * rasstoyanie_do_chastitsy.
If the step is -1, an automatic increase is disabled.
Example:
cl_glow_factor 3 0.1 - every 3 particles increased to rstoyanie * 0.1


cl_fade_factors <initial limit of expression (FLOAT)> <initial limit of
damping (FLOAT)> <ultimate limit damping (FLOAT)> - install
damping and the manifestation of particles from a distance. Transparency distributed
between these paramtremi so:
Position (0) - transparency (0)
Position (initial manifestations of the border) - transparency (0xFF000000)
Position (initial boundary damping) - transparency (0xFF000000)
Position (finite boundary damping and more) - transparency (0)
If nachalnach limit is -1, the effect is completely disabled.
PrimerZh
cl_fade_factors 1,100,200
(Note: if you set the distance to take into account the maximum distance Z
buffer)

cl_color <tekuschiy_tsvet 0xFFFFFFFF> - sets the current color of the particle.
Example:
cl_color 0xFFFF000000 - Set the opacity of the color red.
(Please note: When you can just set the parameter alpha particles. But it will shut down when you turn cl_fade_factors. When you turn off this setting transparency to all the particles placed in 0xFF000000)

cl_texture_name <name of the texture> - load the texture with the specified name. If you enter no parameters, will give the name of the current texture. In texture should have an alpha channel.
Example:
cl_texture_name dust1.bmp

cl_side_count <count (INT)> - set the number of particles on one side texture. Total number of particles is equal to the square of this value. In According to this value will raschityvatsya texture coordinates for the following set of particles.
Example:
cl_side_count 3 - install 3 x 3 pattern, ie in her 9 particles.

cl_rotate_params <step (INT)> <speed (FLOAT)> - install rotation for the particles. Step specifies which N-th particle will rotate rate sets the maximum speed of the particle. Take the chance to this value.
If the step is -1, to disable this effect for all particles.
Example:
cl_rotate_params 3 0.2 - rotate every third particle speeds up to 0.2

cl_pos_factor <coefficient. increase (FLOAT)> - is designed for visual increase the volume and size of the cloud. Apply only after placement all particles, because of the regime included the installation of the particles produced in incorrect place. By setting the coefficients.
increase in 0 - the effect is muted.
Valid values from 1 to several hundred.
Example:
cl_pos_factor 30 - Magnification 30 times.
(Note: use this mode carefully, checking the map on presence of artifacts. When activated, it applies tricks with reference to chamber. Pay attention to the correct position of the clouds in space such a regime.)

cl_save_cld <name fayla.cld> - save the cloud in a file name. Files are saved in the folder DATA \ PFX \ DUSTFX \. The recommended expansion of CLD.

cl_load_cld <name fayla.cld> - load the cloud from a file with the specified name. Name to indicate no path but with extension.
Doesn't really help me. The cld files also don't appear to be plaintext.

-
Edit: What about include scripts, rather than system-specific ones? There's references to clouds in 3 include scripts:
- Create_clouds.script -- cloud creation function? Looks like it's possible to mess with the parameters
- ObjectList.script -- appears to contain definitions
- RandomObjects.script -- several functions with "cloud" in the name; appears to generate debris

I'll do some editing and see what testing will turn up. I think I'll have to start a new game, as saves appear to contain info on systems we've already visited.

Edit 2:
Okay, I commented out the CreateCloud() calls (lines 64-66, 149-151) in Create_clouds.script, but I'm not sure if it worked. There's still the fog effect in Hephaestus, but I can't remember if it's less than before. Screenshot attached (got blown up by the turrets, lol).

Goblin Wizard
05-28-2010, 01:48 PM
As I said earlier, the createclouds.script contains 2 functions which are never used/executed in any script file. Changing them gives no effect.
But RandomObject contains functions which are used sometimes: CreateClouds, CreateAsterCloudsCube, CreateTechCloudsCube, CreateCloudsCube, CreateCloudsLine, CreateAsterCloudsLine, CreateTechCloudsLine, CreateClouds2. There are more "cloud" functions but only these use troublesome LoadCloud() function.
Only one advise: to disable every function (inside location scripts) that contains word "cloud" ;)

We need [spoiler] tags so that long posts don't stretch the page too much.
Try CODE. Not as good as SPOILER but better than plain text.

Trucidation
05-28-2010, 11:44 PM
Yeah I forgot about that, d'oh. There's quite a few in RandomObjects but I'm not sure if commenting those out will help - as you can see, they spawn debris and other stuff as well, right? Those aren't really a problem. It's the damn fog clouds we need to remove.

Location scripts... I have trouble looking for Hephaestus, most of the folders are named correctly after the systems they represent but not Hephaestus. That's the earliest sector which I can check for fog clouds when starting a new game.

Goblin Wizard
05-29-2010, 11:07 PM
Yeah I forgot about that, d'oh. There's quite a few in RandomObjects but I'm not sure if commenting those out will help - as you can see, they spawn debris and other stuff as well, right? Those aren't really a problem. It's the damn fog clouds we need to remove.

Let me make it clear. Functions, I've mentioned, contain base function LoadCloud which spawns our troublesome dust clouds. There are other functions inside RandomObjects which use e.g CreateCarcass function to simulate cloud by multiplying normal models. We have no interest in these functions. To get rid of all dust clouds you need to disable not only LoadCloud function itself (inside every location.script file) but all other functions which refer to LoadCloud function. To do this - disable whole content (all between "function" and "end;") of the function that contains LoadCloud function (inside RandomObjects.script). If you are not sure how to
do this I can give you modified RandomObjects.
I hope it's clear now. I do my best but english is not my native language.

Location scripts... I have trouble looking for Hephaestus, most of the folders are named correctly after the systems they represent but not Hephaestus. That's the earliest sector which I can check for fog clouds when starting a new game.
Check the neighbor sectors on the global map. e.g. Elio has nice short name you can easily find inside "locations" folder. Look into Elio activate.script. The first you see is the list of locations which are connected to Elio. By negative selection, you can easily find out that "Hephaestus" is called "gefest". This little trick can help you with other strangely named sectors too.

Trucidation
05-30-2010, 01:42 AM
Thanks, I didn't think of checking neighbouring system names :) Ya, I saw in RandomObjects that CreateCarcass() isn't the one I was looking for. Do we need to comment out entire functions? I thought it's safer to comment out the line which does the actual LoadCloud() call.

I'll edit gefest location script and start a new game to check.

Edit:
Ok, weird. I thought the nested loop in function CreateRandomCloud() was responsible for spawning all that crap, right? But commenting them out didn't help. Turns out the culprits are the 3 LoadCloud() calls in section "--CLOUD", lines 63-65, which call LoadCloud() with "huge_cyl.cld". Huh. I thought that was a debris reference. Commenting these 3 lines out caused the laggy fog to not appear. Great. If all systems follow the same convention, then simply commenting out the LoadCloud() calls under the "--CLOUD" section will stop fog from showing up.

@lanelor:
The pitch black effect is used sort of like a scene fade out. Something like "come closer and let me tell you about it", then the scene fades to black. A few seconds later normal lighting is restored. Only seen it used in the InoCo endgame missions though.

Edit 2:
I've found a better solution than having to manually edit every single system script. Simply rename/delete the "huge_cyl.cld" file and the game won't draw anything since it can't find it. All done, no more laggy fog now. Does anyone know what format the .cld file is? Is it an image or something? It may be a better idea to replace it rather than just delete it.

Edit 3:
I cloned medium_station_ora.cld and renamed it huge_cyl.cld. Game didn't crash, but it didn't show anything strange as I was expecting either. There were smaller than normal patches of fog though. Replacing it with a copy of clouds1.cld simply showed nothing. So I guess you can either replace huge_cyl.cld with a copy of clouds1.cld or simply delete/rename it to get rid of the fog.

Caution, I haven't tested in other systems. I think there's also fog somewhere in Debris 1 and the Precursor map.

Goblin Wizard
05-30-2010, 07:51 AM
So I guess you can either replace huge_cyl.cld with a copy of clouds1.cld or simply delete/rename it to get rid of the fog.
This is probably the fastest solution which generates no errors. Just replace all cld files with cloud1 and give them proper names. Cloud1 seems to be a blank file or a very small cloud.

Trucidation
05-30-2010, 12:18 PM
I did just that, made 28 copies of clouds1.cld and renamed them to the original .cld file names. Save wouldn't load, game complained of possible file corruption - I'm guessing this is because sector data is also saved, and it's already got previous cloud data in there which no longer matches.

I don't think it's broken though, I think all this means is that if you do this, you'll need to start a new game. Gonna test that now.

Edit:
Yep, new game works fine. Jumped into other sectors okay. So the problem was due to saves "remembering" the old cloud data.

Update:
Probably should highlight this in case someone else later wanders into the thread and can't find how to do it.

How To Remove Dust Clouds Which Are Lagging Up Your Game
This mini-mod does not, of course, apply to people with good graphics cards. I'm talking about those of us who game on older machines - especially laptops, since those generally didn't get good gfx cards until recently. The game actually runs well on older computers, that is until you run into those dust clouds (or large battles, but it usually takes a really huge crowd to lag it up badly and that only happens in a few endgame scenarios).

1. Open folder \Data\PFX\DustFX.
2. Copy down the file NAMES of all the .cld files. Just write down the names somewhere, in notepad or something. There should be 28 of them.
3. DELETE all of the .cld files except for clouds1.cld.
4. Now make 27 copies of clouds1.cld and rename them all with the names you copied in step (2) just now. Obviously, clouds1.cld will already be there so skip that 1.

You're done. Basically, what you did was replace all the .cld files with a simple one that doesn't lag up your framerate.

WARNING: If you have savegames, they will not work. This is because saves also preserve information about systems you've visited - including dust cloud info. So the game chokes when it tries to load your save because all the .cld files now point to the same simple cloud type so it can't render the complex clouds remembered by the save. That's why you must do this BEFORE you start a new game.

Enjoy :cool:

Sing_In_Silence
06-28-2010, 10:12 AM
Goblin Wizard, Trucidation, thank you.
Very helpful.
(And combat tends to go better, now that I don't need to switch to map mode :P )


Shame, though, as space loses some atmosphere (nyuk nyuk), but hey, eventually I'll get a better computer, so whatever.