Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

Week Eight and Nine: Out of Time

So I haven’t done an update on the eigth week until now and the reason is that I’ve been pretty stresst to get every thing working and writing all of the reports that needs to be done at the of the for the the nineth and final week, on friday (tomorrow) actually.

So here is the post on both the of the last to week working on the project.

 

Week Eight

———————————-

During the eigth week I was only going give the particles the ability to use geometry instead of only having the option of using the billboards, but that was don in less then two days so I said to myself, what the hell, it would be cool if they could rotate as well and not just have their original roation when loaded by the program. Well after this proved to take just a little bit more time than the adding the geometry particles to the system, I again looked invard for guidance and I found that I wanted to make the emitters rotate as well, because that would be freaking awsome. So of course I did and the result was pretty awesome as I hope that these screenshot will show. I might upload some videos later as the screenshots doesn’t quite capture the awesomeness of the moving emitters.

SpinningEmitter1

This image shows a spinning surface emitter that has the shape of a cube.

SpinningEmitter2

The image above shows a spinning surface emitter with the shape of a dosecahedron.

SpinningEmitter3

Above is an image of a line emitter spinning line emitter that’s emitting cubes.

SpinningGeometry

This image shows a stationary line emitter that’s emitting cubes that are given an angular velocity as they’re emitted from the emitter.

 

Week Nine

————————————

As I metioned at the start of this post I’ve been a little bit stressed during the ninth and final week, and that has to do with the fact that I was supposed to be done with the GUI at the end of last week so I only needed to write the repport for the project during week nine. But, because of some personal reasons that came up during the weekend I wasn’t able to. So designing and implementing the GUI so users can test the particle system was pushed to the start of this week.

It took about two and a half days to get what I think is all of the functionality to be modable via the GUI and that’s mostly just implementing the functionality for the individual buttons, check boxes, dropdown menues, ect., and spending almost no time at all on checking the different combinations of presses that could break my particle system.

But this the following images shows how the GUI looks like at the moment and most likely it will look the same at the final delivery as well, exept for a few names maybe.

ParticleGUI

 

 

Well that’s about it now I need to go get some lunch and prepare some slides for the presentation tomorrow, have a good one, and I might see you later. :)

Week Seven: I’m a Little Liar (Sort of)

I must confess, in my last post I said that I was going to work on adding more particle types to the system, and I started to, but not right away. Instead I decided to give the billboards the ability to have animated textures via the use of atlas textures, so that’s another thing getting scratched of my todo list while feeling the sweet taste of progress, delicious. :)

I also created a basic *.obj file loader that gave me the ability to load a shape that can be used by my surface emitter, you know what, just look at these pictures and you’ll see the both the loaded surface emitter and the animated textures doing their thing. 😉

ParticleAtlas

This image shows a line emitter emitting particles which has the animation of an explosion (I’ve enhanced the blue color channel to give the particles their bluish color).

The following images shows the stanford dragon emitting particles from all of it’s surfaces at ones. The last one shows the starting position of the particles without rendering the dragon at the particle emitters location. The particles are not effected by any gravity.

ParicleDragon1

 

ParicleDragon2

 

ParicleDragon3

 

ParicleDragon4

 

This week I intend to keep the promise that I gave last week by implementing one more particle type. That will most likely be the last feature that I will have time to integrate into my particle system, as the cource is nearing its end and I still need to fix the editors. If I still have time before the deadline I will also add save and load capabilities to the editors and particle system.

Before I go, I want to make an apology to Emil that gave me the beautiful particle image. I misspelled his last name in the post where I mentioned that he gave me the texture. So here is his full name spelled correctly (hopefully 😛 ), Emil Hedemalm.

Now it’s time to go home, bye bye.

More Emitters, Victory

So the implementation of the new emitter types wasn’t that hard at all, and that what we call a victory, a sweet, sweet, victory. Because of that I thougth I shuold share the results with you by showing you some more images ;).

This is an image of the line emitter that’s now available to the system.

LineEmitter

 

And an image of the line emitter from the side.

LineEmitterSide

This image is of the surface emitter that can bring particles into existance in the world.

SurfaceEmitter

 

And an image from inside the “blood snow” emitted by the surface emitter.

SurfaceEmitterInside

 

 

The line emitter can consist of an arbitrary amount of line segments and the surface emitter can consist of an arbitrary amount of surfaces. So if I just create a way to load model files I could just use the surface that are of a mesh. The surfaces of the surface emitter don’t need to have the same amount of vertices for every surface, but every surface needs to be convex if the it should emit its particles or emitters correctly.

So now I’m going to add a wider variety of particles to make things more interesting.

Bye, have a beautiful time. 😉

 

Week Six: There’s Emitters Everywhere

