Archived

This topic is now archived and is closed to further replies.

Designing Particle System

This topic is 5800 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well I''v had some experience programming particle systems with the half-life engine, probably done about 3-4 different designs. Recently I''v learned that h-l doesn''t support alpha transparency mode, which screws me over since I''v been using many effects reliant on that(the only reason they actually did was because of an bug in the engine, it''d work as long as no additive transparency triangles ahd been rendered prior per frame.) There is a way around this by using an ordered list, draw alpha fist then any other but i''d rather not have a feature that''s dependent on a bug. So the criteria for the system is to use quads or tris, flexibility to create systems ranging from smoke to blood to weather effects, only using additive transparency or normal draw modes. One problem I was having with additive mode was if several triangles were layered upon each other there would be drastic slowdown, which is unacceptable. The total particles available would be about 1500 quads, or 3000 triangles. Plus ideally OO. The desing im currently using looks like: CParticleSystem - virtual base >CBasicParticleSystem - contains all logic for updating, moving, calculating collision, etc. >>CMovingParticleSystem - basic base for systems with a moving emitter. >>>CFragment - system that moves... >>CFire - fixed location fire emitting system. There was also a class for managing the particle lists and return pointers etc. and one for managing all the systems which calls the update function etc. The particles are updated through a callback function to it''s systems update function. The list was rendered in h-l''s triangle rendering callback by getting a pointer to the active particles and iterating through the linked list. Any feedback you gave give on design, optimizations, or any resources would be appreciated(I''v read several articles, although probably not all, still post either way if you could.) P.S: Yes I know half-life is old and ugly.

Share this post


Link to post
Share on other sites