#LFO - Lux's Flames and Ornaments
1 messages · Page 5 of 1
awesome
seems to be working 100% perfectly in game
the most difficult part for me is figuring out how the curve for each of the parameters is supposed to look 😆
and the scale
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
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
base = constant value ?
yep
that would do it
it just sets the value to the corresponding number
while add and multiply just modify the base number
in retrospect it's obvious lol
also a slight issue, im noticing the plumes pretty much invisable when seenn from the bottom
yeah, that's just a symptom of the plumes being mesh-based
they only render on the surface of the cylinder
ah
but there is also a volumetric shader in LFO
but honestly, I barely have any clue how it works
i tried messing with the volumetric shader originally and nothing would show lol
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
welp time to go breaking things and messing around with the volumetric stuffs lol
the LFO -> New Volumetric Plume button should get you set up
now to find a way to actually make it show somthing instead of being completely blank
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
same, well kinda same, im just seeing a cylinder blocking out the gridlines
ooh
fixed it
disable custom ztest
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
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
ooooooooh
did you succeed in using volumetric plume ? it works for me in unity but not in game
hm, any errors in logs?
[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 ?
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
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
thank you!
munix, another feedback. In unity, modifying throttle with group throttle (in LFO throttle Data Master Group) don't affect volumetric plumes
that works fine for me
Who actually has them turned on?
I do
I'm only really active here, and if someone is pinging me, I want to know it
ok, i will try again, perhaps i made a mistake
did you click Collect children on the master component?
yes
weird
rhhhaaaa... i forgot it, sorry.
haha it's ok
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 🙂
alright, I'll try to fix the issue with volumetric plumes as soon as possible
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
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
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
you'd have to build it yourself from the newest version in the dev branch, but I can send the zip
sorry, completely forgot
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
Were is lux used to be so active on here

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
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
this was basically the whole fix (the original is on the bottom)
flashback to UI Toolkit gamma/color
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
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
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
yeha, i was debugging that before i went MIA
they worked on an earlier version
but then i went into performance enhancing
and bam
but then i was like, i'll just wait for 2022 cuz that will have a built in Vollumetric solution
actually i think it may be an issue with mesh scale
taller plumes will have this issue even in waterfall
most waterfall plumes are made of short segments
and not one large one
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
it is an issue with the fresnel effect, the effect that makes it dimmer/disappear near the edge
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
https://docs.unity3d.com/Packages/[email protected]/manual/Fresnel-Effect-Node.html
simpler to just show the wiki...
as you can see, Fresnel takes a Normal Direction and a View Direction
These can be World, Object, Screen and Tangent View Direction.
Waterfall and LFO uses Screen for both.
Object works well but has some caviats...
https://docs.unity3d.com/Packages/[email protected]/manual/View-Direction-Node.html
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
yeah i was looking at the shader and noticed something that caught my eye
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
lmao thats mb, thx for that!
trust me, you can use it pretty well on Unity Shader graph

