Jump to content
The Dark Mod Forums

particle request: candle smoke


Recommended Posts

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.

 

That's my understanding yes.

 

I think it fades to fadecolor. Fading to 0 0 0 0 as you are doing should work, although it'll darken an alpha blend particle like smokepuff as it fades too. I expect that fading the alpha channel would be enough.

 

tdm_dustfog_01 is a good example of a gradual slow fade in and fade out using smokepuff.

 

I think fadeindex 0.5 means particles spawned during the last 0.5 of time will already be faded when they start. I'm a bit hazy how that works.

 

I made my notes from memory not from consulting the code... but I stuck to what I was prety sure of. I'll have a brush up on it later and if necessary update the wiki (if we can).

 

Do try turning off soft particles during this test just in case I cocked something up! r_useSoftParticles. If you are getting too close to the particle (< about 6 units to the eye for this particle size) the proximity fade that's meant to stop popping could be kicking in.

 

color 0.060 0.060 0.060 1.000 -- that seems quite dark as the max colour, and it might not be leaving the fade effect much room to be gradual given that the rgb channels are being faded too. That's all I can think of looking at the decl above, but hmm it should still allow for about 20 fade gradations so it shouldn't pop.

Link to post
Share on other sites
  • Replies 112
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I haven't quite got an answer to testing it on a candle yet, but I've done some research.   There's a single "emitter" for the entire map, so that's why it's always considered to be in view. The emitt

Ok, I'm an idiot. The elegant solution is obvious. Wish I hadn't spent 2 hours thinking aloud in the thread now!   The above suggestions were concerned with how to find the right place in the sequenc

Looking better. Proper fading and no inheritace of rotation etc. Now at timescale 0.3, particles still unnaturally spread out:   http://youtu.be/Gf0UY2wBXC8

Posted Images

I'll do a video of what I'm seeing tonight when I get home. I'm using an additive blend texture, so I don't know if that matters, but I don't think I'm seeing any fade at all, either in or out (yet I do in the DR particle viewer, which is odd).

Link to post
Share on other sites

Ah, additive blend textures *have* to be faded using the rgb channels. Alpha has no effect on them. But your 0 0 0 0 fade is correct then.

 

I should check the code to see whether additive blend textures are handled properly in the particle code, come to think of it. I had to write "either/or" code in the renderer for the soft particle effect because the standard fade method (adjusting alpha) does nothing to additive blend materials. If the particle code itself doesn't make the distinction, we have our answer.

Link to post
Share on other sites

What would the in game editor do differently from the DR one?

Link to post
Share on other sites

You said:

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.

Editing particles ingame was WYSIWYG.

It's only a model...

Link to post
Share on other sites

The DR editor is supposed to be WYSIWYG as well. I doubt it's the editor's fault. It's probably an issue related to the additive blend material.

Link to post
Share on other sites

Ah, additive blend textures *have* to be faded using the rgb channels. Alpha has no effect on them. But your 0 0 0 0 fade is correct then.

 

I should check the code to see whether additive blend textures are handled properly in the particle code, come to think of it. I had to write "either/or" code in the renderer for the soft particle effect because the standard fade method (adjusting alpha) does nothing to additive blend materials. If the particle code itself doesn't make the distinction, we have our answer.

Not this. The particle code adjusts all four channels to produce its fade effect. But have you tried making your material blend blend instead of blend add to see whether it fixes it? Most (not all) smoke effects are blend blend.

 

With a standard 2.02 plume, you do see proper fading. There's a bit of bouncing in the particle effect towards the end, but no popping:

http://youtu.be/Hi46yc3Xp-o

 

Edit: this is at timescale 0.25 by the way

Edited by SteveL
Link to post
Share on other sites

The DR editor is supposed to be WYSIWYG as well.

I opened fire effect. The heat haze effect is not displayed in DR at all and in stead obscures other particles making hard to see what happens. Smoke seems to be different than in game. And when I tried to save changes DR crashed, but that used to happen in in-game editor too.

It's only a model...

Link to post
Share on other sites

What you describe as "bouncing" I interpret as the particles shutting off one at a time in the second stage of the particle. It's what I'm calling "popping". That's the effect that shouldn't be happening.

 

edit: Here's a video that clearly shows the problem. I see no evidence of fading out...the particles just shut off suddenly one after another.

 

http://youtu.be/KJDVSqGAMOQ

Link to post
Share on other sites

Hmm as you say there's no evidence of fading. If the particle quads are overlapping and repeating, that would explain the bouncing illusion. When clear space appears below, it's easier to see that the particles are snapping out of view.

Link to post
Share on other sites

I'm going to try some particles that I know fade properly, like gas arrows, and see what happens when it is played on candles instead.

Link to post
Share on other sites

Not quite sure how to analyze the results. The particles do seem to start fading, but then the whole thing blinks out. The particle doesn't behave this way when firing a gas arrow; it fades out to completion.

 

Could there be something in the candle script that is turning off the particles after a set amount of time?

 

http://youtu.be/8UkCyHUdLTg

 

edit: don't know much about what I'm doing, but could there be something like this controlling the alpha of the "model_extinguished" particles that turns them off after X seconds (in tdm_lights.script)?

 

string extModel = getKey("model_extinguished");

if ( extModel )

{

setModel( extModel );

// set alpha to 100%

setShaderParm(3, 1.0);

setShaderParm(4, -sys.getTime() );

setShaderParm(5, sys.random(1.0) );

show();

}

 

I also found this which sounds relevant? Maybe the particles are hidden after ext_hide_delay?

 

 

// Wait some time and hide self, to save on performance

// Since nothing need be rendered after the extinguish particle finishes.

 

float delay = getFloatKey("ext_hide_delay");

wait (delay);

 

/* old code

if (delay > 1)

{

delay--;

wait (delay);

}

*/ // end old code

 

// fix for syncronicity issues

if ( m_bExtinguished )

{

hide();

}

 

//sys.println(sys.getTime() + ": DEBUG: " + getName() + " done smoking");

smoking(0); // grayman #2603 - no longer smoking

Link to post
Share on other sites

Well this is weird and frustrating. I can't reproduce the way the particles were working yesterday. Now they don't show up at all, and I've reverted just about everything I can think of.

 

Do try turning off soft particles during this test just in case I cocked something up! r_useSoftParticles

 

Is it r_useSoftParticles 0 to go back to the original look?

Link to post
Share on other sites

Yes. Note there's something wrong if soft particles change anything in this situation . It should only change stuff when there's solid geometry interfering with the particle. I've not had chance to follow up on any of your leads because I'm away from home for training, but I'll be back tomorrow night and hope to be able to rep it.

Link to post
Share on other sites
Yes. Note there's something wrong if soft particles change anything in this situation

 

It does, actually. With r_useSoftParticles 0, the candle smoke looks like the video I posted yesterday. With it set to 1, the wispy smoke stage is not visible at all.

Link to post
Share on other sites

We may have bigger fish to fry. I just noticed that the player lantern is provoking the same weird bobbing (shadow bobbing) in one of the missions I played (Samhain night). Maybe there is some definition inheritence funny business happening to movable lights?

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 post
Share on other sites

I haven't seen any problems with lights, just the extinguished particles.

 

Were you in noclip mode? The lantern bobs in that mode for some reason.

Link to post
Share on other sites
Ok, can you send me the decls to rep it please? Soft particles doesn't mess the up the default candle smoke

 

Ok, I've uploaded the changes to SVN. WIth softparticles off, you should see the wispy blinking smoke from the video above.

Link to post
Share on other sites

For the record, nothing is different in the particle, except that it refers to a different material.

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.

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