Jump to content
  • Advertisement

Archived

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

Med

Particle effects

This topic is 5156 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

I''ve been trying to use the particle engine from NeHe''s tutorials to no avail. Basically, I''ve got the rest of my scene set up and want to incorporate a particle system. Is there a way of just adding the .cpp file to my project, then calling to the engine from within the code I already have? I''ve tried cutting and pasting segments of code into the code I do have, but am having no luck, being a noob. Cheers for any pointers

Share this post


Link to post
Share on other sites
Advertisement
Failing that, does anybody know of an available engine that can simply be called from an existing piece of code? If it helps, I''ve got a 3d model of an F1 car, and I''m trying to display a simple air stream flowing over the wings. For the purposes of the program, the particles don''t need to use collision detection or any complex modelling, they simply need to move at different speeds and change colour according to a speed variable being used by the program, so if anybody knows of something I could use for doing this it''d be very much appreciated.

Share this post


Link to post
Share on other sites
Cutting and pasting code is not the way to learn. Sit down, and figure out how a particle system works. This is relatively simple, considering you already have the NeHe source code for one. Next, figure out how your program uses a particle system, and how to incorporate a particle system into your program.

What I think you want is a simulation of a wind tunnel, where air passes over the model of the F1 car. The air, modelled as particles, is a different colour based on the speed it''s moving. I''ll tell you now, what you''re attempting to do requires some very complex dynamics, not to mention collision detection, if you''re doing it properly. I''m not sure to what degree you want to model it, so I can''t comment much more on that aspect.

Basically, a particle system works like so: you have an emitter object, whose job it is to pump particles out into the world, from a certain position, in a certain direction. You also have a particle object, which is generally a billboarded quad with an appropriate texture map on it. In your simulation, however, it would probably be best to model the particles as points, and draw each one in it''s specific colour. You should place the emitter in front of the F1 car, with the emission direction pointing towards it, then start the emitter.


Windows 95 - 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company that can''t stand 1 bit of competition.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!