Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Blender modified to put the Real-Time Particle System library in the Game Engine
tree: e1c6ec1402

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


enjalot's modifications to Blender, putting the RTPS library in the Game Engine

You will need to grab the RTPS library by using the following submodule commands:
git submodule init
git submodule update

(this will place the EnjaParticles repository in blender/extern/rtps) URL:
Make sure you have the dependencies listed in the README there
The main one is OpenCL, you must have a fairly recent NVIDIA or AMD (ATI) Graphics Card

Build Blender:
You want to follow the CMake instructions for building blender on your platform:

    cd ..
    mkdir build25rtps
    cd buildb25rtps
    cmake ../BGERTPS/blender    (Mac users may want to run ccmake ../BGERTPS/blender to configure properly)
        (make sure to check that all the libraries and dependencies are found)
    make -j8    (j8 runs make in 8 threads, if you encounter an error rerun make by itself to get sequential error output)
    make install    (this copies the python scripts and other runtime files to the build directory)

Note: on Linux if python3.2-dev is not available one can download and install python3.2 with one line in bash:
wget ; tar -jxpf Python-3.2.tar.bz2 ; cd Python-3.2 ; ./configure --prefix=$HOME/py32 ; make ; make install

Note: For OpenCL you will need either the ATI APP SDK or NVIDIA CUDA SDK along with sufficiently uptodate drivers. for more details please see the INSTALL files for each platform

You can apply the RTPS modifier to an object which turns it into a domain
You can add particles by putting objects within the domain and giving them a 'num' integer property with the value equal to the number of particles.
You can make colliding objects by giving an object within the domain the 'collider' boolean property and setting it to true (it must be composed of triangles, use ctrl-t in edit mode)

Check MODIFIED_FILES for a more indepth list of changes

I added opencl headers with slight modification in the intern/ directory

The most important aspects of the gameengine changes are in
gameengine/Converter/BL_ModifierDeformer.cpp (in the Apply and Update functions)
The rendering chain gets hijacked in RAS_MaterialBucket.cpp and then RAS_ListRasterizer.cpp

You can see refer to my blog to see how I made the custom modifier:

I had to make some changes to several header files so we don't include any gl.h or glext.h before glew.h

I will continue to add more as experimentation. In the future I hope to integrate with the 2.5 blender particle redesign
right now I'm still finding my way around blender and opencl


If you have write access to the EnjaParticles repository (for the RTPS library)
then you may need to change the submodule's repository url in the .git/config

change this:
[submodule "blender/extern/rtps"]
    url = git://

to this:
[submodule "blender/extern/rtps"]
    url =

Something went wrong with that request. Please try again.