Topic: Particles

So, I've finally got something to show for the particles. It's FAR from complete yet, but at least it's something.
I don't think I can embed youtube videos here, so I'll just link them.
Firstly, textured particles.
http://www.youtube.com/watch?v=i20skmd_zi0

Next, untextured particles, but creating an interesting trail.
http://www.youtube.com/watch?v=dYdSG9Z2alI

What it's doing right now is rendering, I believe no more than 1000 particles, usually quite a few less, as point sprites. This means that it's very limited in what they can do (no change in size based on age for example, no rotations,...) but they're fast. I haven't got any empirical evidence, but I think, even with my rudimentary update, any bottleneck will be that, rather than the rendering. They also have "gravity". Unfortunately, Maratis doesn't currently expose the gravity, something I'll probably change, so it's a hard coded number, but that makes very little difference. The particles have a random spread, up to a value defined in the editor, so can make circular explosions (as in the untextured video) or a more targetted spray.

What is still to be done:

  • A lot.

  • Different blend types (Additive being the most important)

  • Exposed particle sizes to the editor.

  • Non-Point sprite particles:

  • Particle growth/decay

  • Rotation

  • Physics:

  • Using Maratis scene gravity

  • Sphere collision with particles

  • Sphere collision with (some) world objects

  • AABB collision with world objects

Other ideas:

  • Attractors?

Re: Particles

Very nice! Keep up the good work!
looking forward to see more of this as it progresses.

Re: Particles

Great work Nistur, on getting the partical system working. If you need any art assets "partical textures or models" to
test with let me know. Once again congratulations wink

Re: Particles

Well, at the moment, it just uses point sprites. I have absolutely no intention in the near future to get it to support 3D models for particles tongue Potentially it can be added.

Having said that, though, particle textures would be great. If you would be willing to provide a couple of examples that can be provided with the particle system, maybe with some presets. That would be great smile I am definitely no artist, so I couldn't produce presets with textures myself, and would have to look for free art online.

Thanks for the feedback, both of you smile I'll keep you all up to date with how things go smile

Re: Particles

Nistur wrote:

Well, at the moment, it just uses point sprites. I have absolutely no intention in the near future to get it to support 3D models for particles tongue Potentially it can be added.

Having said that, though, particle textures would be great. If you would be willing to provide a couple of examples that can be provided with the particle system, maybe with some presets. That would be great smile I am definitely no artist, so I couldn't produce presets with textures myself, and would have to look for free art online.

Thanks for the feedback, both of you smile I'll keep you all up to date with how things go smile

Lol I didnt mean 3D models as sprites, what I meant was... Example I have a wooden staff model with an emerald that should have a partical effect. If you need models to test partical effects on wink

Example


How do you want the partical textures (colored or transparent background), also should the textures be colored example: should a flame partical be colored like a flame or just white.

Re: Particles

Oh!
That makes more sense now! Sorry. Well, If there are any objects you would be happy to release as examples (CC?) then I'd love anything like that. When I have got things more sorted out with this, and we have the plugin system in Maratis properly, I think I'll make a collection of examples within the github repository with different scenes people can look at. In fact, if I get some samples, I can do that now.

With regards to the particle textures... to be honest... I really don't know what's "normal"... I've not done very much work with other particle systems myself. I could use our in house one at work as a basis, but that's probably not the most flexible.

