Archived

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

Cass

Ah, ugly "particles"

Recommended Posts

If one notices the "emitter" on the lesson 19 particle engine tutorial, it is always an ugly square. I have been messing with that tutorial, and turned the particle into a class, and added some helper functions for effects, such as fire and water. one problem i have noticed, is the rather ugly fact that the source of the particles, is always this cube. it looks ugly. and i honestly havn''t a clue what to do about it. how i could make it into a different shape, or not even have it there, or something. like in a flame effect, i have a tip to a flame, like a teardrop, but the bottom is this square emitter that the fire is coming out of. its ugly. any clues?

Share this post


Link to post
Share on other sites
well, the particles will fly out in a cube shape, because you are not normalizing your vector. Think about the inital velocity, and how its range is a cube. Now you need to make that velocty range a sphere, so what you must do is use pythagoris (sp) theroum, to restrict the vectors to a constant length.

Anyway, I can''t be bothered to explain how this is done, so I hope that you know how to do this, or that you can find it on the internet.


ANDREW RUSSELL STUDIOS
Looking for my webpage? Funny that... Me too!
Resist nes8bit :: Bow Down to Linux Communisum

Share this post


Link to post
Share on other sites
I think the biggest problem for newbs out there is that most of the time, tutorials do not spend enough time talking about and explaining the underlying concepts. Most of the tutorials I''ve read on the net either seemed way too technical for me to get into the tutorial or was just someone who was quite pointedly chuffed that they''d coded something, when in reality it''s a half-arsed attempt which barely scrapes the surface. Now this is not a bash at anyone''s tutorials! I do not have the right to say a tutorial is crap because that''s my opinion (And besides, the tuts on this site are actually of very good quality).

However, NeHe''s and Trent''s tutorials I felt did not explain particle systems in a very good way. It''s all well and good throwing some code at someone and stepping them through how it works, but what then? Sure they know how to do a particle system, but they only know one way of approaching it - and how to expand on those ideas? - and I did not think there was enough talk about the concepts behind a particle system. As a result of which - you get kids with problems like this one...

Plz don''t flame me anyone - I am not being pompus but I do know quite a lot about particle systems and how they work and I just felt that the tutorials on here didn''t quite convey the ideas in a clear way for the reasons mentioned.

Share this post


Link to post
Share on other sites
But yeah the problem - try starting your particles off completely transparent then fade them in really quickly. The reason for your problem is that all the particles starting at the same time means that the same spot in 3D space has a bitmap alpha blended onto it several times per frame until eventually all the colours are saturated. This is what causes that ugly square. My suggestion would meet all the criteria for solving the problem though there are other ways. Basically you have to stop so many particles being blended onto the same place at once. Lowering the opacity of the particles would help, fewer particles, starting the particles off at not just one place, but in a random place within a volume of a given size - etc etc... Be creative!!! *g*

Hope that helps m8!

-Big G

Share this post


Link to post
Share on other sites