Jump to content
The Dark Mod Forums

particle request: candle smoke


Springheel

Recommended Posts

Right now when our candles go out, they play the same puffy smoke particle as torches. It just doesn't suit candles very well. I don't know much about particles, but I wonder if someone had the time and know-how to make something more wispy and candle-like? (this could also double as pipe smoke)

 

~DSCF0045_2.jpg

  • Like 1
Link to comment
Share on other sites

As long as you don't want it to be reactive or unique for all candles, that can probably be done by baking either a fluid simulation

in blender or video source to textures for animation frames.

 

Realtime and dynamic? We'd need to do physics on the GPU.

 

Arcturus?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I don't care if it's real time or dynamic; none of our other smoke effects are.

Link to comment
Share on other sites

I'm still not clear on the differences between sprites and particles...is it that sprites orient themselves to the player pov, and particles to the world?

Link to comment
Share on other sites

That's beautiful smoke!

 

A sprite is a 2d image that can move around the screen. The view-aligned stages of particles are sprites. Our usual technique for rising smoke is a procession of sprites each showing a fuzzy round blob, which move upwards and grow but fade out as they get higher. That looks ok from above too, because the flat images come into line and you see the one or two round blobs at the top with the others below them adding density.

 

If we want to use anything other than round blobs, we have the problem what it should look like from above. If we use a particle effect, we're still stuck with making the effect from 2d images. We could use an animated filmstrip of images for an accurate candle plume like in your picture above, but the illusion would be broken by someone looking straight down on it. If we make it view-aligned, it'd look like it was coing out of the candle sideways. If we make it y-axis aligned, it would get too thin and vanish when seen from above. It might look ok to use an upright image for the side view crossed with a horizontal image for the overhead view to display the animated video, but probably not. When seen almost from the side, the horizontal images would look like dense lines passing up the smoke plume.

 

Trying to think this through. Particles need to be 2d, so do we have any options other than particles? Could you make that smoke plume out of an animated 3d mesh?

 

There's nothing to stop us breaking up a video image over lots of small 2d quads, which can have set positions in the world but all turn to face the player, and that foreshorten the moving image as the view angle increases. That would take care of a range of view angles, but probably still not the directy-from-above view, which needs to be something different from a foreshortened version of the side-on view.

 

We might be over-complicating it. 99% of the time, the player will be holding the candle or at least standing in front of it when they frob it to put it out, so a side-on video of a smoke plume would be just the ticket. Perhaps we can choose an effect selectively, falling back on the old particle for edge cases. Does anyone know where to find a video of a smoke plume with a black background? I'll go ask google.

 

Edit: Hmm that's not quite true is it? Smoke plumes last a few secods, and the player usually puts the candle down.

Link to comment
Share on other sites

If we make it y-axis aligned, it would get too thin and vanish when seen from above. I

 

Can't the effect spiral up in a cone pattern? That would make it still visible from above.

 

Or we could do something wispy but in a larger cloud shape, something like this:

 

1680218984.jpg

Link to comment
Share on other sites

This looks like it uses the same particle system that we have (single images slowly getting larger) it's just that the images are wispy bits of smoke instead of fuzzy balls. Not sure how they did the single wisp coming off the cigar though.

ibsUyvNzgvrHeW.gif

Link to comment
Share on other sites

You're right, it's a combo of two particle stages using only the same tech as we have. There's a view aligned stage -- a wispy ball -- and a world-aligned stage, the plume coming out of his mouth or the cigarette, which I think is a filmstrip.

 

You can see the transitions best in frames 21 and 25. In 21 there's a poor transition between the plume and the wispy ball. In frame 25 a second plume emerges behind the first and it starts to look bad as it gets side-on.

post-29566-0-40869500-1416795843_thumb.jpgpost-29566-0-49328300-1416795844_thumb.jpg

 

They've been able to go to town more on the cigarette plume filmstrip because I guess they knew you'd not be able to see it from above. Again it's a combo of an axis- or world-aligned plume and the same wispy ball at the top.

post-29566-0-35122200-1416795841_thumb.jpg

 

The wispy ball uses the same technique we do in lots of particles. it's the same image at different depths repeated and sometimes rotated, although it's apparently not random. On the left you can see the same detail at the same orientation from the cigarette particle and from the mouth particle.On the right that same detail appears 3 times in the mouth smoke.

post-29566-0-45127100-1416795848_thumb.jpg

Link to comment
Share on other sites

So I imagine something similar could look good for candles. A world-aligned wispy stream coming off the candle and then wispy balls further above the candle aligned to the player view.

 

Do we have current example of sprite particles I could look at as an example?

Link to comment
Share on other sites

Any view aligned particle stage is a sprite, so most of our particles are. We reuse the smokepuff / shotgunpuff shader / texture (I forget which is shader and which is image) for everything from fog to gas arrows to chimney smoke to snow and dust motes, basically for anything indistinct.

 

I spotted this while googling for suitable images. Would it be possible to get something like this animation into TDM? http://www.creativecrash.com/maya/3d-model/smokestrings-4-0-dynamic-smoke-generator-3d-model

 

We can try to find or make a flat image first.

Link to comment
Share on other sites

Any view aligned particle stage is a sprite, so most of our particles are. We reuse the smokepuff / shotgunpuff shader / texture (I forget which is shader and which is image) for everything from fog to gas arrows to chimney smoke to snow and dust motes, basically for anything indistinct.

 

