Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Matt, posted on December 28, 2001




Image Description, by Matt



These are a few pictures of the particle system that I've been writing over the past few days. The top left picture is the standard flame type particle effect that you see in most pictures of particle systems. The top right picture is of a cool nebula effect that I stumbled upon while playing around with the settings. Below that picture is nice little water fountain.

Finally the two pictures in the bottom left are of another nice effect that I discovered. The upper picture shows a funny little wobbling star and the lower image (after a few changes to the settings) shows that same star exploding.

A lot of the main particle system code itself is based upon the source code to Richard Benson's Particle Chamber (sorry, can't find his website) so a lot of the credit should go to him. The main things I've changed is convert it to VB and add support for DX8 point sprites.

Now you may be asking "Why VB?" Well there's a simple answer to this. VB is a great platform for testing ideas out and it's also the programming language I know most about. I'm still learning to use DirectX and I'm not that familiar with C++ so why make it hard for myself and try to learn two things at once?

Current speed of the particle engine (which you may be able to see in some of the screenshots so I won't lie ;) is about 45fps with 1000 particles on a 1Ghz Athlon with GeForce 2 GTS. Comparing the speeds with Richard Benson's Particle Chamber they are only about 10% to 20% slower. (more than likely because of VB)

The code at the moment is totally un-optimised and a lot of it is basically a hack so there's no public executable or source at the moment. Once I've cleaned it up a bit I'll update my (VERY out of date) website at http://www.mfoggin.btinternet.co.uk/.

Matt


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Timothy Barnes

December 28, 2001, 04:50 PM

Hey cool. Another VB DX programmer.

Anyhoo, does the guy who made "Particle Chamber" go by the alias "Keebler" by any chance?

 
YvonnaFlipShirt

December 28, 2001, 05:16 PM

Indeed. I am that which believes itself to be a walrus.

 
David Olsson

December 28, 2001, 05:23 PM

The pictures look good but the performance is pretty bad, 45k particles/sec on that platform sounds really low, unless you use very high screen resolution.

 
Funkymunky

December 28, 2001, 05:25 PM

Right...but then, why learn DirectX instead of learning C++? DX is relatively simplistic if you ask me, and you're only hurting yourself by putting off C++...but, the shots do look pretty sweet.

 
Uthman

December 28, 2001, 05:55 PM

yo Timothy Barnes -

yeah, i know keeb. i've meet him in persona few times too- he's one of andre' lamothe's pals, and can usually be found on dre's msg board located in area51 of his website: http://www.xgames3d.com/

 
Warren Marshall

December 28, 2001, 06:34 PM

DirectX is simplistic? I think you're forgetting what it was like when you were new to it, staring into the black abyss. :)

 
Dr.Mosh

December 28, 2001, 06:38 PM

Heh, I just waited until it was similar enough to OpenGL :)

 
Smelly Dog

December 28, 2001, 08:01 PM

Your demo looks really cool! BTW, I think the url for the particle chamber is here. Good work!

 
Ben Everett

December 28, 2001, 08:28 PM

Nice particle system. Are the particles in 2D or 3D, and also, do you have the particles going through any physics(like air resistance, gravity, weight, etc)?

 
David Olsson

December 28, 2001, 09:48 PM

...or advanced particle physics.

 
ArielJ

December 29, 2001, 03:32 AM

Learn OpenGL and SDL for the compiler use Delphi !
I don't think I've convinced anyone with that line BUT you should really take a look at this option. (that noone mentions...)

L8R,

Ariel

 
Warren Marshall

December 29, 2001, 03:48 AM

To be fair though, there aren't many job openings for a 3D programmer using Delphi.

 
=[Scarab]=

December 29, 2001, 05:34 AM

You can see a gravity slider in the right-most shots! :)

 
L.e.Denninger

December 29, 2001, 11:06 AM

What part of "The code at the moment is totally un-optimised" didn't you understand, boyyyyyyy..??

:-)

 
primlikant

December 29, 2001, 11:20 AM

Think you're right when you say, that VB is a very good Language to test ideas and to quickly set them up. Later when the application should get a performance boost, you can still write the time critical stuff in C and import it in your VB app (the approach I chose in my VB engine). Or you completely port it to C, in which case you have to (even partly) learn C/C++.

 
David Olsson

December 29, 2001, 01:31 PM

All of it ? :)

Though even if it's unoptimized you should still get better stats like that unless it's algorithmically unoptimized.

Nevermind...

 
Kernel

December 29, 2001, 02:59 PM

Now that I have an account here on flipcode I can tell you about the updates (or lack of) that I have made to the particle system and answer some of your questions.

In the short periods of free time that I've had over the past few days I've been able to get the DX Point Sprites rendering method working. At the moment I'm seeing nearly a 50% drop in rendering speed with point sprites and I'm not sure why. I guess I need to play with the code a little more...

David Olsson:
Yes it is pretty slow at the moment. I expect that some of it is caused by VB itself, it's not the fastest language in the world.

Funkymunky:
DX Simple? Since when was anything made by MS simple? =)
I am slowly converting my programs over to C++ when I get the time.

Smelly Dog :
Thanks for that. It's not the website I got the particle chamber from but it is the correct particle chamber.

Ben Everett:
I'm not sure exactly what you mean by "Are the particles in 2D or 3D".
Each particle is a textured quad orientated towards the camera with a location in 3D space.

primlikant:
That's what I like about VB. It may execute slower but it's a lot quicker to work with. I'll probably end up doing what you did. Write all the time critical things in C++ and everything else in VB. You get the best of both worlds then.

 
zed zeek

December 29, 2001, 03:44 PM

one word of advice is try your particle systems out with a differenet backgroud ie most look good on a black backgroud then u place them against a light blue sky + they look crap.
i expect the fps is due to the method of drawing ( unoptimized perhaps )
fwiw my particle system handles 10000particles at 30fps on a celeron433 i cant really see using vb will make it 30x slower.
btw looks fun to play around with.

 
Lohkay

January 02, 2002, 10:07 AM

I totally agree on the VB for testing idea... I know both languages very well and was always developing in C until recently where I thought about starting off in VB and "upgrading" parts in C as I go.

Its a very nice approach.

 
This thread contains 19 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.