#LFO - Lux's Flames and Ornaments

1 messages · Page 2 of 1

brittle tendon
#

now finally back to LFO!

#

AND WE'VE GOT PLUMES

#

finally

#

now I only need to test this with a new engine

#

just any engine that has the new components

#

I'll try to get one such working in SPARK, since I have the source for that project

brittle tendon
#

for fuck's sake

#

is there literally not a single engine mod with public source that has LFO plumes on the prefabs

#

the only mod whose source I can get my hands on is SPARK

#

and the version on GitHub doesn't have any components on the Plume objects

grim bridge
brittle tendon
#

I'm about to start screaming

#

and not just internally, either

grim bridge
#

You havent already?

brittle tendon
#

I do have people asleep in the house

#

I think they wouldn't appreciate it

#

but istg if I were alone, I definitely would have

brittle tendon
#

ok I actually now have a plume in Unity but no clue what all I need to add/do or how to export it

#

I added the master group component but that doesn't want anything to do with the volume component

#

it only interacts with the throttle group one

#

and that one wants a mesh

#

but I don't want mesh rendering, I want volumetric

#

how does this all work

#

😭

#

and why is there 0 documentation

#

ahhHHHhhh

#

excuse me what the actual fuck

#

WHY DOES IT NEED TO COMPILE THE SCRIPTS IN RUNTIME MODE FOR ADDRESSABLES TO BUILD?????!!!!!

#

this can't be real right

#

will I seriously have to change all these conditional compilation blocks to use reflection??

brittle tendon
brittle tendon
#

I am so done with this

#

been trying to simply test if plumes work now, for an hour and a half

#

it's 5am and I am dying

#

and right now I never want to see Unity, LFO or SPARK ever again in my life

brittle tendon
#

well, 4 and a half hours of sleep and it's time to get back on the grind

#

