Jump to content

[1.11.x] Waterfall - a framework for continuous, mesh-driven engine effects (June 16)


Recommended Posts

ok my MM issue from earlier still stands, but I've managed to bodge it together a little so I can at least try and create effects in KSP. However experimenting with the effects has shown a bunch of weird issues. For example when using the Additive dynamic shader premade plumes models only show up cut in half while a cylinder model works just fine. When using an additive shader the premade plume models work fine, but there are no controls for the shape of the cylinder mesh and textures/noise appear to be broken as well. Premade models also seem to be the only way to get the planes into the exthaust which make it look good when looking directly from behind/from the front. However those also get broken by the additive dynamic shader. Additionally, I often get NullReferenceExceptions when trying to use certain premade plumes (in my case ion), so effects that exist but also don't. They show up in the list of effects, but are broken.

Could anyone help me here? I'm quite confused why this isn't working properly

Link to post
Share on other sites

So excited to see this "finally" launch! --- This looks terrific, and the execution of an in-game editor is particularly great. I have a feeling the year 2020 will wind up being redeemed by a few things, and I'll now consider Waterfall potentially of them. ;)

Link to post
Share on other sites
3 hours ago, HB Stratos said:

ok my MM issue from earlier still stands, but I've managed to bodge it together a little so I can at least try and create effects in KSP. However experimenting with the effects has shown a bunch of weird issues. For example when using the Additive dynamic shader premade plumes models only show up cut in half while a cylinder model works just fine. When using an additive shader the premade plume models work fine, but there are no controls for the shape of the cylinder mesh and textures/noise appear to be broken as well. Premade models also seem to be the only way to get the planes into the exthaust which make it look good when looking directly from behind/from the front. However those also get broken by the additive dynamic shader. Additionally, I often get NullReferenceExceptions when trying to use certain premade plumes (in my case ion), so effects that exist but also don't. They show up in the list of effects, but are broken.

Could anyone help me here? I'm quite confused why this isn't working properly

The Dynamic shader is not very well documented and fairly new to the project. You should think of each shader as a different workflow for effects. At the moment, I would look at the mainsail plume for a good example of the non-Dynamic workflow, and the Poodle plume for an example of Dyanmic. The Dynamic workflow only works with the basic cylinder model.

Link to post
Share on other sites
47 minutes ago, Nertea said:

The Dynamic shader is not very well documented and fairly new to the project. You should think of each shader as a different workflow for effects. At the moment, I would look at the mainsail plume for a good example of the non-Dynamic workflow, and the Poodle plume for an example of Dyanmic. The Dynamic workflow only works with the basic cylinder model.

Thanks for the response, I'm still struggling with some weird issues in the mod. Though my main problem currently is that textures don't seem to work with the non-dynamic shader and that I don't see a way to get a controller for throttle on an afterburning/mode switching engine. When using the normal throttle controller it just drops to zero when switching modes, no matter what moduleID is used.

I also can't figure out how the meshes were shaped in the non-dynamic workflow as they are clearly a cone shape, but I was unable to recreate that from a premade plume.

Link to post
Share on other sites

I also can't take a look at the poodle engine, I don't have restock and when I remove the dependency in the patch and load in the effect everything breaks once I try to click on the engine in the Editor

Spoiler

unknown.png

 

Link to post
Share on other sites
20 minutes ago, HB Stratos said:

Thanks for the response, I'm still struggling with some weird issues in the mod. Though my main problem currently is that textures don't seem to work with the non-dynamic shader

Can you be more specific? Textures seem to work fine for me. How are you assigning them - in config or using the ingame editor? Perhaps some screenshots of what you're seeing?

23 minutes ago, HB Stratos said:

When using the normal throttle controller it just drops to zero when switching modes, no matter what moduleID is used.

I have some mode switching engines working fine in FFT. I can check again with a more traditional engine but the basic idea is that the effect is controlled purely off the engineID. Will investigate. 

2 minutes ago, HB Stratos said:

disregard the textures not working with normal additive shader, however the UI completely breaks if the engine that is being edited gets destroyed, same error as in the above screenshot

That's... honestly expected, the UI is really barely 'good enough', not designed to handle gameplay. 

 

24 minutes ago, HB Stratos said:

I also can't figure out how the meshes were shaped in the non-dynamic workflow as they are clearly a cone shape, but I was unable to recreate that from a premade plume.

You shape things by using the various effect modifiers on the parts of the plume. Again, really suggest you load up an existing effect (the mainsail and LV-N are good examples) to see how this set of modifiers works. Each of the models looks like this:

68747470733a2f2f6d656469612e646973636f72646170702e6e65742f6174746163686d656e74732f3730363338383530353236313131333336352f3733323633313134383833313730333130302f73696d706c65706c756d652e706e673f77696474683d393035266865696768743d363738 

