#LFO - Lux's Flames and Ornaments

1 messages · Page 3 of 1

brittle tendon
#

the LFO issue is almost 100% in the shaders

#

so a rewrite of the C# codebase wouldn't change anything

grim bridge
#

It'd just allow us to actually not want to die while using it

brittle tendon
#

but it does bring me to the idea of testing LFO 0.2.1 with the 0.9 bundle and vice versa

split geyser
#

Well, that's something fairly significant - the not wanting to die part, I mean

grim bridge
#

This codebased is so coupled

brittle tendon
#

that might not be a bad idea

#

lemme do that rq

#

hm ok

#

that tell me absolutely nothing

#

because neither 0.9 with a 0.2.1 bundle or 0.2.1 with 0.9 bundle works at all

#

the 0.2.1 dll needs "lfoadditive 2.0.prefab" and 0.9 needs "lfoadditive 2.0.mat"

#

and neither of the opposite bundles has the file for the other version

grim bridge
#

RIP

brittle tendon
#

I could try using Asset Ripper to decompile the shader from 0.2.1, I know that it has like partial support for it

#

it might at least give us a bit of an idea

split geyser
#

And what, put it into a new combo bundle?

#

Then test that with 0.2.1?

brittle tendon
#

well, no, test it with our current LFO version

#

but it probably won't be fully usable

split geyser
#

How would that help?

brittle tendon
#

because the 0.2.1 shader works and the 0.9 doesn't?

#

I meant more so just to compare the decompiled shaders from 0.2.1 and 0.9

grim bridge
#

We know one issue, the shape is caused by the 0.2.1 -> 0.9 switch

brittle tendon
#

since they would be in the same format

split geyser
#

Is that the particular shader that works in SORRY?

brittle tendon
#

yes,

grim bridge
#

"works"

brittle tendon
#

and not just sorry

#

the 0.2.1 additive shader is when all the mesh-based plumes last worked

#

which are basically all except a few of yours

#

Questaria, Kesa, SORRY, they all use the mesh ones

split geyser
#

wdym? I don't recall the shape of my mesh plumes going wonky

#

The color, yes.

brittle tendon
#

#1092613573290754108 message

split geyser
#

As I said, test with SORRY

brittle tendon
brittle tendon
split geyser
#

True, they're very simple

brittle tendon
#

the image I linked is a SORRY engine

split geyser
#

Test new LFO with even newer combo bundle and a modified SORRY to use the old 0.2.1 shader?

brittle tendon
#

but we don't have the 0.2.1 shader

#

and the decompilation is almost guaranteed to not give us the full source

split geyser
#

That you would rip from the dead clutches of the old 0.2.1 bundle?

brittle tendon
#

it's nearly impossible to decompile shaders

#

at most you get little bits and pieces

split geyser
#

<- is just that stupid

brittle tendon
#

that's why I wanted to decompile, basically

#

to compare the "little bits and pieces" of both 0.2.1 and 0.9 when decompiled

#

to see if it could give us some hints

#

of what to look at

split geyser
#

The next time we get a Lux sighting we can ask if he could share the 0.2.1 shader source...

grim bridge
#

if he has it

split geyser
#

^^^

brittle tendon
#

but since he never committed that version to git, it's most likely he doesn't have it

#

since he just has his project and keeps updating it

#

without versioning it

#

so it might be lost forever

#

most likely

#

I could be wrong and he could have kept a backup

#

but I wouldn't count on it

split geyser
#

Well... It sux that bundles can't be fully decompiled.

brittle tendon
#

but it's still weird... did he not test LFO 0.9 with SORRY at all?

#

since the issue was already there when he released it

split geyser
#

Maybe he tested it with SPARK and just assumed it would be OK for SORRY?

brittle tendon
#

that's possible

split geyser
#

I know he tested it with SPARK

brittle tendon
#

but then it would be almost safe to assume he didn't make any major changes to the additive shader...

#

if he didn't feel like testing it with any of the mods that use it

grim bridge
#

I am downloading asset ripper as we speak

brittle tendon
#

ahhh this is such a tangled mess

#

the post-patch 5 period just keeps giving

#

and I'm not sure I want to keep receiving

#

lol

split geyser
#

WTB one shader mechanic. Low pay. High Stress. Madness almost certain. Unlimited glory if you're successful.

grim bridge
#

i swear to the gods if I decompile these shaders and they are the exact same

brittle tendon
#

but at least we can hope that we all learn something from all this, and maybe set some better practices in place...

grim bridge
#

Well, no ksp2 modding increased my insanity

grim bridge
#
Shader "LFOAdditive 2.0" {
    Properties {
        _Opacity ("Opacity", Range(0, 1)) = 1
        _FalloffStart ("FalloffStart", Range(0, 10)) = 5
        _FalloffStartPosition ("FalloffStartPosition", Range(-1, 1)) = 0
        _StartFadeIn ("StartFadeIn", Range(0, 10)) = 1
        _LenghtwisePosition ("LenghtwisePosition", Range(-1, 5)) = 0
        _LenghtwiseBrightness ("LenghtwiseBrightness", Float) = 1
        _SpeedRandomMultiplier ("SpeedRandomMultiplier", Float) = 0.1
        [NoScaleOffset] _NoiseTex ("NoiseTex", 2D) = "white" {}
        _NoiseContrast ("NoiseContrast", Range(1, 5)) = 1
        _Tilling ("Tilling", Vector) = (1,1,0,0)
        _Speed ("Speed", Vector) = (0,1,0,0)
        _Noise ("Noise", Range(0, 1)) = 0.5
        _Falloff ("Falloff", Range(0.5, 5)) = 4
        _Brightness ("Brightness", Range(0, 10)) = 1
        [HDR] _StartTint ("StartTint", Vector) = (1,1,1,1)
        [HDR] _EndTint ("EndTint", Vector) = (1,0,0,1)
        _TintFalloff ("TintFalloff", Range(0, 2)) = 1
        _Fresnel ("Fresnel", Range(0, 10)) = 1
        _FresnelInverted ("FresnelInverted", Range(0, 10)) = 0
        _NoiseFresnel ("NoiseFresnel", Range(0, 1)) = 0
        _ScaleRandomizer ("ScaleRandomizer", Range(0, 0.5)) = 0.05
        _LinearExpansion ("LinearExpansion", Range(-1, 1)) = 0
        _QuadraticExpansion ("QuadraticExpansion", Range(-1, 1)) = 0
        _Seed ("Seed", Range(-10, 10)) = 0
        [Toggle(_ENVIRONMENTREFLECTIONS_OFF)] _ENVIRONMENTREFLECTIONS_OFF ("_ENVIRONMENTREFLECTIONS_OFF", Float) = 1
        [Toggle(_SPECULARHIGHLIGHTS_OFF)] _SPECULARHIGHLIGHTS_OFF ("_SPECULARHIGHLIGHTS_OFF", Float) = 1
        [HideInInspector] _BUILTIN_QueueOffset ("Float", Float) = 0
        [HideInInspector] _BUILTIN_QueueControl ("Float", Float) = -1
    }
    //DummyShaderTextExporter
    SubShader{
        Tags { "RenderType" = "Opaque" }
        LOD 200
        CGPROGRAM
#pragma surface surf Standard
#pragma target 3.0

        struct Input
        {
            float2 uv_MainTex;
        };

        void surf(Input IN, inout SurfaceOutputStandard o)
        {
            o.Albedo = 1;
        }
        ENDCG
    }
    Fallback "Hidden/Shader Graph/FallbackError"
}
#