(my dog woke me up and won't let me sleep anymore 😴 )

storm ore
#

damned ... make it coding 🙂

split geyser
brittle tendon
#

huh, thanks for letting me know

split geyser
#

My understanding is that LFO needs (needed?) the bare Plume object.

brittle tendon
#

then I have absolutely no clue where that is supposed to happen in the code

#

because in the game it kept trying to add a LFOThrottleData component when such a class didn't exist anymore (moved to LFO.Shared.Components.LFOThrottleData)

#

and I have been through every file in the codebase like 50 times yesterday

#

and have no clue how that would happen

#

oh wait maybe I should read first

#

you did say that there's a plume prefab

#

so I'm assuming that also has to be exported with the addressables?

split geyser
#

No, I'm sorry I wasn't clear. Here's what you do.

#

Or what is/was normal previously

#

Take a prefab of your engine and make a prefab variant. It's important to not do this to the prefab you're going to export.

#

The prefab should have a bare Plume object under thrustTransform

#

So the variant will have one too

#

On the variant, add a TDMG to the Plume

grim bridge
#

Wait then why the fuck did the namespace change break things

split geyser
#

I'd open my Spark Project and give you some screen shots, but it's still restoring. about 2:30 left

split geyser
#

The object under the Plume is where there is a Cube (for volumetric (Profiled)) or a Flames or whatever

#

You need to also add a LFO Throttle Data and an LFO Volume component to that object.

#

You tweak the settings in the LFO Volume to get the plume as you like

#

And in the LFO Throttle Data I beleive that's where the Float Params go

brittle tendon
#

yeah I got all those settings the way I wanted them before, but on the actual prefab, not a variant

split geyser
#

When you have it looking good, you go back to TDMG, make sure you've done a Collect Children, and then export the config

brittle tendon
split geyser
#

I really don't know why it's done this way (obviously), I only know that Lux as very clear it needed to be done this way (for LFO to work as it was previously engineered)

brittle tendon
split geyser
#

Not if you're doing Volumetric (Prefab), since that's just a cube

#

But yes if you're doing Flames or something like that

brittle tendon
#

yeah gotcha, I was trying to use the regular Volumetric

split geyser
#

I don't think any of my engines do that. Maybe @eternal robin can help with that?

#

I would really like to know how to set those up as it will be needed for the next workshop and the CPP engine

brittle tendon
#

oh it's fine, as long as I can get anything to show up in the game, I'll be happy

#

I was pretty happy with the previous result

#

I just needed to know about the variant thing

grim bridge
split geyser
#

I think if we're talking about having two ways to do this, or even talking about a break at the 1.0.0 level where we fully do it a better way, then it's fine if we depart from the old way.

brittle tendon
split geyser
#

I was far to hasty last night and bought myself a massive load of trouble

#

That's one way to learn!

#

If I'd have slowed down just a tiny bit and thought about it first I could have gotten it done soooo much easier and faster

grim bridge
#

Almost like me writing a build script that accidentally permanently deleted my saves in a game I was modding...

split geyser
#

Yeah, something like that - except that here it's not permanently gone and most of it conveniently ran over night.

brittle tendon
#

ah yes this fun bug again, with blinking red, blue and purple

#

I'm pretty sure that's not how a plume looks

#

I kept getting that yesterday, too, it would work for a few minutes, then you'd look away and suddenly this would be there

#

and wouldn't go away

split geyser
#

The thing is Florida has the second most flaky electrical grid in the world (there must be someplace worse... Ukraine?) My power went out twice last evening. What would have happend if it had gone out in the middle of a massive restore?

grim bridge
#

Use a laptop :3

brittle tendon
#

I think I'll just go with the Additive shader for now, that one doesn't have those issues

split geyser
#

That makes sense. Get one working and then move forward.

#

The additive one is the mesh-based one, right?

brittle tendon
#

I think so yeah

split geyser
#

Looks kinda sorta Ok from the side, but dreadful from the back?

brittle tendon
#

and invisible from the top/bottom

grim bridge
#

Dreadful

split geyser
#

Yep! I use that one on several engines

#

Lux was taling about making a volumetric version that would work better, but he hasn't gotten to it yet

grim bridge
#

Fixing the volumetric one is going to be fun

brittle tendon
#

oh definitely

split geyser
#

If we can reverse engineer enough of this we may be able to do it.

brittle tendon
#

especially when I know 0 about shaders

brittle tendon
#

#1092613573290754108 message

#

but as you can see..

#

it likes to break

split geyser
#

I was thinking that one was more for chemical engines.

grim bridge
#

Maybe if we reverse engineer them, we should document them a lot more

brittle tendon
split geyser
#

What I was hoping for is a volumetric one suitable for ion

brittle tendon
#

oh

#

Lux was using this Additive shader for his methalox engines

#

so the volumetric one is basically a replacement for that

split geyser
#

So, like Voumetirc(profiled) but different.

#

I'm wondering if I couldn't use volumetric(profiled) with just a (very) different profile for the MPDs and VASIMR?

brittle tendon
#

alright, so now that I have the prefab variant with the plume on it, what do I do with it? nothing? just export the JSON?

split geyser
#

Yes.

#

The Prefab variant is just a place to model the plume so you can create the JSON

brittle tendon
#

where does the game get the information about which components to add though

split geyser
#

The JSON

brittle tendon
#

there is nothing about that in the JSON

split geyser
#

IT's all there

#

Or is it?

brittle tendon
#

but that says nothing about the type of the component

#

so where does it get the class name "LFOVolume"

#

for example

split geyser
#

Maybe all the info is there, but the tool assumes what to add then populates based on the JSON info

brittle tendon
#

yeah but my whole issue is

grim bridge
#

It likely gets all that from the shader name

brittle tendon
#

that doesn't tell me the name of the class?

#

like

#

how does it know to add LFOVolume but not LFO.Shared.Components.LFOVolume

#

that is my whole issue

#

😭

split geyser
#

OK, how about this. If there is a JSON then you add LFOVolume, and if it's not there and you've got an addressable instead then you add LFO.Shared.Components.LFOVolume?

brittle tendon
#

but... where do I add it

#

like

grim bridge
#

Let me look at the source cose

split geyser
#

As a component on the child of Plume?

brittle tendon
#

not in the editor

split geyser
#

Ahh, I see. They are both forms of "where to add it", but very different Qs and As

brittle tendon
#

since the information about the components obviously isn't exported

#

because it's on the variant

#

not on the prefab

split geyser
#

What if it were on the prefab?

#

What if LFO didn't need to create it?

grim bridge
#

GameObjectToPlumeDict aaaaa

#

This source code is gonna make me scream

brittle tendon
#

I know, there was a good reason why I wanted to rewrite it

grim bridge
#

Its even using the assetmanager api in a yucky way

eternal robin
brittle tendon
#

it's alright, we have the volumetric shaders, too

#

for now the biggest issue is actually getting stuff into the game

grim bridge
#

I swear I just wanna rewrite parts of this

brittle tendon
#

exactly

#

but for starters I didn't want to make any big changes because then I wouldn't know if it doesn't work because of those, or something else

#

and I'm glad I didn't rewrite it yet

#

because there already are issues

#

even with just adding namespaces

grim bridge
#

this shouldn't break on a namespace changeee

brittle tendon
#

right???

#

it isn't hardcoded anywhere

#

let me just try again with the current codebase, I'll just disable the Deprecated assembly loading for now

#

holy shit

#

we've got a plume

#

I repeat

#

we've got a plume

grim bridge
#

Without the Deprecated assembly?

brittle tendon
#

yep

eternal robin
#

🎉

grim bridge
#

Next up is engine sounds

#

lmao

brittle tendon
#

I seem to have those on SORRY engines though

grim bridge
#

Do the SORRY plumes work

brittle tendon
#

except for the shaders being broken, everything works

#

now let me get rid of the LFO.Deprecated monstrosity

#

since it's obviously not needed

#

this is without it loaded

split geyser
brittle tendon
#

the gimbal on modded engines goes absolutely insane though

#

the oscillations are out of whack

#

it isn't nearly that bad on the stock engines

split geyser
#

That's curious. I've moddled my gimbals on the config params used in stock engines.

brittle tendon
#

yeah, that's why it's strange to me

#

ok one more test with the LFO.Deprecated project completely removed

eternal robin
brittle tendon
#

I tried to lower it by half on the Community Parts Pack engine, but that gave me oscillations with SAS on, AND it was extremely slow responding to input

#

or rather, it felt like it was responding to inputs like a couple of seconds late

grim bridge
#

Could it be like where the thrust transform is?

brittle tendon
#

I was also thinking that

split geyser
brittle tendon
#

maybe if it's inside the throat, right below where the gimbal is, it will be better than if it's below the nozzle

eternal robin
#

Would that even do much though

split geyser
#

I'll admit I'm winging it on some details. My assumption is that thrustTransform needed to be located where you want the plume to be, but of course you can offset the plume graphics form that.

brittle tendon
split geyser
#

So, perhaps I've placed it wong on the CPP engine

#

I mainly thought it needs to be a child of gimbal and needs to point in the right direction for it to work properly

brittle tendon
#

alright, another test successful

split geyser
#

It should also be dead center on axis as with gimbal

brittle tendon
#

so I'd say the next thing that needs to be done with priority is fixing the shaders

#

and then we can start rewriting/adding features

#

but first we should get it working, I think

split geyser
#

By fixing the shaders, what is included there?

#

Does that include fixing the colors?

brittle tendon
#

yeah

#

mainly

#

but the issue is not just the colors

#

the shaders generally don't do what they should

split geyser
#

Have you tested the new version with any SPARK engines?

brittle tendon
#

I will try right now

#

but I do know the colors are still broken

#

since the SORRY plume looks completely wrong and red

#

(#1092613573290754108 message)

split geyser
#

idkwym, that looks perfectly fine!

brittle tendon
#

those clean lines are definitely not supposed to be there

split geyser
#

everything is fine, just fine

eternal robin
#

The clean lines look like the expansion stuff is messed up

#

It looks like its max compressed and is going into itself

brittle tendon
#

and Lux tried for a couple of hours to fix the colors not getting set properly in the shader, and couldn't figure it out

#

so it's going to be really fun trying to fix that with my non-existent shader knowledge, when even he couldn't

#

lmao

eternal robin
#

Red is the default color of anything so i imagine its because somethings wrong with saving or reading the color information

split geyser
#

OTOH, you've got a fresh pair of eyes and may see things differently than he did

brittle tendon
#

well, I wouldn't say fresh, they're pretty tired after 4 hours of sleep

grim bridge
#

this is disgusting

split geyser
brittle tendon
brittle tendon
#

to appease Unity

split geyser
#

Hopefully there are all related and it's just one thign that's different between 0.1.4 and 0.1.4.1

grim bridge
brittle tendon
#

it's another one of those things I'd just like to refactor completely out of the in-Unity code

#

in the current state, everything depends on everything and it's nasty, there's absolutely no reason why the same class used in the editor needs to call a SpaceWarp method

#

it can be easily solved with some DI

grim bridge
#

@brittle tendon can you give me a plume config for a volumetric (profiled) plume

brittle tendon
#

I don't know if I have one

#

SPARK has those, right?

grim bridge
#

Found one

brittle tendon
#

lemme redownload it (I had replaced it with my own version of it which doesn't work)

grim bridge
#

I think I know one of the issues

brittle tendon
#

jesus it's already 1pm, I gotta go walk my dog

grim bridge
#

Right here

#

_NoiseTex should point to a 3D texture, how do those work

#

But that is only a 2D texture being loaded

brittle tendon
#
[Error  : Unity Log] Error assigning 3D texture to 2D texture property '_MainTex': Dimensions must match
[Error  : Unity Log] Error assigning 3D texture to 2D texture property '_NoiseTex': Dimensions must match
#

a lot of these

grim bridge
#

Exactly

brittle tendon
#

and of course it couldn't be more verbose

#

like saying which texture it can't assign

grim bridge
#

Just add some debug logging here

brittle tendon
#

since it's not the current version

grim bridge
#

Log($"Assigning texture {textureName} to property {kvp.key}");

grim bridge
brittle tendon
#

that's what I see there

grim bridge
#

Thats exactly it

brittle tendon
#

it isn't

grim bridge
#

Yes it is?

brittle tendon
#

yours had SpaceWarp.API

#

this one has LFO.TryGetAsset

grim bridge
#

Ahh

#

Okay, the difference is minimal

brittle tendon
#

yeah, I was just wondering why you didn't have the version with reflection

grim bridge
#

Just the reflection

brittle tendon
#

np

grim bridge
#

Somehow the submodule put me into a weird commit

brittle tendon
#

ah yeah because I only pushed a few minutes ago with the updated submodule commit

grim bridge
#

Still, just change this to the following

Debug.LogError(e.Message);

To

Debug.LogError($"Error assigning texture {textureName} to property {kvp.Key} of {material.name}: {e.Message}");
brittle tendon
#

that did nothing

grim bridge
#

It didn't fix the logging?

brittle tendon
#

nope

grim bridge
#

Does unity not throw an exception there???????

#

Just prints an error?

brittle tendon
#

apparently not

grim bridge
#

Okay

brittle tendon
#

I mean we can just print it before trying to set it

grim bridge
#

Just put

Debug.LogInfo($"Assigning texture {textureName} to property {kvp.Key} of {material.name}");

Before the material.setvalue or whatever

brittle tendon
#

yeah

#

uhhh

#

it's not coming from there apparently

grim bridge
#

what the fuck?

brittle tendon
#

and that's the only place where SetTexture is called

grim bridge
#

Does unity .... lazily set the textures?????

brittle tendon
#

🤷‍♂️

grim bridge
#

Can you show the logs from where it is setting the textures though?

brittle tendon
#

...

#

0 results for "Assigning texture"

grim bridge
#

I uhhh, what?

brittle tendon
#

???

grim bridge
#

Are you sure the correct DLL is in there?

#

Like did you deployandrun and it not update the DLL?

brittle tendon
#

bruh

#

yeah

#

you're right

#

ahhhhh I hate that this happens

#

WHY

#

the same thing happens with PM sometimes

grim bridge
#

I always just delete the old folder before DeployAndRunning

brittle tendon
#

the new files just don't get copied into dist for some reason

#

needed to completely delete both build and dist, nuget restore, and rebuild

grim bridge
#

Wtf

brittle tendon
#

and

#

surprise surprise

#

plumes don't show up again

#

so it was the fucking Deprecated dll

grim bridge
#

idfgi

#

This is some arcane magic that makes no sense

brittle tendon
#

🥲

grim bridge
#

We just have to get stuff to work

#

then we can fix style and unmaintability

brittle tendon
#

Error assigning texture 3DNoise to property _NoiseTex of LFO/Additive: Couldn't find texture with name 3DNoise.

#

at least I got this now lol

#

that should be the easiest part to fix

#

but I just don't understand why the fucking namespace breaks it

grim bridge
#

Alright

#

and honestly we can just do something where we try to get it from addressables if we can't find it in the asset manager (which is yucky yeah)

brittle tendon
#

but it is in the bundle

grim bridge
#

3D Noise

#

not 3DNoise

brittle tendon
#

...

#

yeah that would do it

#

where the hell is it even used

#

oh, in my testing engine lmao

#

but why

#

it isn't assigned anywhere

#

oh duh

grim bridge
#

Check the config?

brittle tendon
#

ok but this one is also in the bundle

grim bridge
#

The bundle

#

name

#

is lfo-resources.bundle

brittle tendon
#

yeah?

#

that's the name of the bundle literally everything is in

grim bridge
#

Can you dump the logs where spacewarp lists everything in the bundle?

brittle tendon
#

[Info :lfo/lfo-resources/packages/lfo.editor/assets/noise/3dnoise.png] registering path "lfo/lfo-resources/packages/lfo.editor/assets/noise/3dnoise.png"

#

so why is this throwing an error

grim bridge
#

lfo/lfo-resources/packages/lfo.editor/assets/noise/3DNoise.png
Yeah thats what that would expand to

brittle tendon
#

is it because I messed up the reflection code?

grim bridge
#

Like try get asset does lowercase the path as well?

brittle tendon
#

shouldn't it be case insensitive?

grim bridge
#

it is

brittle tendon
#

huh

#

anyway I really need to go or my dog will eat me in my sleep for making him wait for 2 hours longer for his walk

grim bridge
#

There are 2 different methods named TryGetAsset

grim bridge
#

BindingFlags.Public | BindingFlags.NonPublic
Also this doesn't work

#

Just do binding flags.public

brittle tendon
#

Buh

#

I didn't even notice I left that there

brittle tendon
grim bridge
#

Yeah

#

BindingFlags are a combination, and I'm pretty sure they are treated as an all flags much match kinda situation

brittle tendon
#

I don't think that's true

grim bridge
#

idk

split geyser
#

BTW, if it's expanding to foo.png, then it's looking for a 2D thing (you guys know that of course). The 3D things are not png, but are .asset

grim bridge
#

I've always had issues with using Public | NonPublic

brittle tendon
#

Which (for some stupid reason) 3DNoise is

#

3DNoise.png is the file

grim bridge
#

Then the issue is probably an ambiguous match

split geyser
grim bridge
split geyser
#

I have no 3DNoise, only "3D Noise"

brittle tendon
#

Those are two separate files

#

Both are in the bundle

#

As you can see from my screenshots above

split geyser
#

I don't have a "3DNoise" in the old LFO installed into Sparky

brittle tendon
#

Well, it is in this one

split geyser
#

Where did it come from?

brittle tendon
#

From the zip from Lux

#

I simply added all the assets to the bundle and built it

#

It's possible that it's not supposed to be used, that it was just for some testing or something

#

However the file is definitely there

#

So it makes no sense that the asset manager can't find it

grim bridge
#

What are its import settings?

brittle tendon
#

Ah that's a good question

grim bridge
#

and what are the logs surrounding that error?

brittle tendon
#

I'll need to look when I get home

grim bridge
#

Because I have a guess on where it messed up in the reflection

#

See if you have that error

brittle tendon
#

I'm almost sure I didn't see that

#

But I will look

grim bridge
#

Also lux keeps using exception.message

#

when he should be using exception.tostring!

#

aaaaaaaaaaaaaaa

brittle tendon
#

Lux does a lot of things munley

#

But the most important part right now is to get the namespaced components to work

grim bridge
#

I just want to do
sed /\.Message/\.ToString\(\)

brittle tendon
#

Like it's completely beyond me why they don't

grim bridge
#

Cuz Exception.Message won't contain the exception name either...

brittle tendon
#

now there aren't any _NoiseTex errors but instead there's this...

#

aaand you're right

#

Ambiguous match

#

but I still don't understand why?

#

how can it find multiple methods of that name in SpaceWarp.API.Assets.AssetManager?

#

oh, generics... right?

grim bridge
#

Yep

brittle tendon
#

alright, that should be easy to fix

#

however these errors were popping up long before I made it generic

grim bridge
#

No

#

its the generic method inside of Space Warp

#

there are 2 space warp methods named TryGetAsset

#

one is generic, the other isn't

brittle tendon
#

I don't mean the ambiguous thing

#

I mean the _NoiseTex and _MainText errors

grim bridge
#

That wasn't the same error

brittle tendon
#

those happen even with LFO 0.9

#

before I touched it

brittle tendon
grim bridge
#

As I said, not the same as the ambiguous match

brittle tendon
#

bruh

#

how do I get rid of the ambiguous match

grim bridge
#

By passing the types into the findmethod function

brittle tendon
#

I already made the method generic

grim bridge
#

You have to pass the argument types into the GetMethod here

brittle tendon
#

wtf is a binder

grim bridge
#

Use the overload I just sent you

#

name, flags, types

brittle tendon
#

why the fuck does Rider not show that one at all

#

oh, it's only in .NET 7

#

not in .NET Standard 2.1

grim bridge
#

Wtf

brittle tendon
#

ok apparently I just pass null to the binder

#

to use the default one

#

I swear to fucking god

#

I just can't use the correct overload

grim bridge
#

There is another more complex method

#

you can get all methods with the name, and then select the one that isn't generic

#

Or get all methods

brittle tendon
#

so basically what we do in the patcher

#

for Patch Manager

grim bridge
#

So like

FindType("SpaceWarp.API.Assets","AssetManager").GetMethods(BindingFlags.Static | BindingFlags.Public).Select(method => !method.ContainsGenericParameters && method.Name == "TryGetAsset").FirstOrdefault();
#

And you might as well just cache that

brittle tendon
#

yeah

#

I got a bit confused why it said it's returning an ienumerable of bools

#

it's Where, not Select

#

but thanks

#

I really hope this finally works

#

like

#

some stupid reflection to call one method should not be this complicated to write

grim bridge
#

We really need to just make an interface and implement it only at runtime

brittle tendon
#

yeah, exactly

#

like I said, DI is the way to go here

grim bridge
#

DI?

brittle tendon
#

dependency injection

grim bridge
#

Ahh yeah, for sure

brittle tendon
#

everything is so tightly coupled here it's a miracle it doesn't collapse into a black hole

grim bridge
#
class LFO {
  LFORuntimeInterface inter;
  LFO(LFORuntimeInterface i) {
    inter = i;
  }
  T TryGetAsset<T>(...) {
    return i.TryGetAsset(...);
  }
}
brittle tendon
#

yeah, exactly

#

but lemme just try to make this work first like this

#

since I already have it

grim bridge
#

And since we never instantiate the LFO class when building the asset bundles, we don't even need to provide an implementation of the interface in the editor, only the interface itself

brittle tendon
#

oh my god

#

finally the fucking plume is back

#

I've never been this happy to see a shitty flame

grim bridge
#

lmao

#

do you still get errors in the log?

brittle tendon
#

yep

#

the texture ones

grim bridge
#

Post em

brittle tendon
#
[System] Loading localizations for plugin Lux's Flames and Ornaments completed in 0,0011s.
[System] Lux's Flames and Ornaments: loading soundbanks completed in 0,0001s.
Error assigning 3D texture to 2D texture property '_MainTex': Dimensions must match
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.AssetBundle:LoadAsset (string,System.Type)
UnityEngine.AssetBundle:LoadAsset (string)
SpaceWarp.Patching.LoadingActions.FunctionalLoadingActions:AssetBundleLoadingAction (string,string)
SpaceWarp.API.Loading.Loading:LoadSingleAsset (System.Func`3<string, string, System.Collections.Generic.List`1<System.ValueTuple`2<string, UnityEngine.Object>>>,string,string,SpaceWarp.API.Mods.SpaceWarpPluginDescriptor)
SpaceWarp.API.Loading.Loading/<>c__DisplayClass9_0:<CreateAssetLoadingActionWithExtensionsDescriptor>b__0 (SpaceWarp.API.Mods.SpaceWarpPluginDescriptor)
SpaceWarp.Patching.LoadingActions.DescriptorLoadingAction:DoAction (System.Action,System.Action`1<string>)
KSP.Game.Flow.FlowAction:Do (System.Action`1<KSP.Game.Flow.FlowAction>,System.Action`2<KSP.Game.Flow.FlowAction, string>)
(wrapper dynamic-method) KSP.Game.Flow.SequentialFlow:DMD<KSP.Game.Flow.SequentialFlow::NextFlowAction> (KSP.Game.Flow.SequentialFlow)
KSP.Game.Flow.SequentialFlow:Update ()
grim bridge
#

Excuse me, wtf

#

Its .... in the asset bundle??

brittle tendon
grim bridge
#

Meaning one of the assets doesn't have its import setting built right

brittle tendon
#

and the rest of them look like this

grim bridge
#

With a slice size of 16

brittle tendon
#

as in, 16 columns and rows?

grim bridge
#

Yes

brittle tendon
#

👍

grim bridge
#

But that may be wrong

#

Just to test though

brittle tendon
#

the other ones look like this

#

this one like this

grim bridge
#

Ahh, nevermind

#

Might be worth building a custom version of spacewarp that logs exactly which asset it is loading

brittle tendon
#

yeah, hm

#

[LFO] Assigning texture 3DNoise to property _NoiseTex of LFO/Additive

#

that does seem to work with no errors

#

the _MainTex is the issue now

grim bridge
#

But that comes from the import

brittle tendon
#

the import?

grim bridge
#

Can you add that to FunctionalLoadingActions.cs in SpaceWarp and use that modified version of space warp?

#

Honestly I might just push this on dev

brittle tendon
#

yep

grim bridge
#

Also might be worth adding a try/catch there as well

#

Screw it I will

#

You can also just use the dev branch

#

In a second

#

There, the dev branch has some more logging

brittle tendon
#

3d noise 3?

grim bridge
#

Yep

#

Can you show that asset

#

3d noise 3.mat

#

it might have something set incorrectly

brittle tendon
grim bridge
#

3d noise 3.mat

#

not .png

brittle tendon
#

ah

#

this is 3D Noise 3.asset

#

here you go

grim bridge
#

Ahhh

#

Alright, so its a material named 3d noise ... that uses the standard shader????

brittle tendon
#

yeah, that's weird

grim bridge
#

I don't think that asset is necessary

#

remove it from the bundle?

brittle tendon
#

can do

#

lol this just popped up

grim bridge
#

lmao

brittle tendon
#

well, that's one less error

#

now for the shaders...

brittle tendon
#

it's weird that they work well in Unity but not in the game

#

and even weirder that they broke in 0.1.4(.1), not in 0.1.5

grim bridge
#

It could be some shader parameters not being set correctly

#

How do we know it was 0.1.4.1 that broke it?

#

Do we know that

brittle tendon
#

@split geyser seemed pretty sure

#

and I can't go back to 0.1.4 since it's not in the Steam betas list

#

I can test 0.1.3.2

brittle tendon
#

but I think we can safely say that the bug was at least partially present in 0.1.4.1 for sure, since SPARK plumes turned red

grim bridge
#

Alright

#

My guess is a property isn't bein set correctly

#

we should dump all the properties being set

brittle tendon
#

actually, where are they even being set

grim bridge
#

In the class where Material.SetValue is used

brittle tendon
#

that is not used anywhere

grim bridge
#

Yes it is

brittle tendon
#

oh these

grim bridge
brittle tendon
# grim bridge Yes it is

I only did a project-wide search for SetValue and didn't find anything, that's why I said it isn't called lmao

grim bridge
#

oh lol

#

I misremembered the name

brittle tendon
#

well alright then

#

time for some debug logs

#

but first I need to grab some lunch, it's 3:30pm and I'm dying of hunger

grim bridge
#

First off dump the keys and types of the values

#

but yeah, go eat

brittle tendon
#

alright time to get back to this

#

so, those are still the same "errors" I was getting before

#

except the plumes actually show up now

grim bridge
brittle tendon
#

but the material values look good

#

where the fuck is it taking the old class names from

#

when the components are not in the JSON and not on the prefab

#

this makes literally 0 sense

#

and this time I'm sure there are no old DLLs

grim bridge
#

Hmm

#

Prefab variants arent built into the asset bundle are they?

brittle tendon
#

either I'm going crazy, or the SORRY engines just have the components on the prefabs

#

let me check the SORRY addressables in Asset Studio

grim bridge
brittle tendon
grim bridge
#

istg lux

brittle tendon
#

excuse me why is this in the SORRY addressables

grim bridge
#

The fuck

brittle tendon
#

I know Lux was testing custom planets and stars

#

but why in SORRY

#

that doesn't look like "an empty object named Plume" to me

grim bridge
#

....

brittle tendon
#

let me test again with the CPP engine that I added a plume to

#

since that shouldn't have those errors

grim bridge
#

Could those be the "stock" plumes

brittle tendon
#

I don't actually think there are any, I think I made that up lol

#

yeah ok, that is just a thing in SORRY

#

not in LFO

#

bruh

#
[LFO] Setting _Opacity to 0 on LFO/Additive
[LFO] Setting _Brightness to 2,32 on LFO/Additive
[LFO] Setting _StartTint to {
  "r": 0.8944215,
  "g": 0.5896226,
  "b": 1.0,
  "a": 1.0
} on LFO/Additive
[LFO] Setting _EndTint to {
  "r": 0.672184467,
  "g": 0.0,
  "b": 1.0,
  "a": 1.0
} on LFO/Additive
[LFO] Setting _NoiseTex to 3DNoise on LFO/Additive
[LFO] Method invoked successfully, asset: 3DNoise
[LFO] Assigning texture 3DNoise to property _NoiseTex of LFO/Additive
[LFO] Setting _QuadraticExpansion to -0,1 on LFO/Additive
[LFO] Method invoked successfully, asset: Flames
#

this is for the CPP engine

grim bridge
#

:/

brittle tendon
#

so it has to be in the shaders

grim bridge
#

But what changed with em

brittle tendon
#

I have no idea

#

especially since it was before the Unity upgrade

#

let me just try to grab some older versions of LFO to test

#

nope, still only getting red on 0.2.1 and 0.2, and 0.1 worked completely differently

grim bridge
#

Rip

brittle tendon
#

so something must have changed in the game somewhere between 0.1.3.2 and 0.1.4.1

#

most likely between 0.1.4.0 and 0.1.4.1, since that where schlosrat first noticed the red plume on his engines

grim bridge
#

Does anyone still have a 0.1.4.0 decomp?

brittle tendon
#

actually, good point

#

I do

grim bridge
#

I do have a second install, maybe thats still 0.1.4.0

brittle tendon
grim bridge
#

Perfection

brittle tendon
#

I guess I should grab a 0.1.4.1 install

#

to do a diff

#

hopefully the downgrade won't take long

brittle tendon
#

Code diffs weren't that helpful...

#

Nothing significant between 0.1.4 and 0.1.4.1

#

And there's a lot between 0.1.3.1 and 0.1.4, I did look in some places that have to do with VFX, rendering, and such, but again, nothing that seemed significant

#

But then there's also the fact that the shaders are all broken in the same way

#

Even though we checked that the code that is setting the colors on the material is setting the right values

#

It would be kinda weird if all the shaders had the same bug

grim bridge
#

So, I do have an old 0.1.4.0 install

brittle tendon
#

Nice!

grim bridge
#

I just need the mods to test with

#

a version of LFO and a version of SPARK where the plumes go red

brittle tendon
#

Definitely the latest release of LFO on CKAN/SpaceDock

grim bridge
#

and SPARK

brittle tendon
#

And the latest version of SORRY should work too

grim bridge
#

SPARK was the one with the red plumes

brittle tendon
#

And latest version of SPARK

brittle tendon
#

None of them get anything else than the white-red spectrum

grim bridge
#

Alright

#

It feels weird booting up 0140

brittle tendon
#

This is what the SORRY plumes should look like

#

The 3rd one is the one I was testing

#

#1092613573290754108 message

#

And this is it in the game now

#

I think that should illustrate the shader problems pretty well

grim bridge
#

And yes patch 4

brittle tendon
#

Amazon

#

So if schlosrat's theory is right, your plumes should look right

grim bridge
#

If I can get them at all

#

What is the name of that engine?

brittle tendon
#

Reiptor-12

grim bridge
#

This looks like not the correct plume at all?

brittle tendon
#

Yeah... That looks like the same shader issue

grim bridge
#

So we can rule out 0141

brittle tendon
#

Welp

#

Time to start downloading 0.1.3.2

grim bridge
#

I'm thinking this is a bug in LFO

#

tbqh

#

I don't think anything changed in the game

#

I think LFO is setting stuff up incorrectly

brittle tendon
#

Could you try version 0.2.1 and 0.2.0 in your version of the game?

#

0.2.0 definitely had to work

#

But it doesn't work at all in KSP 0.1.5

#

or possibly it doesn't work with the latest SORRY

grim bridge
#

Launching with 0.2.1 now

brittle tendon
#

Thank you

grim bridge
brittle tendon
#

that's... different, but also wrong??

#

it looks like the mesh is correct, but still wrong colors

grim bridge
#

But also idk if the latest version of SORRY is correct for that

#

SPARK just wont load with a lower version of LFO

#

imma use SORRY 0.4.0

brittle tendon
#

yeah, SPARK uses the volumetric plumes

#

which Lux only added in 0.9

#

and schlosrat had working blue plumes at some point

#

so it can't be because of LFO updates

#

it has to be a game version thing...

grim bridge
#

Or it could be lux doing undefined behaviour that didn't mesh well with the game

brittle tendon
#

that's definitely possible

#

but if I'm right, then it would work in 0.1.3.2

#

I'll download it

grim bridge
brittle tendon
#

that's 0.2?

grim bridge
#

Thats 0.2.1, with sorry 0.4.0

brittle tendon
#

that's expected

grim bridge
#

Ahh alright

#

Then hmm

#

this version should've worked

#

but it doesn't

brittle tendon
#

@split geyser is it possible your plumes only worked (non-red) in 0.1.3.2, and never in 0.1.4 or 0.1.4.1?

#

because we can't get them to work properly in either of those

#

well, I suppose we'll know either way in 10 minutes

split geyser
#

That’s easy to test. I can download 0.1.3.2. I’m pretty sure though they were fine in 0.1.4. I’ll go back and look at when I released versions of SPARK vs the game version and the fact that red was not there on 10/7 and was there by 10/15

brittle tendon
#

no need! I'm already downloading it

split geyser
#

Also, check out the SPARK releases. I generally note what version they’ve been tested with

brittle tendon
#

hm, @grim bridge could you try 0.9 with SPARK, then?

#

in 0.1.4

split geyser
#

Nope. My SPARK release notes are useless

brittle tendon
#

version 0.1.1 is the last that says KSP2 0.1.4.0

#

so that one should be safe to test?

split geyser
#

Though I do know that SPARK 0.1.4.1 came out tested with game 0.1.4.1. It was a funny coincidence

grim bridge
#

gonna go with 0.1.3 then

brittle tendon
#

and I'll run to quickly grab some food before my download finishes

brittle tendon
grim bridge
#

0.1.3 was released on 10/7

brittle tendon
#

since it came out before the hotfix release

split geyser
#

I was referring to my GH release notes but yeah, spacedock too

grim bridge
#

Actually, I have to go

#

Need to grab dinner as well with my family

brittle tendon
#

alright

split geyser
#

Driving home now

grim bridge
#

Did anything change with the fx manager between 3 and 4?

brittle tendon
#

I think that was one of the obvious few places where I looked, and no substatial changes

grim bridge
#

I wish someone named lux would document this stuff

#

In all honesty, how much will this testing help us

brittle tendon
#

I... don't know

#

I wanted to at least pinpoint exactly where the change from "working" to "not working" happened

#

to give us some sort of a clue

split geyser
#

On my SPARK GH Repo it looks like the README.md was last updated 2 months ago and says

Tested with Kerbal Space Program 2 v0.1.4 & SpaceWarp 1.4.3

Requires SpaceWarp 1.4.0+
Requires LFO 0.9.0+
Optional, but highly recommended: Kesa Solar 1.0.3+
Optional, but highly recommended: Lux's OAB Extensions 1.0.0+

#

Specifically that was updated on 9/29 actually.

#

With version 0.1.2

#

And I know for sure that SPARK v 0.1.4.1 came out shortly after KSP2 0.1.4.1 on 10/16

#

And I know that I was using LFO 0.9.0 from at least 0.1.2 onwards

brittle tendon
#

according to SpaceDock, you already released 0.1.2 for 0.1.4.1 though

pliant widget
#

Do all plumes appear red or only previously blue ones?

brittle tendon
#

and that's not the only issue

split geyser
#

OK, it's possible that "Tested with Kerbal Space Program 2 v0.1.4" actually meant 0.1.4.1...

brittle tendon
#

yeah, the 0.1.4.1 hotfix released on September 29th

#

so 0.1.2 was the first version for it

#

since it came out a day later

#

and no version of SPARK was released for 0.1.3.2

#

so it had to work on 0.1.4 and LFO 0.9 (since you were always using the volumetric plumes, and those came only in 0.9)

split geyser
#

Yep

brittle tendon
#

so it's even weirder that Cheese couldn't get LFO working properly on 0.1.4

#

this just gets weirder and weirder

#

it worked before, and now with the exact same setup, it doesn't

#

could it be something in SpaceWarp??

grim bridge
#

Was schlosrat testing with the release version of lfo

brittle tendon
#

I would assume not

#

but it's the only other variable

grim bridge
brittle tendon
#

I mean, how could debug mode affect the flow actions...

#

I feel like we're dealing with something metaphysical when it comes to KSP2 modding

#

lol

grim bridge
#

I'm gonna start setting up a shrine I suppose

brittle tendon
#

and I never had a pre-release

grim bridge
#

Maybe commune with some other eldritch deities

brittle tendon
#

that might be our best bet to solve this tbh

split geyser
brittle tendon
#

see

#

none of this makes any sense

grim bridge
#

Alright

#

Im gonna install spacewarp 1.4.3 when I get home

#

istg if that fixes the issues

#

I will delete spacewarp if it does

brittle tendon
#

👀

#

we'll have to use Quantum

split geyser
grim bridge
#

SW 1.5 was released on 10/10

brittle tendon
#

I've been trying to get this all running on 0.1.3.2 but it just doesn't seem to want to work

#

like none of it

#

SpaceWarp, LFO, or SPARK

grim bridge
#

Wtf

brittle tendon
#

tried SW 1.4.2, got stuck on loading localization addressables

grim bridge
#

1.4.3

brittle tendon
#

that was a fix for 0.1.4

#

but I think I also tried that

grim bridge
#

1.4.2 was the fix

brittle tendon
#

ah right

#

I got confused because it's marked as 0.1.3.2 on SpaceDock

grim bridge
#

Cuz spacedock didnt have 0.1.4.0 at the time

brittle tendon
#

makes sense

#

well

#

time to nuke the BepInEx folder

#

and try again

#

this time one by one

#

not all at once

#

nope... SpaceWarp 1.4.3, UitkForKsp2 1.4, stuck on localizations

grim bridge
#

On ksp2 0.1.3.2

#

Obviously that will break

brittle tendon
#

yeah

grim bridge
#

Cuz the localizations didnt need to be fixed then

#

Try with 1.4.1

brittle tendon
#

no Mods...

#

and I have only SW and UitkForKsp2 1.4.2, which was released before SW 1.4.1, and was the last version before 2.0

grim bridge
#

Sw 1.4.2 on ksp .132?

brittle tendon
#

SW 1.4.1

grim bridge
#

Dafuq

brittle tendon
#

UITK 1.4.2

#

nothing else

#

and with a clean BepInEx install

grim bridge
#

Config manager?

brittle tendon
#

installed from CKAN

#

so yeah

grim bridge
#

internal screaming

brittle tendon
#

I told you none of this makes sense

#

there's a computer poltergeist fucking with me istg

split geyser
#

This has got to be the most bizarre thing I've seen yet. We're unable to roll back to a prior working version? I mean, how that possible?

grim bridge
#

Try .1.4.1 with sw 1.4.3?

split geyser
#

Wouldn't that be expected to be borked?

#

Red plumes?

brittle tendon
#

I can't even get SpaceWarp working on 0.1.3.2

#

any version of it

#

lmao

split geyser
#

Yeah, that's what I mean

brittle tendon
split geyser
#

I'd think: Install old version of KSP, Use CKAN to install old version of SW/BIE, etc.

brittle tendon
#

I'll make a backup of 0.1.3.2 just in case we need it again

#

but it's kinda useless if SW doesn't work

#

lol

grim bridge
#

Dont use CKAN for 1.4.1?

brittle tendon
#

sure, I can download from GH

grim bridge
#

Istg

brittle tendon
#

could it be that somehow some remnant files of 0.1.5 are fucking this up?

#

since I did a downgrade from it

#

oh duh, this one was obvious

#

I didn't install UITK with the GH release

#

lol

#

because I deleted the full BepInEx folder

brittle tendon
#

fucking finally

#

I have no clue why the CKAN install didn't work

#

dear god finally

#

by the way SPARK is only marked as compatible with 0.1.4-* so I had to manually change that number

#

but it's the latest release

#

and obviously it works in 0.1.3.2

#

FINALLY

#

ok, so confirmed working on KSP2 0.1.3.2, LFO 0.9, SPARK 0.1.4.1, and SpaceWarp 1.4.1

grim bridge
#

So 2 variables

brittle tendon
#

and since schlosrat was releasing the mod for 0.1.4, it should work there as well

grim bridge
#

Game version and sw version

brittle tendon
#

so it's really looking more and more like SpaceWarp to me...

grim bridge
#

I dont know what would have changed between the versions to cause this??

brittle tendon
#

I can try with a few different SW versions in 0.1.4.1

grim bridge
#

I was testing with a prototype version of 1.5

brittle tendon
#

we should know soon, this update is only 500 MB

#

and the only difference should be updating SW to 1.4.3

grim bridge
#

Okay

#

Now 1.5...

brittle tendon
#

so I was right lmao

#

it's SpaceWarp 1.5

grim bridge
#

What the actual fuck

#

Well we narrowed down the issue

#

Kinda?

#

I am now at a loss for what could be causing the issue

brittle tendon
#

I will say, I'm honestly a bit relieved

#

I was hoping it wasn't something in the shaders themselves

grim bridge
#

Alright

#

So ... we debug lfo in 0.1.5 with spacewarp 1.5 hoping to find something for a hotfix?

brittle tendon
#

probably

grim bridge
#

You wanna start with that while im still out?

brittle tendon
#

oh and let me just quickly test SORRY, to see if all the shader issues happen after SW 1.5

#

not just the colors

#

most likely yes

#

but I'd rather know for sure

grim bridge
#

Hmm ... should we start with disabling the colors patch as a test

brittle tendon
#

those both look wrong...

#

except the left one has correct colors

#

let me test with LFO 0.2.1 now

#

these were SW 1.4.3 vs 1.5.1

#

yeah that looks right

#

so there are two issues

grim bridge
#

Wtf did we do

brittle tendon
#

the color is caused by SpaceWarp

#

and the shape of the plumes is caused by LFO

#

well this is fun

grim bridge
#

Do we have shader source for the plume in 0.2.1?

brittle tendon
#

now we have two separate bugs for the price of 1

brittle tendon
#

the unitypackage schlosrat has is called 0.2.1, but it already has the volumetric shaders

#

so it's more like a wip version of 0.9

#

and Lux didn't commit any of his Unity project stuff

#

so most likely we don't have the 0.2.1 shaders...

#

istg if this just means the working version is lost forever

#

because of no VCS

#

I will commit murder

#

as for the SpaceWarp part of the problem, I suppose we could just port 1.4.3 to work on 0.1.5

#

and then start bisecting the commits that led to 1.5

grim bridge
#

Not easy

#

Most of it was straight from 1.4.x -> restructure -> 1.5

brittle tendon
#

hm

#

I hate all of this

grim bridge
#

We kinda just have to grok the changes

brittle tendon
#

just to get the full set of permutations

#

SW 1.5.1 + LFO 0.2.1

#

basically what you had

#

correct shape, wrong color

#

these two issues are definitely completely separate

grim bridge
#

Wow

#

At least we have more info

brittle tendon
#

yeah, it was driving me crazy that we couldn't reproduce it

grim bridge
#

@brittle tendon the shader shape is correct in unity, right?

brittle tendon
#

I haven't played around with it that much but it looks like it?

grim bridge
#

For the mesh based

brittle tendon
#

honestly I don't really know how to recreate these more complex plumes

#

but there were no hard edges or anything

#

so I think it looked fine

#

oh but it also did in-game...

#

so that proves nothing

#

I couldn't resist

grim bridge
#

Honestly, LFOs shaders not having any documentation confuses me into how anyone could use it

brittle tendon
#

with a lot of help from Lux

#

lmao

#

well, except for JiMKesa

#

let's face it, he's just a genius

#

he gets everything working without anyone's help while we're struggling

#

lmao

#

it will also be a bit difficult to test in Unity whether the plume shape looks good or not

#

because we don't know how it's supposed to look for which values

#

🙃

#

oh but actually no

grim bridge
#

We could decompile the asset bundle for SORRY?

brittle tendon
#

we could replicate the values from existing JSON configs

#

for SORRY for example

#

and I think that there's even a "load config" button in LFO

#

never tried it before

grim bridge
#

Ah wait

#

Sorry uses mesh based plumes

#

Unless I have an old version of sorry that I just grabbed

brittle tendon
#

it does

#

Lux never finished his volumetric plumes for his engines

grim bridge
#

Bug in the editor

#

It needs to create the folder first if it does not exist

brittle tendon
#

noted, thanks

grim bridge
#

Actually, why the fuck is the save json button calling load json?

#

Wait, nevermind

#

Ahh I need to put the thing as a child of an object

brittle tendon
#

why does ThunderKit just work in 99% of cases now

#

I'm not even using your fork

#

no need to reimport or "Fix Unity" after restarts most of the time

#

Unity is so inconsistent istg

grim bridge
#

@brittle tendon so your stuff completely broke the LoadConfig stuff

brittle tendon
#

how fun

grim bridge
#

As the LoadedShaders is never updated for the LFO class

brittle tendon
#

why the fuck does the editor code depend on the runtime stuff

#

and vice versa

#

like, LoadedShaders was always written only from the flow action, no??

grim bridge
#

Yep...

brittle tendon
#

so I didn't break it, it never could have worked

grim bridge
#

And I am trying to fix this stuff in the editor

brittle tendon
#

I feel like at this point we would be better off really just first completely rewriting it

#

and then fixing the shaders

grim bridge
#

Yeahh

#

I really just want to test something

#

Honestly, screw it, lets rewrite this

#

I am not dealing with this as is

#

I cannot

brittle tendon
#

and consider this: at least now it's a single solution where you can build and test the runtime part with a single click, and for the editor part you don't need to do anything, just push it

#

it used to be that you go to a .NET project, build the DLLs, copy them to the Unity project, export a unitypackage of all of it, and make a release with that

grim bridge
#

The problem is, we need plumes to test with

#

As we more than likely will break stuff

brittle tendon
#

I'll attempt to remake some

#

we still have the JSONs for SORRY

#

I can just manually write down values from it

split geyser
#

We obviously have the JSONs for SPARK, and presumably there must be JSONs for Questaria

brittle tendon
#

indeed

#

but I thought the SORRY ones were an obvious choice, since they are pretty complex, so they should show well if everything behaves the same, and they were made by Lux, so supposedly they should be written how he intended

split geyser
#

I'm kinda amazied right now. You guys have done soooo much

#

That you've isolated this down to two bugs in two different things is really amazing

brittle tendon
#

yeah, very glad we got to that stage at least

#

now to fix both!

split geyser
#

Are you sure that re-writing is the best path to that?

brittle tendon
#

it will definitely make us not want to tear all our hair out while working with the current codebase...

#

or at least make it less so

#

lol

split geyser
#

I mean I get it, SW went through a refactor, so finding that one could be pretty hard