Jump to content

[WIP] PrunePhysics - turn parts to physicsless for better performance with large ships


peteletroll

Recommended Posts

Highly experimental - backup your savefiles!

This module can turn normal parts into pysicsless parts, hopefully making possible to build larger ships.

It can be compared to welding mods that group many parts into a single custom one, but this should be easier to use.

The module contains a whitelist; parts containing modules or resources not in the whitelist can not be converted to physicsless. The whitelist is contained in files named *.prunephysicswhitelist or *.ppwl, placed anywhere in the GameData folder. Any mod can add itself to the PrunePhysics whitelist by adding a whitelist file to its own distribution.

To convert a part to physicsless, activate the PrunePhysics switch in the PAW, and force a reload of the craft by F5-F9, or by switching to a far away craft and back, or by going to the KSC and back.

You can reverse this by disabling the PrunePhysics switch and forcing a craft reload again.

If the craft has not been reloaded yet, a "WAIT" warning will appear in the PAW.

The physicsless conversion is extended to all the symmetry counterparts.

Download here.

Edited by peteletroll
Link to comment
Share on other sites

18 minutes ago, peteletroll said:

Highly experimental - backup your savefiles!

This module can turn normal parts into pysicsless parts, hopefully making possible to build larger ships.

It can be compared to welding mods that group many parts into a single custom one, but this should be easier to use.

The module contains a whitelist; parts containing modules or resources not in the whitelist can not be converted to physicsless. The whitelist is contained in files named *.prunephysicswhitelist or *.ppwl, placed anywhere in the GameData folder. Any mod can add itself to the PrunePhysics whitelist by adding a whitelist file to its own distribution.

To convert a part to physicsless, activate the PrunePhysics switch in the PAW, and force a reload of the craft by F5-F9, or by switching to a far away craft and back, or by going to the KSC and back.

You can reverse this by disabling the PrunePhysics switch and forcing a craft reload again.

If the craft has not been reloaded yet, a "WAIT" warning will appear in the PAW.

The physicsless conversion is extended to all the symmetry counterparts.

Download here.

I try it. Sounds great! And oh 1st! (Squad wants to know your address)

Can't you apply it for all the mods with only one patch

Link to comment
Share on other sites

30 minutes ago, VoidCosmos said:

Can't you apply it for all the mods with only one patch

Yes. Whitelist entries are actually regular expressions, so if you put a single line like this in a *.ppwl file you can whitelist all modules:

.*

Of course this is not tested, and may awake the Kraken. Do it at your own risk, and let me know how it works!

I tested it with all the batteries, and many structural parts, and no Kraken yet.

Edited by peteletroll
Link to comment
Share on other sites

@peteletroll I don't have a 1.9.x game going yet as I use JNSQ. I did load my 1.8.1 game and the PAW option was there on my fuel station. I enabled it for the solar panels and RCS blocks. Went back to the KSC and the back to the ship. I'm still seeing WAIT in the PAW. Also tried F5-F9, and switch to a distant ship and back. Same results. I know this was built for 1.9, so do you think that's the issue?

Link to comment
Share on other sites

2 minutes ago, peteletroll said:

@leatherneck6017, stock RCS blocks are already physicsless, so the PrunePhysics switch should be hidden. 1.8 shouldn't be a problem. Can you share a log file?

I didn't know that about the RCS, thanks. Here's my log (warning, heavily modded): https://www.dropbox.com/s/bdbcrhfz3f5zti6/Player.log?dl=0

Link to comment
Share on other sites

1 minute ago, Stone Blue said:

I've always just edited cfgs for parts I want physicsless... which is a *LOT*...

Do you have a list of the parts you usually turn to physicsless? Since they're already tested, I'd like to add their modules to the PrunePhysics whitelist.

Link to comment
Share on other sites

9 minutes ago, peteletroll said:

Do you have a list of the parts you usually turn to physicsless? Since they're already tested, I'd like to add their modules to the PrunePhysics whitelist.

Hmm... not really... I just spend 99% of my time screwing around in sandbox, rather than career... and I change my installed mods moar than I change...

...my socks... :P

Its usually antennas, and small science-y type parts... vOv

But now that I know this mod exists (and I expect to add it to my installs going forward), I'll try to compile a list as I go along... vOv

 

Edited by Stone Blue
Link to comment
Share on other sites

31 minutes ago, peteletroll said:

 

this should fix your problem: now the PrunePhysics switch won't appear if the part can't be converted to physicsless, or already is.

That was fast! It solves the WAIT issue, and I assume that means the part is now physics-less. However, now there is no option to restore physics to a part.

EDIT: I checked the part (solar panel) in the save file, and it does show that PrunePhysics is true.

Edited by leatherneck6017
checked the save file
Link to comment
Share on other sites

2 minutes ago, leatherneck6017 said:

There is no PAW entry to convert it back to having physics, though.

If there's no PAW entry, PrunePhysics won't do anything.

If you're OCD like me, you can change all the "PrunePhysics = True" in your savefile to "PrunePhysics = False". This is absolutely not necessary though.

Link to comment
Share on other sites

Just now, peteletroll said:

If there's no PAW entry, PrunePhysics won't do anything.

If you're OCD like me, you can change all the "PrunePhysics = True" in your savefile to "PrunePhysics = False". This is absolutely not necessary though.

I'm referring to the solar panel that I had switched to physics-less prior to the bug fix release. Shouldn't I be able to undo that change from the PAW?

Link to comment
Share on other sites

24 minutes ago, leatherneck6017 said:

Shouldn't I be able to undo that change from the PAW?

Yes you should. The PrunePhysics status is reversible. The problem is a bug now fixed that showed the PAW entry when it shouldn't have. Now you have parts marked for PrunePhysics that shouldn't be, but the setting is ignored.

In other words, everything is fine, don't worry.

Link to comment
Share on other sites

49 minutes ago, peteletroll said:

Yes you should. The PrunePhysics status is reversible. The problem is a bug now fixed that showed the PAW entry when it shouldn't have. Now you have parts marked for PrunePhysics that shouldn't be, but the setting is ignored.

In other words, everything is fine, don't worry.

I'm not worried, I'm trying to figure out how it works. So I did a test. I created a HECS probe with a single Communotron 16 antenna on it. Per the .ppwl file, both modules for the antenna are whitelisted. While in the VAB, the PAW entry is visible but I did not activate. Video in spoiler. Log: https://www.dropbox.com/s/lrd6wtmn7b3iwiu/1.8.1 prunephys Player.log?dl=0

Spoiler

 

 

Edited by leatherneck6017
Link to comment
Share on other sites

10 hours ago, leatherneck6017 said:

Video in spoiler.

The VAB PAW entry is a bug I'm going to fix. On the launch pad: you can't activate PrunePhysics on the antenna because it's already physicsless, and you can't activate it on the probe core because it's the vessel root part, and it can't be physicsless.

Link to comment
Share on other sites

New release, with bugs fixed, please update!

@leatherneck6017, this should fix the problems you found with the UI.

@linuxgurugamer, there's a new PAW entry available in the debug dll (PrunePhysics.debugdll) that enables/disables PrunePhysics globally at runtime, for easier performance evaluation.

If you want to know exactly how much faster things go with PrunePhysics:

- delete PrunePhysics.dll and rename PrunePhysics.debugdll to PrunePhysics.dll;

- PAWs will contain a "Enable/Disable PrunePhysics Globally" button now;

- go to a big ship, and start activating PrunePhysics where you want;

- check your FPS, then disable PrunePhysics globally, F5-F9, and check your FPS again.

Please share your test results!

Edited by peteletroll
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...