Jump to content
The Dark Mod Forums

Trailing particles


SteveL

Recommended Posts

A quick "Did you know" post because I don't think many people do know this. I certainly didn't until tonight. TDM has a "func_smoke" entity that works like a func_emitter but emits particles that are independent of the emitter once released. Using a func_emitter, the particles follow the emitter even after release. But if you attach a func_smoke to a moving entity, the particles will trail behind:

 

 

Both flasks in the vid use the same particle effect. The one on the left is a func_emitter, the one on the right is a func_smoke. The left particle looks faster but I think that's an optical illusion: the steam isn't being trailed so it looks like it's reaching the top of its plume instantly. Both are the same particle at the same speed.

 

I added a script event to let mappers use these trailing particles in 2.03, but it turns out it's not really needed. Func_smoke does almost everything the script event can, and it's much easier.

 

There's one catch: you need to change the "model" spawnarg in DR to be called "smoke" instead of "model". You still use it to specify the particle effect. I've corrected the default spawnarg for TDM 2.04, but in the meantime, just overtyping it works.

 

I've added info to the wiki article

 

Here's the original script demo that I did while working on the script event for 2.03, where a candle wick spouts an improbable amount of smoke. You'll find the script on the wiki article, although you could do the same thing with a func_smoke:

 

  • Like 4
Link to comment
Share on other sites

Well that's cool...how would I add this functionality to the candle entity?

 

It could be as simple as swapping the func_emitter Nope, I just checked and candles don't use a func_emitter. It'd be possible to get the tdm_lights.script to spawn a func_smoke instead of swapping the light model for a particle, but we'd probably be better off using the script I put on the wiki article to produce the smoke. It'd save an extra entity being spawned. It's too late for me to try tonight but I'll give it a go tomorrow if no-one beats me to it :)

Link to comment
Share on other sites

In general, if you bind particle effects on AI, they must be func_smoke, as I learned when making the U:G automatons. Using func_emitter looks accelerated in time and weird like in your video.

Edited by Sotha

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

I think lights don't use func_emitter either. The light entities use the particle as a model. I don't know if they understand the smoke spawnarg either, at least it is not listed in the spawnarg list.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

@Obs: I think so too. But the model switch is done by the script object, so it could spawn smokes instead without needing to spawn a func smoke.

 

@moonbo, Sotha: you guys reminded me I have more to put on that wiki article. You don't need a func smoke entity for AI or projectiles. They support trailing particles natively. Prev discussion: http://forums.thedarkmod.com/topic/16710-particle-request-candle-smoke/page-5?do=findComment&comment=360338

Link to comment
Share on other sites

Are the smoke and the lamp glare part of the same particle effect, added via an emitter? Then yes swapping the func_emitter for a func_smoke should fix it. The lamp glare will in theory trail too, but that shouldn;t matter because individual lamp glare quads last only a fraction of a second.

 

For flame lights in general, we could make the default model_extinguished (smoke particle) use the trailing particle system, spawning the particle quads by script instead of spawning a func_smoke. The script will only run for a second or two after the player extinsguishes the light, just until all the smoke has been released.

 

I'll commit the script changes after work so we can try it.

Link to comment
Share on other sites

Wow I really love this! Now we can build a fog monster like in "Wheel Of Time" :)

I don't know what that looks like and a few google searches didn't help me! But yes you could make an AI with an invisible skin, only seen because of particle effects trailing from each joint. That could be pleasantly freaky :)

  • Like 2
Link to comment
Share on other sites

I don't know what that looks like and a few google searches didn't help me! But yes you could make an AI with an invisible skin, only seen because of particle effects trailing from each joint. That could be pleasantly freaky :)

 

There you go SteveL. I shit my pants back when I was a fawn. :)

 

WOT-2010-10-27-00-47-49-51.jpg

  • Like 1

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

Hehe. So it's a streak of fog that comes at you? We could make it distinctly AI-shaped but made of fog and trailing fog :ph34r:

 

Well that's cool...how would I add this functionality to the candle entity?

 

Here's an amended tdm_lights.script tdm_lights.script.txt that uses the trailing particle effect for the "model_extinguished". It trails smoke ok on a candle, but with 2 things we'd want to tackle:

  1. The smoke will need to be thicker to allow for it being more spread out.
  2. 2-stage effects where one has an offset don't really work well with it. In the current candle effect, the thicker plume of smoke that appears 10 or so units above the candle doesn't connect with the smaller particles that rise from the wick, if the candle is moving.

For (1) we have the option of amplifying the particle effect through a spawnarg instead of thickening the particle effect itself. There's nothing to stop the script emitting 3 times as many particles as the particle def says, for example. For (2), we'd probably want to use a single stage that just gets bigger.

 

NB this hacked script will break lights with non-particle-based "model_extinguished" spawnargs. That doesn't matter, it'll be easy to amend the script to make it distinguish between particle-based and model-based "model_extinguished" lights. I just didn't put that distinction in this test.

Link to comment
Share on other sites

Me neither. I played the solo campaign a bit and later on we tried to play it in Multiplayer which is really cool, because you can setup traps and monsters for the enemy. But we were only 2 people - I guess this is even more fun with 8 folks xD

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

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

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 0 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...