As it stands, the particle system can currently handle both alpha blend and additive, so transparent background would be fine. I am having some trouble with setting the colour of point sprites (either they're black, or totally transparent... not sure why...) so, for now, it's best that the textures themselves be coloured. In future, I fully intend to be able to colour them properly.

Gah, sorry, I was rambling a bit. Basically. For now, coloured textures are best. Whether they are transparent, or on a black background depends on what the particles are for. In general, transparent would be more suitable I think. For things like glows, where you want more particles to be brighter, an additive texture would work much better.

Re: Particles

Awesome, especially video 2 smile
Can't wait to see more!

Re: Particles

Not to worry Nistur I havent forgot about you just prepairing, a test scene and some things to use as particals. Have a peak.


First off here is the background Music  http://zester.googlecode.com/files/01-S … 20Mayo.mp3

Soon there will be a band on the stage animated to look like there playing this song, and the rest of the tavern will be
filled with various types of customers.

Test Scene1

Test Scene2

The bar keep is rigged and ready to be animated, I am just going to have him clean the counter for now because
I am not very good with walk cycles.

Inn Keeper

Hope you like smile

Last edited by zester (2012-04-19 23:41:08)

Re: Particles

Wow, that looks really cool. Coincidentally, the scene I'm working on for my game is a bar too tongue Yours looks a little bigger than mine though.

What I could really probably do with a couple of use-cases for the particle system. What I think would be really cool is if we could have a nice looking, but small, level we can use to demo different particle systems at the same time. What I can think of, off the top of my head, is a fire, a fountain, smoke, and some sparkly magic object (like the staff). Of course there are many other things that it can be used for...

I spent last night fiddling with particle sizes, trying to get a rough idea of what I can currently do with the system. As I'm still only using point sprites, and I can't colour the sprites yet, it's quite limited, but I have got some nice looking fire. There will be videos and screenshots coming soon.

Re: Particles

Cool glad you like it. I have the outside terrain and trees also. The tavern is suppose to be out in the woods built into the side of a hill on a dirt road. I am going to make a small rat army, that has a worn a beaten cat pulling a caged cart for them. And three brother mice in the tavern that each have a staff like the one you seen but a ruby and saphire inspired one.

Partical wise. I can see having Fire, Flame, Sparkle, Smoke, Snow & Rain as something to
work twords.

Lastly I did this in tribute to Brian Jacques http://en.wikipedia.org/wiki/Brian_Jacques

Last edited by zester (2012-04-20 18:03:59)

Re: Particles

I have to say that, when I saw the art, the first thing I thought was Brian Jacques. I have to admit to not having read much though...

I will try and get some example videos of real world/professional particle systems (ie. movies) to try and simulate, for reference material. For now, I'm trying to add physics to my smoke, so I can make it swirl tongue slow work though tongue

Re: Particles

Nice zester smile

By the way Nistur, i was wondering if that kind of particles were possible :

https://www.youtube.com/watch?v=owtuv9p … d&hd=1
https://www.youtube.com/watch?v=R35tG0D … u&hd=1
(both video are pretty much the same)

That would greatly boost the immersion & put some life in the scene.

PS. I have an idea for your demo scene, i'm gonna work on it today and see if i can come with something
decent (and even if you don't use it in the end that's always free training for me =p).

Re: Particles

The reason I'm doing the particle system initially is because I want a smokey room. So yes. Both of those should definitely be possible.
Moreover, the things I'm working on right now are physics interactions between particles and, hopefully eventually other game objects, should make it even more immersive. I played with the idea of using Bullet for this, as a lot of it would already be set up, but I didn't like the idea of that amount of collision with potentially complex shapes, but I think that cuboids and spheres should be able to get most of what is needed.

I was trying to find a video of the kind of thing I meant, I think I remember seeing it in a tech demo for one of the bigger engines, but I can't remember which one. The video showed, from memory, a generic space-marine-esque character with some sort of particle trail running through a doorway which had a particle... forcefield type thing, him running through it made the particles of the field disperse a bit and mix with that of his train. Difficult to explain.

The kind of thing I'm hoping for is actually in this NVidia tech demo (look when the car goes through it's own "cloud")
http://www.youtube.com/watch?v=RuZQpWo9Qhs
However, that's 0.5M particles... and probably several people working very hard on some perfected GPU code... so I don't hold up much hope for being able to match that degree of finesse.

