Light at the end of the tunnel

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.

2 thoughts on “Light at the end of the tunnel”

  1. Great work so far. The modifier idea is inirnguitg. The OpenCl is AWESOME!!! Looks solid in its early state.You mentioned requests, so I’ll throw some out:•I would enjoy the ability to have the individual particles interact with (other objects in)the bullet physics engine in blender. •The ability to animate particles with other modifiers that are AFTER the particle modifier in the modifier hierarchy, like an animated array modifier & simple deform, would be cool too, but not sure if its feasible•The ability to crossfade between 2(or more) particle systems within the modifier. Something abstract like this could be VERY useful

  2. This comment came up as spam. The email/url certainly look like spam, but the content seemed to be mostly relevant (mandatory XKCD link) so I’ve approved it for now.

    I think I will definitely have to have a look at the particle system within blender to try and work out what this whole modifier thing is 😛 At first look though, these seem like quite high level features whereas I am currently still looking at the fundementals of how the particle system will function. That’s not to mean that I’m not thinking of high level features and how they will tie into the low level system, just that I have no schedule yet to implement them.

Leave a Reply

Your email address will not be published. Required fields are marked *