I sure as hell hope it’s not the death star exploding.
I have to admit, I’ve not done anything overly interesting with the particle system as of yet. It’s still just spraying out a few hundred black dots. I unfortunately haven’t really had time to sort the textures for the point sprites, nor have I had time to add any new features. It’s been a lazy day. I have, however, done some research into OpenCL.
Now. At this stage, OpenCL is overkill. I don’t even have a fully functional particle system. However, it’s something I don’t know much about, and it’s definitely interesting. Plus, I think it would be a nice feature at some point to be able to have an options menu somewhere and say “High Quality Visuals” or something… anyway, I’m getting ahead of myself. I will be from for the majority of this next week, I’m going to take my netbook with me, but it isn’t designed for anything particularly heavy. I have, however, been trying to set it up so I can easily develop on it, so I’ve been pulling all my projects, making sure they compile, run etc and that I have the latest version of Maratis for them to compile against. After this was all sorted, as well as non-computer related tasks, I had myself a couple of hours, so I thought I would dip into OpenCL briefly. Actually, that’s not strictly true, I had a random urge to look at functional programming languages. After I scraped what was left of my brain up, I attempted to look at OpenCL.
I had a couple of things in mind when I was looking into what I can do. Firstly and most importantly for me, how good is the documentation/support. A library can be the best thing since computers made beeping noises to connect to the internet, but without some clue as to what to do with it, it’s near to useless. I don’t have time to practically reverse engineer things. So, what did I find. Well, to be honest, I was a little let down. There are certainly books and tutorials and everything you’d expect, but not the plethora of choices I’m used to when I type in <something> tutorial into Google. On the other hand, I didn’t have to wade through too much useless garbage to find what I wanted, so I guess I can’t complain too much. Secondly, how easy was it to install and set up. I would give it a little flexibility here as there are 3 major GPU manufacturers, and one organisation trying to write a standard. I got pretty much what I was expecting. Everything installed smoothly and I had an empty project linking to the newly installed libraries within a matter of minutes. Finally, the API itself. Now, I definitely haven’t spent enough time to be able to tell you how much I like or dislike it, but it seems decently structured. Everything is in the cl namespace, and then neatly sorted within that. I was a little disappointed to see that “Hello World” was 93 lines long, plus the kernel, but having sorted through the code, the majority is aggressive error checking and boilerplate code.
So, my current opinion? Well, I wasn’t horrified by anything I found. I was quite happy with the API and I think adding OpenCL support to MParticle would be a worthwhile investment at a later date. It will be a considerable amount of work so before I begin working I think I will wait until I know that what I am wanting to do with the particles is definitely too much for the CPU.
There is one more thing that I would like to add before I finish up tonight. As MPlugin slowly gains more functionality, I would appreciate some feedback as to how people would use it. Unfortunately with the plugin code not being even in the upstream Maratis svn repository, I can’t realistically expect people to test a plugin that they’d have to totally recompile Maratis from an unofficial source for. However, if someone is interested, feel free to send me a message and we can try to arrange things to be set up in a more comfortable manner.
So, what do people think? Am I aiming too high too early with even considering OpenCL now? Have I forgotten something in my research? Can you suggest some way to make testing MParticle a bit nicer? Whatever it is, I’d like to hear your thoughts.