Particles in BGE Update: GLSL, more options

So I’ve been making some headway with my OpenCL Particle Systems in the Blender Game Engine. I now have the option to render the particles with GLSL (Hi moguri, I’m going to need more help!), and I have improved my modifier to give UI access to several parameters, including which system of the few I’ve implemented you want to use.
Check out the youtube screencast:

I also preview my initial attempts at using images (textures) with the particle system. My example is pretty crude, I just load in an image with OpenCV (there are other ways, but I want to learn OpenCV too) and generate particles in a grid with the color of each particle set to the pixel values of the image. The next step is to use actual OpenGL textures and then of course interface with Blender materials.

I still have lots of work ahead of me, I want to make interaction with the system only affect generators (this means dealing with world coordinates instead of local for manipulation and rendering), collision is high up on the list of things to do, and now that I have GLSL working I need to learn how to use it to make some cool and efficient effects! In addition I’m starting to learn SPH which I’m really looking forward to!

I want to shout out to the Department of Scientific Computing for supporting this research, and check out our Intro to Game Design course we are offering again this fall!

15 thoughts on “Particles in BGE Update: GLSL, more options

  1. Blenderificus

    awesome work so far. 60fps with that many particles in blender is !!!!!! And the ability to use textures/movies/animated-procedurals for particle color(or other properties) is going to be an extremely cool addition to blender. Thank you for your hard work, and thanks to the DSC for supporting it!

    Given your focus on the particle system, I wonder if you’ve seen the other amazing particle addition being added to blender. Particle node-based system, AMAZING, much like your work.

    http://vimeo.com/13495148

  2. Martin Lindelöf

    You seem to be quite experience w/ OpenCL, I’ve just checked out the early demos from Apple, and khronos and read some source code that uses opencl.

    that particle demo is off the hook! have you planned to take a look at the compositing nodes besides BGE? I think them can be massive sped up by utilizing the GPU instead of CPU.

    nice work!

  3. enj Post author

    @Blenderificus yeah I’ve been talking with phonybone about his work, I think I have much to learn from him! It’s not clear that the node system could be made to perform well enough in real-time though. Thanks for the video link!

    @Martin thanks! I’m still learning so much in the BGE and about particles that I haven’t had time to look at stuff outside it, but I do hope that my work will set up OpenCL in Blender so other aspects can be sped up. Related projects like Luxrender and Bullet are adding OpenCL acceleration too.
    Thanks for the par4all link, there is a lot going on!
    btw I like your art/blog!

  4. Martin Lindelöf

    @blenderificus

    You’re always commenting the same blender stuf as I am ;D but 1 post before.

    @enj

    Thanks, I’ll actually will update in the coming weeks! I can give you a comment and you can check it out later w/ update videos and images!! everything done in blender, even the logo design.

    enj I totally agree! I’ve done just simple sample code with OpenCL and nothing w/ blender so I can’t really contribute *yet*
    But what I would love too see is a couple of devs starting to implement OpenCL to blender, and I think you are way in the front line. I hope you continue to devs and Is there a way to donate money? I dont see a paypal button anywhere.

    Bullet is getting OpenCL in 3.X , and I’ve seen Bucarellis demos w/ LuxGPU vids. it’s awesome.

    keep up the good work! and I hope you accelerate the particles in BGE, then if you become OpenCL fluent you could try and teach module owners to Optimize nodes, simulations etc.

    Cheers

  5. enj Post author

    @Martin thanks for the support! It’s certainly a goal that my continued improvement in OpenCL will rub off on other devs :)
    I’ll certainly be working on this for the next year since it is the basis of my Master’s thesis. I don’t have a paypal button up, maybe I will at some point… but if you’re feeling generous even a little bit of your graphic design talent would be more valuable!

    I’m on gtalk and IRC all day, my email is on my about page and I’m enjalot in the blender IRC channels.

  6. francoisgfx

    sadly for me, I’m not too interest in BGE but more in internal, simulation and for sure Compositor node.
    But this is incredible, it is good that someone finally is getting into openCL w/ Blender. hopefully it will be used to speed up some tools, Compositor node really need some speed up improvement

  7. Martin Lindelöf

    @enj

    Sweet, I’ pop in and out on #blender and #blendercoders (like to hang around) . Sure I would love to help you out w/ artwork and stuf for your demo’s. I’m sending an e-mail to you so you get my email and we can talk there, or if you see me on IRC it’s “aermartin”

    do you have a twitter acc?

    if you set up the initial scene and explains what you need, I can do the rest in blender. model/animate, composite as best as I can and optimize for best results/fastest render. And then I can send it back to you for render w/ your OpenCL patch/SRC code.

    Cheers, keep up the good work, and I hope it goes well with the thesis/studies.

  8. enj Post author

    @fraincoisgfx
    Thanks! We have found that the compositor node is pretty inefficient and could certainly benefit from an OpenCL speedup. Unfortunately I need to spend all my time on the BGE particles for now. As my code matures I hope it can serve as a launching point for integrating OpenCL in Blender. I think one of the hardest parts is getting the libraries loaded and setting up the devices cross-platform. After that there would be a lot of low-hanging fruit :)

    @Martin
    I wrote you an email :)
    Just to be clear for others reading though, right now rendering isn’t really possible since this is all in the game engine. I take screencasts of playing in the game engine, but I still desperately need some good looking material to demonstrate!

    I have a twitter account, its enjalot, but I’ve let it fall off… perhaps I will dust it off this weekend

  9. enj Post author

    @Whimsy Collective that should be possible relatively soon. I need to improve the rendering capabilities and my knowledge of GLSL for smoke, and I haven’t tried it yet but I’m going to look into SPH for fluids.

Comments are closed.