https://github.com/ChrisAdderley/Waterfall/wiki/Bundled-Basic-Effect-Modules

The green items are bones that can be scaled and positioned with Position, Rotation and Scale Modifiers. The white items are meshes that can be controlled with Float and Color Modifiers. 

14 minutes ago, HB Stratos said:

I also can't figure out how the meshes were shaped in the non-dynamic workflow as they are clearly a cone shape, but I was unable to recreate that from a premade plume.

Unfortunate, those are keyed to transforms that only exist in the restock model.You can still look at the config to see how the modifiers are laid out, or you can adapt it to the weird stock one by changing the ParentName in the config. It'll probably be positioned and scaled wrong though .

Link to post
Share on other sites
Spoiler


@PART[turboJet]:FOR[Waterfall]
{

  !EFFECTS {}
  MODULE
  {
    name = ModuleWaterfallFX
    // This is a custom name
    moduleID = Dry
    // This links the effects to a given ModuleEngines
    engineID = basicEngine

    // List out all controllers we want available
    // This controller scales with atmosphere depth
    CONTROLLER
    {
      name = atmosphereDepth
      linkedTo = atmosphere_density
    }
    // This controller scales with effective throttle
    CONTROLLER
    {
      name = throttle
      linkedTo = throttle
    }
    // this controller generates a random value in the range specified
    CONTROLLER
    {
      name = random
      linkedTo = random
      range = -1,1
    }
    // -----------------------------------------------------
    // Past here should be generated with the ingame editor!
    // -----------------------------------------------------

  }

  MODULE
  {
    name = ModuleWaterfallFX
    // This is a custom name
    moduleID = Wet
    // This links the effects to a given ModuleEngines
    engineID = basicEngine

    // List out all controllers we want available
    // This controller scales with atmosphere depth
    CONTROLLER
    {
      name = atmosphereDepth
      linkedTo = atmosphere_density
    }
    // This controller scales with effective throttle
    CONTROLLER
    {
      name = throttle
      linkedTo = throttle
    }
    // this controller generates a random value in the range specified
    CONTROLLER
    {
      name = random
      linkedTo = random
      range = -1,1
    }
    // -----------------------------------------------------
    // Past here should be generated with the ingame editor!
    // -----------------------------------------------------

  }
    
}

This is my patch for the panther, but it doesn't appear to work. As in, it works and provides two different modules that can be used with the editor, but the throttle for both is linked to the non-afterburning throttle

Regarding textures, for some reason it works now while it wasn't working earlier, or I just made a mistake earlier.

Something I notice with all the fx though is that they look pretty bad when viewed from behind. They become static due to the way the simpleplume is set up (the waterfall_plane s become the only thing visible and they are not animated) and this gets far worsened by fresnel fading out the main mesh as the camera is rotated. I wish there was a way to soften the edges of the plume mesh without using fresnel or at least limit fresnel so it doesn't affect viewing the plume from behind.

Oh and sometimes entering values in the UI instead of moving sliders doesn't update the plume, making it really hard to reset something. Specifically with the sliders that control the shape of a dynamic shader cylinder.

Edited by HB Stratos
Link to post
Share on other sites
56 minutes ago, HB Stratos said:

This is my patch for the panther, but it doesn't appear to work. As in, it works and provides two different modules that can be used with the editor, but the throttle for both is linked to the non-afterburning throttle

 

 moduleID = Wet
    // This links the effects to a given ModuleEngines
    engineID = basicEngine

