param, colors; no trasfer when far - wip
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 1.7 MiB |
BIN
zoneb/bin/data/cold3.png
Normal file
After Width: | Height: | Size: 2.4 MiB |
BIN
zoneb/bin/data/cold4.png
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
zoneb/bin/data/cold5.png
Normal file
After Width: | Height: | Size: 2.4 MiB |
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<ZONE_B>
|
<ZONE_B>
|
||||||
<XY>61.2245, -16.3265</XY>
|
<XY>61.2245, -12.2449</XY>
|
||||||
<scale>1.7965</scale>
|
<scale>1.7965</scale>
|
||||||
<device>video3</device>
|
<device>video3</device>
|
||||||
<thermo_delay>4</thermo_delay>
|
<thermo_delay>4</thermo_delay>
|
||||||
|
|
|
@ -7,8 +7,13 @@ uniform sampler2DRect u_world;
|
||||||
uniform sampler2DRect u_v4l2cam;
|
uniform sampler2DRect u_v4l2cam;
|
||||||
uniform sampler2DRect warm1;
|
uniform sampler2DRect warm1;
|
||||||
uniform sampler2DRect warm2;
|
uniform sampler2DRect warm2;
|
||||||
|
uniform sampler2DRect warm3;
|
||||||
|
// uniform sampler2DRect warm4;
|
||||||
uniform sampler2DRect cold1;
|
uniform sampler2DRect cold1;
|
||||||
uniform sampler2DRect cold2;
|
uniform sampler2DRect cold2;
|
||||||
|
uniform sampler2DRect cold3;
|
||||||
|
uniform sampler2DRect cold4;
|
||||||
|
uniform sampler2DRect cold5;
|
||||||
|
|
||||||
uniform float uAreThereTwoPeopleTween;
|
uniform float uAreThereTwoPeopleTween;
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ void main()
|
||||||
posWorld.z = -depth * 65535.0; // Remap to float range.
|
posWorld.z = -depth * 65535.0; // Remap to float range.
|
||||||
posWorld.x = ray.x * posWorld.z;
|
posWorld.x = ray.x * posWorld.z;
|
||||||
posWorld.y = ray.y * 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;
|
float age = misc.y;
|
||||||
if(age > 1) { // reached target
|
if(age > 1) { // reached target
|
||||||
|
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.3 MiB |
Before Width: | Height: | Size: 2.3 MiB |
BIN
zoneb/bin/data/warm3.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
|
@ -142,7 +142,7 @@ void ofApp::setupGui()
|
||||||
|
|
||||||
debugGui.setup("DEBUG");
|
debugGui.setup("DEBUG");
|
||||||
debugGui.add(calibMode.setup("calib", false));
|
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(dummyXY.setup("XY", {0, 0}, {-500, -500}, {500, 500})); // should be false
|
||||||
debugGui.add(debugFps.setup("FPS", "0"));
|
debugGui.add(debugFps.setup("FPS", "0"));
|
||||||
debugGui.setPosition(230, 10);
|
debugGui.setPosition(230, 10);
|
||||||
|
@ -248,20 +248,39 @@ void ofApp::updateThermal()
|
||||||
|
|
||||||
if (dummyMode == false)
|
if (dummyMode == false)
|
||||||
{
|
{
|
||||||
if (hotspots.size() > 0 && hotspots.at(0).size() > 0)
|
if (uBetweenDistance > 500 || hotspots.size() < 2)
|
||||||
{
|
{
|
||||||
hotspot0 = hotspots.at(0).at(0);
|
hotspot0 = ofVec3f(100000, 100000, 0);
|
||||||
}
|
hotspot1 = ofVec3f(100000, 100000, 0);
|
||||||
if (hotspots.size() > 1 && hotspots.at(1).size() > 0)
|
|
||||||
{
|
if (hotspots.size() < 2)
|
||||||
hotspot1 = hotspots.at(1).at(0);
|
{
|
||||||
areThereTwoPeople = true;
|
areThereTwoPeople = false;
|
||||||
areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween + 0.02, 0, 1);
|
areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween - 0.02, 0, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
areThereTwoPeople = true;
|
||||||
|
areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween + 0.02, 0, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
areThereTwoPeople = false;
|
if (hotspots.size() > 0 && hotspots.at(0).size() > 0)
|
||||||
areThereTwoPeopleTween = ofClamp(areThereTwoPeopleTween - 0.02, 0, 1);
|
{
|
||||||
|
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
|
else
|
||||||
|
@ -296,6 +315,7 @@ void ofApp::update()
|
||||||
bodies.push_back(toGlm(joint.position));
|
bodies.push_back(toGlm(joint.position));
|
||||||
}
|
}
|
||||||
uBetween = uBetween.getInterpolated(bodies.at(0).getInterpolated(bodies.at(1), 0.5f), 0.1f);
|
uBetween = uBetween.getInterpolated(bodies.at(0).getInterpolated(bodies.at(1), 0.5f), 0.1f);
|
||||||
|
uBetweenDistance = bodies.at(0).distance(bodies.at(1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -434,7 +454,10 @@ void ofApp::draw()
|
||||||
drawMain();
|
drawMain();
|
||||||
boundShader.draw(0, 0);
|
boundShader.draw(0, 0);
|
||||||
}
|
}
|
||||||
drawDebug();
|
if (showGui)
|
||||||
|
{
|
||||||
|
drawDebug();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ofApp::keyPressed(int key)
|
void ofApp::keyPressed(int key)
|
||||||
|
@ -447,6 +470,10 @@ void ofApp::keyPressed(int key)
|
||||||
{
|
{
|
||||||
ofSetFullscreen(false);
|
ofSetFullscreen(false);
|
||||||
}
|
}
|
||||||
|
if (key == 's')
|
||||||
|
{
|
||||||
|
showGui = !showGui;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ofApp::keyReleased(int key)
|
void ofApp::keyReleased(int key)
|
||||||
|
|
|
@ -53,7 +53,7 @@ private:
|
||||||
std::vector<ofFbo> traces;
|
std::vector<ofFbo> traces;
|
||||||
int curTrace;
|
int curTrace;
|
||||||
std::map<string, ofFloatImage> gradients;
|
std::map<string, ofFloatImage> gradients;
|
||||||
std::vector<std::string> gradientNames {"warm1", "warm2", "cold1", "cold2"};
|
std::vector<std::string> gradientNames {"warm1", "warm2", "warm3", "cold1", "cold2", "cold3", "cold4", "cold5"};
|
||||||
|
|
||||||
ofxV4L2 v4l2Cam;
|
ofxV4L2 v4l2Cam;
|
||||||
ofTexture v4l2Tex;
|
ofTexture v4l2Tex;
|
||||||
|
@ -68,6 +68,7 @@ private:
|
||||||
ofVec3f hotspot0, hotspot1;
|
ofVec3f hotspot0, hotspot1;
|
||||||
ofVec3f hotspot3d0, hotspot3d1;
|
ofVec3f hotspot3d0, hotspot3d1;
|
||||||
ofVec3f uBetween;
|
ofVec3f uBetween;
|
||||||
|
float uBetweenDistance;
|
||||||
bool areThereTwoPeople;
|
bool areThereTwoPeople;
|
||||||
float areThereTwoPeopleTween;
|
float areThereTwoPeopleTween;
|
||||||
|
|
||||||
|
@ -85,4 +86,6 @@ private:
|
||||||
ofxVec2Slider dummyXY;
|
ofxVec2Slider dummyXY;
|
||||||
ofxLabel debugFps;
|
ofxLabel debugFps;
|
||||||
ofxPanel debugGui;
|
ofxPanel debugGui;
|
||||||
|
|
||||||
|
bool showGui = false;
|
||||||
};
|
};
|
||||||
|
|