Jump to content

[1.12.x] Waterfall - a framework for continuous, mesh-driven engine effects (Aug 2)


Nertea

Recommended Posts

Hey !

After the very good looking of restock RCS effect, it's pretty hard to see the ''stock effect'' of RCS from other mods

So, just a little technical question, is it possible to do a patch that add the effect to all RCS/Monoprop engines. Or the config have to be done one by one per engine ?

Thanks

 

Link to comment
Share on other sites

8 hours ago, Carni35 said:

Hey !

After the very good looking of restock RCS effect, it's pretty hard to see the ''stock effect'' of RCS from other mods

So, just a little technical question, is it possible to do a patch that add the effect to all RCS/Monoprop engines. Or the config have to be done one by one per engine ?

Thanks

 

It'd likely have to be done per type of engine; scaling of the effect plume and the like isn't done automatically. However, if you have (for example) a set of RCS blocks that all have the same nozzles, you should be able to apply the same patch to all of those RCS blocks. I'm not an expert though, so probably shouldn't take my word for it ^^;
(Should clarify that by "patch" I also mean the plume definition)

Edited by Starseeker
Link to comment
Share on other sites

9 hours ago, Carni35 said:

Hey !

After the very good looking of restock RCS effect, it's pretty hard to see the ''stock effect'' of RCS from other mods

So, just a little technical question, is it possible to do a patch that add the effect to all RCS/Monoprop engines. Or the config have to be done one by one per engine ?

Thanks

Functionally yes. However as mentioned it might not work perfectly. That would depend on all mod RCS blocks and engines having the same locations and scales of plume which is probably unrealistic. However you can use a template to greatly decrease the work. 

On 12/24/2020 at 3:55 AM, Atlas Gaming said:

Would this effect be possible?

I think that waterfall definitely adds more realism to rocket exhaust... but one thing I don't think any of the exhaust mods do, including what I have seen so far here, is apply  a blur effect for inside of the flame. If you look at 90 degrees through rocket exhaust IRL you will see what is behind it, but with a heat blur or mirage blur... would be great is this mod could apply  that effect (in moderation of course) as well.

I have a heat distortion shader on the roadmap, but that's a ways off. 

 

On 12/24/2020 at 2:59 AM, Lijazos said:

