Jump to content

[1.8.x-1.10.x] SmokeScreen 2.8.14 - Extended FX plugin (18 April 2020)


sarbian

Recommended Posts

I have just pushed a commit that fixes this issue to my pull request.

The issue is fixed by distributing the newly emitted particles uniformly at random along the emitter's trajectory during the frame. Bear in mind that you still have to make the emission high enough, otherwise there just aren't enough particles to make a continuous plume.

I would recommend against using this bug for shock diamonds, as their appearance would then depend on the performance of the machine displaying them.

Other features introduced include better collision, buoyancy and logarithmic growth (which I would strongly recommend instead of exponential growth, as it looks more natural and removes the need for clamping). Avoid using damping with physical=true, it looks awkward. Set the dragCoefficient instead. The new options are as follows:


// Initial density of the particle seen as sphere of radius size of perfect
// gas. We then assume (only true for ideally expanded exhaust) that the
// expansion is isobaric (by mixing with the atmosphere) in order to compute
// the density afterwards. Units (SI): kg / m^3.
[Persistent]
public double initialDensity = .6;

// Whether to apply Archimedes' force, gravity and other things to the particle.
[Persistent]
public bool physical = false;

// How much the particles stick to objects they collide with.
[Persistent]
public double stickiness = 0.9;

[Persistent]
public double dragCoefficient = 0.1;

// Logarithmic growth applied to to the particle.
// The size at time t after emission will be approximately
// (Log(logarithmicGrowth * t + 1) + 1) * initialSize, assuming growth = 0.
// TODO(sarbian): make this a cfg-configurable curve (as a function of density).
[Persistent]
public double logarithmicGrowth = 0.0;

Here are a few illustrative screenshots a before/after for dotted smoke, and two launch pictures. I didn't do anything fancy in Unity (just an emitter with the HotRockets! SRB texture) so the particles themselves are ugly.

http://imgur.com/a/HyKTX

Man, I don't like your smoke sprite, but only for a SRB (very fast) that trail is a very consistent awesomeness!!

Link to comment
Share on other sites

(Crossposted from HotRockets thread)

So, I'm finally back(ish) and actually looking through stuff now.

I have a request for Nazari, Nothke, and anyone else writing ModuleEnginesFX conversions: please, please, instead of nuking the old ModuleEngines node and rewriting it, use this form. We'll take the Skipper as the example.

--

This will make it compatible with DRE, and with other things that change the engine's stats.

