Skip to content

OldBrunet/BGERTPS

 
 

Repository files navigation

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

Build: 
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: https://github.com/enjalot/EnjaParticles
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:
http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender


    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 http://www.python.org/ftp/python/3.2/Python-3.2.tar.bz2 ; 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
    



Usage:
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)





Changes:
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:
http://enja.org/2010/05/24/blender-creating-a-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://github.com/enjalot/EnjaParticles.git

to this:
[submodule "blender/extern/rtps"]
    url = git@github.com:enjalot/EnjaParticles.git

About

Blender modified to put the Real-Time Particle System library in the Game Engine

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 70.5%
  • C++ 19.7%
  • Python 8.3%
  • CMake 0.8%
  • Objective-C++ 0.3%
  • Objective-C 0.2%
  • Other 0.2%