I guess I mean an animated sprite. The particles I'm familiar with use just a single image and then either scale or rotate it or both during the "animation" process. Do we use any that are a strip of images played in sequence, like this:

 

703.jpg

Link to comment
Share on other sites

There's support for it, but I don't know whether we use any. I can look later. We could also try scrolling a static plume upwards into view with a wispy cloud growing above it. Probably the limits of what I can do to help try it out unless you want to have a crack at that animated mesh.

I did a quick image search earlier but haven't yet found a suitable wispy cloud to try out. All the detailed ones were cut off at the edges. Is that something you could make in your modeling software?

Link to comment
Share on other sites

I know there were a couple D3 particles that we wound up replacing that had those animated strips. I'll have to dig around and see what I can find. I can probably put something together in photoshop, though it will be a bit of trial and error.

Link to comment
Share on other sites

Ok, I'm getting somewhere, but I could use some help. Can anyone tell me what these spawnargs actually do? Some of them I know, but most of them I can't tell but by trial and error.

 

Specifically, I'm trying to figure out how to make particles fade away softly rather than blinking out.

 

{

count 10 <-- number of individual particles spawned

material textures/particles/candle_smoke // textures/particles/smokepuff <-- texture to use

time 3.000 <-- duration of the effect?

cycles 1.000

deadTime 2.000

bunching 1.000 <-- I think this is how many seconds the particles take to spawn

distribution rect 1.000 1.000 1.000

direction cone "2.000"

orientation view <-- "view" vs "world"?

speed "0.000"

size "2.000" to "8.000" <-- size of particles

aspect "1.000"

randomDistribution 1

boundsExpansion 0.000

fadeIn 0.250

fadeOut 5.5000 <-- I thought this was how long it took particles to fade away, but it doesn't appear to be doing that

fadeIndex 0.500

color 0.060 0.060 0.060 1.000

fadeColor 0.000 0.000 0.000 0.000

offset 0.000 0.000 0.000

gravity world -2.000 <-- direction and speed of particles relative to world (- is up, + is down)

}

Link to comment
Share on other sites

I read that, but couldn't quite figure out what it was saying. I tried using DR's particle editor, and while I made the particles fade very nicely in the viewer, loading them in game still results in them snapping off suddenly.

Link to comment
Share on other sites

Yeah, this one might answer a few of those a little better:

 

http://wiki.thedarkmod.com/index.php?title=Particle_Editor

 

time 3.000 = lifespan of individual particles

bunching 1.000 = how close particles are to each other

orientation view = facing player (view)... (snow\weather effects) vs emitting from the surface direction (world) (spraying water, etc)

fadeOut 5.5000 = should determine how long each particle takes to fade... if your "time" value is too short you wont see it

gravity world -2.000 <-- direction and speed of particles relative to world (- is up, + is down) (sounds right to me)

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

fadeOut 5.5000 = should determine how long each particle takes to fade... if your "time" value is too short you wont see it

 

This doesn't appear to be having any effect no matter what value I set it at. I notice that the original candle smoke particle does the same thing--it's hard to see because the entire particle is pretty transparent, but each particle just blinks out when it's done. I'm going to try testing with an emitter, to see if it's the particle or something to do with the script.

Link to comment
Share on other sites

Ok, I'm getting somewhere, but I could use some help. Can anyone tell me what these spawnargs actually do? Some of them I know, but most of them I can't tell but by trial and error.

 

Specifically, I'm trying to figure out how to make particles fade away softly rather than blinking out.

 

{

count 10 <-- number of individual particles spawned, or for cycling particles, number that are on screen at once

material textures/particles/candle_smoke // textures/particles/smokepuff <-- texture to use

time 3.000 <-- duration of the effect? duration of life for individual quads. Also used as the base time for calculating other durations specified below.

cycles 1.000

deadTime 2.000 <-- matters for cycling particles. time between cycles when there's no spawning

bunching 1.000 <-- I think this is how many seconds the particles take to spawn spawning will be randomized over bunching*time seconds

distribution rect 1.000 1.000 1.000

direction cone "2.000"

orientation view <-- "view" vs "world"? view=always face the screen. x, y, or z will align the particle to one of the emitter's axes

speed "0.000"

size "2.000" to "8.000" <-- size of particles they will spawn at 2 and grow to 8 over time seconds

aspect "1.000"

randomDistribution 1

boundsExpansion 0.000

fadeIn 0.250

fadeOut 0.85 <- this needs to be in the range 0..1. Proportion of time that the particle will spend fading out. It's ok for the fadeOut time to overlap wth fadeIn, which I think means the particle will never reach full opacity

fadeIndex 0.500

color 0.060 0.060 0.060 1.000

fadeColor 0.000 0.000 0.000 0.000

offset 0.000 0.000 0.000

gravity world -2.000 <-- direction and speed of particles relative to world (- is up, + is down)

}

Link to comment
Share on other sites

fadeOut 0.85 <- this needs to be in the range 0..1. Proportion of time that the particle will spend fading out. It's ok for the fadeOut time to overlap wth fadeIn, which I think means the particle will never reach full opacity

 

So if I set this to .5, then the particle should spend the last 1.5 seconds of its 3 sec life fading out? This is definitely not what I'm seeing.

 

How does the "fading" process work? I see a "fadeColor" but I'm not sure exactly what it does. And what is "fadeIndex"?

 

I ran out of time with my tests last night, but it seemed like the original smoke_candleout particle has the "popping out" problem, while the smoke_torchout does not. Haven't been able to track down the difference.

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.

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.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...