I'm not sure if I'm doing this right (guess I'm not because it would work otherwise)... I'm trying to create a new template to use with Restock's Skipper.


Once I finish the effect with the editor, I export it as a template and copy the .cfg to GameData/Waterfall/Templates.

Then I go to the part's config and change templateName = to my new template's name.

But once I load the game and fire the Skipper, there is no plume.

Could someone please point this poor soul in the right direction? :(

 

You don't need to put it in the template folder, it can really go anywhere.

However, I will need your log and the file you generated to debug that. 

Link to comment
Share on other sites

29 minutes ago, Nertea said:

You don't need to put it in the template folder, it can really go anywhere.

However, I will need your log and the file you generated to debug that. 

Fortunately I managed to get it working. I must've done something wrong in the first place.

And I gotta add again- this mod changes the game so much for the better. Thank you Nertea.

Link to comment
Share on other sites

Hi @Nertea and @HB Stratos,

I saw that you had been trying to get the Panther effects to work and apparently you managed to have them showing in game. Could you guide me through the process? I'm trying to get stuck in but lots of things in the config files don't really make sense to me (I'm a complete noob). First of all, should I create a cfg file in the "GameData>WaterfallRestock>Patches>Squad"? How do I get the engineID? How did you solve the issue regarding switching engine modes?

In summary, how do I get started? I tried to read the wiki but the sections regarding creating effects were empty and I couldn't find anything about creating config files.

Many thanks in advance,

Kerb

Edited by Kerburettor
Link to comment
Share on other sites

6 minutes ago, mateusviccari said:

Does this mod work by default with stock parts? If not, are there any configs available?

There's a config set (linked in the main post) for ReStock versions of stock parts; there isn't one for stock parts themselves, since the good looks of these plumes would just enhance the stock parts' ugliness

Link to comment
Share on other sites

9 hours ago, Kerburettor said:

Hi @Nertea and @HB Stratos,

I saw that you had been trying to get the Panther effects to work and apparently you managed to have them showing in game. Could you guide me through the process? I'm trying to get stuck in but lots of things in the config files don't really make sense to me (I'm a complete noob). First of all, should I create a cfg file in the "GameData>WaterfallRestock>Patches>Squad"? How do I get the engineID? How did you solve the issue regarding switching engine modes?

In summary, how do I get started? I tried to read the wiki but the sections regarding creating effects were empty and I couldn't find anything about creating config files.

Many thanks in advance,

Kerb

Stratos made some effects, but they never posted the actual config as I recall. You'd have to start from scratch.

The wiki assumes you are familiar with how you add a module to a part, probably with ModuleManager. I don't really want to get into that, there is a lot of documentation and tutorials, plus a couple dozen examples in NFT now. 

You find the engine ID by looking at the original part config:

MODULE
	{
		name = ModuleEnginesFX
		engineID = Dry
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 85
		heatProduction = 15
		useEngineResponseTime = True
		engineAccelerationSpeed = 0.5
		engineDecelerationSpeed = 0.5
		useVelocityCurve = False
		flameoutEffectName = flameout
		powerEffectName = power_dry
		//runningEffectName = running_thrust
		engageEffectName = engage
		disengageEffectName = disengage
		spoolEffectName = running_dry
		engineSpoolIdle = 0.05
		engineSpoolTime = 2.0
		EngineType = Turbine
 ...

I'm not aware of any issue with various engine modes; as the wiki describes there should be one ModuleWaterfallFX per engine module. 

Link to comment
Share on other sites

https://imgur.com/a/iGgZWIX

https://imgur.com/uDSE5me

I've been busy again after quite some time of doing nothing with the mod. I'm now happy to present the results, or at least preliminary ones. I'll release a pack of patches once I'm done, but that will be a while as I'm trying to make patches that work with realplume, stock stuffs etc.

Until then, enjoy these two videos here

Edited by HB Stratos
Link to comment
Share on other sites

4 hours ago, HB Stratos said:

https://imgur.com/a/iGgZWIX

https://imgur.com/uDSE5me

I've been busy again after quite some time of doing nothing with the mod. I'm now happy to present the results, or at least preliminary ones. I'll release a pack of patches once I'm done, but that will be a while as I'm trying to make patches that work with realplume, stock stuffs etc.

Until then, enjoy these two videos here

Ooo, love the green TEB/TAB ignition flash on the second one!

Link to comment
Share on other sites

7 hours ago, HB Stratos said:

https://imgur.com/a/iGgZWIX

https://imgur.com/uDSE5me

I've been busy again after quite some time of doing nothing with the mod. I'm now happy to present the results, or at least preliminary ones. I'll release a pack of patches once I'm done, but that will be a while as I'm trying to make patches that work with realplume, stock stuffs etc.

Until then, enjoy these two videos here

I know the TEB flash has been commented on, and it is wonderfully cool, but I noticed it’s both an ignition and a shutdown. I assume this is because it’s tied to the very lowest end of the thrust range. I don’t remember seeing documentation of a controller that could be used to achieve this effect only on ignition, and work for engines with no spool up/down time. Perhaps a “time running” controller could do this? Though it wouldn’t have any upper bound, which might be difficult.

 

Unrelatedly, one of these days I have to get around to reporting the misplaced and oddly scaled Torch effects in WaterfallRestock.

Edited by RyanRising
Link to comment
Share on other sites

yeah @RyanRisingsadly I can't only make it appear on ignition. Well technically I could, but I've made it so the effect only starts at 1/3rd throttle tobe accurate with how the nozzle of the whiplash is animated. It also has the annoying problem that when precisely 1/3rd throttle is hit then the flash stays on permanently, but I've made the throttle window where it is visible very small, so that's not really an issue.

There's a multitude of controllers and features I'd like to see so I can improve my FX further, so I suppose it's the time to ping @Nertea to notify them of my list of features I'd like to see in the future.

- A mach number controller

- A smooth random controller, as the current random controller just leads to violent jerks instead of a smooth shaking

-The ability to re-order modifiers and effects

-The ability for modifiers to directly affect other modifiers. Or in other words, more than 2d curves. For example I'd like to have a curve linked to throttle that has a negative gradient at low altitude, and at high altitude it the curve should have a positive gradient, morphing between the two as altitude changes. This is currently only possible by duplicating meshes and making them only visible at certain altitudes, but this is a rather ugly solution as it leads to a bunch of meshes clipped in the same place.

- A gimabl deflection x/y controller so the plume can be animated based on how the vectoring petals impinge on the plume.

- A way to to also utilize mesh based effects for flameout/reignition/startup 

- An angle of attack x/y controller to bend the plume when the airstream is hitting it sideways, here one of the 3d curves to combine it with the mach number controller would be useful

- As mentioned above, a way to create the TEB ignition properly, maybe a trigger system along the lines of: When throttle threshold x is passed from below/above/both then play animation y for z seconds.

 

Tips for those getting started with the mod

- if you ever want a effect that does not move as the engine gimbals, "model" is the transform name you want to use.

- on mostly jet engines using thrustTransform as the parent transform leads to issues, smokePoint is the one you should use

 

A bug I observed:

- animation speed often seems to be glitched. When creating a new effect (tested using cylinder mesh and additive dynamic shader) the animation often runs backwards and responds to the speed setting in reverse. Sometimes no movement is possible at all, too. This can also sometimes be observed when using the engine patch in fligh, refer to the video below showing one of the plume animations on the right engine to be stuck. 
https://imgur.com/a/HEsIfwE
https://imgur.com/a/8GoisgC here's another video of the same issue, sadly the quality is bad, but it can be seen here that the outer effect is stuck with no animation while the inner effect is slowly moving, but in reverse

Link to comment
Share on other sites

13 hours ago, Nertea said:

Stratos made some effects, but they never posted the actual config as I recall. You'd have to start from scratch.

The wiki assumes you are familiar with how you add a module to a part, probably with ModuleManager. I don't really want to get into that, there is a lot of documentation and tutorials, plus a couple dozen examples in NFT now. 

You find the engine ID by looking at the original part config:


MODULE
	{
		name = ModuleEnginesFX
		engineID = Dry
		thrustVectorTransformName = thrustTransform
		exhaustDamage = True
		ignitionThreshold = 0.1
		minThrust = 0
		maxThrust = 85
		heatProduction = 15
		useEngineResponseTime = True
		engineAccelerationSpeed = 0.5
		engineDecelerationSpeed = 0.5
		useVelocityCurve = False
		flameoutEffectName = flameout
		powerEffectName = power_dry
		//runningEffectName = running_thrust
		engageEffectName = engage
		disengageEffectName = disengage
		spoolEffectName = running_dry
		engineSpoolIdle = 0.05
		engineSpoolTime = 2.0
		EngineType = Turbine
 ...

I'm not aware of any issue with various engine modes; as the wiki describes there should be one ModuleWaterfallFX per engine module. 

Thanks a lot, I wasn't familiar with modules but now I'll dig into them.

Link to comment
Share on other sites

3 minutes ago, Kerburettor said:

Thanks a lot, I wasn't familiar with modules but now I'll dig into them.

https://cdn.discordapp.com/attachments/772485444570316831/793122664054259712/HBpantherPatch.cfg here you go, my current panther patch for you to dig through and see how I made the MM patch, note that the panther is a multi mode engine so it has two different fx. I believe it still contains broken fx from 0.1.2 on dry running, don't let them confuse you

Link to comment
Share on other sites

1 minute ago, HB Stratos said:

https://cdn.discordapp.com/attachments/772485444570316831/793122664054259712/HBpantherPatch.cfg here you go, my current panther patch for you to dig through and see how I made the MM patch, note that the panther is a multi mode engine so it has two different fx. I believe it still contains broken fx from 0.1.2 on dry running, don't let them confuse you

How good! I tried to implement something real quick yesterday but got no sound nor fx showing, this will help me heaps! Thanks

Link to comment
Share on other sites

My implementation to get the sound working again is a little ugly as I just copied the stuff from the original panther config and inserted it there, modifying it to have no smoke or particle based afterburner.

Also @Nertea is the Smoke Control button in the GUI supposed to do anything? At least when I click it nothing happens, though I may be doing something wrong

Link to comment
Share on other sites

1 hour ago, HB Stratos said:

In other news, @Nertea did you see the bugs I observed and the rest contained in that post?

No, thanks for reminding me.

That's quite a wishlist. Probably at least 40 or so hours of development. And, to be perfectly honest, I don't really care about planes so uptake is really going to depend on whether these are useful for other things as well.

On 12/28/2020 at 6:18 AM, HB Stratos said:

- A mach number controller

Not hard, could be added.

On 12/28/2020 at 6:18 AM, HB Stratos said:

A smooth random controller, as the current random controller just leads to violent jerks instead of a smooth shaking

That's a lot more nuanced than you think it is. How frequently is a new random number generated? what is the rate of movement between the two numbers?

On 12/28/2020 at 6:18 AM, HB Stratos said:

-The ability to re-order modifiers and effects

That's... really involved at this point. I can think a bit about it but I'm really trying to avoid more UI work. 

On 12/28/2020 at 6:18 AM, HB Stratos said:

-The ability for modifiers to directly affect other modifiers. Or in other words, more than 2d curves. For example I'd like to have a curve linked to throttle that has a negative gradient at low altitude, and at high altitude it the curve should have a positive gradient, morphing between the two as altitude changes. This is currently only possible by duplicating meshes and making them only visible at certain altitudes, but this is a rather ugly solution as it leads to a bunch of meshes clipped in the same place.

That seems like overkill for that situation? What is preventing you from doing that with multiple modifiers with different blend modes? The effect you describe could for example be accomplished with a throttle-driven curve (replace) that animates a positive gradient. A atmosphere-driven curve (multiply) that moves between values of -1 (at sea level) and 1 (at altitude) should invert the curve as described.

On 12/28/2020 at 6:18 AM, HB Stratos said:

- A gimabl deflection x/y controller so the plume can be animated based on how the vectoring petals impinge on the plume.

Probably not impossible.

On 12/28/2020 at 6:18 AM, HB Stratos said:

- A way to to also utilize mesh based effects for flameout/reignition/startup 

I'll think about the best way to achieve this as it seems like a good improvement in general

On 12/28/2020 at 6:18 AM, HB Stratos said:

- An angle of attack x/y controller to bend the plume when the airstream is hitting it sideways, here one of the 3d curves to combine it with the mach number controller would be useful

I don't think this one will be happening.

On 12/28/2020 at 6:18 AM, HB Stratos said:

- animation speed often seems to be glitched. When creating a new effect (tested using cylinder mesh and additive dynamic shader) the animation often runs backwards and responds to the speed setting in reverse. Sometimes no movement is possible at all, too. This can also sometimes be observed when using the engine patch in fligh, refer to the video below showing one of the plume animations on the right engine to be stuck. 
https://imgur.com/a/HEsIfwE
https://imgur.com/a/8GoisgC here's another video of the same issue, sadly the quality is bad, but it can be seen here that the outer effect is stuck with no animation while the inner effect is slowly moving, but in reverse

Can you provide some kind of template for me to reproduce this?

Edited by Nertea
Link to comment
Share on other sites

20 minutes ago, Nertea said:

That's quite a wishlist. Probably at least 40 or so hours of development. And, to be perfectly honest, I don't really care about planes so uptake is really going to depend on whether these are useful for other things as well.

First off, thanks for having a look. Also, thanks for all your work on this mod so far. You're doing this for free so I really expect nothing from you there. Take these rather as suggestions on how the mod could improve.

20 minutes ago, Nertea said:
On 12/28/2020 at 3:18 PM, HB Stratos said:

- A mach number controller

Not hard, could be added.

would be cool to have to change how mach diamonds move. May run into issues when in a vacuum, though this may just be up to the patch maker to disable the FX being influenced by mach depending on atmosphere depth

20 minutes ago, Nertea said:
On 12/28/2020 at 3:18 PM, HB Stratos said:

A smooth random controller, as the current random controller just leads to violent jerks instead of a smooth shaking

That's a lot more nuanced than you think it is. How frequently is a new random number generated? what is the rate of movement between the two numbers?

 I was thinking of something like perlin noise, which is inbuilt into unity. You'd take samples from it at position x * currentTime where x is the speed set by the user. It would also be nice if the user could either set a seed or choose to have it randomized for every instance of the FX

20 minutes ago, Nertea said:
On 12/28/2020 at 3:18 PM, HB Stratos said:

-The ability to re-order modifiers and effects

That's... really involved at this point. I can think a bit about it but I'm really trying to avoid more UI work. 

I haven't dealt much with UI so it's hard to judge for me how hard it would be to implement. However, it would be really helpful to at least be able to re-order modifier as currently I either have to change it in the file and re-launch the game, which takes ages, or I have to delete modifiers and re-add them manually, which is quite annoying to do. I do think this would also help everyone who is making patches for the mod, not only me who is working on atmosphere engines.

20 minutes ago, Nertea said:
On 12/28/2020 at 3:18 PM, HB Stratos said:

-The ability for modifiers to directly affect other modifiers. Or in other words, more than 2d curves. For example I'd like to have a curve linked to throttle that has a negative gradient at low altitude, and at high altitude it the curve should have a positive gradient, morphing between the two as altitude changes. This is currently only possible by duplicating meshes and making them only visible at certain altitudes, but this is a rather ugly solution as it leads to a bunch of meshes clipped in the same place.

That seems like overkill for that situation? What is preventing you from doing that with multiple modifiers with different blend modes? The effect you describe could for example be accomplished with a throttle-driven curve (replace) that animates a positive gradient. A atmosphere-driven curve (multiply) that moves between values of -1 (at sea level) and 1 (at altitude) should invert the curve as described.

That could actually work, but it would be a bit annoying with more complex curves. Though, seeing as this would be quite complicated to implement otherwise I think I can live with this solution. 

20 minutes ago, Nertea said:
On 12/28/2020 at 3:18 PM, HB Stratos said:

- A gimabl deflection x/y controller so the plume can be animated based on how the vectoring petals impinge on the plume.

Probably not impossible.

Is it an issue with the KSP mod API not allowing you to access these values? In this case I think it should be possible to get these values by comparing the angles of thrustTransform and model

20 minutes ago, Nertea said:
On 12/28/2020 at 3:18 PM, HB Stratos said:

- A way to to also utilize mesh based effects for flameout/reignition/startup 

I'll think about the best way to achieve this as it seems like a good improvement in general

okay great!

20 minutes ago, Nertea said:
On 12/28/2020 at 3:18 PM, HB Stratos said:

- An angle of attack x/y controller to bend the plume when the airstream is hitting it sideways, here one of the 3d curves to combine it with the mach number controller would be useful

I don't think this one will be happening.

I figured as much, but I'd love to see it, especially for something like a falcon 9 reentry burn with the plume correctly showing up as blasted by the airstream as it slows down the rocket.  This would require a combination of the attack X, attack Y and mach number controllers, but it would be pretty cool.

On 12/28/2020 at 3:18 PM, HB Stratos said:

- As mentioned above, a way to create the TEB ignition properly, maybe a trigger system along the lines of: When throttle threshold x is passed from below/above/both then play animation y for z seconds.

I believe you missed this one... maybe it could be implemented as an expansion upon the igniton/shutdown FX

22 minutes ago, Nertea said:
On 12/28/2020 at 3:18 PM, HB Stratos said:

- animation speed often seems to be glitched. When creating a new effect (tested using cylinder mesh and additive dynamic shader) the animation often runs backwards and responds to the speed setting in reverse. Sometimes no movement is possible at all, too. This can also sometimes be observed when using the engine patch in fligh, refer to the video below showing one of the plume animations on the right engine to be stuck. 
https://imgur.com/a/HEsIfwE
https://imgur.com/a/8GoisgC here's another video of the same issue, sadly the quality is bad, but it can be seen here that the outer effect is stuck with no animation while the inner effect is slowly moving, but in reverse

Can you provide some kind of template for me to reproduce this?

Whiplash Patch and a Plane to test it with

Here it is relatively easy to observe when an animation is stuck as you have two engines. Which FX and on which engine it is stuck appears to be random, sometimes all FX work, but with the amount of FX I have in this one that's rarely the case.

My Panther patch suffers from the same problem, though it may be less obvious at times

I also mentioned that it happens when creating a plume. For this create a cylinder mesh with the additive dynamic shader with the transform set to smokePoint on the whiplash, then rotate it by x = -90° and turn up the falloff and noise. As a default animation speed is already set you'll see that often when doing this it will animate backwards, which is sometimes fixed by copying the effect and deleting the original one.

 

I think that's all for now, thanks for all the awesome work on this mod!

Link to comment
Share on other sites

2 hours ago, HB Stratos said:

I believe you missed this one... maybe it could be implemented as an expansion upon the igniton/shutdown FX

Nope. It's the same as the other one (play effects for a specific event)

2 hours ago, HB Stratos said:

 I was thinking of something like perlin noise, which is inbuilt into unity. You'd take samples from it at position x * currentTime where x is the speed set by the user. It would also be nice if the user could either set a seed or choose to have it randomized for every instance of the FX

sure

2 hours ago, HB Stratos said:

Is it an issue with the KSP mod API not allowing you to access these values? In this case I think it should be possible to get these values by comparing the angles of thrustTransform and model

It's software, most things are possible ;).

2 hours ago, HB Stratos said:

Whiplash Patch and a Plane to test it with

Here it is relatively easy to observe when an animation is stuck as you have two engines. Which FX and on which engine it is stuck appears to be random, sometimes all FX work, but with the amount of FX I have in this one that's rarely the case.

My Panther patch suffers from the same problem, though it may be less obvious at times

I also mentioned that it happens when creating a plume. For this create a cylinder mesh with the additive dynamic shader with the transform set to smokePoint on the whiplash, then rotate it by x = -90° and turn up the falloff and noise. As a default animation speed is already set you'll see that often when doing this it will animate backwards, which is sometimes fixed by copying the effect and deleting the original one.

I think I found the reason for this. The good news - it's fixable. The bad news - you may need to go and adjust the speeds of all effects you've worked on.

I'll push a new version out tonight with the mach controller, the fix and maybe a few other things.

Link to comment
Share on other sites

that sounds great! Well fixing speeds is less than I had to do previously, so long as my FX stop breaking on me.  Also great to see the mach number controller.

I have some coding experience with unity, but none so far with modding KSP. How hard do you think it would be to sub-mod Waterfall to get the controllers I'd like to see?

Link to comment
Share on other sites

1 hour ago, HB Stratos said:

that sounds great! Well fixing speeds is less than I had to do previously, so long as my FX stop breaking on me.  Also great to see the mach number controller.

I have some coding experience with unity, but none so far with modding KSP. How hard do you think it would be to sub-mod Waterfall to get the controllers I'd like to see?

I'd suggest submitting (tested) pull requests to the Watefall repo, so we can all collaborate. 

 

edit: release will be longer, I started rewriting some stuff.

Edited by Nertea
Link to comment
Share on other sites

13 hours ago, HB Stratos said:

I figured out how to make realplume smoke trails compatible with my waterfall engine patches. 

Just putting it out there, but this could possibly be used to create a sea-level SRB plume.

Link to comment
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...