#LFO - Lux's Flames and Ornaments

1 messages · Page 5 of 1

final plaza
#

skimmed through it and it looks pretty much like the same process i did (minus the mach dimonds)

brittle tendon
#

awesome

final plaza
#

seems to be working 100% perfectly in game

brittle tendon
#

the most difficult part for me is figuring out how the curve for each of the parameters is supposed to look 😆

#

and the scale

final plaza
#

i put the curves on backwards not realising its increasing atmos pressure not decreasing lol

#

i wondered why i was getting a vaccumy looking plume than i saw it

brittle tendon
#

haha yeah

#

and another thing that took me a minute to realize was that you can only have a parameter once, two "_Opacity" float params will just mean that the first one won't be considered at all

#

so if you want both pressure and throttle triggers for it, they need to be both enabled on the same one

#

and that having both of them be set to "Base" also messed up things

#

so I made the other one Multiply instead

final plaza
#

base = constant value ?

brittle tendon
#

yep

final plaza
#

that would do it

brittle tendon
#

it just sets the value to the corresponding number

#

while add and multiply just modify the base number

#

in retrospect it's obvious lol

final plaza
#

also a slight issue, im noticing the plumes pretty much invisable when seenn from the bottom

brittle tendon
#

yeah, that's just a symptom of the plumes being mesh-based

#

they only render on the surface of the cylinder

final plaza
#

ah

brittle tendon
#

but there is also a volumetric shader in LFO

#

but honestly, I barely have any clue how it works

final plaza
#

i tried messing with the volumetric shader originally and nothing would show lol

brittle tendon
#

Lux added it shortly before leaving, and nobody has actually used it yet I think

#

but he was testing it with some of his engines and it seemed to work great

final plaza
#

welp time to go breaking things and messing around with the volumetric stuffs lol

brittle tendon
#

the LFO -> New Volumetric Plume button should get you set up

final plaza
#

now to find a way to actually make it show somthing instead of being completely blank

brittle tendon
#

yeah...

#

I know I had it working at some point once

#

to some degree

#

but I honestly don't remember what I did

#

actually I'm kinda seeing something

#

it's just very faint

final plaza
#

same, well kinda same, im just seeing a cylinder blocking out the gridlines

#

ooh

#

fixed it

#

disable custom ztest

brittle tendon
#

where's that?

#

oh I see

final plaza
#

might have messed with the density slider before finding that one lol

brittle tendon
#

I think we can work with this

final plaza
#

oh man its even animated in the prefab viewer

#

well at least whenever i click it becomes animated

#

or hover over any other ui elements

brittle tendon
#

yeah, it's basically when the Update method runs in the Editor, I think, which is kinda random

#

and then I also know for sure that the Volumetric (Profiled) shader works, that's useful for things like ion engines

storm ore
#

did you succeed in using volumetric plume ? it works for me in unity but not in game

brittle tendon
#

hm, any errors in logs?

storm ore
#

