#LFO - Lux's Flames and Ornaments

1 messages · Page 4 of 1

split geyser
#

Still, it could be a messed up thing in SPARK

#

I'm gonna call it a night, but I'll work on this some more tomorrow.

#

From what I can see I think LFO 0.10.0 is OK

#

There's some madness with one of my plumes, but since the others in that family are all behaving I don't think it's anything to do with LFO

brittle tendon
#

the plumes look just fine for me

#

when I edited the JSON

split geyser
#

Interesting!

#

All the more reason to think it's a weird issue on my end

brittle tendon
split geyser
#

Thanks! I'll check that against what I've got to see what the matter may be.

brittle tendon
#

seems like the current GitHub action is not equipped to handle projects with dependency on submodules

#
MSBuild version 17.7.3+4fca21998 for .NET
  Determining projects to restore...
  Restored /home/runner/work/LFO/LFO/src/LFO.Editor/LFO.Editor.csproj (in 4.72 sec).
  Restored /home/runner/work/LFO/LFO/src/LFO/LFO.csproj (in 4.87 sec).
  LFO.Editor -> /home/runner/work/LFO/LFO/build/bin/plugin/LFO.Editor/Debug/netstandard2.1/LFO.Editor.dll
/home/runner/work/LFO/LFO/src/LFO/LFOPlugin.cs(11,21): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/LFOPlugin.cs(5,11): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/LFOPlugin.cs(6,11): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Patcher.cs(10,21): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Patcher.cs(6,11): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Patcher.cs(7,11): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Patcher.cs(8,11): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Services/AssetManager.cs(3,21): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Services/AssetManager.cs(1,11): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Services/BepInExLogger.cs(2,11): error CS0234: The type or namespace name 'Shared' does not exist in the namespace 'LFO' (are you missing an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Services/BepInExLogger.cs(6,34): error CS0246: The type or namespace name 'ILogger' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Services/AssetManager.cs(8,33): error CS0246: The type or namespace name 'IAssetManager' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Patcher.cs(50,46): error CS0246: The type or namespace name 'LFOConfig' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Patcher.cs(118,13): error CS0246: The type or namespace name 'PlumeConfig' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]
/home/runner/work/LFO/LFO/src/LFO/Patcher.cs(19,33): error CS0246: The type or namespace name 'IAssetManager' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/LFO/LFO/src/LFO/LFO.csproj]

Build FAILED.
#

if any kind soul could approve my PR

#

ooor I'll just force merge lol

split geyser
#

Looks done?

brittle tendon
#

@grim bridge I forgot this was a thing when trying to delete a release...

#

I guess for now I'll just edit the old releases, replacing the download with a text file that says that the original had to be taken down, or something

brittle tendon
#

all the old GitHub releases are deleted, new one up, and for SpaceDock, I replaced the downloads with a zip containing this README.txt:
This version of Lux's Flames and Ornaments (LFO) has been taken down due to some issues. Please see the latest version here: https://spacedock.info/mod/3383

#

and I added a notice to the changelogs of the old versions, too

#

so I think this is the best we can do for now

#

now to fix the shaders...

split geyser
#

So much progress today!

brittle tendon
#

what a day...

#

but I'm sure we'll have plenty more fun dealing with the shaders

deep surge
#

i just want to quickly say i'll never take LFO for granted again and will remember the sacrifices you guys have made to get these pretty plumes working whenever i see them, lol

storm ore
#

Congrat guys. What a great job !
I can't check it today but as soon as possible. Respect for your work !!!

balmy tide
#

Amazing job, congrats!

lilac dawn
#

@brittle tendon Thanks for the update! Amazing work at getting this working again!

storm ore
#

Console message (unity 2022) :
Assembly 'Assets/LFO/LFO.dll' will not be loaded due to errors:
Unable to resolve reference 'SpaceWarp.Core'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Something is missing ?

brittle tendon
#

That looks like you're using an old version of LFO in Unity

storm ore
#

thanks munix. I will try

storm ore
#

Works fine ! Thanks.
I'll rebuild each part and push a mod update.
Really, thank you to everyone who contributed to this LFO upgrade

#

it didn't look easy

#

Saving plume json works nice in Assets\plugin_template\assets\plumes
loading plume json config too, except for noise texture (in LFO/Additive shader). In Unity, no noise texture reference, but exists in json
Not blocking me, just for info

split geyser
storm ore
#

it's ok

split geyser
#

@brittle tendon I dumped my old LFO and synched to 0.10.0, added an Archive folder on my local repo that's now ignored in the .gitignore, added a Meshes folder under src, and put updated blends and fbx files there with the units now in m instead of mm. There's a PR for you.

#

We're not gonna get into a situation where whe can't rebuild!

brittle tendon
#

thank you

#

however, a few things - the fbx files still contain the cameras and lights, which they shouldn't, and then, do we need two versions of each fbx to be in the repo?

#

I think just the blend files would be fine

split geyser
#

Oh! So sorry. let me fix thos rn

brittle tendon
#

no need!

split geyser
#

They're easy to fix!

brittle tendon
#

since the working exported fbxs are already in the Assets folder of the Unity project

#

it makes no sense to have them duplicated

split geyser
#

Well, I'll fix the blends to remove those so that if we ever need to remake them we don't get those things

#

I assume it probably does make sense to have things scaled in m since pretty much 100% of modders will be scaling their engines like that.

brittle tendon
#

but if you want to update them, there's one thing I've noticed now

#

the mesh is called "bell_j_01.002"

#

but to be loaded properly in the game when exported, it needs to have just the name without the .002

#

oh and one more thing, could you please move the folder with these out of src? into something like <root>/blender or similar?

#

I'd prefer to keep the src folder only for the C# projects

#