Let me explain. Since ModuleEngines and ModuleEnginesFX take almost the same parameters, instead of replacing the whole module, you just change the name line to refer to the new module, and add the lines that the old module lacks (and do a remove for fxOffset, in case it exists and you want to clear it out). Further, this will occur on the :Final pass, which means it will occur *after* all other changes are made (like DRE's change to heatProduction).

What your referring to here Nahtan.. Is this the problem im having with my reentry effects when using DRE? I mean its... bad. The effect flashes on and off, im getting both the condensation cloud effect at the same time and my sound skips so bad I have to mute it.

EDIT: It is NOT SmokeScreen. I removed it.. So it must be DRE.

Edited by Motokid600
Link to comment
Share on other sites

Man, I don't like your smoke sprite, but only for a SRB (very fast) that trail is a very consistent awesomeness!!

Well, the sprite is just for demonstration purposes (I couldn't use the HotRockets! model as it was angled and had damping), it's up to you (or nothke or Nazari or anyone else with Unity and artistic skills) to make something pretty out of these features. :)

Note that the dotted smoke fix will apply to HotRockets! just fine (the emission is a bit low, so things will still be somewhat discontinuous, but the blobs will be randomly distributed, denser and fast-moving rather than regularly spaced and fixed with respect to the rocket).

As HotRockets! uses damping and seems to apply some sort of rotation to its particles, another .mu file is needed if you want to use collide or physical, otherwise things will look weird.

Edited by eggrobin
Link to comment
Share on other sites

Well, the sprite is just for demonstration purposes (I couldn't use the HotRockets! model as it was angled and had damping), it's up to you (or nothke or Nazari or anyone else with Unity and artistic skills) to make something pretty out of these features. :)

Note that the dotted smoke fix will apply to HotRockets! just fine (the emission is a bit low, so things will still be somewhat discontinuous, but the blobs will be randomly distributed, denser and fast-moving rather than regularly spaced and fixed with respect to the rocket).

As HotRockets! uses damping and seems to apply some sort of rotation to its particles, another .mu file is needed if you want to use collide or physical, otherwise things will look weird.

I was doing my own work on FX for my pack, but (as you can see in my sketches) to the day all my SRB .mu are flying messes...

We can work in this together, if you let me be your artist co-author :blush:. I can send you feedback and any particle you will need for your .mu tests. And I can bear a hand on configs and final aspect.

(of course, nothke or Nazari gonna kick our asses when they release anything of they work... but that is another theme... :D)

Link to comment
Share on other sites

The download is updated with all of eggrobin patch (thanks again for those).

You'll have to ask him for the new parameters for now. After 2 evenings of rebuilding my server I need a small break away from a keyboard :)

Link to comment
Share on other sites

So if I get it right - even if I download your updated Smoke plugin(which i did, and already replaced my old version), the configs from Hotrockets will still need to be edited, in order for the fix to apply?
Hopefully Sarbian will update it today. But from what I understand - Hotrockets has to be updated with the updated version of Sarbian's plugin too. Which means it will take quite some time :(
Note that the dotted smoke fix will apply to HotRockets! just fine (the emission is a bit low, so things will still be somewhat discontinuous, but the blobs will be randomly distributed, denser and fast-moving rather than regularly spaced and fixed with respect to the rocket).

Just install the new SmokeScreen and the regularly dotted smoke issue will disappear. If you want collision or buoyancy you will have to wait for Nazari as something has to be changed in his .mu file in order for that to look good. If you just want the smoke to be denser increase the emission in the cfg.

I was doing my own work on FX for my pack, but (as you can see in my sketches) to the day all my SRB .mu are flying messes...

We can work in this together, if you let me be your artist co-author :blush:. I can send you feedback and any particle you will need for your .mu tests. And I can bear a hand on configs and final aspect.

(of course, nothke or Nazari gonna kick our asses when they release anything of they work... but that is another theme... :D)

Well, I really want to get back to Principia and I am completely incompetent as far as Unity stuff is concerned, but most of the issues you described (star-shaped exhaust, weird bouncing at an angle of À/4) should be fixed by the latest build.

Make a good-looking .mu file with no damping (damping set to 1), no forces and no weird angle (I don't know what Nazari1382 did, but his smoke comes out of the SRBs at an angle; don't do that).

In your cfg, use the following settings:


grow 1.0 0.0 // No exponential growth.
energy 1.0 5.0 // or something higher, you want the smoke to last a while.
// Set the speed to something high enough, bearing in mind that it will drastically slow down on collision and due to drag.

collide = true // collision.
collideRatio = 0.0 // For smoke at least 0.0 is the only thing that will look good.

// New parameters:
physical = true // buoyancy, drag.
stickiness = 0.85 // Smoke should be very sticky (at least 0.75, or as high as 0.95), otherwise a lot of
// smoke will come out of the trench vertically. Stickiness slows smoke down on collision
// with a perpendicular surface.
logarithmicGrowth = 5.0 // This is what I used in the screenshots, you might want to use something significantly higher.
// The formula for logarithmic growth is Log(logarithmicGrowth * t + 1) + 1), where t is
// in seconds and 1 is the initial size in the result, so you can [url=http://www.wolframalpha.com/input/?i=Plot%5B%7BLog%5B5+*+t+%2B+1%5D+%2B+1%2C+Log%5B50+*+t+%2B+1%5D+%2B+1%2C+Log%5B0.5+*+t+%2B+1%5D+%2B+1%7D%2C+%7Bt%2C+0%2C+10%7D%5D]try that out[/url] in
// Wolfram|Alpha to see how things will grow with time (the linked plot shows you the growth over
// 10 seconds for logarithmicGrowth = 50, 5 and 0.5). This should really be a user-definable
// density-dependent curve, but I'll let [b]sarbian[/b] do that.
sizeClamp = 10000 // You don't need size clamping with logarithmic growth, set this to something high so it doesn't bother you.
// I (or [b]sarbian[/b]) should make a 'noClamping' setting someday.
initialDensity = 0.6 // Atmospheric density is about 1.2, set this to something lower for lighter, hotter stuff (e.g. smoke, flames)
// and something higher for cold, heavy stuff (e.g. cryogenic venting; note that you should remember to use low velocities
// and low energy (short lifetime) for cryogenic venting).
// For reference, 0.6 is about the density of air at 300 °C, 1 atm.
dragCoefficient = 0.1 // Fool with this until smoke slows down the way you want.

This should get you started, then fool with the settings until you get something that looks good.

EDIT: PSA:

I found out where the pyramidal shape mentioned before on this thread was coming from. This is because using a Random Velocity in Unity will generate a random velocity offset as a product of uniform distributions, i.e. a uniform distribution on a square. Sarbian or myself will have to code something to enable better initial velocity distributions of particles (uniform on a disk should do the trick for most purposes).

Edited by eggrobin
Disk, not circle.
Link to comment
Share on other sites

Emmmmm... this gonna be fun... :D

Great and huge size mushroom cloud monkeying with your settings and erona's .mu (I hate mine...).

http://imgur.com/a/0kGJU

Seriously, if you don't use your own .mu (or more precisely a .mu for which you have access to the Unity project) things are going to look weird. I suspect this particular look is coming from damping. If you set physical=false and fire a SRB nozzle up, does the smoke slow down to a halt after some distance? If this is the case your problem is damping, and you have to make your own .mu.

In any case, it will be far easier for me to help you if you are able to tweak things on the Unity side.

Link to comment
Share on other sites

Sarbian, can I use this in the Singularity Mod, It would look great for the engines.

I believe the license specified in the opening post allows this

Licence : Attribution 4.0 International (CC BY 4.0): http://creativecommons.org/licenses/by/4.0/

You are free to package the DLL with your mods as long as it use the directory structure of my zip and that you respect the licence (the Attribution part, so the *whole* licence). And you would be kind to link to this thread so users can get a newer version when I release one.

So yes, providing you abide by the terms of the license

Must provide attribution (including, for preference, a link to the SmokeScreen thread).

Cannot add further restrictions to the work

Must include the .dll in the specified directory structure

Link to comment
Share on other sites

Seriously, if you don't use your own .mu (or more precisely a .mu for which you have access to the Unity project) things are going to look weird. I suspect this particular look is coming from damping. If you set physical=false and fire a SRB nozzle up, does the smoke slow down to a halt after some distance? If this is the case your problem is damping, and you have to make your own .mu.

In any case, it will be far easier for me to help you if you are able to tweak things on the Unity side.

That was only for fun. I have a kerbal spirit...

I had this launch, finally:

RtAzMRg.gif

But I guess is no longer possible, because Nazari's Hot Rockets is now licensed as by-nc-nd (I had not seen until now).

Obviously, as Unity n00b, I'm not gonna re-do all .mu, smoke and flame settings from zero. That would a huge pain in my ass and I don't have time enought right now.

Edited by Proot
Link to comment
Share on other sites

You can use those .mu files just credit and link to hotrockets if you upload them. Also if you need pointers on creating a mu let me know

Wow, thank you Nazari1382!! :kiss::kiss::kiss:

I only know the artistic side of Z-Brush in the 3D software world. I'm learning Blender and a bit of Unity right now...

Of course apropiate credits was in the work planning for the release, and my own .mu for next versions.

Thank you again!

Edited by Proot
Link to comment
Share on other sites

I love the launch in that .gif! It is the first one I see that seems pretty convincing and that does not have any weird artifacts or annoying glitches. I really love where this is going.

But I guess is no longer possible, because Nazari's Hot Rockets is now licensed as by-nc-nd (I had not seen until now).

I see you already have permission, but if you had not: it is almost impossible to revoke earlier licenses. If you had permission per a license before, you do still have it - unless that license specifically included a time limit or something. A changed license counts from that point on and not retroactively.

Link to comment
Share on other sites

I have left collision off by default in hotrockets for now, in addition to keeping particle count fairly low, because I want it to be friendly to performance. You can turn on collision and try other values in the config though.

Link to comment
Share on other sites

Emmmmm... this gonna be fun... :D

Great and huge size mushroom cloud monkeying with your settings and erona's .mu (I hate mine...).

http://imgur.com/a/0kGJU

Haha wow that is quite the mushroom indeed. I'd be happy to work with you on making more custom .mu smoke files of varying sizes, speeds, colors etc. I've just been waiting patiently for hot rockets and smokescreen to finalize their config options. The latest smokescreen fixed the dotted particle issue when moving at speed but it did some weird stuff to the flame effects. Anyway, hit me up with what you might need and I'll see what I can do.

Link to comment
Share on other sites

That was only for fun. I have a kerbal spirit...

I had this launch, finally:

RtAzMRg.gif

This looks pretty good!

I have left collision off by default in hotrockets for now, in addition to keeping particle count fairly low, because I want it to be friendly to performance. You can turn on collision and try other values in the config though.

Note that while collision is a performance hit, the other features (buoyancy/drag) should have negligible computational cost.

The latest smokescreen fixed the dotted particle issue when moving at speed but it did some weird stuff to the flame effects. Anyway, hit me up with what you might need and I'll see what I can do.

HotRockets! does not use MODEL_MULTI_PARTICLE_PERSIST for its flames, so I was not aware of this. Could you perhaps be more specific (a screenshot would be nice) and create an issue on the repository?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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...