diff --git a/zoneb/bin/data/cold2.png b/zoneb/bin/data/cold2.png index c5edcd3..391f647 100644 Binary files a/zoneb/bin/data/cold2.png and b/zoneb/bin/data/cold2.png differ diff --git a/zoneb/bin/data/cold2_.png b/zoneb/bin/data/cold2_.png deleted file mode 100644 index 391f647..0000000 Binary files a/zoneb/bin/data/cold2_.png and /dev/null differ diff --git a/zoneb/bin/data/cold3.png b/zoneb/bin/data/cold3.png new file mode 100644 index 0000000..c5edcd3 Binary files /dev/null and b/zoneb/bin/data/cold3.png differ diff --git a/zoneb/bin/data/cold4.png b/zoneb/bin/data/cold4.png new file mode 100644 index 0000000..1ee02bc Binary files /dev/null and b/zoneb/bin/data/cold4.png differ diff --git a/zoneb/bin/data/cold5.png b/zoneb/bin/data/cold5.png new file mode 100644 index 0000000..0126368 Binary files /dev/null and b/zoneb/bin/data/cold5.png differ diff --git a/zoneb/bin/data/settings.xml b/zoneb/bin/data/settings.xml index 562f2c4..d043dd1 100644 --- a/zoneb/bin/data/settings.xml +++ b/zoneb/bin/data/settings.xml @@ -1,6 +1,6 @@ - 61.2245, -16.3265 + 61.2245, -12.2449 1.7965 video3 4 diff --git a/zoneb/bin/data/shaders/particles/draw.frag b/zoneb/bin/data/shaders/particles/draw.frag index 8038694..7ff3a09 100755 --- a/zoneb/bin/data/shaders/particles/draw.frag +++ b/zoneb/bin/data/shaders/particles/draw.frag @@ -7,8 +7,13 @@ uniform sampler2DRect u_world; uniform sampler2DRect u_v4l2cam; uniform sampler2DRect warm1; uniform sampler2DRect warm2; +uniform sampler2DRect warm3; +// uniform sampler2DRect warm4; uniform sampler2DRect cold1; uniform sampler2DRect cold2; +uniform sampler2DRect cold3; +uniform sampler2DRect cold4; +uniform sampler2DRect cold5; uniform float uAreThereTwoPeopleTween; diff --git a/zoneb/bin/data/shaders/particles/update.frag b/zoneb/bin/data/shaders/particles/update.frag index 8e3f091..958c0e2 100755 --- a/zoneb/bin/data/shaders/particles/update.frag +++ b/zoneb/bin/data/shaders/particles/update.frag @@ -146,7 +146,7 @@ void main() posWorld.z = -depth * 65535.0; // Remap to float range. posWorld.x = ray.x * posWorld.z; posWorld.y = ray.y * posWorld.z; - posWorld.xyz += random3(posWorld.xyz) * 0.3; + posWorld.xyz += random3(posWorld.xyz) * 0.15; float age = misc.y; if(age > 1) { // reached target diff --git a/zoneb/bin/data/warm1.png b/zoneb/bin/data/warm1.png index e861a1e..3d798c1 100644 Binary files a/zoneb/bin/data/warm1.png and b/zoneb/bin/data/warm1.png differ diff --git a/zoneb/bin/data/warm1_.png b/zoneb/bin/data/warm1_.png deleted file mode 100644 index 3d798c1..0000000 Binary files a/zoneb/bin/data/warm1_.png and /dev/null differ diff --git a/zoneb/bin/data/warm3.png b/zoneb/bin/data/warm3.png new file mode 100644 index 0000000..e861a1e Binary files /dev/null and b/zoneb/bin/data/warm3.png differ diff --git a/zoneb/src/ofApp.cpp b/zoneb/src/ofApp.cpp index 158e776..e6ec9c5 100644 --- a/zoneb/src/ofApp.cpp +++ b/zoneb/src/ofApp.cpp @@ -142,7 +142,7 @@ void ofApp::setupGui() debugGui.setup("DEBUG"); debugGui.add(calibMode.setup("calib", false)); - debugGui.add(dummyMode.setup("dummy", true)); // should be false + debugGui.add(dummyMode.setup("dummy", false)); // should be false debugGui.add(dummyXY.setup("XY", {0, 0}, {-500, -500}, {500, 500})); // should be false debugGui.add(debugFps.setup("FPS", "0")); debugGui.setPosition(230, 10); @@ -248,20 +248,39 @@ void ofApp::updateThermal() if (dummyMode == false) { - if (hotspots.size() > 0 && hotspots.at(0).size() > 0) + if (uBetweenDistance > 500 || hotspots.size() < 2) { - hotspot0 = hotspots.at(0).at(0); - } - if (hotspots.size() > 1 && hotspots.at(1).size() > 0) - { - hotspot1 = hotspots.at(1).at(0); - areThereTwoPeople = true; - areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween + 0.02, 0, 1); + hotspot0 = ofVec3f(100000, 100000, 0); + hotspot1 = ofVec3f(100000, 100000, 0); + + if (hotspots.size() < 2) + { + areThereTwoPeople = false; + areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween - 0.02, 0, 1); + } + else + { + areThereTwoPeople = true; + areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween + 0.02, 0, 1); + } } else { - areThereTwoPeople = false; - areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween - 0.02, 0, 1); + if (hotspots.size() > 0 && hotspots.at(0).size() > 0) + { + hotspot0 = hotspots.at(0).at(0); + } + if (hotspots.size() > 1 && hotspots.at(1).size() > 0) + { + hotspot1 = hotspots.at(1).at(0); + areThereTwoPeople = true; + areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween + 0.02, 0, 1); + } + else + { + areThereTwoPeople = false; + areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween - 0.02, 0, 1); + } } } else @@ -296,6 +315,7 @@ void ofApp::update() bodies.push_back(toGlm(joint.position)); } uBetween = uBetween.getInterpolated(bodies.at(0).getInterpolated(bodies.at(1), 0.5f), 0.1f); + uBetweenDistance = bodies.at(0).distance(bodies.at(1)); } else { @@ -434,7 +454,10 @@ void ofApp::draw() drawMain(); boundShader.draw(0, 0); } - drawDebug(); + if (showGui) + { + drawDebug(); + } } void ofApp::keyPressed(int key) @@ -447,6 +470,10 @@ void ofApp::keyPressed(int key) { ofSetFullscreen(false); } + if (key == 's') + { + showGui = !showGui; + } } void ofApp::keyReleased(int key) diff --git a/zoneb/src/ofApp.h b/zoneb/src/ofApp.h index 39de5a3..631ce1d 100644 --- a/zoneb/src/ofApp.h +++ b/zoneb/src/ofApp.h @@ -53,7 +53,7 @@ private: std::vector traces; int curTrace; std::map gradients; - std::vector gradientNames {"warm1", "warm2", "cold1", "cold2"}; + std::vector gradientNames {"warm1", "warm2", "warm3", "cold1", "cold2", "cold3", "cold4", "cold5"}; ofxV4L2 v4l2Cam; ofTexture v4l2Tex; @@ -68,6 +68,7 @@ private: ofVec3f hotspot0, hotspot1; ofVec3f hotspot3d0, hotspot3d1; ofVec3f uBetween; + float uBetweenDistance; bool areThereTwoPeople; float areThereTwoPeopleTween; @@ -85,4 +86,6 @@ private: ofxVec2Slider dummyXY; ofxLabel debugFps; ofxPanel debugGui; + + bool showGui = false; };