Question about the particle system

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Question about the particle system

Post by Nash »

Is it technically possible for the particle drawer to draw more than just simple squares? Correct me if I'm wrong but setting the particle type to "smooth" seems to draw some textures inside the /glstuff directory, so... would it be hard to extend it to allow drawing sprites or heck, even models? Or would that just defeat the purpose of having a fast particle system?

Right now I know that the best we could get is setting an Actor as +NOINTERACTION but you will still never be able to achieve the same amount of density as the built-in particle system while maintain fast performance speeds...
User avatar
Rachael
Posts: 13699
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Question about the particle system

Post by Rachael »

If you're talking about QZDoom, as far as I know that's already being done. I don't know if it applies only to the truecolor drawer or to palette mode as well. I do know that dpJudas did at one time make the code to do it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49118
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Question about the particle system

Post by Graf Zahl »

Nash wrote:Is it technically possible for the particle drawer to draw more than just simple squares? Correct me if I'm wrong but setting the particle type to "smooth" seems to draw some textures inside the /glstuff directory, so... would it be hard to extend it to allow drawing sprites or heck, even models? Or would that just defeat the purpose of having a fast particle system?
Other sprites should technically be doable, if the high level code could maintain it.
Models would be a problem because they are a lot more costly to set up.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US

Re: Question about the particle system

Post by Ed the Bat »

I was just wondering about all this recently. Specifically, in hopes that raindrops could be made less resource-intensive.
User avatar
Nash
 
 
Posts: 17454
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Question about the particle system

Post by Nash »

Yeah, that was specifically what I had in mind. For visual FX stuff like spark or smoke, rain, leaves falling from trees, dust particles in the air etc.

As for models, I can't think too many use cases right now. Maybe someone wants to make a 3D weapons mod with 3D bullet casings. Or rock/debris special effects.
dpJudas
 
 
Posts: 3100
Joined: Sat May 28, 2016 1:01 pm

Re: Question about the particle system

Post by dpJudas »

Rachael wrote:If you're talking about QZDoom, as far as I know that's already being done. I don't know if it applies only to the truecolor drawer or to palette mode as well. I do know that dpJudas did at one time make the code to do it.
Both modes uses a texture now. I hardcoded the texture and its size, but that limitation could be lifted with very little work.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49118
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Question about the particle system

Post by Graf Zahl »

Ed the Bat wrote:I was just wondering about all this recently. Specifically, in hopes that raindrops could be made less resource-intensive.

The problem is not the sprites but the necessary collision detection. Particles cannot do that at all so for objects that require any kind of physical interaction they are out.
And for rendering they hardly make any difference. Setting up a particle for rendering is just as much as a sprite.
User avatar
Ed the Bat
Posts: 3060
Joined: Thu May 03, 2012 1:18 pm
Graphics Processor: nVidia with Vulkan support
Location: Maryland, US

Re: Question about the particle system

Post by Ed the Bat »

True, but since they're not actors, I thought they might be excluded from things like ThinkerIterator, which could save on resources elsewhere.

Return to “General”