This is your problem. ModuleID is the ID of the plume module. engineID is the ID of the... engine. Make sure that all moduleIDs are unique (they don't matter in specifics, just how things are shown in the UI) and that the engineIDs match the engineIDs in the engine. 

59 minutes ago, HB Stratos said:

Something I notice with all the fx though is that they look pretty bad when viewed from behind. They become static due to the way the simpleplume is set up (the waterfall_plane s become the only thing visible and they are not animated) and this gets far worsened by fresnel fading out the main mesh as the camera is rotated. I wish there was a way to soften the edges of the plume mesh without using fresnel or at least limit fresnel so it doesn't affect viewing the plume from behind.

 

There is an art to this, which involves fine control of how you apply the fresnel effects to the two meshes. It's not perfect, it's the best I can make it at the moment. I continue to try to improve this, but hey, if I liked 100% of how it works it wouldn't be in the Development forum.

The Dynamic method will do you a bit better in this respect and we are trying to port some of its improvements to the other shader. 

58 minutes ago, HB Stratos said:

Oh and sometimes entering values in the UI instead of moving sliders doesn't update the plume, making it really hard to reset something. Specifically with the sliders that control the shape of a dynamic shader cylinder.

Repro steps would be nice, I didn't see any issues with this when I was working on things last night. 

Glad you're using the tools, at least. Feedback helps improvement. 

 

 

 

Link to post
Share on other sites

@Nertea - you say "Support for atmospheric expansion and all kinds of effects" in the OP.

Does that include different looking plumes in the atmospheres of different planets? Simulating, perhaps, how plumes might interact with different gasses in those atmospheres?

Although, scientifically, that might not even be a thing. I have no idea.

Edited by theonegalen
Link to post
Share on other sites
20 minutes ago, Nertea said:
1 hour ago, HB Stratos said:

Oh and sometimes entering values in the UI instead of moving sliders doesn't update the plume, making it really hard to reset something. Specifically with the sliders that control the shape of a dynamic shader cylinder.

Repro steps would be nice, I didn't see any issues with this when I was working on things last night. 

Glad you're using the tools, at least. Feedback helps improvement. 

ok, create a new effect using the additive dynamic shader, then edit it's material by moving the slider for _ExpandLinear. Then try to enter a value into the field on the right to reset the slider. The slider will move, but it won't have an effect on the engine.

Link to post
Share on other sites

https://imgur.com/a/j4MQeE0

embeds aren't working but this is my afterburner so far, I'm pretty happy with it.

Now this makes me think if it was possible to use the mesh method for trail particles as well since they are also notorious for getting ripped apart with laggy craft. It would probably be a fair bit of effort and require multiple meshes to form a trail but it would be super cool to have

Link to post
Share on other sites
40 minutes ago, HB Stratos said:

Now this makes me think if it was possible to use the mesh method for trail particles as well since they are also notorious for getting ripped apart with laggy craft. It would probably be a fair bit of effort and require multiple meshes to form a trail but it would be super cool to have

Nice work!

Are you talking about smoke? This method is not super well suited to that, I have some other ideas on how to accomplish it.

5 minutes ago, Sebastiaz said:

Hi, I really love how the mod looks! Is there any chance of communicability with older game versions? (Such as down to 1.6.1?)

It will likely work ok back to 1.8.1. prior to that, the .net framework version change will make it non-functional without a recompile at minimum, and probably a lot more fixes.

Link to post
Share on other sites
Just now, Nertea said:
43 minutes ago, HB Stratos said:

Now this makes me think if it was possible to use the mesh method for trail particles as well since they are also notorious for getting ripped apart with laggy craft. It would probably be a fair bit of effort and require multiple meshes to form a trail but it would be super cool to have

Nice work!

Are you talking about smoke? This method is not super well suited to that, I have some other ideas on how to accomplish it.

yes, I'm speaking about smoke and various other trails like the vortices on wingtips... I'd be curious to hear what you have in mind for that. Though thinking about it... the current method may be suited for low pressure condensation above wings, aka this or propper mach effects like this

Link to post
Share on other sites
21 minutes ago, HB Stratos said:

yes, I'm speaking about smoke and various other trails like the vortices on wingtips... I'd be curious to hear what you have in mind for that. Though thinking about it... the current method may be suited for low pressure condensation above wings, aka this or propper mach effects like this

I think the challenge with those mach effects would be that they are very dependent on the geometry of the plane, making a flexible thing that would adapt to the whole craft would be a towering challenge.

Wingtip vortices are best handled with trail renderers for sure.

Smoke is tough. Volumetric particles are best, but it is hard to get performance with those. I have some ideas but they're a ways off.

Edited by Nertea
Link to post
Share on other sites
58 minutes ago, HB Stratos said:

embeds aren't working

You need to add the file extension (.png, .jpg, etc) to the end of the link when you insert image from URL
 

1 hour ago, theonegalen said:

Does that include different looking plumes in the atmospheres of different planets? Simulating, perhaps, how plumes might interact with different gasses in those atmospheres?

Although, scientifically, that might not even be a thing. I have no idea.

Well, most compositions usually don't have much of an effect on most engines, and the only extent ksp stores composition data at all is whether there's oxygen, so the only thing that'd apply to is engines operating in oxygenated atmospheres which heat but don't fully combust their fuel (mainly just NTRs and to a much lesser extent fuel-rich staged combustion engines), so I'm not sure if there's much of an incentive to, at least at this point

Link to post
Share on other sites
13 hours ago, Nertea said:

I think the challenge with those mach effects would be that they are very dependent on the geometry of the plane, making a flexible thing that would adapt to the whole craft would be a towering challenge.

Wingtip vortices are best handled with trail renderers for sure.

Smoke is tough. Volumetric particles are best, but it is hard to get performance with those. I have some ideas but they're a ways off.

it would be awesome if you could provide us with a trail renderer that we can use as a seperate effect, I can already see some really useful applications. 

I'd love to help out with this project as I've been wanting realistic engine FX forever. I know how to write code for unity, but not how to integrate it with ksp (yet). I wanted to make a mod that adds a wingtip vortice generator as a part for ages now, but I lack the knowledge to do it. 

as for smoke, I really think that particles are not the way to go here as ksp just can't handle it, especially with laggy craft. Maybe a modifies trail rendere could work here. This also leads me to another thought, black engine smoke currently isn't possible in game, but would be super cool to have.

Anouther thought, the project is currently somewhat on break, but @blackrack was working on heat distortion via particles, I wonder if his shader could be applied here or even on a trail renderer.

12 hours ago, WarriorSabe said:
14 hours ago, HB Stratos said:

embeds aren't working

You need to add the file extension (.png, .jpg, etc) to the end of the link when you insert image from URL

I mean technically it would have been .mp4, .gifv or .gif, not sure what imgur makes out of uploaded images

Link to post
Share on other sites
2 hours ago, HB Stratos said:

it would be awesome if you could provide us with a trail renderer that we can use as a seperate effect, I can already see some really useful applications. 

I'd love to help out with this project as I've been wanting realistic engine FX forever. I know how to write code for unity, but not how to integrate it with ksp (yet). I wanted to make a mod that adds a wingtip vortice generator as a part for ages now, but I lack the knowledge to do it. 

Great thing to try to learn with!

I have a lot of projects, the scope of this is staying where it is.

3 hours ago, HB Stratos said:

Anouther thought, the project is currently somewhat on break, but @blackrack was working on heat distortion via particles, I wonder if his shader could be applied here or even on a trail renderer.

Just needs a shader. I prototyped this years ago (a number of modders have over the years), it's not terribly difficult abd should be supported by this system quite well.

3 hours ago, HB Stratos said:

as for smoke, I really think that particles are not the way to go here as ksp just can't handle it, especially with laggy craft. Maybe a modifies trail rendere could work here. This also leads me to another thought, black engine smoke currently isn't possible in game, but would be super cool to have.

I disagree, suffice to say that KSP does not implement any of the capability and performance features that Unity's modern systems use. Implementing those would be a first step. Black smoke is definitely possible.

2 hours ago, HB Stratos said:

Also another idea, controllers for gimbal deflection would be nice. And the ability to make linear curves instead of the smoothed ones

You can make linear curves, you just need to use the tangents in the curve editor correctly (the last two numbers).

Gimbals, you can already do by parenting the effect to the gimbal transform, unless you mean something else.

Link to post
Share on other sites

https://imgur.com/a/QxB2N8A my current whiplash effect, I'm super happy with it.

8 hours ago, Nertea said:

Gimbals, you can already do by parenting the effect to the gimbal transform, unless you mean something else.

I want to distort a plume based on gimbal deflection, I know that parenting is possible and I already used it on my engines.

 

8 hours ago, Nertea said:
11 hours ago, HB Stratos said:

Anouther thought, the project is currently somewhat on break, but @blackrack was working on heat distortion via particles, I wonder if his shader could be applied here or even on a trail renderer.

Just needs a shader. I prototyped this years ago (a number of modders have over the years), it's not terribly difficult abd should be supported by this system quite well.

I sadly don't know anything about how to code shaders so I'd need his help to get a heat distortion shader working with waterfall.

 

8 hours ago, Nertea said:
11 hours ago, HB Stratos said:

it would be awesome if you could provide us with a trail renderer that we can use as a seperate effect, I can already see some really useful applications. 

I'd love to help out with this project as I've been wanting realistic engine FX forever. I know how to write code for unity, but not how to integrate it with ksp (yet). I wanted to make a mod that adds a wingtip vortice generator as a part for ages now, but I lack the knowledge to do it. 

Great thing to try to learn with!

I have a lot of projects, the scope of this is staying where it is.

I wasn't able to find any resourches that teach how to actually get code and not just models into ksp, if you could show me some that would helpme a lot. And I understand, your projects, your decisions.

 

8 hours ago, Nertea said:
11 hours ago, HB Stratos said:

as for smoke, I really think that particles are not the way to go here as ksp just can't handle it, especially with laggy craft. Maybe a modifies trail rendere could work here. This also leads me to another thought, black engine smoke currently isn't possible in game, but would be super cool to have.

I disagree, suffice to say that KSP does not implement any of the capability and performance features that Unity's modern systems use. Implementing those would be a first step. Black smoke is definitely possible.

Well yes but no, it just isn't possible to spawn enough particles to stop them getting ripped apart on laggy craft. As for black smoke, all shaders ksp provides for particles are as far as I have seen additive and therefore do not allow black smoke.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...