that is all assetripper will export

brittle tendon
#

yeah, I kinda thought so...

#

but even just the parameters could be helpful I guess?

grim bridge
#
Shader "LFO/Additive" {
    Properties {
        [Header(General)] _Opacity ("Opacity", Range(0, 1)) = 1
        _Brightness ("Brightness", Range(0, 10)) = 1
        _LenghtwiseBrightness ("LenghtwiseBrightness", Float) = 1
        [Space()] [Header(Color)] [HDR] _StartTint ("Start", Vector) = (1,1,1,1)
        [HDR] _EndTint ("End", Vector) = (1,0,0,1)
        _TintFalloff ("Falloff", Range(0, 2)) = 2
        [Space()] [Header(Noise)] _Noise ("Noise", Range(0, 1)) = 1
        [NoScaleOffset] _NoiseTex ("Texture", 2D) = "white" {}
        _NoiseContrast ("Contrast", Range(1, 5)) = 1
        _NoiseFresnel ("NoiseFresnel", Range(0, 1)) = 0
        _Tilling ("Tilling", Vector) = (1,1,0,0)
        _Speed ("Speed", Vector) = (0.5,1,0,0)
        [Space()] [Header(Mask)] _Fresnel ("Fresnel", Range(0, 10)) = 2
        _FresnelInverted ("FresnelInverted", Range(0, 10)) = 0
        [Space()] _Falloff ("Falloff", Range(0.5, 5)) = 1
        [Space()] _FalloffStart ("FalloffStart", Range(0, 10)) = 0
        _StartFadeIn ("StartFadeIn", Range(0, 10)) = 1
        _FalloffStartPosition ("FalloffStartPosition", Range(-1, 1)) = 0
        [Space()] _LenghtwisePosition ("LenghtwisePosition", Range(-1, 5)) = 0
        [Header(Shape)] _LinearExpansion ("LinearExpansion", Range(-1, 1)) = 0
        _QuadraticExpansion ("QuadraticExpansion", Range(-1, 1)) = 0
        [Header(Others)] _Seed ("Seed", Range(-10, 10)) = 0
    }
    //DummyShaderTextExporter
    SubShader{
        Tags { "RenderType" = "Opaque" }
        LOD 200
        CGPROGRAM
#pragma surface surf Standard
#pragma target 3.0

        struct Input
        {
            float2 uv_MainTex;
        };

        void surf(Input IN, inout SurfaceOutputStandard o)
        {
            o.Albedo = 1;
        }
        ENDCG
    }
}

And from 0.9.0

brittle tendon
#

so definitely different

grim bridge
#

No fallback shader

#

sapcing added

#

removed _builtin_queueoffset

#

removed _builtin_queuecontrol

#

Holy shit a lot changed there

brittle tendon
#

wait are you sure they're the same shader?

#

they should both have 2.0 in the name

grim bridge
#

The bundle from 0.2.1 only has Additive 2.0

#

And this is from 0.9.0

#

It doesn't have a "Additive 2.0"

brittle tendon
#

hm ok

grim bridge
#

LenghtwisePosition

#

Goddamnit lux

brittle tendon
#

is that the bug????

grim bridge
#

No

brittle tendon
#

no

grim bridge
#

Or is it?

brittle tendon
#

it's in both

#

so the plumes would be broken in both

#

so the shader is renamed but the file still has the 2.0 in the name

#

that explains that part

grim bridge
#

no it doesn't

brittle tendon
#

huh?

grim bridge
#

thats a material called lfoadditive 2.0

#

but its shader guid makes no sense

#

Ahh nevermind

brittle tendon
#

the .mat is just the container

#

I did show the shader

#

ahhh this is all a mess and a half

grim bridge
#

Ahh

#

AssetRipper doesn't handle shader guids

#

So the LFOAdditive 2.0.mat references the new shader

#

So the shaders are completely different

#

and SORRY just doesn't reference the new shader?

brittle tendon
#

wait what?

grim bridge
#

Nah

#

I'm being braindead

brittle tendon
#

in BE-4

#

in Reiptor

#

what??

#

they each only use the one shader, exclusively

grim bridge
#

Hmm

#

Test the plumes of the BE-4

brittle tendon
#

yeah I'm on it

#

in fact, por qué no los dos

#

excuse me wtf

#

it never printed that stack trace before

#

even though the error's been there ever since we added the console

#

this is the first time I'm seeing it, and I had the game running earlier today

grim bridge
brittle tendon
#

actually it's from the files inside the Unity project

#

for LFO

grim bridge
#

Ahhh

#

Wait, drop that plume into sorry

brittle tendon
#

yeah, will do

grim bridge
#

as the one in sorry is "LFOAdditive 2.0"

brittle tendon
#

I see

#

still seems broken to me

#

but in a different way?

grim bridge
#

Is that with the one from LFO dropped in?

brittle tendon
#

yes

#

now go back?

grim bridge
#

Yep

brittle tendon
#

is there no way to pan around the camera in this game?

#

like you could with the middle mouse button in KSP1

#

I feel like I've seen Lux do it in his videos

#

no change afaik

grim bridge
#

Of course it wouldn't be that easy

brittle tendon
#

yeah...

grim bridge
#

If only we knew how to make a new plume to tst

brittle tendon
#

it's also a bit difficult to tell if the BE-4 plume is supposed to look like that or no

#

since the colors are wrong

#

and there could be alpha coming into play and all that

grim bridge
#

Gods if we could only actually load these in the editor to testt

brittle tendon
#

I'll try to recreate one of them I guess

#

since we know how they're made from the JSON

#

I had a stroke there

#

lol

#

trying to write two sentences at once

#

probably the Reiptor one because the difference seems much more pronounced there

#

oh fuck me

#

that thing has 2000 lines

#

well maybe not

#

ok maybe one from Kesa

#

good god how fucking long did these plumes take them to make

#

for the classic surface level engines they're all around 65 kB

#

duh

#

probably like this

#

except those are all broken in my LFO version...

#

there should be the 0.2.1 (which is actually 0.9) unitypackage floating around somewhere here

#

I guess I could try with that one, and with LFO 0.9

#

but I can't find that

#

we really don't have much going for us do we

grim bridge
#

Do we need the mesh based plumes :p

brittle tendon
#

I mean I can try if the volumetric ones actually work

#

at least the non-profiled ones

#

because we know these seem to be ok

#

other than the colors

grim bridge
#

I'm too tired for thisss

brittle tendon
#

idk something is telling me that this isn't right

grim bridge
#

Hmmm

#

Seems right to me

brittle tendon
#

the Volumetric (Additive) looks better

#

oh this is annoying, since I'm building the LFO bundle from inside the package in my LFO project, now when LFO is imported into a parts project, the lfo bundle builds in it as well

#

is there a way to keep the assets assigned to a bundle in VCS for LFO.Editor and not have it be built in projects that install it?

#

ok that did nothing

