SteveL 1042 Posted March 17, 2015 Report Share Posted March 17, 2015 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: 4 Quote Link to post Share on other sites
Springheel 4630 Posted March 18, 2015 Report Share Posted March 18, 2015 Well that's cool...how would I add this functionality to the candle entity? Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
Bikerdude 3740 Posted March 18, 2015 Report Share Posted March 18, 2015 ah I have very good use for this on light entities with lamp_glares, will do a test tomoz. Quote Link to post Share on other sites
SteveL 1042 Posted March 18, 2015 Author Report Share Posted March 18, 2015 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 Quote Link to post Share on other sites
Moonbo 841 Posted March 18, 2015 Report Share Posted March 18, 2015 Yeah, func_smoke can be pretty nifty, I'm using them in my WIP to make smoke trails on some falling fireballs. Quote But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.-Sun Myung Moon My work blog: gfleisher.blogspot.com Link to post Share on other sites
Sotha 1908 Posted March 18, 2015 Report Share Posted March 18, 2015 (edited) 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 March 18, 2015 by Sotha Quote Clipper-The mapper's best friend. Link to post Share on other sites
Obsttorte 1498 Posted March 18, 2015 Report Share Posted March 18, 2015 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. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild WIP's: Several. Although after playing Thief 4 I really wanna make a city mission. 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 post Share on other sites
SteveL 1042 Posted March 18, 2015 Author Report Share Posted March 18, 2015 @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 Quote Link to post Share on other sites
Bikerdude 3740 Posted March 18, 2015 Report Share Posted March 18, 2015 Well I was hoping I could use "tdm_glare_lamp_01.prt" on the func_smoke, because a moving func_emitter (eg. bound to a pendulum) screws up causes the second partcle "textures/particles/smokepuff". Quote Link to post Share on other sites
SteveL 1042 Posted March 18, 2015 Author Report Share Posted March 18, 2015 Is the smoke puff just for when it's extinguished, or all the time? It'll be usable either way. Quote Link to post Share on other sites
Bikerdude 3740 Posted March 18, 2015 Report Share Posted March 18, 2015 Its on all the time, and whan happen with the func_emitter moves is the animation on the smokepuff gets speeded up so its looks weird/sparkly. Quote Link to post Share on other sites
SteveL 1042 Posted March 18, 2015 Author Report Share Posted March 18, 2015 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. Quote Link to post Share on other sites
Bikerdude 3740 Posted March 18, 2015 Report Share Posted March 18, 2015 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.Dont know, but I dont think so because a func_smoke wont play the tdm_glare_lamp particle. Quote Link to post Share on other sites
SeriousToni 481 Posted March 18, 2015 Report Share Posted March 18, 2015 Wow I really love this! Now we can build a fog monster like in "Wheel Of Time" 2 Quote "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 post Share on other sites
SteveL 1042 Posted March 18, 2015 Author Report Share Posted March 18, 2015 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 2 Quote Link to post Share on other sites
SeriousToni 481 Posted March 18, 2015 Report Share Posted March 18, 2015 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. 1 Quote "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 post Share on other sites
SteveL 1042 Posted March 18, 2015 Author Report Share Posted March 18, 2015 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 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:The smoke will need to be thicker to allow for it being more spread out. 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. Quote Link to post Share on other sites
Destined 615 Posted March 20, 2015 Report Share Posted March 20, 2015 @Toni: OMG, it is ages since I played that game. I remember it to be quite good. Maybe I should do that again, if I find it. Now that I think about it: I think, I actually did not finish it... 1 Quote Link to post Share on other sites
SeriousToni 481 Posted March 20, 2015 Report Share Posted March 20, 2015 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 Quote "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 post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.