Jump to content

dkavolis

Members
  • Posts

    110
  • Joined

  • Last visited

Posts posted by dkavolis

  1. Some overdue bugfixes

    Ferram Aerospace Research v0.16.0.5 "Mader"

    Fix cfg syntax errors, thanks @HebaruSan #132
    Sanitize vessel filenames, thanks @HebaruSan #131
    FAR aerodynamic are now presets MM-configurable #130
    _FARPartModule also recognizes ModuleRestockLaunchClamp, thanks @Gordon-Dry #129
    Improve KSPWheel support for the toggle gear button, thanks @simmav #128
    Fix crash due to log messages from voxelization worker threads

  2. Updated version file for KSP 1.12 max
    Fixed picking up fairing would invalidate voxelization until reopening VAB/SPH
    Fixed aerodynamic simulations
    Fixed navball displaying wrong speed after switching back and forth from IVA view #112
    Fixed voxelization error when a part is placed in the editor but not attached to a ship

     

    Haven't encountered any issues so far in my limited testing on KSP 1.12 but SAS seemed a bit wonky compared to 1.11

  3. On 4/25/2021 at 8:08 PM, mszegedy said:

    Yeah, it turns out I didn't fix it after all. The good news is that I have narrowed down the steps to reproduce:

    1. Enter the VAB.
    2. Load a vessel, or create a root part. (This step is unnecessary if the editor has already automatically loaded a vessel.)
    3. Pick up a part from the parts pane.
    4. Drop it somewhere other than on your vessel (so that it turns red and translucent).

    FAR will say in the log that the part has a mesh size of 0, and start spitting out these errors.

    @dkavolis, sorry for the ping, but I believe me and Grimmas have put together a complete bug report here. I think you have all the resources necessary now to fix the problem. Grimmas, since you have a fork of it, do you wanna just patch it yourself and submit it as a pull request? I'm an outsider here and I can't tell what your level of involvement is on the project (for all I know, you're the primary maintainer), but that's what I'd do in your position if I were a random user who actually understood the codebase.

    Should be fixed in 63a9c11

  4. Updated KSP version 1.11
    Update to MFI 1.2.10

    Added Dynamic Deflection for Control Surfaces Option #110, @Alioth81
    Fixed Mk1pod.v2 voxelization by switching to mesh voxelization, colliders were missing top and bottom planes resulting in shell-only voxelization
    Rotor blades are no longer voxelized
    Reduced submerged lift and drag, multipliers are controlled by FARConfig/Settings/submerged[Drag|Lift]Multiplier with default value of 0.25
    Renamed FARWind to FARAtmosphere and added overrides for gas properties

  5. KSPBurst

    Burst compiler for Kerbal Space Program

    KSPBurst by itself will not provide any performance benefits. Mods will need to use Unity job system and decorate the jobs with [BurstCompile] to get any improvements.

    The Burst compiler is archived to prevent KSP from trying to load its dynamic libraries. The archive is extracted the first time the mod runs to <path to KSP>/PluginData/KSPBurst@<mod version>-<archive name>. Burst standard outputs can be found in <path to KSP>/Logs/KSPBurst/ and KSP.log.

    Repository: https://github.com/KSPModdingLibs/KSPBurst/

    Installation

    Download the latest release from the GitHub releases and extract the archive into your KSP directory. plugins_only version does not contain the compiler, use it only if KSPBurst is a hard dependency and download size is an issue.

    Alternatively, KSPBurst can be installed from CKAN using KSPBurst identifier. plugins_only version is indexed as KSPBurst-Lite.

    Compiler version requires Mono, you can download it from here.

    Burst compiler version can be changed by replacing existing com.unity.burst@<version>.zip archive with a different one. The mod expects the archive to follow <package name>@<package version>.<extension> naming scheme, where <package name> contains burst. If a matching archive was not found, KSPBurst will default to using a compiler matching <path to KSP>/PluginData/*burst*/package/.Runtime/bcl.exe with the greatest package version.

    Burst packages can be found here.

    Modders

    KSPBurst can be bundled with other mods. Bundling plugins_only version will keep the file size down but users will need to download the compiler version for Burst benefits.

    Burst compatible Unity plugins and their dependencies are also bundled:

    Configuration Options

    All configuration options present in KSPBurst.cfg map directly to bcl.exe command line options. If ModuleManager is present, patched options will be used.

    Spoiler
    
    
    
    Usage: bcl.exe [options]
           bcl.exe --platform=<platform> --assembly=<PathToAssembly.dll_or_exe> --type=<TypeName>
           bcl.exe --platform=<platform> --assembly-folder=<path1;path2> --method=<FullMethodName[--MethodHash];method2>
           bcl.exe --validate-external-tool-chain --platform=<platform>
          --platform=VALUE       Target Platform <Windows|macOS|Linux|Android|iOS|
                                   PS4|XboxOne|Wasm|UWP|Lumin|Switch|Stadia|tvOS>.
                                   Default: Windows
          --backend=VALUE        The backend name. Default: `burst-llvm-11`
          --safety-checks        Enable safety checks. Default for safety checks:
                                   Disabled
          --disable-safety-checks
                                 Disable safety checks. Default for safety checks:
                                   Disabled
          --disable-opt          Disable `ir-opt` and `cpu-opt` optimizations
          --fastmath             Enable fast math optimizations
          --target=VALUE         Target CPU <Auto|X86_SSE2|X86_SSE4|X64_SSE2|X64_
                                   SSE4|AVX|AVX2|WASM32|ARMV7A_NEON32|ARMV8A_
                                   AARCH64|THUMB2_NEON32|ARMV8A_AARCH64_HALFFP>.
                                   Can be specified multiple times for enabling
                                   more than one target. Default: Auto
          --opt-level=VALUE      Optimization level. Default: 3
          --opt-for-size         Optimizes for size instead of performance. Default:
                                    False
          --float-precision=VALUE
                                 Precision CPU <Standard|High|Medium|Low> Default:
                                   Standard
          --float-mode=VALUE     Math options <Default|Strict|Deterministic|Fast>
                                   Default: Default
          --dump=VALUE           Dump flags <None|IL|Backend|IR|IROptimized|Asm|
                                   Function|Analysis|IRPassAnalysis|ILPre|All>
                                   Default: Function
          --format=VALUE         Object format <Elf|Coff|MachO|Wasm> Default: Elf
          --debugtrap            Inserts a debug trap on the first instruction of
                                   the entry point function. Default: False
          --disable-vectors      Disable SIMD Vector types special codegen (float4,
                                   float2...). Default: False
          --debug=VALUE          Enables generation of debug info <None|Full|
                                   LineOnly> - PDB, DWARF -. Default: None
          --debugMode            Enables debuggability for code generation using a
                                   native debugger. Default: False
          --generate-static-linkage-methods
                                 Enables the generation of static linkage methods.
                                   Default: False
          --generate-job-marshalling-methods
                                 Enables the generation of job marshalling methods.
                                   Default: False
          --temp-folder=VALUE    The temporary directory to use. Defaults to C:\
                                   Users\Username\AppData\Local\Temp\
          --disable-warnings=VALUE
                                 Warnings to disable (separated by ;)  e.g. BC1370;
                                   BC1322
          --compilation-defines=VALUE
                                 Compilation defines to use for building (seperated
                                   by ;)  e.g. UNITY_2020_1;NET_2_0
          --linker-options=VALUE Additional settings to be consumed by the native
                                   linkers (seperated by ;)
          --enable-direct-external-linking
                                 Link external calls directly instead of using
                                   burst.initialize. Default: False
          --use-platform-sdk-linkers
                                 Use platform compiler tool chains for building
                                   desktop platforms (requires MSVC/XCode/Gcc/Clang)
                                   , also has no cross platform support : Default:
                                   false
          --output=VALUE         Output path for the generated shared library.
                                   Default: lib_burst_generated
          --keep-intermediate-files
                                 Keep intermediate files along the shared library
                                   generated final file. Default: False
          --nolink               Don't link the final object file to a shared
                                   library but let the object file to be the output.
                                    Default: false
          --no-native-toolchain  Don't look for a native toolchain. Useful if you
                                   want to provide your own.
          --emit-llvm-objects    Forces output of object files to be LLVM bitcode
                                   rather than native objects.
          --key-folder=VALUE     Key file folder location - required for some
                                   platforms. Default:
          --decode-folder=VALUE  Decode folder location - required for some
                                   platforms. Default: C:\burst
          --threads=VALUE        Number of compiler threads working concurrently.
                                   Default is 13
          --assembly-folder=VALUE
                                 Assembly folders (separated by ; or multiple
                                   options)
          --method=VALUE         Full methodname with optional hash (separated by --
                                   )
          --type=VALUE           A type to decompile all static public methods from.
                                    A hash will be generated for each method
          --assembly=VALUE       An assembly path to look for the type
          --group                Start a new group of methods
          --verbose              Display methods being compiled. Default: false
          --root-assembly=VALUE  Root assembly for finding compile target methods
          --include-root-assembly-references=VALUE
                                 Recursively scan root assembly references for
                                   target methods. If this is false, only target
                                   methods from the root assembly will be compiled.
                                   Default is True
          --validate-external-tool-chain
                                 Don't attempt to build anything, just check that
                                   the current target and host are correctly
                                   configured for linking
          --patch-assemblies-into=VALUE
                                 Produce patched managed assemblies and put them in
                                   this folder
          --pinvoke-name=VALUE   Patch assemblies with pinvokes to this name
          --only-static-methods  Compile only static methods and not Execute
                                   methods of job producer interfaces
          --method-prefix=VALUE  Add a prefix to the names of generated methods
          --chunk-size=VALUE     Number of methods to compile per threads working
                                   concurrently. Default is 3
          --log-timings          Log timings. Default False
          --enable-guard         Enable guard asserts. Default False
          --execute-method-name=VALUE
                                 Name of Execute method. Used in DOTS Runtime,
                                   where an extra wrapper Execute method is
                                   generated.
          --print-monopinvokecallbackmissing-message
                                 Print a warning if a compiled function pointer is
                                   missing MonoPInvokeCallbackAttribute (needed for
                                   IL2CPP). Default: false
          --output-mode=VALUE    Output mode <SingleLibrary|LibraryPerJob> Default:
                                   SingleLibrary
          --always-create-output=VALUE
                                 Always create output library. If this is false and
                                   no target methods are found, no output library
                                   will be created. Default True
          --cache-directory=VALUE
                                 Cache directory. Default
          --only-list-methods    Only list the methods to compile. Outputs like '
                                   assembly.dll, method'. Default False
          --pdb-search-paths=VALUE
                                 A semicolon seperated list of paths to search for
                                   pdbs, in addition to the same folder as the
                                   assembly.
          --warmup               Run a warmup pass of the compile to amortize the
                                   cost of the JIT Compile. Default False
          --help                 Show Help

     

    Building

    Prerequisites

    1. KSP installation
    2. python
    3. Unity Editor 2019.2.2f1 (if building Unity packages)

    Configuration

    Tools read mod configuration options from config.json, users should create config.json.user and override the values there:

    Option Description
    unityBuildDir relative path to unity project build directory
    kspMin minimum compatible KSP version
    kspMax maximum compatible KSP version
    version KSPBurst version
    versionTemplate relative path to version template file
    unityPackages list of bundled unity packages
    unityDependencies list of managed plugins that unity packages depend on

    Tools

    tools contains python scripts:

    Script Description
    post_build.py copy libraries to the mod directory, archive the Burst package if it exists and copy the mod to KSP installation
    version.py update version information in source files and ReadMe
    package.py package mod into an archive at archives/, outputs 2 versions, one with and one without the Burst compiler

    Building the Mod

    1. Clone KSPBurst

    2. Create Directory.Build.props.user in the root directory with

      <Project>
        <PropertyGroup>
          <KSP_DIR>path to KSP</KSP_DIR>
        </PropertyGroup>
      </Project>

      Depending on the platform you may also need to set DATA_DIRNAME to match your installation.

    3. If not building Unity packages, go to to step 7

    4. Open Unity project at Unity/KSPBurst in Unity Editor

    5. Build the Unity project and note the build directory

    6. Create config.json.user in root directory with

      {
        "unityBuildDir": "<relative path to unity build directory in step 5>"
      }

       

    7. Build KSPBurst with your IDE or from command line, the mod will be copied your KSP installation. If the burst package is present in Unity directory, it may take a while to archive it the first time.

    License

    Unity plugins are licensed under under the Unity Companion License for Unity-dependent projects--see Unity Companion License.
    KSPBurst is licensed under the MIT license

    Notes

    System.IO.Compression and System.IO.Compression.FileSystem plugins are used for archive decompression and are bundled with Unity Editor.
    NuGet package Microsoft.Extensions.FileSystemGlobbing is used for glob pattern matching.

  6. 1 hour ago, Wronk said:

    Sorry, here's the ksp.log https://www.dropbox.com/s/3v7jdm9pxq46j63/KSP.log?dl=0

    and the output.log https://www.dropbox.com/s/220ggqvtnggvpky/output_log.txt?dl=0

    Having a scan over it myself, it seems like it might be a conflict with wild blue tools, but I don't really have the time to test myself with a full clean install and isolating those two mods, so it's not urgent just making you aware of it

    With just WBI and MOLE I can't reproduce the issue. Can you try running with the following MM patch?

    @FARConfig:FINAL
    {
        @Debug
        {
            %logLevel = debug
        }
    }

    It will give more info on what FAR is working on when KSP crashes. Also, a comparison between logs with old and new FAR may give additional clues to what is going wrong.

  7. Update to MM 4.1.4
    Update to KSP 1.10

    Added more config options (see FARConfig.cfg):

    • Additional log messages can be enabled
    • Log FAR flight variables to text file
    • Debug voxels are now colored by part (customizable)
    • Removed FARGUIColors.cfg and integrated it into FARConfig.cfg

    Added new DLL FerramAerospaceResearch.Base.dll which is independent of KSP
    Unchanged configs should no longer be saved to new files
    Update Chinese localization (thanks @tinygrox, #88)
    Workaround for KSPUpgradePipeline with removed stock control surface modules
    Fix KSP resetting shielded state on decouple
    Heating should now be closer (and higher) to stock values, KSP applies magic scaling to areas which made FAR calculated exposed areas significantly smaller than stock (can be reverted with MM patch)
    Meshes used for voxelization are now displayed in log with debug FAR log level
    Fix inconsistent voxelization when changing from VAB/SPH to Flight scene and reverting (#89)
    Fix voxelization starting before part is set up in editor
    Ignore launch clamps in editor simulations
    Fix NRE with MechJeb on destruction (#93)
    Resized stock button image to 36x36 px
    Simulation buttons are now disabled while voxelization is active
    Invisible meshes are ignored for voxelization by default

  8. 3 hours ago, Krzeszny said:

    Hi. I've had this problem for a long time but only now did it start bothering me because this rocket flips in upper atmosphere.

    When I pick up and replace wings (any type, on any rocket), some stability derivatives go from green to red or from red to green. It's like the mod calculated them using different formulae each time, or something.

    SxZYhE5.jpg1yaVVBN.jpeg

    I found the solution. Clicking the calculation button too quickly after placing parts calculates the values for the rocket without those parts. Clicking it again recalculates them. Can you perhaps add a delay to the button, @dkavolis?

    Also, there's another bug which isn't caused by the delay. The last pitch control derivative (the red one) changes to green or to red semi-randomly when I replace the wings. I have no idea how it's calculated and if it's important.

    Also here's a tip: set the mach number for upper stages when building rockets. Even if something is stable at low speeds, it can become unstable at high speeds, like upper stages sometimes do.

    Check out dev branch, stability derivatives and a few other buttons are now disabled while voxelization is active.

  9. Re launching vessels from SPH/VAB compared to revert to launch, can you try FAR from dev branch? FAR was voxelizing parts too eagerly, before KSP was done with disabling unused models like engine fairings on scene changes so it was working fine on return to launch. FAR now waits for physics to kick in before voxelizing so it should no longer voxelize what you can't see.

    20 hours ago, Krzeszny said:

    Sorry, FARc only counts connected clamps as part of the vessel. Which is still a bug. As you said, clamps aren't for flying so FARc should ignore them. I know I can detach them when tweaking stability, but I don't see why FAR shouldn't do that by default.

    Launch clamps will be mostly ignored in editor in the next release, there's still a barely noticeable effect on stability derivative values left that I'm not sure where it comes from. For now, you can use the dev branch version.

    For all the other issues, please provide KSP.log, ModuleManager.ConfigCache, the affected craft file and mod list in addition to description of the problem. Ideally, open an issue on github with all of the above.

  10. 2 hours ago, Incarnation of Chaos said:
      Reveal hidden contents

     

    Wow....you're actually going to tackle the voxel system aren't you? Already the speedup you're describing is pretty incredible, and on a sidenote iv'e noticed these gaps since i started using FAR for my games a while back. I never thought much of them honestly, but they do seem to enjoy areas around weird geometry.

    Though the reason I'm posting is just really me wanting to ask a question; why not use matrices to hold the Triangle arrays and perform the needed mathematical operations between multiple matrices of arrays at once? Would the overhead just make it slower than just using the arrays even though you could do more work at once? Or are the calculations dependent on prior ones? Or should i just pull the source and answer my own questions like you have xD

    I'm not a experienced programmer, so i could be missing something really silly.

    Triangles can be anywhere in space so every triangle would need to be checked, this quickly becomes too expensive. And FAR needs to know the filled/shielded volume which plain triangles can't give.

  11. On 2/18/2020 at 12:17 AM, Jagzeplin said:

    so with the pre-release has anyone else had issues with many of the prebuilt planes/ships not loading? for example the Mallard, the Dove, many others... they show up in the list but i cant get them to load up in the SPH/VAB

    On 2/29/2020 at 1:40 PM, Hsinyu said:

    I have the same problem. I cannot load many of those prebuilt ships. The load button is not gray, but the load button just does not work.

    6 hours ago, Poodmund said:

    @dkavolis, this issue seems to be persisting with FAR v0.15.11.4 and KSP 1.9.1.2788. The easiest way to reproduce the issue is to work with a clean vanilla build of KSP, install FAR v0.15.11.4, Module Manager 4.1.3 and MFI 1.2.7.0. Start a new Sandbox game and go to the Editor (VAB). Load the Kerbal X stock craft, then subsequently, try to load the Dynawing stock craft. Exceptions will be thrown when trying to click the 'Load' button when try to load the Dynawing.

    It seems that there is an issue in the upgrade pipeline where FAR is trying to update saved craft files to 1.9.1 'standards'. I think it affects craft that have controllable lifting surface parts as the same thing happens with a lot of the stock aircraft when trying to load them in the SPH.

    Log attached: https://www.dropbox.com/s/zo47m3ew88gsf68/KSP.log?dl=0

    In the attached log, I followed the process I outlined above and then tried to load other vessels that triggered the same issue.

    Would you like me to raise an issue on the Git tracker?

    I've added a workaround for now in dev branch (0033445)

  12. 1 hour ago, Poodmund said:

    @dkavolis, this issue seems to be persisting with FAR v0.15.11.4 and KSP 1.9.1.2788. The easiest way to reproduce the issue is to work with a clean vanilla build of KSP, install FAR v0.15.11.4, Module Manager 4.1.3 and MFI 1.2.7.0. Start a new Sandbox game and go to the Editor (VAB). Load the Kerbal X stock craft, then subsequently, try to load the Dynawing stock craft. Exceptions will be thrown when trying to click the 'Load' button when try to load the Dynawing.

    It seems that there is an issue in the upgrade pipeline where FAR is trying to update saved craft files to 1.9.1 'standards'. I think it affects craft that have controllable lifting surface parts as the same thing happens with a lot of the stock aircraft when trying to load them in the SPH.

    Log attached: https://www.dropbox.com/s/zo47m3ew88gsf68/KSP.log?dl=0

    In the attached log, I followed the process I outlined above and then tried to load other vessels that triggered the same issue.

    Would you like me to raise an issue on the Git tracker?

    It's KSP updating their crafts as the traceback suggests. FAR replaces all ModuleControlSurface with its own PartModule, that's why you get NREs. It's a bug with KSP and not FAR, they should have really added a null check in their code since they allow modifications of part modules.

    There are 2 workarounds I can think of:

    • Load the craft in pre-1.8 KSP version with FAR and save it
    • Replace all ModuleControlSurface with
    MODULE
    {
    	name = FARControllableSurface
    	isEnabled = True
    	pitchaxis = 100
    	yawaxis = 0
    	rollaxis = 100
    	pitchaxisDueToAoA = 0
    	brakeRudder = 0
    	maxdeflect = 6
    	isFlap = False
    	isSpoiler = False
    	flapDeflectionLevel = 0
    	maxdeflectFlap = 15
    	massMultiplier = 0.5
    	stagingEnabled = True
    	pitchaxis_UIFlight
    	{
    		controlEnabled = True
    		minValue = -100
    		maxValue = 100
    		stepIncrement = 5
    	}
    	yawaxis_UIFlight
    	{
    		controlEnabled = True
    		minValue = -100
    		maxValue = 100
    		stepIncrement = 5
    	}
    	rollaxis_UIFlight
    	{
    		controlEnabled = True
    		minValue = -100
    		maxValue = 100
    		stepIncrement = 5
    	}
    	pitchaxisDueToAoA_UIFlight
    	{
    		controlEnabled = True
    		minValue = -200
    		maxValue = 200
    		stepIncrement = 5
    	}
    	brakeRudder_UIFlight
    	{
    		controlEnabled = True
    		minValue = -100
    		maxValue = 100
    		stepIncrement = 5
    	}
    	maxdeflect_UIFlight
    	{
    		controlEnabled = True
    		minValue = -40
    		maxValue = 40
    		stepIncrement = 0.5
    	}
    	isFlap_UIFlight
    	{
    		controlEnabled = True
    	}
    	isSpoiler_UIFlight
    	{
    		controlEnabled = True
    	}
    	maxdeflectFlap_UIFlight
    	{
    		controlEnabled = True
    		minValue = -85
    		maxValue = 85
    		stepIncrement = 0.5
    	}
    	massMultiplier_UIEditor
    	{
    		controlEnabled = True
    		minValue = 0.05
    		maxValue = 2
    		stepIncrement = 0.05
    	}
    	EVENTS
    	{
    		DeflectMore
    		{
    			active = False
    			guiActive = True
    			guiActiveUncommand = False
    			guiIcon = Deflect more
    			guiName = Deflect more
    			category = Deflect more
    			guiActiveUnfocused = False
    			unfocusedRange = 2
    			externalToEVAOnly = True
    		}
    		DeflectLess
    		{
    			active = False
    			guiActive = True
    			guiActiveUncommand = False
    			guiIcon = Deflect less
    			guiName = Deflect less
    			category = Deflect less
    			guiActiveUnfocused = False
    			unfocusedRange = 2
    			externalToEVAOnly = True
    		}
    		ToggleStaging
    		{
    			active = True
    			guiActive = False
    			guiActiveUncommand = False
    			guiIcon = Disable Staging
    			guiName = Disable Staging
    			category = Disable Staging
    			guiActiveUnfocused = False
    			unfocusedRange = 2
    			externalToEVAOnly = True
    		}
    	}
    	ACTIONS
    	{
    		ActivateSpoiler
    		{
    			actionGroup = Brakes
    		}
    		IncreaseDeflect
    		{
    			actionGroup = None
    		}
    		DecreaseDeflect
    		{
    			actionGroup = None
    		}
    	}
    }

    There doesn't seem to be a way to modify the SaveUpgradePipeline used in KSPUpgradePipeline, at least no public API.

  13. 11 hours ago, kretze said:

    I have an update on this topic

    My first post related to KSP 1.7.3 and FAR 0.15.11.2 (since RP-1 only runs with KSP 1.7.3)

    I tested it again today with KSP 1.8.1 and FAR 0.15.11.4 after seeing on github that there was a revised configuration management
    installed in 0.15.11.3.

    In a new KSP 1.8.1 installation + far 0.15.11.4, I cannot reproduce this configuration change. is it related to all the realism and some other mods with RP-1?

    I will do more tests.

    ----

    Info for identifying the problem

    the changes i found in CustomAreoData.cfg (0.15.11.2)

        BodyAtmosphericData
        {
            index = 1
            viscosityAtReferenceTemp = 1.7893999999999998E-05
            referenceTemp = 288
        }
     

        BodyAtmosphericData
        {
            index = 1
            viscosityAtReferenceTemp = 2.0000000000000002E-05
            referenceTemp = 288
        }
     

    i found 2 mods that change this value

    - FAR & RSS

     

    New config system should coming in the next release but in any case configs without changes should not be output. I can compare the config node string with the last saved/loaded string to determine if any values have changed in game. That should prevent MM from creating patches a second time.

  14. 17 hours ago, kretze said:

    FAR undermines ModuleManager Cache

    With constant changes to the CustomFARAeroData.cfg file, the ModuleManager cache can no longer be used.
    This is not particularly noticeable in small installations.

    I currently use RP-1 + Kerbalism and various part mods. The ModuleManager must import over 86600 patches when KSP is starting.
    Because the CustomFARAeroData.cfg is always changed and thus has a new SHA256 hash, the MM cache is no longer used.
    Each start of the game currently takes 10-12 minutes because of patching. It is very annoying.

     

    KSP LOG:

    [LOG 21:42:24.994] Checking Cache
    [LOG 21:42:26.559] SHA generated in 1.562s
    [LOG 21:42:26.559]       SHA = E0-E4-3C-AD-9D-D3-84-CB-B9-37-BF-24-2A-27-25-E9-E9-39-01-2C-B4-25-3A-BF-EE-28-5E-82-07-F6-8E-A6
    [LOG 21:42:27.312] Changes :
    Changed : FerramAerospaceResearch/CustomFARAeroData.cfg.cfg

    [LOG 21:42:27.312] Cache SHA = E4-69-DE-4A-51-48-6E-A8-5D-BD-C1-99-00-3A-31-DF-96-5D-4E-9D-00-C8-16-12-62-E6-0C-1B-09-AA-DB-4D
    [LOG 21:42:27.312] useCache = False
    [LOG 21:42:27.313] Pre patch init

     

     

    Thanks, I'll add a fix some time soon. In the mean time you can run KSP from a batch/bash script which deletes CustomFARAeroData.cfg before starting KSP. Use del (batch) or rm (bash) commands to remove the file.

     

  15. So, I've been playing around with jobs system for voxelization and figured out how FAR voxelization works since it has no comments and questionable variable names.

    For every triangle in the mesh:

    1. Choose shell voxelization plane based on largest normal component
    2. Transform triangle into voxel index space
    3. Calculate triangle plane equation in index space
    4. For every index pair bounded by the triangle in voxelization plane
      1. Solve for the last index from the plane equation
      2. Fill the voxel if
        • The 3d index is inside triangle (barycentric coordinates)
        • The 3d index is within tolerance to any triangle vertex (currently 0.5)
        • The 3d index is within tolerance to any triangle side (currently 0.5)

    This voxelization algorithm is far cheaper (roughly  O(n2)) than most others that rely on triangle/AABB intersection tests, which are relatively expensive, with complexity of about O(n3). I have also found  https://github.com/ramakarl/voxelizer which has another O(n2) voxelization algorithm though I could not get it to properly voxelize a sphere as of now.

    However the current implementation can leave gaps in the shell (sphere in 50x50x50 voxel volume).

    baTkDCC.png

    Also, C# even only using value types is slow for maths heavy applications. This shell voxelization took about 60ms without Burst on my machine in Unity editor and only 2ms with Burst (single thread).

    Edit: tried the same voxelization using C# arrays instead Unity NativeArray and it took about 60ms as well, maybe a few ms faster on average but not as easy to offload to another thread/synchronize/parallelize as a job.

  16. 1 minute ago, Xd the great said:

    Thanks. What are the recommended values? And what are the default settings comparable to?

    My guess is that YmaxStress is the yield stress and XZmaxStress  is the tensile strength, though the comments are wrong and should say MPa instead (same as in C# source). So all the values fall in aluminium alloy/carbon steel ranges which are really wide.

  17. 1 hour ago, Xd the great said:

    How do I modify the settings so my planes have the same strength compared to high grade alloys/composites?

    You will probably want to change the values in https://github.com/dkavolis/Ferram-Aerospace-Research/blob/master/GameData/FerramAerospaceResearch/FARAeroStress.cfg with an MM patch or edit them from the settings GUI in the space centre scene.

  18. Update to MM 4.1.3
    Update to KSP 1.9

    Removed CompatibilityChecker
    Debug voxel mesh is now built as a single mesh, with possible submeshes. Choose between 16 (default) and 32 bit vertex indices from the Space Centre settings menu. (#86)

     

    The debug voxel mesh should now be faster to build and render, use less memory and much easier to customize in the future.

×
×
  • Create New...