#
[Info   : Unity Log] [Camera] Setting camera to ID Flight
[Info   : Unity Log] [LFO] Setting _Brightness to 3,01 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _InnerBrightness to 1,81 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _InnerBrightnessFalloff to 1,23 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _LengthwiseBrightness to 1,88 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _ColorMedium to {
  "r": 1.0,
  "g": 0.0,
  "b": 0.8495259,
  "a": 1.0
} on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _ColorMediumPosition to 0,657 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _ColorLow to {
  "r": 0.435441971,
  "g": 0.0,
  "b": 1.0,
  "a": 1.0
} on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _ColorLowPosition to 0,218 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _ColorOffset to 0,42 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _StartPosition to 0 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _EndPosition to 0,195 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _RadialFalloff to 0,59 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _RadialFalloffPosition to 0,732 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _LinearExpansion to -0,45 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _QuadraticExpansion to 0,31 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _YAnchorOffset to 0,08 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _Noise to 0,73 on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Setting _NoiseTex to 3D Noise on LFO/Volumetric (Additive)
[Info   : Unity Log] [LFO] Method invoked but returned false.
[Info   : Unity Log] [LFO] Method invoked successfully, asset: 3D Noise
[Info   : Unity Log] [LFO] Assigning texture 3D Noise to property _NoiseTex of LFO/Volumetric (Additive)
[Info   : Unity Log] [Flight] Switching To Vessel Fly Safe-1 ----------------------
#

this all looks fine, and I see no errors anywhere else in the log...

