CLOUDS-Interactive-Documentary / Oscillations

1 stars 1 forks source link

Empty Visual System

Welcome to the CLOUDS Interactive Documentary CodeStorm! We'll be creating Visual Systems, modular visual sketches used that are used along with the pointcloud interviews to illustrate the concepts presented in the film.

In order to make the process of making a VisualSystem efficient and easy we have put together a wrapper that is a lot like a testApp.cpp but with ofxTimeline and ofxUI built in for variable and animation controls. The system can also store all the settings in presets letting you configure each sketch in different ways and invoke the visuals within the film.

Create your own visual system

Download a fresh openFrameworks 0.7.4 from http://www.openframeworks.cc/download/. Unzip it and do the following commands in the terminal

Next you need to rename the project to the name of your sketch,

Modify ofMaterial & ofLight

To Run you'll need to modify two things in the oF Core

In libs/openFrameworks/gl/ofLight.h add reference & and remove const keyword

    ofFloatColor& getAmbientColor();
    ofFloatColor& getDiffuseColor();
    ofFloatColor& getSpecularColor();

In libs/openFrameworks/gl/ofLight.cpp as well

    //----------------------------------------
    ofFloatColor& ofLight::getAmbientColor() {
        return ambientColor;
    }

    //----------------------------------------
    ofFloatColor& ofLight::getDiffuseColor() {
        return diffuseColor;
    }

    //----------------------------------------
    ofFloatColor& ofLight::getSpecularColor() {
        return specularColor;
    }

In libs/openFrameworks/gl/ofMaterial.h add reference & to the material colors

    ofFloatColor& getDiffuseColor();
    ofFloatColor& getAmbientColor();
    ofFloatColor& getSpecularColor();
    ofFloatColor& getEmissiveColor();
    float& getShininess();

Match the changes in libs/openFrameworks/gl/ofMaterial.cpp

    float& ofMaterial::getShininess(){
        return shininess;
    }

    ofFloatColor& ofMaterial::getDiffuseColor() {
        return diffuse;
    }

    ofFloatColor& ofMaterial::getAmbientColor() {
        return ambient;
    }

    ofFloatColor& ofMaterial::getSpecularColor() {
        return specular;
    }

    ofFloatColor& ofMaterial::getEmissiveColor() {
        return emissive;
    }

Included Addons

CLOUDS uses many addons from the community

Loading Data

Anywhere you want to access things in your bin/data folder you'll need to do so by first calling

getVisualSystemDataPath() + "path/to/my/stuff"

This will ensure that your data access works when running the module inside of CLOUDS.

Saving Presets

CLOUDS VisualSystems are driven by presets. To create a preset, configure the variables and timing just how you like and then click Save on the main GUI. Enter a name on the popup window and confirm. This will save all your settings into bin/data/Presets/

The Presets GUI now has a button with the name you just entered, and you can click it to bring these settings back. Feel free to change anything after you've created a preset, since you'll always be modifying the Working/ preset.

Make sure to commit your presets so everyone can check them out!

Hot-Keys

Some useful hotkeys for the interface