(which inevitably also includes the Unity project in the hierarchy in our case, because the LFO.Editor C# project needs to compile files that are inside the Unity project)

#

but for asset sources, I'd prefer to have them in a different folder in the root

#

sorry if I'm asking a lot 😅

#

I just really want to have some good structure in the project so that it doesn't devolve into a similar state to how it was before

split geyser
#

I think I fixed the naming - though I didn't see what you're showing up there. When I look at the blends they all look like this

brittle tendon
#

ahhh yeah that's actually my mistake, sorry

#

I opened the blend and then imported the fbx into it, to see both at once

split geyser
#

I think it's fine to remove the camera and lights, it makes generating the fbx bulletproof and we don't need them. When are we going to render these things in blender? And we could always add the default camera and lights back in quite easily if we did want to.

brittle tendon
#

and of course, since a mesh with the same name already existed, it named the imported one with the .002

#

so that's totally on me!

brittle tendon
split geyser
#

No worries. I renamed the folder blender and moved it to the root. I'll update my repo. Do I need to make another push or will updating my repo get you the update?

#

<- is a Git git

brittle tendon
#

the pull request is from one of your branches to one of the project's branches, so when you update yours, so will the pull request

split geyser
#

I thought it might be like that

#

I've pushed to my branch so it should be good to go. My tiny little contribution to this effort!

brittle tendon
#

the folder still contains the fbx files with the lights and cameras, and ideally there should be no fbx files in it

split geyser
#

That's weird. I re-exported after removing the camera and lights.

#

If you prefer I'll just delete the fbx's, but I thought you might like to have them in m

brittle tendon
#

in the LFO.Editor repo

split geyser
brittle tendon
#

yeah, and that resulted in two cameras and two lights

#

but maybe I just imported the wrong old file

split geyser
#

Hmm...

#

Weird

brittle tendon
#

let me try again

#

ah yeah it looks alright now, I probably clicked the wrong file, sorry!

#

my downloads folder is getting slightly messy lol

split geyser
#

Oh good, cause I tried that on my end and it worked. I thought I was going mad

#

I'll move the fbx's to the LFO.Editor folder where they belong

brittle tendon
#

when I try the new ones, it does result in this in Unity:

#

where the tiny speck is the old one and the big one is the new one

#

it automatically gets created at 100x scale for some reason

#

but when I set the scale to 1, it's fine

#

so hopefully it will be ok

#

it seems like the 100 scale comes from the fbx itself

split geyser
#

Hmm... Then I've messed up something in my attempt to get it to be scaled in m.

#

That's no good. I'd like these to be left in a state where anyone can use them and it's easy to update

brittle tendon
#

honestly this whole thing about units and scales is so annoying

split geyser
#

It is!

#

And I'm sure it's my fault for being stubborn and going with mm at the begining.

#

I set that as my defauilt in blender, and I really should fix that

brittle tendon
#

what worked for me was what I showed you earlier, setting the units to cm and unit scale to 0.01

#

that resulted in the correct size by default in Unity

#

but why, I have no clue

#

since units as meters and scale of 1 should be pretty much the same thing

split geyser
#

Well, I can scale everything down by 100x very easily in blender, but I suspect there's something else I'm missing. Though why 100x and not 1000x?

brittle tendon
#

well, probably because 100 cm is 1 m

split geyser
#

OIC. You could have used a scale of .0001 and set the units to mm and had the same effect.

#

You're really just saying 1 = 1

brittle tendon
#

yeah, to be honest I really have no clue how all these scales work and interact

#

you have blender units, blender unit scale, blender mesh scale, and unity scale

split geyser
#

I'm not finding the folder to drop the fbx's into. What I see under LFO.Editor is this for content in the Assets folder

#

I found it!

brittle tendon
#

it's a separate repository which is linked as a submodule in the main repository

split geyser
#

I want to get these right before I move them in though

brittle tendon
#

and yeah it's under Packages

split geyser
#

Let's see, the ones that are there are OK now? They work as is, but when you import them into a blend with the new ones then they're scaled wrong, correct?

#

Well, the new ones are scaled wrong.

brittle tendon
#

yeah, basically

split geyser
#

So if I manage to get the blends to where, if I were to import an fbx from the lfo.editor/Assests/Meshes folder, they basically overlay, then I will have gotten my blend to perhaps be scaled correctly.

#

Or rather, that a new blend importing both fbx's would have them overlaying.

brittle tendon
#

this is such a mess, jesus

split geyser
#

If I can get them to that state (and I'm sure I can), then the blends I'm submitting will be OK

brittle tendon
#

this is the scale of the one that currently works

#

when I set it to 1, it's the same size as the new one

split geyser
#

Which also makes it 100x to big, right?

brittle tendon
#

(oh because now I have the units set to meters)

#

when I had them set to cm, the scale was 1

split geyser
#

You mean the scale in Unity, right?

brittle tendon
#

in Blender

#

when my units are set to cm, and unit scale to 0.01, then the old fbx is imported at 1x scale, and the new one at 100x scale, when I set the units to meters and unit scale to 1, then the old fbx is imported at 0.01 scale and the new one at 1x scale

#

ahhhh I hate everything about this

split geyser
#

Let me work on this and you relax. I'll sort this out so that the new fbx's are the same scale as the old one, and as the stock stuff from the game. I'm sure whatever we do it will be best to be at the same scale as stock.

brittle tendon
#

thank you for dealing with this, this has been making me lose the last bits of sanity I have left after all the updates for UITK and LFO

#

but at least we know it works in the current form

split geyser
#

I think I've got it sorted now. Once again, the problem was at my end. The fix was stupidly easy, and I should have known. All I needed to do was go into it in Object mode and click Apply Rotation and Scale. I think what happened was that in changing the units this gave it an automatically applied scale transformation to keep it the same size, and Blender was relying on me to know that I would then need to go in and also click on Apply Scale and Rotation. Silly Blender! This is schlosrat! Here's a video from a test blend where you can see I've imported the original game objects as well as some brand new fbx's, and they look like they're very close but not quite identical.

#

Which is huge next to the shock diamonds...

brittle tendon
#

awesome! no clue why the bell meshes are so huge compared to the shock ones lol

split geyser
#

I'll move the test.blend to Archive so it doesn't get commited, and the new FBX's to where they need to go

brittle tendon
#

but it seems like they work fine that way, so that's all that matters

split geyser
#

Oh, the bell is used I think when you're modeling a plume expanding in space maybe?

brittle tendon
#

actually I think those may be placed, as the name suggests, inside the engine bell

split geyser
#

But yeah, if they work then they work, and now we've got blends that can generate proper fbx's (I hope!)

#

Well then, I have no idea why they're such a different scale.

#

Hmmm... before I just haul off and drop new FBX's into a unity project folder... Can I do that without messing up the .meta files? Should I do that in Unity instead?

brittle tendon
#

yeah, that's probably for the best

split geyser
#

I'll do it that way then

brittle tendon
#

just delete the old files and their meta files, and drop in the new ones

#

so that new meta files are generated for them

#

and please assign them to the lfo-resources bundle

split geyser
#

The project is 2022.3.5f1, right?

brittle tendon
#

yep

split geyser
brittle tendon
#

that's not a Unity project

#

it's just a package inside a project

#

you need to open src/LFO.Editor/Unity

split geyser
#

Ahh!

#

Good thing I clicked Quit then.

brittle tendon
#

the way packages work is that you create a project that will hold the package, and create a folder for it in the Packages folder

#

and then you edit it through the project

split geyser
#

Yeah, well now I've got a Project called "Unity" in my hub... That'll be easy to remember!

#

Also this

brittle tendon
#

it's not the greatest name, I could probably rename the folder to something like LFOUnity

split geyser
#

Expected?

brittle tendon
split geyser
#

OK.

brittle tendon
#

this is really annoying but there's not much we can do about it

#

you may have to do some shuffling around to get ThunderKit to show up

#

LFO depends on KSP2_x64, but obviously we can't put that on GitHub, so there are compile errors when you clone and open the project

split geyser
#

So, for my local copy, it's safe to install TK, import the game, etc.?

#

And that won't mess up the repo?

#

Seems like TK is installed, it popped up the Settings dialog

brittle tendon
#

ah great, that makes things easier

#

sometimes TK doesn't pop up because of the compile errors, and you have to take the lfo.editor package, move it out of Packages, import KSP2, and then move it back in

split geyser
#

So, I'm seeing LFO Editor Tools int he Packages. I thought things in Packages are RO.

brittle tendon
#

RO?

split geyser
#

Will I be able to drop in new mesh FBXs?

#

Read Only

brittle tendon
#

oh

#

well usually packages are not actually in the Packages folder

#

this one is

#

because the project is the source of the package

#

so nope, it is not read-only

#

because it's not just a cached remote package, it's a local one

split geyser
#

OK, I was able to delete the old ones and drop in the new ones, but they look rotated by 90deg

#

The ones I found in there were all horizontal.

brittle tendon
#

well what happens when you drop them into the scene?

split geyser
#

I'm concerned I might have messed something up, but OTOH I know that in Blender I can import these and the stock .obj's and they're oriented the same

split geyser
#

Hi, I'm Hugh. Hugh Jass. Pleased to meetcha

brittle tendon
#

well then, you can try to build the bundle and drop it into your game, and see if they work fine

#

or send the bundle to me to test with SORRY

#

since I have various vessels and save files ready for quick testing

split geyser
#

Presumably I need to install KSP2UT then

brittle tendon
#

no

#

just build the bundle

#

from the Assets menu

#

KSP2UT messes up the project, because it usually prevents ThunderKit from working when KSP2 is not imported

#

it's only really needed/useful for parts

split geyser
#

Hmmm... Need to import the game looks like

#

Are we OK to do Include Everything again?

brittle tendon
#

no, that still doesn't work

#

at least not in the main TK repo

#

Cheese has a hotfix in her fork, but I didn't want to add a dependency to a fork

split geyser
#

Makes sense

#

From errors to warnings. Are these expected?

brittle tendon
#

yep

split geyser
#

There are a lot. 999+

brittle tendon
#

huh?

split geyser
#

Should be 666 I think...

brittle tendon
#

there should be like ~10 of them

#

all they all coming from the shader?

split geyser
brittle tendon
#

hide the warnings, seems like there are also 5 errors

split geyser
#

There are a lot of these hash conflicts

brittle tendon
#

what the fuck

split geyser
#

The errors are the old ones

brittle tendon
#

alright

#

so if you clear the console, everything is good?

split geyser
#

I'll clear the log and rebuild

brittle tendon
#

yep, thanks!

split geyser
#

Now it doesn't build. Like nada. No errors, warnings, or anything.

brittle tendon
#

is there an old built bundle? if so, delete it

#

it doesn't rebuild if there are no changes

split geyser
#

Where will it be?

brittle tendon
#

in AssetBundles

#

in the project's Assets, not in Packages

split geyser
#

Delete in Unity or in file explorer?

brittle tendon
#

it doesn't matter

split geyser
#

'cause it had no effect deleting in file explorer

#

There's a 25MB file from 11:14 am in there

brittle tendon
#

ok and if you delete the whole AssetBundles folder?

split geyser
#

That got it moving

brittle tendon
#

alright, finally! 😆

split geyser
#

Sorta...

brittle tendon
#

oh god

split geyser
#

It created the folder and put stuff in it

#

But there's nothing in the Addressables Report and nothing in the console

brittle tendon
#

this isn't addressables

#

asset bundles and addressables are completely separate

split geyser
#

Oh wait! I'd hidden the warnings...

#

I'm a dufus

#

12 warnings

brittle tendon
#

alright, that seems like the normal amount

#

it's just some inefficiencies in the shaders

#

I didn't want to mess around with them for now, when it works

split geyser
#

Like this stuff?

brittle tendon
#

yeah, exactly

split geyser
#

There you go then. A test bundle.

#

I'll be happy to test it as well, but most likely it needs to be tested with SORRY engines.

brittle tendon
#

yeah, those most notably make use of those meshes

#

it seems like you didn't add the new meshes to the bundle

split geyser
#

Nope, 'cause I'm a dufus

#

Is this not already established?

brittle tendon
#

I prefer to call it "gaining experience" 😆

split geyser
#

LOL, if you say so!

#

<- slow learner

#

Here in 'merica we say "rides the short bus", but I'm sure that it would be insensitive to imply that I measure up to that standard.

#

There was a guild in WoW called "Rides the Short Bus"... That was a lot of fun to see under a character name

brittle tendon
#

😆 never heard that one before

split geyser
#

Now what about this issue?

#

I've put the meshes into the proper folder, made them part of the bundle, and still my GitHub doesn't see them in that folder?

brittle tendon
#

ah alright, so seems like .vsconfig needs to be added to the .gitignore

brittle tendon
#

LFO.Editor

#

not LFO

#

you should be able to see it by opening the Packages/lfo.editor folder in GH Desktop

split geyser
#

Ahhh... I thought we'd already established my bus?

#

I'll yank them out of the blender folder, then push

brittle tendon
#

wait with that push

split geyser
#

waiting...

#

Not pushing some stuff... but also waiting

brittle tendon
#

I still see one .fbx checked, that's one thing

split geyser
#

Yeah, you don't want that one anyway

#

It's also not in the bundle

brittle tendon
#

also we probably don't want to push all the other files below

#

the project and TK settings

#

and I have no clue why your packages-lock.json is different

split geyser
#

How about this? Just the new blends

brittle tendon
#

yeah, that would be ideal

split geyser
#

And maybe the .gitignore needs some fresh love

brittle tendon
#

well, most of the ones that are unchecked are supposed to be in the repo

#

but there shouldn't be any need to update them

#

but the .vsconfig folder should definitely be added to .gitignore

#

ahh I see another issue now that I'm testing with SORRY

split geyser
#

QA!

brittle tendon
#

two of the files start with bel_*

#

but I named them bell_*

split geyser
#

I can change those, the stock one's have bel_j_xxxx

#

I'm not sure what j is for. I assumed jar

brittle tendon
#

also one of them has a capital J in the bel_J_1 in the mesh name

#

but a lowercase j in the file name

split geyser
#

OK, I fiX!

#

(The capital X was intentional bTw...)

brittle tendon
#

by the way the originals had "bell", I double checked

split geyser
#

Do you want the exxact same names?

#

I had assumed that since we're different we'd have at least slightly different names.

brittle tendon
#

definitely not, but it makes more sense to keep it a real word 😆

split geyser
#

Would you like it to be just bell and bell_p2 then?

brittle tendon
#

I'm really annoying today with all these requests and corrections, aren't I

split geyser
#

Nope, not at all!

brittle tendon
#

since it's already hardcoded in C#

split geyser
#

hardcoded as bel_j_1 and bell_p2_1?

#

I wanna be sure I fix it right

brittle tendon
#

double l

#

for both

split geyser
#

Oh that... Picky picky picky

brittle tendon
#

basically I have a dictionary that maps the old names to the new ones

#

so that plumes made for older LFO can still work

split geyser
#

What should I be saving this unity project as?

brittle tendon
#

that's just a scene, not a Unity project

#

and you don't need to be saving it at all

#

whenever there are some changes there, I just do this

#

since we don't need anything to be in the scene in the repo

split geyser
#

The only issue with that is that where you have SampleScene* I've got Untitled* and so Discard changes is grayed out for me

brittle tendon
#

huh why do you have an untitled scene at all

#

you should see the SampleScene under Assets/Scenes, right?

split geyser
#

Cause I dropped a mesh onto the scene to see if it was horrizontal or vertical

brittle tendon
#

that doesn't really answer the question

#

since I do that as well, but in the SampleScene

#

not a new untitled one

split geyser
#

Ha! I got around it!

#

I double clicked on Sample Scene to open it and that let me discard the changes

brittle tendon
#

basically, there always has to be an open scene, so you should just be able to discard it by opening SampleScene

#

yeah, exactly

split geyser
#

If this bundle works then it will mean there are at least two (or three counting Cheese) who can readily build and export the lfo bundle.

#

There is safety in numbers! And you are worth 2 or 3 at least

#

Did you ever play the old Baulders Gate game?

brittle tendon
#

nope, I've only played BG 3

split geyser
#

There was this big strong character (don't recall the name) who had a pet giant minature space hamster (a real hamster, but that's not what he thought), who would say "there is safety in numbers, and I'm worth 2 or 3 at least". And you know what, he was!

brittle tendon
#

😆

#

guess what

#

I also had a bug in LFO

#

[Error :Lux's Flames and Ornaments] Couldn't find asset vfx_exh_bell_j_01_0

split geyser
brittle tendon
#

I was missing the _0 in my dictionary

split geyser
#

The hamster's name was Boo!

brittle tendon
#

I guess it's time for LFO 0.10.1

split geyser
#

Oh FFS!

brittle tendon
split geyser
#

Damn, it makes me wanna go play the game!

#

It takes me back decades...

brittle tendon
#

if you haven't played the new Baldur's Gate 3, I strongly recommend it

#

one of the best games I've ever played

split geyser
#

I haven't actually. I should play it. I've heard good things!

brittle tendon
#

seems like the meshes are still not scaling well

#

and it is indeed oriented wrong

split geyser
#

Wow... I don't get it. I imported both the new one and the stock one and they were oriented, positioned, and scaled basically the exact same

#

If it's wrong, it's on me.

#

But... how?

brittle tendon
#

check your meshes for these settings

#

(when you click on the mesh in the Meshes folder directly, and scroll down in the inspector

#

they should look like this, with 0 rotation and 1 scale

tranquil plank
#

There are import settings in unity that will try to automatically fix orientation of meshes. And then theres the options in a blender export that also try to do the same.

split geyser
brittle tendon
#

yeah, as expected

tranquil plank
#

I think the best practice for unity is to turn off the Y-Up setting in blender(so blender gets to use what ever its orientation is), and let unity try and correct the orientation

#

Or vice versa

#

But not both

split geyser
tranquil plank
split geyser
#

Unity is wonky

tranquil plank
#

Cause unity also has a convert scale button that will convert real measurements into unity units. This scale depends on the scale set in the blender mesh

split geyser
#

When I import both the FBX and the stock game's OBJ files into the same empty blend they are scaled and oriented just fine

brittle tendon
#

I hope you don't mind if I get back to something else for now, since we've already spent 3 hours on this

#

and the version we had before works fine

split geyser
#

Sure. No worries. Eventually I'll get these blends to make FBXs that work straight out of the box

tranquil plank
#

Cause and fbx export and obj export will have different settings

split geyser
#

Interesting, there is this

brittle tendon
#

yeah, I did have to uncheck that for my fbx files

#

but also it makes no sense, 1cm is 0.01m

tranquil plank
#

(Also that bake Axis Conversion button the orientation import setting i mentioned earlier)

split geyser
tranquil plank
tranquil plank
split geyser
tranquil plank
#

Hmm the scales are normal in blender. Which probably means you've got the "convert units" option turned on when importing to unity

#

This could be different per mesh type

brittle tendon
#

so who knows what export settings they used for them

split geyser
#

For importing into Unity all I did was darg and drop the fbx's into the folder

tranquil plank
#

Ah, i see. Then OBJs are most likely already in a proper unity scale

#

The fbx then needs to be converted to the right scale. Either through the import setting or changing the scale of the mesh in blender. (I would reccomend doing this on the unity side)

split geyser
tranquil plank
#

Give it a shot

split geyser
brittle tendon
#

it's interesting that the file size keeps changing by a couple of kB

tranquil plank
#

Its probably the extra information from. The convert units, and bake axis conversion settings

split geyser
#

For reference, the previous version I posted had Convert Units ON and Bake Axis Conversion OFF. #1092613573290754108 message

brittle tendon
#

that doesn't look right

#

this is the first file

split geyser
#

LOL

tranquil plank
#

Lmao

split geyser
#

Those look a tad large...

brittle tendon
#

actually I think the size is right

#

the orientation is wrong

#

I'll try the second bundle

#

well that changed nothing

#

so the axis conversion doesn't seem to have any effect

tranquil plank
#

Hmm, can you make sure that the axis conversion option is actually checked

#

I'm not sure if the settings travel with the mesh or the meshes .meta file

split geyser
tranquil plank
#

Huh

split geyser
#

I clicked the box and hit apply for each one

tranquil plank
#

I meant @brittle tendon

brittle tendon
#

I'm just dropping the built bundle into the game

tranquil plank
#

Ooh

#

Nvm then

#

Huh weird

#

Looks like each child/sub mesh is being oriented in world space. Maybe adjust the settings from blender? Try "Apply Transforms"?

brittle tendon
#

the files each only contain one mesh, and the plume is composed of multiple of them

tranquil plank
#

Oh, how does the plume work exactly?

split geyser
split geyser
brittle tendon
# tranquil plank Oh, how does the plume work exactly?

basically it's composed of a hierarchy of objects in Unity, you can add as many meshes as you want, choose the appropriate shader for each, toy with the shader parameters until you're happy, and then a JSON config file is exported for the plume, dropped into the game, and the mod then recreates the plume hierarchy and appends it to the engine's root "plume" object

tranquil plank
split geyser
#

They are at default. I've never messed with those settings

#

I'm going to give it a go with just the Apply Transforms done in Blender and see what they look like in the Unity project

tranquil plank
brittle tendon
#

for reference these are the settings from other custom meshes in the project

tranquil plank
brittle tendon
#

however the ones that we have replaced with the new ones were the game objs, so the import settings could have looked different

split geyser
#

OK, so I did one, and it came in like this

#

If I place it in a scene though, it orients like this

brittle tendon
#

yeah, but the game ignores these position/rotation/scale parameters

#

so it's important that they're at 0, 0 and 1

split geyser
#

Why are they not though?

brittle tendon
#

I would like to know that, too

storm ore
#

When i export fbx from blender :

  1. Rotate -90 to X
  2. Object -> apply rotation
    3 rotate 90 to X
    Then export fbx
tranquil plank
#

I've gotta head out, hope this gets figured out. Converting of axis and scale units has always been and will always be a pain. Good luck yall

brittle tendon
#

though for example Lux's Flames mesh also has those wrong:

#

and it shows, because when you're making a plume with it, it's oriented incorrectly and you have to manually rotate it back

split geyser
brittle tendon
#

there's actually a lot of weird rotations happening in general with LFO

#

but we can't really go back and fix it without breaking current plumes (even more)

split geyser
#

Success! Maybe...

#

I'll do the others this way (thanks Jim!) and we'll see soon enough if this sorts the rotation problem.

brittle tendon
#

except it's not supposed to be oriented that way

split geyser
#

Sure it is.

brittle tendon
#

(if that is the current one)

split geyser
#

You mean in the scene? I think it should be

#

My engines are all oriented like that with thrust pointed down

brittle tendon
#

I mean it should but the obj wasn't like that originally

#

which means plumes are not made with this (correct) orientation

split geyser
#

The object was originally like this, right?

brittle tendon
#

yeah

split geyser
#

And it is again!

#

The scene is rotated from the view of the obj

brittle tendon
#

oh...

split geyser
#

Wacky, huh?

brittle tendon
#

jesus this is such a mess

#

how come it was so easy for me to fix the ones you originally made

#

I simply imported the fbx into Blender, changed units to cm and scale to 0.01, exported, and then in Unity I unchecked Convert Units

#

and that was it

#

and it works fine

#

no rotation issues or anything

split geyser
brittle tendon
#

🤞

#

let's see

split geyser
#

The one before was El malo...

#

And the next one will be El Feo!

brittle tendon
#

no bueno...

split geyser
#

Poo!

#

Scale, though and not orientation?

brittle tendon
#

yes

#

orientation seems correct now

split geyser
#

We can try the same GD trick with scale then. How about I convert the model to use cm?

#

I bet that's what it needs.

brittle tendon
#

you can try

#

but it should be possible to get this working using whichever units you choose

split geyser
#

Yeah, it seems the problem is here where the scale shows 100x

brittle tendon
#

it should just be possible to apply the new scale in Blender

#

and have the mesh itself scaled to 1x

split geyser
#

Didn't that get solved by me unlicking the Convert Units?

#

At one point the scale was OK. Let me do that rn and try again.

#

Though I suspect the more long term solution will involve changing the blends to be in cm.

brittle tendon
#

there we go, finally

split geyser
#

Converting a blend to be scaled in cm gives this when I bring in the FBX

storm ore
#

to export fbx with correct units for unity

split geyser
#

That's with Convert Units checked

split geyser
#

I'm going to do this with the others, then rebuild the bundle

brittle tendon
#

I really hope that this was worth the 4 hours it took

split geyser
#

If it puts this problem behind us and establishes a documented path forward, then it was time well spent. Behold! I present to you Tiempo Bien Gastado!

brittle tendon
#

nope

#

too small again

split geyser
#

This was the same FBXs, but with Convert Units unchecked.

brittle tendon
#

yeah, that works

brittle tendon
#

alright so I recreated the hierarchy of the SORRY Raptor plume

#

and managed to load the JSON config into it

#

safe to say that there is no difference in the shader between the game and the editor

#

the shader is just incorrect/unfinished

#

or

#

it' just new and the old plumes were supposed to be remade

#

(the sizes and positions of the elements don't match because I'd have to do that manually, but the general shape is the same as in the game)

brittle tendon
#

one thing I want to do is enable the loading of the full plume, including its object hierarchy, all the objects' positions, rotations and scales, and all that, from an existing JSON config

pliant widget
# brittle tendon

Almost looks like an expansion ratio somewhere was set to be negative instead of positive

brittle tendon
#

because currently the way it works is that you have to have the object hierarchy already fully created, and have to set up the position/rotation/scale of every object manually, and add all the components to all the objects

#

and then you can press "Load Config" and it just loads the material properties from it

#

I think it shouldn't be too difficult to make it so that it instead creates the full plume for you

brittle tendon
#

I took an already existing SORRY plume

#

and the linear expansion is set to -1 on the main mesh

#

but that worked well with LFO 0.2.1 and the older shader

#

it's possible that the old shader was "broken" and this one is working as intended

#

but in that case, plumes will have to be remade

grim bridge
#

I want to mess with some stuff

brittle tendon
grim bridge
#

getting a bunch of NREs

brittle tendon
#

with LFO and KSP2?

grim bridge
#

Yep

brittle tendon
#

but it looks to be the same size so idk

grim bridge
#

I should have the latest version of LFO.Editor]

brittle tendon
#

what line is that?

grim bridge
brittle tendon
#

wut

#

it says the error is in a whole different file though

grim bridge
#

wtf

brittle tendon
#

I see FloatParam.cs

grim bridge
#

Thats the line its actually referencing

#

idk but double clicking on it brought me to the mastergroup

brittle tendon
#

weird

grim bridge
#

I see what happened

brittle tendon
#

but yeah that makes sense, since materials are created programmatically and assigned directly to the objects

grim bridge
#

it didn't apply the materials corrrectly

brittle tendon
#

not actually saved to files

#

so the object will have references to non-existing materials

grim bridge
#

So can you send me the config?

brittle tendon
#

you'll still need to create them all manually probably but sure

#

the config only applies values to existing materials

grim bridge
#

When attempting to load the config

#

(I added a material instance ot every child beforehand

brittle tendon
#

the plume is not really complicated to recreate anyway, I just created this object hierarchy, where Engine is just a cube cube, thrustTransform is simply moved below the engine, Plume is an empty object with the master group component, and then Screen and all the Scatter objects are just unpacked Flame prefabs, Mach 1-3 are unpacked shock_1_pt2 prefabs, and Bell is an unpacked bell_p2_1 prefab, and these all need a LFO Throttle Data component, where you click New material instance

brittle tendon
brittle tendon
# grim bridge

do a search+replace for LFOAdditive 2.0, replace it with LFO/Additive

#

in the config

#

that's another thing I'm adding to the editor scripts, being able to load the shader from materials and shaders

#

just like the runtime can

#

the Editor is severely lacking in features that exist in the runtime

grim bridge
#

Now I have the issue of the Mach 3 scatter being way too big

brittle tendon
#

ah yeah, same, didn't even notice it lol

#

it doesn't matter all that much

grim bridge
#

Scaling that down helped

brittle tendon
#

like I said, none of the positions/rotations/scales are correct

#

since that info isn't loaded from the config in the current version

grim bridge
#

But yeah, that is wrong in the editor

brittle tendon
#

I wouldn't even say it's wrong

#

it just has linear expansion set to -1

#

so it makes sense it looks like this

#

it looks fine with values ~0-1

#

I think the fix for this is to just remake the plumes that look wrong

#

for example Kesa plumes look just fine, because I'm guessing they were remade with the newer (0.9) version

#

and to make remaking existing plumes not as tedious, since going from older LFO to current LFO breaks everything in the editor, I'll just add a button to (hopefully) completely re-create the plume from JSON

#

and then the few wrong values can just be easily readjusted

grim bridge
#

Setting the linear expansion to zero in the throttle data while keeping the same curve looks aight

brittle tendon
#

yeah

grim bridge
#

I still need to plan out the KSP2UnityTools/LFO integration, and also how to ignore files, which is actually quite simple

#

I want LFO to keep its stuff in its bundle so it doesn't mess with addressable groups itself, so at the runtime it will load either from its bundle or addressables

brittle tendon
#

I don't even know if it wouldn't be better to keep all that functionality in LFO itself

#

(except for the ignoring stuff)

grim bridge
#

Well, KSP2 Unity Tools sets up a custom addressables group for everything

#

And for asset deduplication it makes sense to have the plumes keys be like {mod_id}/plumes/{part}.json

brittle tendon
#

yeah it does

#

I just wish KSP2UT didn't mess with ThunderKit when KSP2 is not imported

grim bridge
#

How does it mess with thunderkit?

#

I've never had this happen to me

brittle tendon
#

LFO also depends on KSP2 code but it doesn't seem to break it

brittle tendon
#

at least whenever I tried

#

because of the compile errors presumably

#

but LFO doesn't do it

#

even though it also has compile errors

#

so you can go and import the game and everything works fine

#

usually

#

with KSP2UT, you have to uninstall the package, import KSP2, and reinstall it

#

I hit the issue when I added KSP2UT as a dependency for my LFO project

#

so I removed it

grim bridge
#

wtf

#

I am literally doing nothing w/ thunderkit though in KSP2UnityTools

brittle tendon
#

yeah I know

#

idk why it happens

grim bridge
#

Alright, I'm going to try myself

brittle tendon
#

it's why I originally told you that Unity templates won't work

#

because I noticed that you can't import KSP2 when KSP2UT is installed

#

but then I saw that it's not the case always, since with LFO it was fine

grim bridge
#

I removed KSP2_x64 as a package from my own KSP2UT testing project

#

now lets restart it

brittle tendon
#

I can't guarantee it will always happen, since I didn't test it extensively, but it definitely happened the few times I tried

grim bridge
#

It works fine for me though...

brittle tendon
#

bruh

#

now I can't replicate it either

#

but I swear to god it happened to me at least 4-5 times

#

with various projects

#

no TK menu, no TK window

#

oh well

#

let's just ignore that lmao

#

I'll let you know if I encounter it again

#

but for now I guess it's ok

grim bridge
#

Alright
In that case, can you review my PR for KSP2UnityTools

brittle tendon
#

sure

grim bridge
#

Wait

brittle tendon
#

btw I think you skipped a version

grim bridge
#

I did a dumb

#

I did not

#

I bumped the version in my editor

#

but ehh I need to fix something rq

brittle tendon
#

this was the version I just installed from main

#

that's why I said it

#

ah yeah, I see

grim bridge
#

Ohh I named it 0.6.4 in the pr, but 0.6.3 in the package.json

brittle tendon
#

Rider used to correctly inform about stuff that wasn't available in the current Unity version of C#

#

but now it doesn't seem to anymore

#

I also had that thing with file scoped namespaces happen multiple times, when they don't work in Unity

#

idk why it no longer recognizes that

grim bridge
#

I am going to set rider to force block scoping

brittle tendon
#

yeah, that's what I did, for the specific project

grim bridge
#

But anyways, that PR should actually be right now

brittle tendon
#

also I'm going to comment out the KSP2 Builder GH action in LFO for now

#

since it doesn't clone the submodule and thus doesn't work

grim bridge
#

Hmm, one thing with loading from addressables ... if we put textures and such in addressables, then they won't be loaded properly in the editor when loading a config

brittle tendon
#

hm why not?

#

the files still have to be in the project somewhere

#

and the search is done by name

#

in both editor and runtime

#

at runtime we just need to load everything from a specific label, and then find the asset with the correct name among the loaded ones

#

and in the editor, it's just about doing AssetDatabase.FindAssets("name")

#

(and also checking the type, since there can be technically multiple assets with the same name, but different type)

#

such as a shader and its material

#

I don't see a problem though

grim bridge
#

Alright

#

I'm going to work on the editor side of this for the moment

brittle tendon
#

alright

#

let me push what I have for now so you have the latest version

grim bridge
#

Darn I was already pushing something to dev

#

Though all I pushed was having it reference KSP2UT, and then changing the load json button to be a lot more usable

brittle tendon
#

oh well

#

time to get merging

#

lmao

#

it's just the one file

grim bridge
#

Aight, time to fix what you just pushed

brittle tendon
#

this is gonna get messy lifesupport

#

lmao

#

I still plan on refactoring some stuff

storm ore
#

Hy. Everything works fine. Great work guys. Mods updated with unity2022 and LFO 0.10.0
When i edit curves for engine, i can't edit values. I have to move dots manualy. It seems to be general with all curves edition. Is it same for you ?

pliant widget
#

Yeah they changed the curve editor since Unity 2020, to edit the values of the key you have to: select the dot by drawing a rectangle over it and then press Enter it'll allow you to modify the x,y values

storm ore
#

Thanks Safarte

brittle tendon
#

very interesting

#

seems like this particular bug only occurs when there's more than one active engine

brittle tendon
#

aaand I got it figured out I guess

#

it's only SORRY engines that do this

#

and the SORRY engines also have all the objects, components and materials directly on the prefab, which they shouldn't

#

alright, not all SORRY engines, the only ones I see this happen with are the sea level Reiptor, sea level Kheap and the Mk2 double-nozzle engine

#

and I can confirm it's not related to the "Error assigning 3D texture to 2D texture property" errors

brittle tendon
#

this would be much easier to debug if I could see how the SORRY prefabs are set up

#

I mean I can in Asset Studio

#

but it's not great

brittle tendon
#

also this makes me think the new shader is working like it's supposed to

#

since this is for one of the newest SORRY engines iirc

#

and its plume looks good, unlike the old ones

#

so the plume was probably created using the new shader

#

and the older ones were either not tested, or Lux was planning on updating them

#

SORRY also demonstrates really nicely why having the plumes in addressables is important - if they were, we could just release a separate PM patch for the SORRY plumes

#

without Lux having to update the core mod

brittle tendon
#

alright, the first half of the addressables support (the editor side) is done

#

the KSP2UT API makes it dead simple - just needed to call the AddressablesTools.MakeAddressable method

#

thanks for that @grim bridge!

grim bridge
#

You are welcome!

brittle tendon
#

one thing I've noticed that happens when I call that method is that in the Addressables Groups window, the label appears as crossed out, if it hasn't been used before, but unchecking and checking it again in the dropdown gets rid of that

#

is that expected?

grim bridge
#

Ahh no

#

I can fix that tho

#

I was wondering what would happen if I add a label that isnt defined yet

brittle tendon
#

I couldn't even find anything about it online

grim bridge
#

Because technically the addressables API is undocumented :3

brittle tendon
#

we love Unity

grim bridge
brittle tendon
#

hm

#

[Error :Lux's Flames and Ornaments] Failed to load assets from lfo_assets: UnityEngine.AddressableAssets.InvalidKeyException: Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown. No Location found for Key=lfo_assets

#

i have my catalog/settings/StandaloneWindows64/AddressablesLink in LFO/addressables, as usual

#

and all the settings look correct afaik

#

I used the group created by KSP2UT

grim bridge
#

Thats quite odd

#

I've tested the addressables built by KSP2UT before

brittle tendon
#

do I need to add a custom loading action or something?

#

I don't really need to pre-process the assets in any way, I just need them accessible through Addressables.LoadAssetsAsync

grim bridge
brittle tendon
#

weird, as far as I can tell, the structure, location, the catalog, the settings, everything looks fine (and equivant to those of other mods using addressables)

#

oh duh

#

I'm trying to access the addressables in OnPreInitialized but SpaceWarp loads them later

#

aaand done

#

addressables support finished

#

reworking the entire asset workflow in LFO previously made this change extremely easy to implement at runtime

#

just need to make a test mod with addressable assets and configs to test that part out

grim bridge
#

How does it deal with deduplication against the builtin bundles?

brittle tendon
#

but I'm pretty happy with the progress, 0.11 so far includes a dropdown for shader params in the FloatParams editor, the option to completely create a plume from a JSON, and addressables support

brittle tendon
#

and if so, how? 😅

grim bridge
#

2 assets can't have the same key

brittle tendon
#

why would they have the same key?

#

I did check the builtinshaders bundle and it contains nothing

#

shaders are all included in the main bundle, with their whole path, like Packages/lfo.editor/Assets/Shaders/...

grim bridge
#

Gotcha

#

Is stuff like noise includde in the bundles?

brittle tendon
#

everything that was in the lfo_resources asset bundle is now in the main addressable bundle

#

including the noise textures

grim bridge
#

And what if a mod wants to add noise?

brittle tendon
#

then they add it, just need to use a different name for it than the ones included in LFO

#

the way I handle the adding of assets to addressables during the saving of the plume is that I go through the whole object hierarchy, gather all the mesh and texture names, then find their paths, and if the path begins with Packages/lfo.editor, it's ignored

#

otherwise the asset is added into addressables

#

I could theoretically do something like add a prefix for the asset names in the addressables, like lfo-*

#

so that they can't conflict with other non-LFO assets

grim bridge
#

Gotcha

#

Well shit, we might wanna start working on a PM addon for this now

#

It can still load json files the old way as well right?

#

I really need to be 100% sure that the addressables loading actions run after all the PM stuff

#

which means I might need to do some PM shenanigans

brittle tendon
#

the plumes in the screenshot are loaded from JSON

#

haven't actually tested loading the JSON from addressables yet

#

I'll make a plume for the Community Parts Pack engine to test it out, and add a custom mesh and noise for good measure

grim bridge
#

I'm gonna see what I can do in PM to make its actions the first ones

#

This is going to involve some reflection, or more accurately publicizing spacewarp

brittle tendon
#

actually now that I'm thinking about it, instead of just directly loading the plumes from the JSON files, I could add a custom resource locator/provider pair and add even the old .json plumes to the addressables system

#

theoretically that would allow for the patching of even those old plumes

#

but then that would have to be done before Patch Manager stuff runs lol

grim bridge
#

That'd have to be done in PreInitialize

brittle tendon
#

well, then that should work I suppose

#

I can try to do that

#

after I make the test plume mod

grim bridge
#

Actually wait

#

lemme fix one thing

#

This is necessary to ensure patch manager gets run and registers its locators before any other mod does

#

Alright, now lemme make that release

#

Hmmm, would it be a stupid idea if we create an LFO/PM addon to have an export as PM patch button?

#

it'd at least make the process of completely swapping out plumes a lot easier

#

it'd still have to put everything else in addressables tho

brittle tendon
#

I mean I don't hate the idea, it would make the patching of plumes much easier

#

you'd just import a plume using the new Create plume from JSON functionality, change stuff, and then press Export as PM patch

#

and you could patch any existing plumes from any mod that way

grim bridge
#

Did you do the CPP test?

brittle tendon
#

I had to go take care of some work stuff, but I'll finish dinner and get to it

grim bridge
#

Aight

#

No rush, was just curious if it worked

#

And once that is done mayhaps I'll start on a PM Addon for LFO

brittle tendon
#

I was also kinda thinking

#

could we do kinda the opposite maybe?

#

basically allow embedding raw JSON into a patch

grim bridge
#

You already can

brittle tendon
#

to simply replace either an entire JSON file or a part of it, like an object

#

ah

grim bridge
#

@set-value

brittle tendon
#

that makes it really simple then

grim bridge
#

Raw json is a valid patch manager literal

brittle tendon
#

you've really thought of everything huh

#

😆

grim bridge
#

That was actually unintentional at first

#

But it just came naturally from the syntax I was designing

#

Set-value was intentional though

#

I should add an @embed, but that would make caching weird

#

So no

brittle tendon
#

alright time to try this out

brittle tendon
#

[Error : Unity Log] AssetProvider unable to find assets with label 'lfo_configs'. these are so annoying, it's the same thing as the one with the localization label

#

(this is before adding the new plume)

grim bridge
#

Not much can be done about that

brittle tendon
#

I mean

#

we could just not log that specific exception as an error

#

instead just make it an info message or something

#

in AddressableAction

#

we could even just do a check like this before the try block, and it it returns false, just info log it and resolve:

grim bridge
#

I suppose yeah

brittle tendon
#

I'll test it and PR it to dev then

grim bridge
#

Did the test work

brittle tendon
#

yep

grim bridge
#

Pog

brittle tendon
#

and now I'm in the process of making my own pretty flame

storm ore
#

You built your flame mesh ?

brittle tendon
#

that's just the default Flame mesh from LFO with some noise on it, but I am adding a custom mesh, the purple part is just a default Unity capsule mesh

#

just to test out the adding of assets to addressables

storm ore
#

Nice

brittle tendon
#

(and of course I've already found a couple of bugs)

storm ore
#

🙂 Never stops

grim bridge
#

Welcome to mr. bugs wild ride, the bughunting never ends

storm ore
#

Someone d seen if xenon is integrated in natives resources in ksp2 ?

brittle tendon
#

Xenon is a stock resource, yeah

storm ore
#

Cool

brittle tendon
#

alright yeah the prefixing of the assets is a must

#

this will obviously not work

#

I just changed the code to save and read the LFO assets with the prefix "lfo/"

grim bridge
#

Definitely nott

brittle tendon
#

that should hopefully prevent any conflicts

#

and I will definitely recommend to also prefix the name of any custom assets with the name of the mod, similarly to parts

#

so that two mods don't add the same "Capsule" mesh for example

grim bridge
#

I was thinking of having the editor automatically doing the prefixing

#

{sanitizedmodid}/{asset}
It shouldnt be hard to reverse that at runtime if need be

brittle tendon
#

so upon saving, it would go through all the meshes from Assets that are used in the plume config, and rename them?

#

ah

#

I mean, that could also work

#

it shouldn't theoretically cause issues since mod IDs really shouldn't be changing

brittle tendon
#

currently all assets are simply cached in a dictionary with their name as key

#

and while we probably could just store them with the mod ID prefix, it would also mean that the prefix would have to be part of the name of the asset in the configs themselves

#

oh nevermind, it doesn't even work like that

#

I didn't realize that when you load addressables from a label, you don't get to know their addresses at all

#

you just get the asset name, which has nothing to do with the name in the addressables group settings

#

so we really will just need people to name their assets with the name of their mod as a prefix or something, because the address setting won't prevent collisions of assets of the same name

#

within the lfo_assets label

brittle tendon
#

alright, we've officially got addressable plume configs with custom addressable assets

#

there are some obvious issues with that plume, but it wasn't made to be actually used anywhere, it's just a test of the system

#

overall I'm very happy with where LFO is right now, so I think it may be time for a 1.0.0 release pretty soon

brittle tendon
#

next step before the release will probably be to write documentation for this

grim bridge
#

Hmm, then maybes I can use this to fix LFOs plumes using patch manager (if you do the thing where you put json plumes into addressables)

#

I mean SORRY's plumes

brittle tendon
#

yeah, that was really my main reasoning for that feature

#

I have some work stuff I need to finish today, and work all day tomorrow, but I'll try to take a look at it either later tonight or tomorrow after work

#

it shouldn't be too difficult

brittle tendon
#

alright, it seems to be working, though I'm not 100% sure if it's done in time for Patch Manager to patch the plumes

#

but it probably should be?

#

the plumes are registered as addressables in an action added through Loading.AddAssetLoadingAction in Awake

#

and also the one plume that is actually in addressables seems to be loaded twice for some reason

#

(though it just means that the 2nd time will overwrite the 1st time)

#

I'll push it to dev anyway, since it seems to not have broken anything so far

grim bridge
#

You said its being loaded twice?

#

Where did you build the plume to

#

Did you put it under plugin_template/assets/plumes?

brittle tendon
#

no

#

it's only in the addressables

#

you can see here that it's definitely not coming from the file system, since it doesn't have a full path as its name

grim bridge
#

Hmm, it is being loaded twice for some reason

brittle tendon
#

yeah, and it's the only thing in the addressables with the lfo_configs label

grim bridge
#

Can you send your ksp.log?

brittle tendon
grim bridge
#

It only calls the loading action once ... hmmm

#

Are you sure you didn't accidentally put it into 2 groups or something

brittle tendon
grim bridge
#

Gotcha

#

I am utterly confused

brittle tendon
#

same

grim bridge
#

And the addressable action just does a load by label with the game ... hmmm

pliant widget
#

When this in LFO klueless

grim bridge
#

Gods I cant imagine the work needed for that, to combine multiple plumes into one

brittle tendon
#

Lux was working on it

#

😭

#

or planning to

deep surge
brittle tendon
#

I mean it would be relatively easy to make with current LFO if someone made a single SH engine, like in Starship Expansion Project

deep surge
#

wouldnt it be very difficult to have it behave realistically though, since the inner 13 engines can all gimbal independantly?

eternal robin
#

Not rlly

#

Its been done with ksp1 waterfall

brittle tendon
#

Tundra and SEP for KSP1 both have single engines with 9/33 nozzles

#

and they all gimbal correctly as they should

eternal robin
#

Is LFO for v.1.5 out yet?

brittle tendon
#

#1170561870026002433 message

grim bridge
#

We should release the version with addressables

brittle tendon
#

though I feel like I'd rather do some more testing first

#

considering that weird asset duplication bug

#

and the major architecture rewrite

#

maybe a prerelease?

brittle tendon
#

well fuck me, I just spent like 30 minutes typing up a detailed changelog along with instructions for the 1.0 prerelease

#

and then I fucking misclicked and left the GH page and it's all lost

#

lmao

#

I am so not redoing that tonight

eternal robin
#

is there a new dev kit for making plumes for the new version?

brittle tendon
#

the Unity package is already at 1.0 on the main branch, since I was going to release the 1.0 mod as well yesterday

#

so I might as well just do that now

#

also have to delete the old LFO folder

#

in your project

#

and existing plume components will almost definitely be broken, but that's why I added an option to fully create the plume object hierarchy from a JSON config, so redoing it shouldn't take long

#

at most you should have to move/scale/rotate the root plume object since LFO doesn't know anything about your original transform

eternal robin
#

Thanks

brittle tendon
#

I hate that I lost all the text I was writing yesterday because it explained everything in detail

eternal robin
#

this is so sad

brittle tendon
#

I was going to write docs and then release 1.0

#

but I'll just do the opposite lol

#

since plumes made with the new editor (if using addressables) will only work with LFO 1.0

#

(old plumes will still work as well though)

eternal robin
#

i gotta make new plumes since my old ones are distorted

brittle tendon
#

yeah, Lux either updated or rewrote the mesh additive shader for 0.9

#

so old plumes don't look great, the issue is mostly with the linear and quadratic expansion parameters from what I've seen

#

well, not sure if I'd call it "issue", I feel like it makes more sense the way it's set up now

#

but we don't have the source for the old version of the shader so there's no way to compare the code

brittle tendon
#

it is done

#

1.0 is released

#

now let's just hope I don't get a flurry of bug reports lmao

tranquil plank
brittle tendon
#

I'm pretty sure raymarching was what Lux was working on

tranquil plank
#

yeah that makes sense

#

those are gonna be some computationally expensive plumes

brittle tendon
#

but since I kinda took over this project (at least until Lux is hopefully back), guess I'll have to learn shader programming and all these techniques lmao

#

that's going to be fun, coming from a place where I have like 0 experience with graphics munley

tranquil plank
#

oof, good luck. you know about the youtuber sebastian lague?

brittle tendon
#

yep, love his videos

tranquil plank
#

dope, then you already know about his raymarching vid(s)

brittle tendon
#

yeah

tranquil plank
brittle tendon
#

guess my uni linear algebra course will come in handy now lol

tranquil plank
#

oh yeah it will lmao. 3D math is vital to a lot of game programming, especially graphics. Did your linear algebra course cover matrices, and quaternions, and transforming vectors?

brittle tendon
#

not quaternions, but other than that it was pretty in-depth (and also the course with the lowest passing rate of the whole software engineering program, at like 15% lifesupport)

tranquil plank
#

oooof

tranquil plank
#

anything more would require a math degree

grim bridge
#

Quaternions are fun

#

4 dimensional complex numbers

#

Just do everything with transformation matrices lol

tranquil plank
pliant widget
#

I really like this talk to understand where quaternions come from mathematically: https://youtu.be/htYh-Tq7ZBI

..or can you? A deceptively simple question with a complex answer – come join a mathematical journey into madness and wonder, in search of answers that might just give you a new perspective on the mathematical constructs we use in our games

Recorded at Dutch Game Day 2023, October 4th

Timestamps:
00:00 Intro
04:34 Talk Start
05:17 Anatomy of a...

â–¶ Play video
grim bridge
#

I mean ive watched that video yeah

brittle tendon
#

nice, thanks, I'll definitely watch it

grim bridge
#

And quaternions do actually describe certain 4x4 matrices

hybrid sonnet
#

are there configs for the vanilla engines?

brittle tendon
#

nope, it would require some extra work in removing the stock engine plumes, which I haven't gotten around to

eternal robin
#

any documentation available on controllers (like atmoDepth or throttle) and exporting plumes?

brittle tendon
#

I don't think Lux has written any docs for this, and I haven't gotten to it yet (in addition to not even completely understanding everything 100% yet myself)

#

but I can try to assist

eternal robin
#

i will probably need that help when i get back from my trip

#

i need to make new plumes since my old ones are not working properly in the new LFO

brittle tendon
#

yeah, Lux made some changes in the shader in 0.9 before he took off

#

but it should only be a matter of changing a "-1" to "0" in one spot

eternal robin
#

Oh cool

#

so i dont have to redo them

brittle tendon
#

Well, the LFO editor import has now been changed to an actual Unity package installed in the Package Manager, and most of the backend and editor stuff has been rewritten

#

but

#

I added a button for "Create plume from JSON"

#

so even though the old plume objects won't work with the new LFO version, you can just import your JSON plumes back into the editor with one click

#

and then just fix up the number stuff and correctly rotate/scale the plume (since the exported JSON has no fields for the root transform)

#

it should be relatively straight-forward, I tried to make the "remaking" process as simple as possible

eternal robin
#

nicee

brittle tendon
#

and then you just click a button to export the plumes and you'll get the addressables to put into your mod folder

#

(new plumes are in addressables instead of just in JSON files)

#

it allows other people to patch your plumes with Patch Manager if they want

eternal robin
#

cool

#

thx for keeping it simple

eternal robin
brittle tendon
#

When you right click on an object in the scene hierarchy (for example your thrust transform), there should be a for LFO

#

Under create or something like that probably

#

I'll take a look at soon as I get to my computer

brittle tendon
#

by the way, you will need to delete any old LFO files you may have imported into your project

#

I think it was just a folder called LFO

#

and add the new Unity package

brittle tendon
eternal robin
#

thanks

brittle tendon
#

the only thing I didn't show off at the end is that when you are done with all of that and have the plume file in your addressables group, you can simply delete the old assets/plumes folder, and just rebuild the addressables and replace the old ones with the new version, since the plume will now be in them

#

though, if you do not have KSP2 Unity Tools set up like this, you'll want to do that first (the window is in Tools -> KSP2 Unity Tools)

#

you can import your swinfo.json instead of typing it manually

#

and after setting that up, when you click "Set Up Addressables From Mod Info", you should get a new addressables group labeled with the name of your mod below the Default Local Group

#

you'll want to move all the assets from the default group into the new one

#

(not sure if this is something you already have or not)

#

oh and another tiny thing, at first I accidentally clicked "Save plume" before unchecking "Don't use addressables", that will simply save the JSON file into plugin_template/assets/plume_name.json, and we don't want that

brittle tendon
final plaza
#

nice

brittle tendon
#

I make a couple of mistakes during the video, but I correct them

#

so hopefully it will not be too confusing

#

(I barely knew myself how LFO works, I only took it up during Lux's absence to update and maintain it)