GithubHelp home page GithubHelp logo

enjalot / bgertps Goto Github PK

View Code? Open in Web Editor NEW
8.0 6.0 3.0 137.02 MB

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

Home Page: http://enja.org

C++ 23.85% C 68.61% Rust 0.01% Shell 0.03% Objective-C 0.34% JavaScript 0.01% Python 7.17%

bgertps's Introduction

####
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 = [email protected]:enjalot/EnjaParticles.git

bgertps's People

Contributors

enjalot avatar erlebach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.