Okey, so during the sixth week I moved the calculations of the particle movment from the CPU to the GPU  (as I mentioned in the last update). I also gave the emitters the ability to move, so I think they’re happy, they haven’t told me otherwise ;D. But the major change to the system is that has happened is that now the particle emitters also has the ability to emit other emitters, and at the same time they can also emit particles which turned out pretty cool. It was my intention to show you my first ever image of the particles (which I got to say is about time), and as I took some screenshots I saw something I havn’t seen before. Some of the particles still doesn’t get sorted right, And i don’t know why, but it only appears to happen when there are two different types of particles that gets to close to one another, see the top of the left most red column and the place where the red and purpule particles meet.

ParticleShot

But for now lets forgett about that glaring issue and let me tell you about what’s happening in the image. At the bottom is a particle emitter (that you can’t see as I don’t render the emitters) that emitts the particle emitters that gives of the red particles creating the red colums and when it has emitted a set amount of emitters it will be removed from the world. The emitters that are emitting the red particles travles up into the sky without being effected by any type of gravity (both the emitters and the particles have their own direction that they “feel” gravity, so it could for example be along the negative x and the positive y axis), and when it has emitted a set amount of particles it transforms into a different type of emitter. It’s that emitter that’s emiting those teal colored particles, but it’s also emitting an “empty” emitter type, and when it has emitted a certain amount of emitters or particles it’s removed from the world. What I mean with an “empty” emitter is that it doesn’t emit any particles or emitters at all, it just lets the physics calculates its motion through the world, and after that “empty” emitter floated around for about 0.3 seconds it transforms into the emitter that’s  responsible for emitting those purpule particles and when it has emitted a certain amount of particles it gets removed from the world. The momentum is preserved between the transformation between different emitter types but can be ignored if the emitter is given an inverse mass of zero which gives the emitter an infinite mass.

So what will/am I doing this week, well I’m going to expand the emitter shape selection of the system. Right now there are only point emitters, at the end of the week I’m pretty confident that the selection will have increased with both line emitters, that will be able to emit particles and emitters between two points, and surface emitters that will be emitting its emitters and particels from its surface.

See you one week in the future.

I’d also like to thank Emil Hedemlam for providing me with a much better particle image then the once I had. Thank You Emil :D.

Week Five: Restructuring and Evolving

During week five things really started to come together and my face was shaped like this, :D, at the end of the week.

I remade the structure of the particle system abit. I erased the existance of what I called particle groups, so now all of the particles that have transparency is sorted together ll of the transparent particles are now located together and are sorted after every other transparent particle. Later I will also add that paricles also are sorted into transparent paricles, that needs sorting, and non transparent particles, that doesn’t need to be sorted (at least not every frame).

I also made created the basic layout for the three different type of editors. Right now they’re all located in the same project, but I will later split them up into three different projects as it will work better with how I’ve designed some parts of the system, and the other parts really don’t care one way or the other. As it will only improve things by making them simpler, I see on reason why I should not do it.

I did also implement the first (and I got to admit, somewhat sucky) version of the morphing system. Right now the particle emitters can only instantaneously change from one type to another, and i hope that I will have time to implement some sort of interpolation system between the different shapes (mainly because I think it could turnout pretty cool 😉 ).

As I’m writting this at the start of the sixth week (Monday) I can also tell you that the movments of the particles are now calculated on the GPU through the use of  OpenCL.

During the rest of the sixth week I’ll be giving the system a new feature, namley the ability for particle emitters to emitt other particle emitters, and I got to tell you I’m really looking forward to this one :D.

Until next time, be cool and stay in school ;).

Week Four: The particle system’s taking shape

This week I started implementing the particle system that will power the final version of the delivered demo. I’ve managed to implement all of the functionality that I entended for the system, exept for the emitters morphing conditions. So according my time plan I’m still in good shape, which feels awesome.

There is however a problem with the systems current design, and unfortunately I only realised that when I basically had finished its implementation. Again the problem has to do with the transparency of particles. All the particles are divided into groups that are used to keep track of all of the particles information. I then render the paricle groups individually, and this is where we find the problem. All of the particles in each particle group are sorted by their distance to the camera and are rendered correctly, and the different particle groups also gets sorted by the distance to the camera. This works really well as long as two groups don’t enter each others personal space, because the particles in different particle groups never gets sorted which means that some of the particles will be rendered in the wrong order. In hindsight I should have realised that this would be a problem as I faced the transparency issue when i made the prototype. But as luck would have it, I think I have a solution for this blunder :).

Unfortunately I woun’t be implementing my transparency solution next week, as I feel I need to think about it some more to really make sure that it will work. So next week I will instead start making the GUI for the editors. There will be three editors in total, one where you can create different particles, another where you can create the particles emitters, and one where you can test the different particle emitter and particles that you’ve made together. I’m confident that I’ll be done with the base of the editors that I can expand upon as the project develops further really early in the week (Monday or Tuesday morning), or rather I need to be done with them by then as I’ll also be implementing the emitters morphing conditions next week, which I have a few ideas for and would like to test them out to see which will work best.

I will tell you more about the particle system in the future, as i feel that it still might happen a lot of changes to the its final design. So bare with me because, as they say, good things comes to those who wait, and this is one of those times ;).