#
[Info   :Lux's Flames and Ornaments] Loading LFO Shaders. LFO/Additive, LFO/Volumetric (Additive), LFO/Volumetric (Profiled), LFOAdditive 2.0
[Warning:Lux's Flames and Ornaments] Shader name 'lfo/additive' is different from key 'lfoadditive 2.0'!
[Info   :Lux's Flames and Ornaments] LFO Shaders loaded. LFO/Additive, LFO/Volumetric (Additive), LFO/Volumetric (Profiled), LFOAdditive 2.0
#

hm

#

but that shouldn't affect this

#

at all

#

since I'm using only the "LFO/Volumetric (Additive)" one

#

let me try just putting the plume on the prefab

#

nope

#

well, I give up

#

absolutely no clue what to do

#

just been trying random bullshit for the past hour which made no sense

#

like at this point unless Lux comes along and magically makes everything work, I feel like there's no chance we can fix this

#

I guess at least we can try to fix the color bug on SpaceWarp's side...

#

but that's about it

brittle tendon
#

It's 7:18am and I'm thinking about the architecture of LFO

#

I think I need help

#

Lmao

split geyser
#

I'm a bit confused, I thought we were getting plumes, but they just were not the right shape and the issue was with the Volumetric (Additive) shader?

#

With no plume at all this makes me wonder if it's related to the apparent SW inssue where we're not getting the specified color and instead getting the default red.

#

Can we test the new LFO with the old SW on KSP2 0.1.3.2 or 0.1.4.1? Or is that what you've shown above?

brittle tendon
#

The "no plume at all" thing happened to me with the LFO/Volumetric shader

#

No sorry

#

The LFO/Volumetric (Additive), yeah, like you said

brittle tendon
#

That was the mesh-based LFO/Additive

split geyser
#

Those are used by SORRY?

brittle tendon
#

Which is used by pretty much all chemical engines

#

Yep

split geyser
#

And I think you said that the SORRY plumes had massive configs for those, right? Unlike the simple configs mine use.

brittle tendon
#

Yeah, SORRY, Questaria and Kesa all have ~2000 lines long configs for their sea level chemical engines

#

Very similar lengths, so I'm assuming they all use the same preset, the one for Sea level plumes

#

But the presets are broken

#

In the current version of LFO at least

split geyser
#

Man, that's nuts. I'd like to take a look at one of those JSONs to see if I can figure out what the differences are about.

brittle tendon
#

So I can't use them to make my own plume to test

brittle tendon
split geyser
#

Why can't we start with a simple SPARK mesh plume? I thought we were at a point where the editor worked?

brittle tendon
#

To get those mach diamonds and so on

split geyser
#

Did we move away from that?

brittle tendon
#

I was able to get a simple mesh plume working with no issues

split geyser
#

Can we model them in Unity Editor?

brittle tendon
#

However, it's very difficult to test whether the shader is broken in the editor as well as in the game

#

Because we don't have no reference to compare to

#

When it's a new plume

#

That's why we wanted to be able to remake an existing plume

#

And compare it to the same plume with a working shape in LFO 0.2.1

split geyser
#

So, one part of the problem then is that I designed my plume in a pre-release of 0.9.0.

#

And using my config will just give my shape

brittle tendon
#

Since Lux apparently completely rewrite the mesh shader between 0.2.1 and 0.9

#

So yeah, we would need a plume that worked in 0.2.1

#

And to recreate it now

#

To see if it looks wrong in the editor

split geyser
#

Or... We leave that be and let Isa and Jim redo their 2000-line monsters to get back to something that works for them.

#

Not great

#

But really, why not pull in Isa and Jim to help with this?

brittle tendon
#

Because now we know whether the wrong shape is caused simply by Lux's rewrite of the shader, in which case it wouldn't work in the editor, either, or it's something else to do with the C# side

split geyser
#

They at least have an idea of how they conmfigured a 2000-line monster

brittle tendon
#

And those don't work in our version

split geyser
#

Ahhh. so they may have copied something from SORRY and not made from scratch. But still, they might have tweaked theirs.

brittle tendon
#

Yeah, definitely, but I think it's unlikely they would be able to make the plumes from scratch

#

Or at least it would be very difficult and time consuming

#

One thing I can do is grab the original preset files from the zip from Lux and see if I can edit them so that they load in the new editor

split geyser
#

There is also the fact that Lux was trying to move away from the mesh-based plume to volumetric.

#

So we're trying to save the old bad way of doing it

brittle tendon
#

Yeah, which might be part of the reason why he possibly didn't even test his old additive mesh plumes with 0.9

split geyser
#

I think you may have nailed it

brittle tendon
#

But all the current engine mods use it, except some of your profiled ones

#

So it would be really nice if we could make it work

#

(plus, when I tried to create a volumetric additive plume, it didn't even work, as you've seen)

#

So there isn't much else to go on

#

Than the old mesh plumes

#

Since those at least show up in the game

#

But again, it's possible I just did something wrong

#

This is really hard with 0 documentation and never having seen Lux making the plumes

split geyser
#

We can look at the Volumetric (profiled) to see why those do work and compare those to volumetric (additive)?

brittle tendon
#

And nobody else has used the volumetric shaders either

#

Except for the profiled one

#

So we don't even know if they're working

#

Well, Lux has, since he has videos of his tests in the game

#

But it also seems like it may be significantly more difficult to get to a good result with the volumetric plumes, compared to the mesh based ones

#

You can do much more with them and they can look much better

#

But with much more work involved

#

For a very simple mesh plume for the CPP engine, I had a file that was literally like 50 lines

split geyser
#

I had the impression (could be wrong!) that Lux thought the volumetric approach was going to not only be better visually, but also ultimately easier to configure. My volumetric profiled plumes are pretty easy

brittle tendon
#

And it looked good enough

#

Of course this is all just my personal and subjective impressions

#

Since I really don't know how the volumetric shaders are supposed to be used

#

🙃

#

At least for the mesh based ones I have some reference in the existing configs

split geyser
#

The part where we can't get volumetric (additive) to even show up in the game is a real issue. If we could get it to show up, then maybe we could play with it, but I suspect the shader is fundamentally a WIP, so this might only take us so far.

#

This leaves the SW 1.5.0 color issue

#

Which is a whole other problem!

brittle tendon
#

It definitely has to be possible to get it into the game, since Lux was testing it I'm pretty sure

#

I just don't know what I did wrong

brittle tendon
#

Though I'm also not very clear on the difference between LFO/Volumetric and LFO/Volumetric (Additive)

split geyser
#

Here, I think maybe we could compare to how a volumetric (profiled) plume works since those are volumetric and do show up

brittle tendon
#

In the editor

#

So maybe that one was more WIP than the additive one

split geyser
#

Are we certain that the in-game examples Lux had were Volumetric (Additive) and not just Volumetric? The former sounds right to me.

brittle tendon
#

Yeah, we don't really know

#

I could try to go back through all of Lux's old screenshots/videos and see if I could catch a glimpse of the editor to see what he was doing...

split geyser
brittle tendon
#

Yeah

#

@eternal robin did you make your Questaria plumes using the LFO presets?

eternal robin
#

They are lfo presets that i modified

brittle tendon
#

Yeah, thought so

#

Thanks!

eternal robin
#

Temporary plumes, will replace with custom ones

brittle tendon
#

If we can ever fix the shaders, that is

eternal robin
#

Yeah

#

Good luck

grim bridge
#

Im seriously considering learning hlsl to write them from scratch, but aaaaaaaaa

brittle tendon
#

Maybe a crazy idea, but could we just take the bundle from 0.2.1, put it into 0.10.0, and create a second bundle that will contain only the new things added in 0.9? That way we could possibly have both volumetric and mesh plumes working?

grim bridge
#

M-maybe

brittle tendon
#

At least as a temporary solution

#

I'll try to do that then

#

Once I get home

split geyser
brittle tendon
#

Well, there won't be if we exclude all the files that existed in the 0.2.1 bundle from our new one

split geyser
#

Good point!

#

So we can prevent those trivially

brittle tendon
#

Yeah

#

I think this should work

split geyser
#

Then let it be so!

#

Will a Unity 2022 game load a 2020 bundle?

grim bridge
#

We'd have to manually load the bundle then

split geyser
#

Is that an issue?

brittle tendon
grim bridge
split geyser
#

Kraken be praised!

brittle tendon
#

There are a couple of mods that were never updated for 0.1.5 and their bundles still load

grim bridge
#

It can load as far back as 2018 or further
I shoulda known this from vrchat

brittle tendon
#

But also, one thing I'm considering is whether Lux intended for the new LFO/Additive mesh-based shader to be backwards compatible with the 0.2.1 one?

#

Maybe it was a full rewrite where he expected the plumes would have to be redone?

#

So many things we don't know

grim bridge
#

And the one person who can answer this is mia a lot of the time

brittle tendon
#

And left 0 documentation

#

🥲

grim bridge
#

This is a cautionary tale tbh

split geyser
#

Perhaps we (and by we, I mean you two) will succeed in a rewrite of LFO that makes it a non-hair pulling thing so that when he returns we end up with a much better final product? I don't know how you'd feel about that...

#

Personally, I'm more concerned with getting the colors solved, but again I'd be little help here either.

brittle tendon
split geyser
#

Is there anything I might be able to do that would help in either of these? I'm really quite willing, but not sure how much help my skils would be

grim bridge
#

Just a note as well, I am going to be busy for today and likely tomorrow writing a research proposal for my english class that is due sunday

brittle tendon
#

Of course, no problem

#

I really should get back to my actual work as well, lol

#

But I hate leaving things unfinished like this

brittle tendon
#

But, knowing how this usually goes for us, I kinda expect it to be something really obscure

lilac dawn
#

Just curious, Lux was making great progress on his mods? Whatever happened. If it's personal that's groovy just seems bizare that such progress was made and then it just flopped over. Seemed to tie in with the many recent updates thgough

brittle tendon
#

yeah, he's been MIA due to personal reasons, for the past month or so

#

but at least he's sent us the current code he had for this mod, so we can continue working on it while he's absent

#

the not-so-good news is that we don't have the previous version, and in this one, most plumes are broken

split geyser
brittle tendon
#

we don't have the shader source

#

that's what I meant

split geyser
#

Ahh, gotcha

brittle tendon
#

since that's like the #1 most important thing we need

split geyser
#

The code itself is not so helpful.

brittle tendon
#

everything else we can completely rewrite from scratch

#

and it won't be too complicated to do

#

but I know literally nothing about shaders

#

so that's the biggest issue

#

basically, the C# codebase is just a small wrapper around the shader functionality

#

and not very important

#

in the big picture

#

speaking of which!

#

I see someone lurking

#

@weary bobcat

#

please please please tell me you still have the source for the original "LFOAdditive 2.0" mesh-based shader that was in 0.2.1

#

since the updated version that's in 0.9 seems to be broken

#

and we only have the source for the 0.9 one

#

and 0.9

brittle tendon
#

alright, so I did a bit of a deep dive

#

those are the most important parts I found

#

some of the LFO links should hopefully contain the working version of the old mesh shader

grim bridge
#

And then what we drop that into 0.9.0?

#

Or 0.10.0

brittle tendon
#

ideally

#

or use it to help us debug the new one

#

one of these has to contain what we need, right?

#

apparently no???

#

what the fuck

#

I'm so confused about the version numbers

#

in July, LFO 0.2.1 was already released

#

but the 0.1.1 "DevKit" was first shared on August 29?

#

then followed by 0.1.2 on the same day

#

and 0.2.0 god knows when (we only have schlosrat's version, no idea when he got it from Lux)

#

and the LFO 0.2.1 bundle contains only a single plume shader called "LFOAdditive 2.0"

#

and none of the files I linked and downloaded contain that

split geyser
brittle tendon
#

it's not really important

#

since we have older versions of it

#

and even those don't contain the needed shader

#

seems like Lux never made a package with it

split geyser
#

Did you get anywhere with the two-pronged bundle approach for a decisive pincer maneuver? Perhaps we can out flank the problem in the short run that way.

brittle tendon
#

not yet, I'll try it after I eat though

#

it will not be that easy, since we'll have to basically have a map of where each specific asset is

brittle tendon
#

alright, time to get into this

#

I hate that this is necessary but I don't see a different option to get existing mesh plumes to work

brittle tendon
#

ok so since the way LFO currently handles assets was just really not going to work well with this double-bundle approach, I'm rewriting a lot of it anyway

split geyser
#

LOL

#

That was franly inevitable

#

This is just the tipping point

#

In the end we'll have something that's much more maintainable and extendable perhaps

brittle tendon
#

Alright so I've finished a large portion of the actual restructuring/rewrite

#

Basically I only need to finish logging for the editor part of LFO, and, well, then actually test if any of this works munley

#

The last hour or so I've spent with my eyes closing on their own, so it's safe to say there are probably bugs lifesupport

#

So I'll first finish it and test it, and then push anything

storm ore
#

When extracting shader : shader disassembly not supported on DXBC
someone knows a solution for that ?

brittle tendon
#

Shaders can't be extracted/decompiled

#

You have to do what you need to do with them at runtime

grim bridge
#

Yeah, it doesnt look anywhere near trivial to decompile

brittle tendon
austere dirge
# brittle tendon Why do you need to decompile a shader, by the way?

To see how it works, what it needs to render stuff?
I was struggling to figure out why overlays for planets aren't working anymore and was just switching things on and off, copying various materials and what not, basically trial and error all the way. In the end I found out it was the shader, because I found a reference in the code to the same shader but with a sufix "_old". I switched to that shader and immediately everything worked again. Would have been a lot easier to take a look at the shader and see what they changed.

grim bridge
#

You can at least easily get the parameters the shader has

austere dirge
#

That I know

#

Would be also nice if we could harmony patch the shader if needed, no?

grim bridge
#

U-uhhh
Yeah thats straight up impossible

#

You have to switch out the shader entirely

brittle tendon
#

Yeah, the only way you could get anywhere close to that is if you decompile the game shader into HLSL (which already is nearly impossible), change stuff, and then illegally distribute it with your mod

storm ore
brittle tendon
#

yeah, that makes sense

#

well, good luck! it's not an easy thing to do

storm ore
#

With my coding level, you can say impossible 😀

brittle tendon
#

alright, the rewrite is almost done

#

there seems to be just one little bug left

split geyser
brittle tendon
#

bug is still there but the editor part should be working so I pushed both repos

grim bridge
#

Which bug?

brittle tendon
#

gotta go walk my dog, but when I'm back I'll take a look at it

#

it isn't immediately obvious to me where I broke it

#

also pretty sure that ref on the prefab is not necessary, since the variable itself is never assigned to in the method

#

it was already there but it should be safe to get rid of

brittle tendon
#

excuse me wtf

#

and I've got a debug build set up, including player-connection-debug=1

#

whyyyy can I not debug it

#

it works, it was just being dumb about it

#

for some reason

#

ok that was such a stupid bug

#

I had ServiceProvider.GetService<AssetManager>()instead of ServiceProvider.GetService<IAssetManager>()

#

so now it's back in a working state

#

other than the shader, of course

#

considering I was writing this code half-asleep, and didn't test it at all until now, I did better than I expected lmao

#

but the volumetric ones don't seem to be working, interesting

#

ah ok so apparently sometimes the configs refer to materials, and sometimes directly to shaders, when specifying a shader

#

alright, this is better

#

now it's in what seems like a fully working state

#

so I guess the next step would be to look into the SpaceWarp color bug

split geyser
#

Yay! We’re so back!

grim bridge
#

@brittle tendon

#

Can you disable the new colors patch in spacewarp 1.5 and test theplumes

brittle tendon
#

sure

grim bridge
#

Because the code for that is different between 1.4.3 and 1.5

brittle tendon
#

nope, still red

grim bridge
#

H-huh?

brittle tendon
#

I commented out all the HarmonyPatch attributes in the ColorsPatch class

#

and nothing

#

(except for wrong looking parts)

#

oh wait

#

not all of them

#

jesus that file is a mess

grim bridge
#

It's disgusting

#

And if that works
Try with removing just the lower half and replacing the upper half with

[HarmonyPatch(typeof(ObjectAssemblyPartTracker), nameof(ObjectAssemblyPartTracker.OnPartPrefabLoaded))]
    internal static void Prefix(IObjectAssemblyAvailablePart obj, ref GameObject prefab)
    {
        ReplaceShader(ref prefab, Shader.Find(KSP2_OPAQUE_PATH), "Parts Replace", "KSP2/Parts/Paintable");
    }

    [HarmonyPostfix]
    [HarmonyPatch(typeof(SimulationObjectView), nameof(SimulationObjectView.InitializeView))]
    internal static void ApplyOnGameObjectFlight(GameObject instance, IUniverseView universe, SimulationObjectModel model)
    {
        ReplaceShader(ref instance, Shader.Find(KSP2_OPAQUE_PATH), "Parts Replace", "KSP2/Parts/Paintable");
    }

    internal static void ReplaceShader(ref GameObject target, Shader shaderToReplace,params string[] allowedShaders)
    {
        foreach (var renderer in target.GetComponentsInChildren<Renderer>(true))
        {
            string shaderName = renderer.material.shader.name;
            if (allowedShaders.Contains(shaderName))
            {
                var mat = new Material(shaderToReplace);
                mat.name = renderer.material.name;
                mat.CopyPropertiesFromMaterial(renderer.material);
                renderer.material = mat;
            }
        }
    }
brittle tendon
#

still nothing though

grim bridge
#

Okay, where else do we touch anything to do with shaders in spacewarp

#

What happens if you just delete that entire class idk?

brittle tendon
#

deleted it and commented out everything in the Colors API class

#

still red

grim bridge
#

I did a solution wide search for Shader and Material

#

Nothing

#

nothing

#

other than the Colors(Patch).cs files

brittle tendon
#

yeah I was expecting this to be something really obscure...

#

seems like I was right

#

but also a good reminder that we need to clean up those two classes for 2.0 lol

grim bridge
#

Is it time to do a git bisect

brittle tendon
#

I think it is

grim bridge
#

Gods this is going to be pain

brittle tendon
grim bridge
#

And you are the one with the environment set up to test stuff

brittle tendon
#

I mean I can just send you a zip with LFO, and then you just need SPARK or SORRY

#

but I can do it

#

I'll just eat dinner first

grim bridge
#

Alright

brittle tendon
grim bridge
#

Thank you

#

Hmmm, does SpaceWarp 1.4.3 work on KSP2 0.1.5.0

#

Or are we going to do between 1.4.3 and 1.5.1 on 0.1.4.1?

brittle tendon
#

technically there should be nothing preventing 1.4.* from working

#

all we did was upgrade to netstandard2.1 and rebuilt bundles

grim bridge
#

True

#

Then i suppose I can get to work on a bisect so we can both try

#

Anyways, bisecting between 1.5.1 and 1.4.3

#

This is going to be worse than I thought

#

there are versions that don't build correctly between the two

#

Ahh git bisect skip works

#

You might want to remove the semver stuff from the swinfo.json when testing yourself munix

#

Otherwise it can cause a crash at startup

#

Did we not fix this bug in 1.4.2 ... while we were still working on 1.5

brittle tendon
#

I don't even remember it lifesupport

grim bridge
#

That was the loading localizations bug

brittle tendon
#

huh

grim bridge
#

The loading localizations from addressables

brittle tendon
#

yeah got it

grim bridge
#

This is almost as bad as going over each commit individually with the amount of errors

brittle tendon
grim bridge
#

Also you need to change the min version of LFO

#

or it wont load

#

I might need to do a second bisect after this

#

Ohh gofs

#

I can't test with that version of LFO

#

specifically because of its dependencie requirement from bepinex

#

unless I dnspy and edit the DLL

#

Alright, modified the LFO.dll

#

It might be impossible to do a normal bisect

#

we might always have to fix the localizatiosn

brittle tendon
#

oh god

brittle tendon
grim bridge
#

But remember to also remove the semver from LFO and make the attributes reference SpaceWarp 1.4.0

brittle tendon
#

yeah I did all that

grim bridge
#

I think I just want to do a diff betweeen the 2 versions at this point

brittle tendon
#

jfc

#

so many commits between 1.4 and 1.5

grim bridge
#

88 commits between 1.4.3 and 1.5.3

brittle tendon
#

I think we need to go further back, since 1.5 was branched off 1.4.0

#

and had many changes before 1.4.3

grim bridge
#

aaaaaaaaaaaaaaaaaa

brittle tendon
#

This is going to be a fun night

grim bridge
#

Let me just try random stuff at this point

#

And we know this is a space warp issue

#

Alright, what is everything that is essential for this

brittle tendon
#

in what context?

grim bridge
#

I meant, what is everything essential for spacewarp to run this test

#

So things we can't blame it on so far

brittle tendon
#

I mean

grim bridge
#
  • My reimplementation of general loading actions
  • The sound loading system
  • Falki's KSC App button
#
  • Colors Patch
#

Testing without lua next

#

Lua is also not the issue, as expected

brittle tendon
#

good god this is annoying

grim bridge
#

It is

brittle tendon
#

I wish we noticed this before 0.1.5 (or at least the fact that it's a SpaceWarp issue)

#

schlosrat knew about it but thought it was caused by the 0.1.4.1 patch

grim bridge
#

Okay

#

We can't blame this on
SpaceWarp.Game.dll SpaceWarp.Messaging.dll SpaceWarp.Sound.dll SpaceWarp.UI.dll or SpaceWarp.VersionChecking.dll

#

Loading spacewarp 1.4.3 back in 0.1.5.0 for more testing reasons

#

Just to confirm its good

#

Ahh great I literally cannot test LFO in this version?

brittle tendon
grim bridge
#

great

#

munix can you build a version of that version of LFO built to reference spacewarp 1.4.3

#

actually scratch it, I can just use the released version of LFO, right?

brittle tendon
#

yeah

#

0.9 should be virtually the same

grim bridge
#

Okay, well, 1.4.3 definitely works

#

the issue is in the main DLL

#

So thats all we have to know

#

something is bugged in spacewarp.core.dll

#

Alright, time to disable the module manager

#

(This test works even without any extraneous modules)

brittle tendon
#

ok so I randomly picked a commit like in the middle, fixed some stuff, and it's already broken there

#

ac4ca33d - Merge pull request #254 from SpaceWarpDev/semver

grim bridge
#

So yeah, the issue is definitely somewhere in the core of spacewarp

#

Alright for more narrowing down

  • Not the official mod loader patch
brittle tendon
#

alright I've narrowed it down to 9 commits so far

grim bridge
#

Getting closer then

#

So we know its in the core dll, in those 9 commits

brittle tendon
#

huh this is weird

#

in this version, the volumetric plume doesn't work at all

grim bridge
#

Huh

brittle tendon
#

I'm pretty sure the Cube is the plume

grim bridge
#

What commit

brittle tendon
#

ec8cc0a7

#

the first one that introduces modules

grim bridge
#

Gods

#

As I was worried about

brittle tendon
#

let me try the one before

#

oh but none of these will probably work

#

yeah, typeloadexceptions galore

grim bridge
#

So a mistake was introduced into the core of the modularization for spacewarp 1.5

brittle tendon
#

so it happened somewhere in here

#

I tested the one before, and it worked there

grim bridge
#

God damn

#

Did I forget to take something out of the accursed spacewarpmanager

brittle tendon
#

yeah that doesn't narrow it down too much...

grim bridge
#

And I have to go again soon...

#

Aaaaaaaa

#

I checked a lot of auxillary systems

#

Its somewhere in the core

brittle tendon
#

well I just finished reading through all the diffs between the commits and didn't find a single suspicious line...

split geyser
#

You guys are amazing! You've narrowed it down soooo much!

brittle tendon
#

like everything I've seen tells me that there is nothing in those 6 commits that should affect shaders/materials/anything related in any sort of way

#

but it's definitely there

split geyser
#

So, git bisecting is where you sanp off and build a some commit in the middle and just keep dividing until you find the commit that has the bug?

brittle tendon
#

yeah, pretty much

#

git has a built-in command for it

#

but I did it manually

split geyser
#

This is a process I've never used but it makes a lot of sense

#

Eventually you would arrive at a commit where the bug first appears.

brittle tendon
#

yeah, exactly

#

or, in our case, 6, since the ones in the middle don't compile/run

split geyser
#

But it might be complex and subtle such that the commit where it appears is interacting with something not obvious.

brittle tendon
#

yeah, which is our case

brittle tendon
#

we know when it happened, but no clue why

#

or where

split geyser
#

Can you point me at the commits? I'll look too.

#

Unlikely I'd help, but I wanna help

brittle tendon
#

they are these ones: #1092613573290754108 message

#

first one is 0b84b0f3, last one is ec8cc0a7

#

somewhere between these it happened

split geyser
#

Is that on the main branch?

brittle tendon
#

well, everything is currently merged into the main branch

#

so yeah

split geyser
#

What date?

brittle tendon
#

07/22-07/23

#

this is such a pain in the ass

#

those commits basically rewrote everything

#

91 changed files just in the last one

split geyser
#

yeah but most of those were name changes?

brittle tendon
#

yeah, a lot of it was just moving them to a different folder

grim bridge
#

I honestly think I broke something in the loading flow

brittle tendon
#

that would kinda be my guess, the loading flow or generally patches

grim bridge
#

This is going to be hell

#

how did this break the shader system

brittle tendon
#

and not even that

#

only custom shaders

#

the ones in the game are fine

split geyser
#

Is there a way to document the loading flow before and after that set of commits?

brittle tendon
#

well... checkout the commit before the first one, see how it works, and then checkout the last one, and see how it works

grim bridge
#

Could it be how asset bundles are loaded?

brittle tendon
#

uh I don't think so

#

in the current version LFO doesn't use SpaceWarp's asset API at all

#

I load the bundle manually

grim bridge
#

istg

#

Yeah
There is only one thing that can be broken at this point, the core loading system

split geyser
#

The only change to LoadingActions in the last of those commits is to the SW.Core csproj

grim bridge
#

BootstrapPatch is where we set up the loading flow

brittle tendon
#

you think some incorrect IL manipulation or something?

grim bridge
#

That would cause a crash

#

I'm thinking some behaviour changed

#

@brittle tendon

#

Commented one suspicious looking line in the Awake method of SpaceWarpPlugin

#

I swear to fucking god

#

I don't even recall why I put that line there

brittle tendon
#

what the fuck

grim bridge
#

That broke it

brittle tendon
split geyser
#

Seriously!?

#

OMFG!

brittle tendon
#

I was wondering what it was about

grim bridge
#

And I don't even know why that was in there

brittle tendon
#

but I didn't question it

#

how the fuck did this break it

grim bridge
#

I have no fucking clue

grim bridge
#

So now we have to do the custom shader stuff

brittle tendon
#

yeah, that's the last step towards fully working LFO

#

but I'm still questioning whether the new shader is broken or just different

grim bridge
#

Can you test with the dev branch using SPARK though munix

brittle tendon
#

maybe the plumes were just meant to be remade with the new shader

grim bridge
#

if its just different, why not have both shaders

brittle tendon
#

well

#

because bundle

grim bridge
#

They are named differently

brittle tendon
#

I'm talking about the rest of the bundle

#

lmao

grim bridge
#

Oh yeah

#

that

#

Anyways though, try testing with SPARK

brittle tendon
#

yeah, a sec

grim bridge
#

There is an easy way to check which shader those were meant to use

#

By checking the parameters against these definitions

brittle tendon
#

I mean hm

#

the plumes for the chemical engine mods were made with the presets from the LFO DevKit unitypackage

#

and all the versions of that contained the new shader

#

not the old one

grim bridge
#

I'm gonna check stuff rn

brittle tendon
#

so that would suggest it's just broken

#

excuse me wtf?

grim bridge
#

Ahhh

#

That's why

#

It was for the new configuration system

brittle tendon
#

ohh

#

that makes sense

grim bridge
brittle tendon
#

I think we need to just do some testing, make some plumes and see if they look different in the game than in the editor

grim bridge
#

Okay, so what if I do this IOProvider.Init at a different point in time

#

Or delay binding until then

brittle tendon
#

how do JSON serializer settings break shaders

#

😭

grim bridge
#

I guess I am going to have to do my own caching

brittle tendon
#

and yeah I can confirm SPARK plumes work with that commit

#

but obviously, no SpaceWarp UI

grim bridge
#

trying with a custom thing

split geyser
#

Man this is the weirdest bug

brittle tendon
#

and this is exactly what Nate was talking about in the interviews when he was saying that all the systems are so interconnected that working on one feature can easily break a completely unrelated other feature

grim bridge
#

Fixed the UI bug

#

@brittle tendon try now

brittle tendon
#

Will do as soon as I get back

#

You know the drill

#

Dog walk

#

Lol

grim bridge
#

fair enough lol

grim bridge
brittle tendon
split geyser
#

Yay!

brittle tendon
#

so after this hotfix is released, SPARK should be fine, basically

#

since LFO 0.9 still works fine with it

#

but we still need to look into the mesh shader for SORRY, Kesa and Questaria

grim bridge
#

Ill release the hotfix asap then

#

Days of debugging

split geyser
#

You guys are amazing!

grim bridge
#

For the issue being one line of code

split geyser
#

Absolutely amazing!

brittle tendon
#

seemingly completely unrelated

grim bridge
#

Dont merge yet

brittle tendon
#

I was about to say lol

#

needs versions bumped

grim bridge
#

Time for a lot of weird messages

#

I love making github actions going crazy

brittle tendon
#

that's like 40 messages for one hotfix

#

lmao

grim bridge
#

Hmm, how soon am I able to modify LFO to use KSP2UnityTools addressables system?

brittle tendon
#

I mean, the code is basically rewritten to a point where I'm like 80% less disgusted by it

#

so I guess now is not a bad time

#

and for me I guess it's time to start learning about shaders

#

there, I officially proclaim "restructuring" to be complete

#

(mostly)

#

I guess I could make a 0.10 release?

grim bridge
#

Go for it

brittle tendon
#

so that we're finally able to get rid of anything unwanted

grim bridge
#

Yeah and we wanna do that asap

brittle tendon
#

by the way...

#

this is how I dealt with it lol

#

it's not pretty but it seems to work

#

I didn't want to be keeping the old names, even if the files are new

split geyser
#

Are these normal for SW 1.5.4?
[Error :Space Warp] System.NullReferenceException: Object reference not set to an instance of an object
at SpaceWarp.Patching.LoadingActions.PostInitializeModAction.DoAction (System.Action resolve, System.Action1[T] reject) [0x0000d] in <c4b7b8e285454218b805517608ac3ffc>:0 [Error : Unity Log] [System] [Error :Space Warp] System.NullReferenceException: Object reference not set to an instance of an object at SpaceWarp.Patching.LoadingActions.PostInitializeModAction.DoAction (System.Action resolve, System.Action1[T] reject) [0x0000d] in <c4b7b8e285454218b805517608ac3ffc>:0
[Error : Unity Log] [System]
[Error :Space Warp] System.NullReferenceException: Object reference not set to an instance of an object
at SpaceWarp.Patching.LoadingActions.PostInitializeModAction.DoAction (System.Action resolve, System.Action1[T] reject) [0x0000d] in <c4b7b8e285454218b805517608ac3ffc>:0 [Error : Unity Log] [System] [Error :Space Warp] System.NullReferenceException: Object reference not set to an instance of an object at SpaceWarp.Patching.LoadingActions.PostInitializeModAction.DoAction (System.Action resolve, System.Action1[T] reject) [0x0000d] in <c4b7b8e285454218b805517608ac3ffc>:0
[Error : Unity Log] [System]
[

#

I just updated

brittle tendon
#

oh boy

#

bug hunting never ends

grim bridge
#

I didnt touch that part

brittle tendon
#

you know how it goes

split geyser
#

It seems PM isn't running?

brittle tendon
#

logs?

split geyser
#

[Error : BepInEx] Failed to run [PatchManager.PreloadPatcher.Patcher] when patching [Assembly-CSharp]. This assembly will not be patched. Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Could not find PatchManager Core

grim bridge
#

You don't have patchmaanger installed?

split geyser
#

CKAN thinks I've got 0.3.1.

grim bridge
#

CKAN could be wrong

split geyser
#

And as I've been working with CPP I certainly must have ut

#

but I'm going to yank it and reinstall

grim bridge
#

Can you show your plugins folder

#

Because if its not finding a file named PatchManager.Core.dll, ya don't have it

split geyser
brittle tendon
#

works fine for me

#

with the new SW

split geyser
#

MY PM folder is apparently hosed. I'll wipe it and reinstall

#

CR was also hosed for some reason...

grim bridge
#

That is very odd

split geyser
#

Beautiful blue plumes!

grim bridge
#

Finally

#

after like an entire month

split geyser
#

Actually, I think my X2 plume is looking weak, this is most likely just an issue with my plume config and nothing to do with any of this.

#

And I really need to fiddle with the MPD plume... But as we now have a working LFO editor!

grim bridge
#

Anyways, I am going to start work on the editor side of addressables based plumes

split geyser
grim bridge
#

It is where all new plumes will be in addressables plus all their parameters such as meshes and such

#

Meaning I am also going to have to make the meshes addressable as well

#

Well hmm

#

Actually I'll keep the meshes in a bundle

#

but all the images and stuff will be made addressable

brittle tendon
#

what if a mod wants to use a custom mesh?

split geyser
#

What about existing mods currently using JSONs?

grim bridge
grim bridge
brittle tendon
#

oh by the way, before you start with the changes, please just give me a moment to edit all the previous commits

grim bridge
#

Alright

#

I made a dev branch, but it should have the same commit history so

brittle tendon
#

alright, then I'll just have to do it twice, that's ok

#

(probably?)

grim bridge
#

Yeah, custom meshes are going to be an interesting one

#

It might mean that there will be mesh duplication across mods

#

Oh and so will textures also be interesting

#

At least if I automate everything

#

Yeah, this might involve a lot of asset duplication unless I have a deduplicator in the editor scripting

#

Where I suppose I could at least deduplicate textures and such

brittle tendon
#

alright that should be it

#

you should be able to fetch and pull the new origin now

#

ahhh fuck I made a mess in the main LFO repo

#

lmao

#

dev is based on the now-nonexistent original main

#

it's not exactly a nice solution... but I just switched the default branch to dev and deleted main

#

since dev had all commits from main anyway

#

alright that was messy af but seems like now we're back to normal

split geyser
brittle tendon
#

while you're here, would you mind testing the 0.10.0 version for me before I release it?

#

just to make sure it really works

#

ah stupid

#

I haven't rebuilt the bundle yet

#

a sec

split geyser
#

I'll be happy to test it

#

Send it!

brittle tendon
#

oh btw @grim bridge there's still a small issue with the editor package

#

when you install it, and build bundles in your project, it will also build the lfo-resources bundle

#

and automatically copy it to the zip

#

when using KSP2UT

#

now that the extension is gone, SW at least won't load it, but it's less than ideal

#

amazing, more bugs with the new bundle

#

fuck me

#

ok wtf

#

when I open the file AssetManager.cs in Rider, I get no advanced syntax highlighting, no analysis, errors showing up, nothing

#

but when I rename it to anything else, that all starts working

#

and renaming it back to AssetManager.cs breaks it again

grim bridge
brittle tendon
#

that might be the best option, yeah

#

there seems to be a bit of an issue with the new meshes

#

the original fbx files directly have a renderer on them

#

but in these new ones, you have some nested objects, and the renderer is on that object

grim bridge
#

Yeah
I noticed that

brittle tendon
#

I can try to just export the inner objects from Blender

brittle tendon
#

alright, errors all fixed

#

but there's still an issue with the size

#

you can see the tiny white specks

#

those are the shock diamond meshes

#

I'm pretty sure

#

seems like they were off by a factor of 1000

#

now they seem to perfectly match the original dimensions

#

they all had scale set to 0.001 in Blender

#

that... changed absolutely nothing

#

lol

#

in both Blender and Unity they look the right size

#

but in game they stayed tiny

#

how?

#

the original ones have this

#

the new ones this

#

how the hell do I change that?

split geyser
#

I had no idea it would do that.

brittle tendon
#

actually, the scale didn't matter at all

#

I think I've finally got it

#

I had to set units up like this

#

cm and unit scale of 0.01

#

now when the meshes are at 1x Unity scale, they are the proper size

split geyser
#

I can fix it if you want.

#

I set up my blender to work in mm, and I probably ought to change that anyway

#

It made sense for the first few things I was making

#

But now it's impacting you and making you need to set things silly

brittle tendon
#

time to test the new bundle

#

I swear to god if that doesn't help

#

that helped!

split geyser
#

Is that what they're supposed to look like?

brittle tendon
#

awesome, so now it should be ready for the 0.10 release

split geyser
#

Or simply what you're expecting

brittle tendon
#

yeah

#

that's the better term

#

that's how they look in 0.9

#

and the goal was to replicate that

#

of course, it would be better with the correct shader from 0.2.1, but that's a whole other issue

split geyser
#

So the shader is still goofed up, or the plumes need to be re-built, take your pick

#

But we're back to 0.9.0 in a form that can actually be released!

brittle tendon
#

yep

#

and now with the correct bundle

#

alright, so one final round of testing for me, with SORRY, SPARK, Kesa and Questaria

#

and I can send you the zip for testing as well

split geyser
#

Thanks!

brittle tendon
split geyser
#

suspicious file downloaded (thank you windowz)

brittle tendon
#

don't tell Cheese, but I'm trying to spread around a COVID-PC virus

split geyser
#

Good thing I'm vaccinated!

brittle tendon
#

ehhh so

#

no Questaria

#

those engines seem completely broken

#

you get a spam of this and can't place the parts

split geyser
#

I get that too some times, but it's intermittent

brittle tendon
#

looks like something is incorrectly set up on the prefab/json of the part

split geyser
#

I don't know that it's related to LFO or anything

brittle tendon
#

yeah most likely not

#

though I can test without LFO later

#

but since the other three mods' engines don't do it (SPARK, SORRY, Kesa), I will assume it has nothing to do with LFO

split geyser
#

That does happen with SPARK

#

Not all the time

#

But sometimes it refuses to place the parts

brittle tendon
#

interesting

#

I've never seen it with SORRY though

#

and for Questaria it happens always, with all the engines

split geyser
#

The most reliable way I know to trigger it is to have a radially attached part with 2x or higher symmetry and try to place TNO reeactors or SPARK engines on it

brittle tendon
#

at least during the current VAB session

#

(and no symmetry anywhere)

#

it looks to me like incorrectly configured attachment nodes

#

and for SPARK, since you're mentioning symmetry, probably the symmetry setting

split geyser
#

I'm getting this going on also. It looks like this on the pad and in the VAB

#

But it looks like this in orbit

#

This is getting to orbit the lazy way as these are really vacuum engines

brittle tendon
#

have you updated SpaceWarp?

#

that looks like the colors bug

split geyser
#

Yes

brittle tendon
#

well fuck @grim bridge

split geyser
#

No, there's no color bug

#

It's just a trick of the lighting on those tanks

#

They look fine in sunshine

brittle tendon
#

oh wait so what was the issue?

split geyser
#

The main engine?

#

The one with the missing nozzle and everything on the central tank

brittle tendon
#

OH

#

I completely missed that lol

split geyser
#

You can see a bit of the cathode protruding, but the nozzle is just gone and the rest is massively clipped

#

Kinda does work well like that

brittle tendon
#

I suspect most of these issues have to do with the configuration of the modules

#

but I can't say for sure

split geyser
#

It's fine in the VAB and even on the pad, but jumping to orbit is... problematic for that one

split geyser
#

We'll need to sort that out before we have another workshop where we roll out the new tools

brittle tendon
split geyser
brittle tendon
#

alright, other than Questaria, all the chemical engines look like they work

#

(within the limits of the shader)

split geyser
#

It works fine if you keep the stress off it apparently

brittle tendon
#

LFO working fine?

#

so I can make the release

split geyser
#

The plume on the MPD3 is a little wonky

brittle tendon
#

and what shader is that?

split geyser
#

Its the mesh

brittle tendon
#

yeah, well, then that's not unexpected

split geyser
#

It's actually the same as on the MPD1 and MPD2

brittle tendon
#

ok that is weird

split geyser
#

But the MPD2's that are beside this look fine

brittle tendon
#

are these the spark_mpd_md_v2 and spark_mpd_sm_v2 parts?

split geyser
#

Hang on, there may have been an electrical issue

#

Yes

#

Those are the parts

brittle tendon
#

that looks to me like the bigger one has noise turned down to 0

grim bridge
brittle tendon
#

yeah

#

let me try with the noise line removed

split geyser
#

Nope, it was not an electrical issue

#

Hmmm... how did that get like that?

#

I'll fix the noise setting in the JSON and give it another go

brittle tendon
#

also, looks like you need to set the colliders to convex on your tanks

split geyser
#

Ah, poo! I thought I'd fixed that!

#

Well, no worry - it's such an easy fix