[Error :Lux's Flames and Ornaments] Volumetric was not created! Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at LFO.Shared.BaseAssetManager.GetMesh (System.String meshName) [0x0001b] in <917217bc43ff4864a6388645c8739a17>:0
at LFO.Patcher.SetupConfig (UnityEngine.GameObject prefab, LFO.Shared.Configs.PlumeConfig config, System.String partName, UnityEngine.Transform tParent, System.Collections.Generic.List`1[KSP.VFX.ThrottleVFXManager+EngineEffect]& effects) [0x0009a] in <9e85df1205274ea6b27afb69de354737>:0

#

perhaps a problem with mesh cylinder ?

brittle tendon
#

thanks for the report, I'm taking a look at it

#

actually would you mind please trying it again with this version? it has the debug files so that line numbers show up in the log

storm ore
#

OK, i try it now

#

System.NullReferenceException: Object reference not set to an instance of an object
at LFO.Shared.BaseAssetManager.GetMesh (System.String meshName) [0x0000b] in C:\Games\KSP Stuff\KSP 2 Modding\Mods\LFO\src\LFO.Editor\Unity\Packages\lfo.editor\Shared\Services\BaseAssetManager.cs:32
at LFO.Patcher.SetupConfig (UnityEngine.GameObject prefab, LFO.Shared.Configs.PlumeConfig config, System.String partName, UnityEngine.Transform tParent, System.Collections.Generic.List`1[KSP.VFX.ThrottleVFXManager+EngineEffect]& effects) [0x00095] in C:\Games\KSP Stuff\KSP 2 Modding\Mods\LFO\src\LFO\Patcher.cs:136

brittle tendon
#

thank you!

storm ore
#

munix, another feedback. In unity, modifying throttle with group throttle (in LFO throttle Data Master Group) don't affect volumetric plumes

brittle tendon
grim bridge
#

Wait munix, do you have ping sounds on?

brittle tendon
#

I mean

#

obviously

grim bridge
#

Who actually has them turned on?

brittle tendon
#

idk, people turn them off?

#

lmao

grim bridge
#

I do

brittle tendon
#

I'm only really active here, and if someone is pinging me, I want to know it

storm ore
brittle tendon
#

did you click Collect children on the master component?

storm ore
#

yes

brittle tendon
#

weird

storm ore
#

rhhhaaaa... i forgot it, sorry.

brittle tendon
#

haha it's ok

storm ore
#

no, i did it, i forgot for a second volumetric plume.
i will try again

#

i have to leave for few hours. see you soon
and thanks 🙂

brittle tendon
#

alright, I'll try to fix the issue with volumetric plumes as soon as possible

brittle tendon
#

well, I tried

#

and I have absolutely no clue what's wrong

#

other meshes of the same type load fine

#

and this one is also loaded from addressables without any issues as far as I can tell

#

but Unity goes crazy while trying to find the renderer component on it

brittle tendon
#

hm ok

#

so I fixed the asset, by just reexporting it from Blender with a simpler structure

#

but the volumetric plumes don't seem to show up in flight, anyway

#

with no exceptions or errors now

#

so I'm guessing this will be more complicated to get working than I thought

#

also the volumetric (additive) shader seems to be unfinished, since many of the properties don't seem to be doing anything or are broken

#

so for now I'd just advise against using it

#

but if anyone wants to take a look at making it work, I'll appreciate it

#

the latest changes are in the dev branches

storm ore
#

munix, i will look after diner

#

thanks for your work

brittle tendon
#

I'm not even sure if Lux ever tested it in the game

#

so it may never have worked

#

I only remember tests in the editor

storm ore
#

on my way tonight 🙂

#

i have to reinstall LFO mod for the mesh ?

brittle tendon
#

you'd have to build it yourself from the newest version in the dev branch, but I can send the zip

brittle tendon
storm ore
#

Hy munix. I've just tried volumetric plume with your mesh. No more error log but still not working in game. I hope Lux finishes it one day

lean cosmos
#

Were is lux used to be so active on here

brittle tendon
#

well

#

playing League of Legends apparently

lean cosmos
brittle tendon
#

so, this is obviously pretty bad

#

and needs to be fixed

#

I'm not 100% sure if this interaction also happens with the stock heating shaders, or just with the one in KSP2 Unity Tools

#

but basically the reentry shader is making the plume meshes visible

brittle tendon
#

oh yeah @weary bobcat that reminds me that Isa did fix the reentry heating issues in the shader

#

I still have to commit that file

#

the plumes were being affected by the in-game light sources such as the reentry plasma effect, as you can see above

weary bobcat
#

LESGOOOOOOOOOOOOOOOOOOO

#

yeah thats pretty fuycking wierd

#

wtf

brittle tendon
#

this was basically the whole fix (the original is on the bottom)

weary bobcat
#

flashback to UI Toolkit gamma/color

brittle tendon
#

lmao don't even remind me

#

Isa also looked into the issue with plumes being invisible from the top and bottom, and turns out it's caused by something in the plume expansion code

#

by comparing it with Waterfall shaders

#

#🔴mod-dev message

weary bobcat
#

i copied it pretty much code for code T-T

#

but tbh i then started working on volumetric ones because the top-bottom view never went right w me

brittle tendon
#

oh yeah that's another thing

#

the volumetric additive plume works nicely in the editor but doesn't show up at all in the game

weary bobcat
#

yeha, i was debugging that before i went MIA

#

they worked on an earlier version

#

but then i went into performance enhancing

#

and bam

weary bobcat
#

but then i was like, i'll just wait for 2022 cuz that will have a built in Vollumetric solution

eternal robin
#

taller plumes will have this issue even in waterfall

#

most waterfall plumes are made of short segments

#

and not one large one

brittle tendon
#

ohh

#

interesting

eternal robin
#

because i scaled a waterfall shader mesh and it had the same problems

#

by default lfo's plume meshes are taller and represent the whole plume

#

actually nevermind

#

still a mystery then

#

definetly not that

weary bobcat
#

the taller the plume, the more likely it is to affect

#

since fresnel can be calculated via various modes

#

the one used in waterfall and LFO is screen space? i think

#

i experimented a lot with it, and there is no good solution

#

trying to find the part in code on the waterfall source that says that they are using screen space

#

i think its easier to show the nodes in Unity

#

but either way

#

waterfall counters this by having a closed cylinder (top and bottom have geometry)

#

while LFO's meshes is just the cyllinder radius (not caps), so top/bottom have no geometry to draw on

#

LFO could support that but i would have to translate the top/bottom calculations that waterfall uses which are pretty... confusing

#

the good thing is that plumes, straight from the bottom are pretty much invisible (they are a single color most of the time)

#

and you can only see the expansion, so i relied on that

eternal robin
#

yep

#

i didnt dig too deep on how the watefall one worked and what was different

#

just some surface level analysis

#

taller meshes should be more affected by fresnel because the normals are closer to perpendicular to the view from the top

#

i am familiar with fresnel cuz i use it in blender a lot

#

all of my shader knowledge comes from blender lol

#

no previous programming experience at all

eternal robin
#

basically there are sections where the alpha of the material is not 0

#

and i noticed u were using the standard pbr shading model

#

so partially transparent areas with low emission are affected by light

#

so i switched to an unlit shader

weary bobcat
weary bobcat