I would love to see a plan for your scene. I would say that anything that people can "donate" to the particle system, in terms of art would be most appreciated and almost definitely used. Eventually, I would like to create an application with several levels to demo the particle system to it's full. If I ever get the degree of fluid dynamics I hope for, I probably would have to sacrifice a lot of other particle emitters, so I'd have to make several scenes anyway. Having said that, it would be good to have one scene (and for some reason every time I attempt to picture it, I come up with a Roman bath house) which can demo the... "stock behaviour" of the system, so the basic things we've already mentioned: fire, water, some sparkly stuff, maybe snow, maybe even slow, non-physics-y smoke coming off a hot bath.

Anyway, I'm getting ahead of myself. I still have a lot to do, including my simplified physics. Unfortunately, over the next, say week and a half, I will be pretty busy (I begin moving flat on Wednesday) so there won't be an awful lot of work that I will be able to do on the particle system. I will try and find some time to keep making a little headway though.

Re: Particles

Impressive video indeed, but it looks like a TV spot more than a videogame no?
----------
The first idea i had was to make some kind of test room, with an "elevator" that goes up&down on demand, switching to the correct object/particle
PunBB bbcode test PunBB bbcode test

But then, you are right, multiple scenes to show the particles in the most accurate environment would be better.
I tried a fountain scene :
PunBB bbcode test PunBB bbcode test
(Still have trouble with the lightmaps, blender system for that is unintuitive as hell, i just can't get the result i want hmm
will have to do some tutorial hunting..)

Then put the scene into a "box" (assuming there will be more scenes) :
PunBB bbcode test

And then in maratis, simply move the camera from a box to another, or making use of changelevel maybe.
But this is not good, cause you won't be able to fly around with the camera.
So i will do complete scenes next time, i will post here all decent attempts.

I'm planning to do :
-More or less the same scene as above.
-For fire : Urban/construction environment, like fire in barrels
-For water : Waterfall, moutain/wood environment

By the way, i'm gonna use alot of 3d models under CC/By license, is it a problem for you?

Re: Particles

From what I gather from the nvidia video, is all real time and could potentially be in a game, is probably far too heavy duty for any game now, CPU/GPU cycles are better spent elsewhere, but the principle is there.

For my game, atmosphere is probably the most important bit for me to work on, and having the player be able to swirl the smoke is something I will be asking towards.

With regards to the scene(s), I was thinking that the separate scenes may be best to showcase the more advanced features and then having one scene with "standard" particle emitters... But I honestly have no idea, I'm no designer and I only really want, here, what is easiest for other people to play around with.

I have absolutely nothing against any license used on assets, as long as it allows me to distribute it freely along with the library

Re: Particles

Nistur wrote:

With regards to the scene(s), I was thinking that the separate scenes may be best to showcase the more advanced features and then having one scene with "standard" particle emitters... But I honestly have no idea, I'm no designer and I only really want, here, what is easiest for other people to play around with.

kk i got it. Sorry, that's the lack of sleep

Re: Particles

Hehe, that's no problem. I think we all know that.

I think I need to start coming up with some firm goals for the particle system, some features I still need to implement.

One thing I've noticed that I probably need is a box emitter, rather than just a single point emitter. I really should have a look how other particle systems are set up. The one I was planning on using initially was quite difficult to figure out.

I will probably install Unity and have a play with how they do particles. Any more particle editors that I can have a look at, do you think? I'm getting a little worried by all this flexibility will make the behaviour awkward to use. Ah well. We'll see. I want to try to make a separate editor plugin to take care of the "world", so maybe I can just have an "advanced" flag in that... I really don't know. Why am I not a designer? That would make this easier...

Re: Particles

Nistur wrote:

I will probably install Unity and have a play with how they do particles. Any more particle editors that I can have a look at, do you think?

Ethanon 2D game engine. It has a very nice particle system with build in particle editor and it is open source. But probably it is Direct X only.

Regards.

Re: Particles

Nistur wrote:

One thing I've noticed that I probably need is a box emitter, rather than just a single point emitter.

Can we create groups of the single point emitters?

Re: Particles

I have some things from my favorites, i drop all links here, maybe something may interest you :

InsaneFX Editor
Particle Toy
OpenGL Physics
+ video demo
http://www.youtube.com/watch?v=ipgnyNrPxhE&hd=1

Re: Particles

Wow, thanks for the quick replies.

Arclord: Thanks. I've not seen that one before. Being 2D some things, of course, can't carry across, but I was also having a look at HGE as it has a nice particle editor. I'll get Enthanon and take a look at that one too.

Zester: We can, but for one thing, if we keep the number of emitters low, it's easier to maintain them. Creating a box emitter is simple anyway though, when you emit a particle, you just get a random position within a specified region, rather than just use the emtity position itself. I could really do with having an "editor draw" function in the behaviours, so that I can represent them in the editor easily. I might actually see if I can add this to Maratis.

Vegas: Wow. Thanks. I'll take a look at them. I definitely like the OpenGL Physics video. I'll take a look at all of them. Seeing some of that stuff though, makes me think that maybe non-axis aligned bounding boxes might be worthwhile...

So much stuff to look at and so little time. Woe is me tongue Also looking again into fluid dynamics... I seem to like things which will most likely destroy me...

Again, thanks for the suggestions and links. Time to do a bit more research! smile

Re: Particles

I was just searching for fluid dynamic particles... I came across a demo video from a paper on the subject from 2010, which seems to be the basis for the nvidia video I mentioned before.
http://www.youtube.com/watch?NR=1&f … cC-_-aqx18

I was in awe.
Until I saw the framerates.
3.5fps is NOT cool.

Then again, if you look at the car section at the end, and consider the 250k particle setup, 18fps is playable... definitely not what you should aim for... but then again, I think for 90% of situations, 250k particles is still far too many. If you're doing something this insane, you'd probably scale it back considerably more than 250k. That was a looooooong trail on the car.

Re: Particles

Hi,
I found a connexion, not online for a long time, just to say it's looking nice,
and if you want to draw something only visible in editor, you can do it in the behavior draw function
and to know if you are in editor, check if the game is running :

draw particles etc

if(! game->isRunning())
{
    draw wire emitters, additional stuff
}

Re: Particles

Good to see you online, hope you're having a good time.
I thought I tried the draw function, but it's very likely that I've made a mistake. I will take another look though, thanks.

Re: Particles

I have been looking through all the suggestions just now, trying to figure out what the best option is to tidy up the current interface and what's exposed to the editor. Refactoring and documenting are fairly easy work, so I think I should be able to manage that during my lunch breaks at work tongue

Just wondering if anyone had any preference as to how I refactor. To begin with, the current Behaviour "ParticleEmitter" is just getting too busy. To be honest, quite a lot of is isn't even totally relevant to the emitter itself. It just sticks it straight into the particle and forgets about it. I think this stuff I'm going to pull out into a ParticleSpec. Now, the first thing, do I make the Spec a behaviour? For the strictest definition, it's not a behaviour at all. Just data. Of course, the simplest thing is to make another behaviour for the spec.

The better solution (in my opinion) is to have an entirely separate spec type which isn't a behaviour at all. Multiple behaviours can then reference the specs by name (dropdown menu would be ideal, but let's not get ahead of ourselves here). The issue with this solution is that we have no way to graphically edit the specs. I can easily make them as fairly human readable plaintext files, but that's not really what we want, is it?

For a graphical editing environment for particle specs, I would either have to commandeer some space from the Maratis Editor, which is in pretty short supply, or write my own editor. Neither are particularly fun sounding tasks. Fortunately I think there's a third option, a hybrid. If I can squeeze a button somewhere into Maratis, I should be able to get it to fire up another window. If this window is also running through Maratis, we can share data with the particle systems and modify them directly, if there's no way to do it like that, we have to reflect the information, or just make sure that Maratis keeps checking the spec files.

I have to apologise for this seemingly dull babble, as I've made clear, I'm not a designer, and I am definitely not a UI designer. Part of this post is me just working through the concepts, and part of it is hoping for someone to say "You should do it this way, fool".

Oh, and don't worry, I haven't forgotten the demo stuff at all. I'm not abandonning that. It shouldn't take too long to throw something together once it all comes together.