Fixed the Transparent Rendering Issue

As I explained in the thried week  project update post, I had an issue with the rendering of the transparant billboard particles I made for the prototype. Click on this link to read the post.

When your rendering transparent objects they need to be rendered in a specific order, namely, the object furthest from the camera needs to be rendered first and the object closest to the camera last. If you don’t do this then some of the particle fragments generated by the rasterizer will never reach  the framebuffer and their colors woun’t be blended into the final image that ends up on the screen.

The solusion (which I’m 100% sure is not close to optimal) ironically came to me when all of the students was presenting what we’d done during the second and third weeks our projects, the preproduction and prototyping weeks. Instead of sorting by the distance from the camera to the center of the particles, I just transformed the particles position in world space to view space, and sorted the particles after the resulting z coordinate. I’m going to give it some more brain crunching time and I will hopefully come up with a better solusion.

Until next time, stay awesome ;).

Week Three: The Prototype Editor

As you probably got by the “subtle” clue hidden in the post headline, I spent this week making a simple prototype particle editor, where I tried out some of the parameters that a user will be able to play around with in the final version of the program. The prototype has one type of particle and one type of particle emitter, but they’re located in the same editor. In the final version I’ll have one editor for the particles and another for the paricle emitters.

In the prototype you can modify the amount of particles that gets emitted every frame, how many particles that are alowed to be active at the same time, how long the particles will live after they’re born (in seconds, should parbably have written that in the GUI description, oops), the size of the particles, the direction they’re emitted, the velocity the particles are emitted with, and by the maximum angle that the particles emittion direction can be tilted by (it’s chosen at random).

For the prototype particle I decided to implement a billboard that has a texture with an alpha channel making parts of the billboard transparent. A billboard means that the object will constantly be facing a given target, in most cases (also in this case) the target is the camera. So a viewer will always see the same part of the object. One thing that I didn’t know when i started was that when using transparent objects the objects needs to be draw in a specific order, namely the object furthest form the camera needs to be rendered first and the object located closest to the camera must be rendered last. If this criteria isn’t meet the object closer to the camera will overwritte the pixels of the objects located furter from the camera instead of blend with them. This becomes very apparent in the demo if you increase the size of the particles. This is because the distance form the particle to the camera is calculated from the center of the particle billboards, meaning that if two particles are very close together but the differnece in the positions y coordinate is relatively large, the particle that should be located behind the other particle can get a distnace that’s closer to the camera then the particle infront of it.

After I did those test programs in OpenCL last week I also realised that i need to design my particle system using a data oriented approach inorder to efficient transfer data from the host program to OpenCL. I also decided that I’ll use TinyXML-2 which is a free XML parser written by Lee Thomason to load and save data about the particles, particle emitters. I’ll also use it to load the different textures that the user can select for the particles and most likely for the shaders aswell.

If you want to try the particle demo you can click on the milestone two link in the upper right corner and navigate to the TestPrototype folder and click on the ParticleEnginePrototype.zip file, or just click on this link, I’d choose the later:P.

Next week (tomorrow) I’ll start to transform the prototype into the alpha and the omega version, whish me luck:).

The First and Second Weeks

Week One

—————————–

During the first week of the project was dedicated to research and planing. The research was about what programs/frameworks I was going to use to create my particle system, but also trying to find out more information on different ways particle systems can be implemented and get some ideas that might improve the design I had in my head.

I made a project plan that includes the project goals, what the programs/frameworks I’m decided that I was going to use, a time schedual so I will know if I’m starting to fall behind, or if I’m actually working better then I expected I would.

So what did my research lead me to. Well I decided that I was going to use Qt to design the GUI for the resulting demo I’m shooting for, because I’ve used it before during my studies and come to know it quite well. I’m going to use  OpenCL for my GPGPU programing. Mainly because I’m curious about the language and how it taps into the powers GPU, but also because of its cross-platform support and its always good to try something new. I’m going to use GLSL to do the rendering, the reason is the same as with Qt, because I’ve used it on multiple occasions during my time studying at this program.

More information on what the project is about is located at the “About the Project” section, or just click here.

Week Two

—————————————-

I started the week by doing a little more research and finishing up on some of the documents I needed to fill out about the project. Which all can be found by clicking at the Milestone 1 link at the top right of this page, or you just click here.

I also compleated a couple of quick tutorials on OpenCL, so I feel like I’ve at least got the basics down and how the basic parts of the framework relate to one another. I also created a basic setup for the program, but because I was dome with the basic setup in what seemed like no time at all, I started working on some  next weeks tasks.

 

Next week (tomorrow), I’m going to start implementing the particle system so I’ll start bringing you some more information on the actual project topic, the particle system. So don’t go anywhere, the fun is just about to begin;).

Site Update

Hello again, I’ve added some info about the project and about myself in the pages entitled “About the Project” and “About the Project Member” respectivly.

At the end of the week (most likely on sunday) I’m going to do a post on what I’ve been doing the first two weeks of the project. So check back then to get the first real project update.