[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Particles system

Particles system

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Particles system

Postby Cobalt » Tue Feb 18, 2014 4:09 pm

I have bought this up to Lord Havoc recently. I find it unusual that the particles system not only in DP but to my knowledge ALL other engines , allows particles to pass through solids. I realize they are most likely non-solid type renders and thats the reason, but I cant think of any effect even as far back as TE_LAVASPLASH that would stand to benefit from it passing through walls / solids. Smoke, blood, sparks, rain and everything else I can think of thats using particles has no use being able to pass through solids.....unless anyone can think of one?
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Particles system

Postby Spike » Tue Feb 18, 2014 5:30 pm

its not an appearance choice, its an efficiency choice.
preventing particles going through walls is seriously expensive when you have 5000 particles on screen at once, each one of them doing collision tests every single frame (although you could optimise it to only one collision test when its first spawned, but then it would still pass through doors and stuff, and that tweak would only apply to particles with no gravity).

there's not really that much you can do when a regular particle hits a wall, other than to remove it so that it doesn't look too goofy when it comes out the other side - bouncing sparks can often be a bit abrupt when it suddenly flips and changes direction of motion, especially if slowly moving along a surface with constant gravity.

and to dispell your myth, FTE supports either bouncing particles, particles that automatically stain surfaces, or particles that spawn new particles on impact. all three need to be enabled via the particle config though, so not all configs will do it (also, be sure to set r_bouncysparks to 1 or it'll be ignored, but configs that depend on that have a nasty habit of forcing it on).
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Particles system

Postby Cobalt » Tue Feb 18, 2014 7:10 pm

Thanks Spike, didnt know that, nor the enhancements for FTE.

Lord Havoc had mentioned checking the ttl as a way of improving this te_rain bug:

Image

(You see the rain particles pass through the solid BSP)

His sugguesiton was:
"Yes it looks like the time to live for the rain particles should be adjusted to compensate for the length of the particles, since right now their origin stops at the impact point but ideally their bottom extent needs to end at the impact point instead..."

To my knowledge I dont believe there has been a build made to test this. Im wondering if this would work for other particle effects if it works for the rain.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Particles system

Postby leileilol » Tue Feb 18, 2014 11:40 pm

Collision is expensive. If you've played Engoo with r_particleblood 666 you'll see how brutal particle collision can be as each blood droplet does expensive trace checks to find where and how to move and behave, then again collision is necessary for high pressure blood to not escape the universe


That rain test bsp looks inteesting. Any sharing?
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Particles system

Postby frag.machine » Wed Feb 19, 2014 12:22 pm

I think this is the golden key room in Gloom Keep.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Particles system

Postby Spike » Wed Feb 19, 2014 12:46 pm

also, when its a big long streak like rain particles, is the 'impact' when the start of the streak hits the ground (in which case it abruptly vanishes) or the end of the streak (in which case it can still poke through)? both bugs can be more distracting than simply passing straight through, at least if the maps were made with the behaviour in mind, anyway.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Particles system

Postby Cobalt » Wed Feb 19, 2014 7:45 pm

Yes, its E1M5, the golden key room. Creating rain coordinates for the ID maps can be challenging, as you are drawing a box...and some locations like this one, you can draw lots of smaller seperate boxes to fill the general area, or one large one covering the area of the room. That has drawbacks, as shown in the screenshot....instead of making smaller coordinates for locations that dont have the rain hitting a solid, while on its way to the room floor. The same issue happens when it hits a liquid as well...but, that kind of effect does look more or less acceptable if you are in the body of liquid and happen to look up and see this...it gives the impression of it penetrating the liquid ever so slightly.

Take a map like E1M6 where the button is that opens up the door on the floor you drop through , and you have a nightmare trying to make the rain look correct.

If you think about it, you really ought to be able to just draw a thin box way above the map in the skybox, covering the area of the map, and the engine ought to do the rest - drawing particles starting in only CONTENT_EMPTY coordinates from the max_z of the box, allowing them to continue until encountering a solid. However, all the ID maps traditionally use SOLID skies, unless you Re-BSP'd them or ar using all newer maps in your mod. The engine would have to be able to detect the sky textures as well I guess to over come this issue. the other drawback over the way it is now, is that you can use the current syustem to make a trigger field the size of the rainbox as a way to detect a player touching it, and create some lightning effects for example. In my youtube channel, I recently made a demo of some lightning tests using this system, with a new sprite that Madfox made for me, its not too bad for a start.

As for sharing , PM me or post requests whatever you want, and I will see what I can do.
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Particles system

Postby Cobalt » Wed Feb 19, 2014 8:20 pm

User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Particles system

Postby leileilol » Thu Feb 20, 2014 12:15 am

.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Particles system

Postby Cobalt » Sun Feb 23, 2014 5:26 pm

Not an engine programmer yet, but I guess what I am hearing is that particles just get "drawn" from start to end, and collision detection never happens because they are not "entities" more or less? What about tracing their projected course / path, and doing a pointcontent type check for a solid along the entire path? Im also guessing the particles are removed only when their ttl expires, so could we not project in a time frame when the particle would be encountering that solid area, and set the ttl to live accordingly?
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Particles system

Postby gnounc » Sun Feb 23, 2014 8:12 pm

my
gnounc's
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Re: Particles system

Postby leileilol » Sun Feb 23, 2014 8:40 pm

That method could have an issue with brush entities especially those that move. Though another advantage with that is just making rain as a single beam that's already from start to target and controlling its scrolling speed and using a clamped texture. You're trading CPU time for GPU fillrate in that case...
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Particles system

Postby Seven » Mon Feb 24, 2014 8:49 pm

Seven
 
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: Particles system

Postby Cobalt » Tue Feb 25, 2014 4:47 am

User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Particles system

Postby revelator » Tue Feb 25, 2014 3:16 pm

Could use sprite32 for rain (should use the alias model collision and culling code not sure how big the impact would be though).
I used it for underwater bubbles and explosions and it seems to Work quite ok there collision wise.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2605
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests