Quantcast
Channel: advanced - openFrameworks
Viewing all 1244 articles
Browse latest View live

Ways to optimize slow ofTrueTypeFont

$
0
0

@Deqing_Sun wrote:

Hi All,
I'm trying to draw some scrolling text with ofTrueTypeFont. However the frame rate is slow on Raspberry Pi.
Is there way to pre-render mesh or bitmap and keep it in memory instead of generate the same thing in each frame?

Thanks
Deqing

Posts: 3

Participants: 2

Read full topic


[SOLVED] ShivaVG alpha issues 0.8.4

$
0
0

@ivaylopg wrote:

I'm having problems with alpha/transparency using bgstaal's ofxShivaVG addon in 0.8.4. The examples compile fine and look great, but when I try to draw into an fbo, I lose transparency! I'm on OS X 10.10.3

Here's what my code looks like. I'm just trying to draw some stuff into an fbo and display that on top of an image:

setup(){

...
_shivaVGRenderer = ofPtr<ofxShivaVGRenderer>(new ofxShivaVGRenderer);
ofSetCurrentRenderer(_shivaVGRenderer);

_shivaVGRenderer->setLineJoinStyle(VG_JOIN_ROUND);
_shivaVGRenderer->setLineCapStyle(VG_CAP_ROUND);

ofEnableAlphaBlending();

...

fbo.allocate(1127,995,GL_RGBA,8);
fbo.begin();
fbo(255,0);
fbo.end();
...
}

draw(){

  ofEnableAlphaBlending();

  bgImage.draw(artCanvasX,artCanvasY,artCanvasWidth,artCanvasHeight);

  fbo.begin();
  ofClear(0, 0, 0, 0);

  ofSetColor(255,0,0,255);
  ofSetLineWidth(30.0f);
  ofLine(10, 10, 500, 300);
  ofSetLineWidth(1.0f);
  ofSetColor(255);

  fbo.end();
  fbo.draw(artCanvasX,artCanvasY);
}

When I run that, I get a red line on a black background, with no image showing through. If I draw the image inside the fbo, before the line, it works fine. If I don't draw anything to the fbo, just leave it empty, it works fine (the empty fbo is drawn over the image, and I can see the image).

This happens if I try to draw anything into the fbo, even using the shiva renderer's built-in calls: ofGetCurrentRenderer()->drawCircle(30, 50, 0, 20);

I tried:

ofGetCurrentRenderer()->clearAlpha();

inside the fbo, with no luck. I also noticed that

ofGetCurrentRenderer()->clear()

only asks for three arguments...there doesn't seem to be a way to clear with 0 alpha.

The draw() code aboce is actually inside a class, which then gets called in the main draw() loop, that's why I'm trying to use ofGetCurrentRenderer()->xxxxx instead of directly _shivaVGRenderer->xxxxx

Any help would be appreciated. I would like to keep this on 0.8.4 because it needs to be stable/run for a long time, but I'd consider moving to OF master.

Thanks!

Posts: 2

Participants: 1

Read full topic

Interpolating between two frames

$
0
0

@Collin_Schupman wrote:

Hey,

I am generating a series of images that that I am going to combine into a video. These images may not be continuous enough between frames to make the animation smooth, so, I am wondering if anyone knows any good/interesting methods (or existing oF tools) to interpolate (through whatever method *linear, etc..) between two images and generate some connecting images.

Best,

Collin

Posts: 3

Participants: 2

Read full topic

ofVboMesh outperformed significantly by three.js

$
0
0

@roymacdonald wrote:

Hi lovely OF people,
This is getting quite frustrating.
I cant get ofVboMesh to perform as well as three.js mesh rendering.
I'm not sure about what's going on behind the scenes in three.js but it is able to render faster and with way more vertices than OF before droppping the fps below 60.
Here is a test example for OF:


and here "the same" for three.js:

any idea on what might be going on? Am I doing something wrong?
The idea behind this
For a project that I already coded using OF, there's a part in which I need to draw a terrain height map.
Everything runs fine except for the terrain rendering, that needs to be optimized.
After some research I decided to go for a Level Of Detail rendering.
I found out the following, that happens to work really well on three.js and suits my needs.
https://github.com/felixpalmer/lod-terrain
So I decided to port it to OF, which I guessed that would be straightforwards, but it has become a several days nightmare. [add frustration, despair and anger emoticon here.]
In essence the idea is to create a grid that decreases in resolution as it moves away from its center. All the rest goes on inside a shader. The problem is that I can't even render the mesh, with no shader anywhere close to three.js in terms of resolution and fps.
Any idea on what might be going on? How to fix/improve? @arturo @tgfrerer?

Here's an oF app that draws the LevelOfDetail mesh.


and here's the three.js version that draws the same. Not sure if the internals are the same because the performaces is significantly better with three.js

So far I've tried using ofxScene (which is a scene graph implementation based on three.js), instanced rendering, and several other methods. None provides any performance boost.
Already read and tried this: http://forum.openframeworks.cc/t/instanced-rendering-with-an-array-of-ofmatrix4x4/19265/3

additionally, I need to render as wireframe, which also drops the fps a lot.

I'm running this on a MacBookPro Retina 2014 2,5GHz i7, 16GBRam, NVIDIA GeForce GT 750M 2048 MB, mavericks 10.9.5

What's going on behind the hoods in OF? is it a bug? How can it be that something that runs inside a browser runs better that a native app.

I will really appreciate any advice, guidance or kind words smile

Best!

Posts: 11

Participants: 7

Read full topic

Serial Disconnect w/o hang

$
0
0

@digitalColeman wrote:

Has anyone found a reliable way to deal with losing a connection to a serial device, not have the program hang, and as a bonus, search for it to come back on? My remote arduino might get shut off while the OF app will keep going and I want to be able to deal with that.
Thanks for ideas.
Chris

Posts: 2

Participants: 2

Read full topic

Multiple ofWMFoundationPlayer in single oF instance, juggling 4K videos/memory release causes crash - options?

$
0
0

@msodrew wrote:

(this question is replicated from an email thread between myself and Mr. James George of the CLOUDS project. I'm replicating it here so he can respond to me and the community at once)

I'm employing the feature-videobuffer branch of CLOUDS-Interactive-Documentary/openFrameworks/tree/feature-videobuffer for hardware-accelerated 4K h264 decoding on Windows, as this branch has an amazing 64-bit Direct3D ofWMFoundationPlayer (which I'm sure is planned for eventual release in oF x64 stable).

However, I've run into a nontrivial roadblock.

I'm trying to get an app that has 3 portrait instances of ofWMFoundationPlayer to load/switch/mutex other 4K videos on-the-fly. The issue that must be familiar to some here: the non-threadsafe nature of the GPU and oF's video.draw() calls cause a bad memory access crash when the video player attempts to do a player->lockSharedTexture() after said texture has already been released.

With a very limited timeframe in mind, what's the best way I can try to handle this? Some ideas that come to mind:

  • Option 1. A dedicated ofWMFoundationPlayer allocated for every video file I try to play back. Create a dynamic vector of shared_ptr<ofWMFoundationPlayer>. I swap between only calling update()/draw() on the "active" ofWMFoundationPlayer. Unwanted update()/draw() calls due to C++'s threading (hopefully) do not cause a crash because I never actually release the shared texture / GPU memory. I know this is inefficient / inelegant, but my machines are quite beefy and I think this is the best option I have given the time frame.
  • Option 2. Attempt to write a class / drop in an ofx class that juggles ofWMFoundationPlayer's to be thread-safe. Perform a lock() on video rendering threads whenever attempting to load or unload a video so that no erroneous video.draw() calls are committed when a video texture is being released or loaded. I honestly doubt I could pull off this option, given my C++ experience and the timeframe.
  • Option 3. Anything y'all could think of? wink

Thanks again for any knowledge that can be shed on this.


Update: I'm currently running with Option 1 and it hasn't caused me any troubles yet. I pretty much just stop the clip and halt asking for video->update()'s besides the active 3 videos in question. I'll come back here to let everyone know how it goes, my install is in 1 week (ಠ_ಠ)

Posts: 4

Participants: 2

Read full topic

Rendering text with shaders

[ALGORITHM]Can someone imitate something similar to iOS touch scroll action?

$
0
0

@cuinjune wrote:

what I want to achieve is,

let's say there is a wide horizontal bar in the screen.

if you touch(click) anywhere on screen and then move up or down, the bar will move accordingly just like using a vertical slider.

But then, if you release the touch(click), the bar will gradually slow down and stop based on how fast you were scrolling right before you release your touch.

It sounds really simple. but I still couldn't figure out the right solution yet.

I would really appreciate if someone can help me out with this.

Posts: 1

Participants: 1

Read full topic


I have used and 50 fbo.It told me length_error

$
0
0

@zuojiadi wrote:

Unhandled exception at 0x75A62C1A in KinectTest006_debug.exe: Microsoft C++ exception: std::length_error at memory location 0x0018F888.

void fbo::setup(){
this->count_1 =50;
this->count_num = 1080 / count_1;
for (int i = 0; i < count_1; i++)
{
	fbos[i].allocate(1920, 1080, GL_RGBA);
	fbos_1[i].allocate(1920, count_num, GL_RGBA);
}
out.allocate(1920, 1080, GL_RGBA);
//shaderGreen.load("shadersGreen/shader");

}

void fbo::update(ofFbo& image){

for (int i = count_1-1; i>0; i--)
{

	fbos[i].begin();
	fbos[i - 1].draw(0, 0, 1920, 1080);
	fbos[i].end();

}

fbos[0] = image;

for (int i = 0; i < count_1; i++)
{
	fbos_1[i].begin();
	fbos[i].draw(0, -i*count_num, 1920, 1080);
	fbos_1[i].end();
}




out.begin();
for (int i = 0; i < count_1; i++)
{
	fbos_1[i].draw(0, i*count_num);
}
out.end();

}

void fbo::draw(){

out.draw(0, 0,1920,1080);

}

When the count is less than 45 can be run.
More than 50 would say the above error.

Posts: 1

Participants: 1

Read full topic

Of v0.8.4 kinect body mask and hand tracking

$
0
0

@ungaro wrote:

Why is it so (incredible) hard to find a good working example of body segmentation (masking) and hand tracking with kinect and opencv? If you know something or have anything handy, can you point me to the right direction?

Many thanks,
Alp

Posts: 5

Participants: 2

Read full topic

ofFbo issues when samples > 0

$
0
0

@armadillu wrote:

Hi, I am finding weird issues when drawing one FBO inside another one.

	int numSamples = 8;
	fbo1.allocate(300,300, GL_RGBA, numSamples);
	fbo2.allocate(300,300, GL_RGBA, numSamples);

	fbo1.begin();
	ofClear(0,0,55,255);
	ofDrawCircle(mouseX, mouseY, 33);
	fbo1.end();

	fbo2.begin();
	fbo1.draw(0,0);
	fbo2.end();

This should draw nothing to screen, but if numSamples is > 0, it does. In my setup (today's github master, OS X 10.10.4) it draws fbo1 on the bottom left of my screen, flipped vertically.

Posts: 3

Participants: 2

Read full topic

ofxEdsdk save video

$
0
0

@wewearglasses wrote:

Hi guys, I'm trying to use ofxEdsdk (ED-SDK v3.2) to control a Canon 700D to record some slow motion video. I can take photo but however I cannot record and save a video. The cam.isNewMovie() always returns false. Anyone has encountered the same problem before?

void DCamera::start(float _duration){
    startTime=ofGetElapsedTimeMillis();
    duration=_duration;
    _isRecording=true;
    cam.beginMovieRecording();
    ofLogNotice("Camera", "Start");
}

void DCamera::update(){
    cam.update();
    if(_isRecording && ofGetElapsedTimeMillis()-startTime>duration*1000){
        cam.endMovieRecording();
        ofLogNotice("Camera", "Stop");
        _isRecording=false;
    }
    if (cam.isMovieNew()) {
        cam.savePhoto("capture.mov");
        ofLogNotice("Camera", "Save");
    }
}

Posts: 4

Participants: 2

Read full topic

Breakthrough Message (evidence of life or intelligence beyond Earth)

$
0
0

@Nuttwista wrote:

The pool of prizes for the best messages totals $1,000,000. The competition is open to everyone

Message To Space

Hi I'm new to the forum and I'm in search to build a small team of onliner's to work together on Interstellar Communications in the form Hologram - 3D Image of Carl Sagan which can be decoded in the simplest way.

Anyone interested in collaborating with this maybe once in a life time fantastic open source project please be intouch.

Posts: 1

Participants: 1

Read full topic

Using Qmake for Compiling OF on Windows 8

$
0
0

@Furkanzmc wrote:

Hi. I'm trying to use qmake to build OF with msvc2012. Here's my .pro file

DEFINES += "WIN32"
DEFINES += "_DEBUG"
DEFINES += "_CONSOLE"
DEFINES += "POCO_STATIC"
DEFINES += "CAIRO_WIN32_STATIC_BUILD"
DEFINES += "DISABLE_SOME_FLOATING_POINT"
DEFINES += "_UNICODE"
DEFINES += "UNICODE"

OF = $$PWD/../../../

TEMPLATE  = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

QT -= gui

CONFIG -= qt
CONFIG -= warn_on
CONFIG += c++11

#GLUT
LIBS += $$OF/libs/glut/lib/vs/glut32.lib
INCLUDEPATH += $$OF/libs/glut/include

#GLFW
LIBS += $$OF/libs/glfw/lib/vs/glfw3.lib
INCLUDEPATH += $$OF/libs/glfw/include
INCLUDEPATH += $$OF/libs/glfw/include/GLFW

#RTAUDIO
LIBS += $$OF/libs/rtAudio/lib/vs/rtAudioD.lib
INCLUDEPATH += $$OF/libs/rtAudio/include

#FREEIMAGE
LIBS += $$OF/libs/FreeImage/lib/vs/FreeImage.lib
INCLUDEPATH += $$OF/libs/FreeImage/include

#FREETYPE
LIBS += $$OF/libs/freetype/lib/vs/libfreetype.lib
INCLUDEPATH += $$OF/libs/freetype/include
INCLUDEPATH += $$OF/libs/freetype/include/freetype2

#QUICKTIME
LIBS += $$OF/libs/quicktime/lib/vs/qtmlClient.lib
LIBS += $$OF/libs/quicktime/lib/vs/QTSClient.lib
LIBS += $$OF/libs/quicktime/lib/vs/Rave.lib
INCLUDEPATH += $$OF/libs/quicktime/include

#FMODEX
LIBS += $$OF/libs/fmodex/lib/vs/fmodex_vc.lib
INCLUDEPATH += $$OF/libs/fmodex/include

#VIDEOINPUT
LIBS += $$OF/libs/videoInput/lib/vs/videoInputD.lib
INCLUDEPATH += $$OF/libs/videoInput/include

#CAIRO
LIBS += $$OF/libs/cairo/lib/vs/cairo-static.lib
LIBS += $$OF/libs/cairo/lib/vs/pixman-1.lib
INCLUDEPATH += $$OF/libs/cairo/include
INCLUDEPATH += $$OF/libs/cairo/include/libpng15
INCLUDEPATH += $$OF/libs/cairo/include/pixman-1
INCLUDEPATH += $$OF/libs/cairo/include/cairo

#GLEW
LIBS += $$OF/libs/glew/lib/vs/glew32s.lib
INCLUDEPATH += $$OF/libs/glew/include

#GLU
LIBS += $$OF/libs/glu/lib/vs/glu32.lib
INCLUDEPATH += $$OF/libs/glu/include

#OPENSSL
LIBS += $$OF/libs/openssl/lib/vs/libeay32md.lib
LIBS += $$OF/libs/openssl/lib/vs/ssleay32md.lib
INCLUDEPATH += $$OF/libs/openssl/include
INCLUDEPATH += $$OF/libs/openssl/include/openssl

#POCO
LIBS += $$OF/libs/poco/lib/vs/PocoCryptomdd.lib
LIBS += $$OF/libs/poco/lib/vs/PocoUtilmdd.lib
LIBS += $$OF/libs/poco/lib/vs/PocoXMLmdd.lib
LIBS += $$OF/libs/poco/lib/vs/PocoNetmdd.lib
LIBS += $$OF/libs/poco/lib/vs/PocoNetSSLmdd.lib
LIBS += $$OF/libs/poco/lib/vs/PocoFoundationmdd.lib
INCLUDEPATH += $$OF/libs/poco/include

#TESS2
LIBS += $$OF/libs/tess2/lib/vs/tess2.lib
INCLUDEPATH += $$OF/libs/tess2/include

#OPENFRAMEWORKS
INCLUDEPATH += $$OF/libs/openFrameworks
INCLUDEPATH += $$OF/libs/openFrameworks/types
INCLUDEPATH += $$OF/libs/openFrameworks/sound
INCLUDEPATH += $$OF/libs/openFrameworks/video
INCLUDEPATH += $$OF/libs/openFrameworks/3d
INCLUDEPATH += $$OF/libs/openFrameworks/math
INCLUDEPATH += $$OF/libs/openFrameworks/events
INCLUDEPATH += $$OF/libs/openFrameworks/utils
INCLUDEPATH += $$OF/libs/openFrameworks/gl
INCLUDEPATH += $$OF/libs/openFrameworks/app
INCLUDEPATH += $$OF/libs/openFrameworks/graphics
INCLUDEPATH += $$OF/libs/openFrameworks/communication


SOURCES += $$OF/libs/openFrameworks/math/ofQuaternion.cpp \
    main.cpp \
    ofApp.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofVec2f.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofMatrix4x4.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofVec4f.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofMath.cpp
SOURCES += $$OF/libs/openFrameworks/math/ofMatrix3x3.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppRunner.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppNoWindow.cpp
SOURCES += $$OF/libs/openFrameworks/app/ofAppGLFWWindow.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofFbo.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofMaterial.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofVboMesh.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLUtils.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofShader.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofTexture.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofGLRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofLight.cpp
SOURCES += $$OF/libs/openFrameworks/gl/ofVbo.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofVideoPlayer.cpp
SOURCES += $$OF/libs/openFrameworks/video/ofVideoGrabber.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofRtAudioSoundStream.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofSoundPlayer.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofSoundStream.cpp
SOURCES += $$OF/libs/openFrameworks/sound/ofFmodSoundPlayer.cpp
SOURCES += $$OF/libs/openFrameworks/events/ofEvents.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofBaseTypes.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofRectangle.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofParameterGroup.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofColor.cpp
SOURCES += $$OF/libs/openFrameworks/types/ofParameter.cpp
SOURCES += $$OF/libs/openFrameworks/communication/ofSerial.cpp
SOURCES += $$OF/libs/openFrameworks/communication/ofArduino.cpp
SOURCES += $$OF/libs/openFrameworks/3d/of3dPrimitives.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofMesh.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofNode.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofCamera.cpp
SOURCES += $$OF/libs/openFrameworks/3d/of3dUtils.cpp
SOURCES += $$OF/libs/openFrameworks/3d/ofEasyCam.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofTessellator.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofCairoRenderer.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofImage.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofRendererCollection.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPixels.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/of3dGraphics.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofGraphics.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofTrueTypeFont.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPath.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofBitmapFont.cpp
SOURCES += $$OF/libs/openFrameworks/graphics/ofPolyline.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofURLFileLoader.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofLog.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofSystemUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofFileUtils.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofXml.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofMatrixStack.cpp
SOURCES += $$OF/libs/openFrameworks/utils/ofThread.cpp

HEADERS += $$OF/libs/openFrameworks/math/ofQuaternion.h \
    ofApp.h
HEADERS += $$OF/libs/openFrameworks/math/ofVec2f.h
HEADERS += $$OF/libs/openFrameworks/math/ofMatrix4x4.h
HEADERS += $$OF/libs/openFrameworks/math/ofVec4f.h
HEADERS += $$OF/libs/openFrameworks/math/ofMath.h
HEADERS += $$OF/libs/openFrameworks/math/ofMatrix3x3.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppRunner.h
HEADERS += $$OF/libs/openFrameworks/app/ofAppNoWindow.h
OBJECTIVE_HEADERS += $$OF/libs/openFrameworks/app/ofAppGLFWWindow.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLProgrammableRenderer.h
HEADERS += $$OF/libs/openFrameworks/gl/ofFbo.h
HEADERS += $$OF/libs/openFrameworks/gl/ofMaterial.h
HEADERS += $$OF/libs/openFrameworks/gl/ofVboMesh.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLUtils.h
HEADERS += $$OF/libs/openFrameworks/gl/ofShader.h
HEADERS += $$OF/libs/openFrameworks/gl/ofTexture.h
HEADERS += $$OF/libs/openFrameworks/gl/ofGLRenderer.h
HEADERS += $$OF/libs/openFrameworks/gl/ofLight.h
HEADERS += $$OF/libs/openFrameworks/gl/ofVbo.h
HEADERS += $$OF/libs/openFrameworks/video/ofVideoPlayer.h
HEADERS += $$OF/libs/openFrameworks/video/ofVideoGrabber.h
HEADERS += $$OF/libs/openFrameworks/sound/ofRtAudioSoundStream.h
HEADERS += $$OF/libs/openFrameworks/sound/ofSoundPlayer.h
HEADERS += $$OF/libs/openFrameworks/sound/ofSoundStream.h
HEADERS += $$OF/libs/openFrameworks/sound/ofFmodSoundPlayer.h
HEADERS += $$OF/libs/openFrameworks/events/ofEvents.h
HEADERS += $$OF/libs/openFrameworks/types/ofBaseTypes.h
HEADERS += $$OF/libs/openFrameworks/types/ofRectangle.h
HEADERS += $$OF/libs/openFrameworks/types/ofParameterGroup.h
HEADERS += $$OF/libs/openFrameworks/types/ofColor.h
HEADERS += $$OF/libs/openFrameworks/types/ofParameter.h
HEADERS += $$OF/libs/openFrameworks/communication/ofSerial.h
HEADERS += $$OF/libs/openFrameworks/communication/ofArduino.h
HEADERS += $$OF/libs/openFrameworks/3d/of3dPrimitives.h
HEADERS += $$OF/libs/openFrameworks/3d/ofMesh.h
HEADERS += $$OF/libs/openFrameworks/3d/ofNode.h
HEADERS += $$OF/libs/openFrameworks/3d/ofCamera.h
HEADERS += $$OF/libs/openFrameworks/3d/of3dUtils.h
HEADERS += $$OF/libs/openFrameworks/3d/ofEasyCam.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofTessellator.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofCairoRenderer.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofImage.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofRendererCollection.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPixels.h
HEADERS += $$OF/libs/openFrameworks/graphics/of3dGraphics.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofGraphics.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofTrueTypeFont.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPath.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofBitmapFont.h
HEADERS += $$OF/libs/openFrameworks/graphics/ofPolyline.h
HEADERS += $$OF/libs/openFrameworks/utils/ofURLFileLoader.h
HEADERS += $$OF/libs/openFrameworks/utils/ofUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofLog.h
HEADERS += $$OF/libs/openFrameworks/utils/ofSystemUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofFileUtils.h
HEADERS += $$OF/libs/openFrameworks/utils/ofXml.h
HEADERS += $$OF/libs/openFrameworks/utils/ofMatrixStack.h
HEADERS += $$OF/libs/openFrameworks/utils/ofThread.h
HEADERS += $$OF/libs/openFrameworks/ofMain.h

When I build the project I get the following errors: The file is on KDE Paste

Posts: 6

Participants: 2

Read full topic

How can I convert contours into box2d?

$
0
0

@icq4ever wrote:

how can I convert from contour from opencv blobs into box2d object?

I tried with ofxTriangle. but it conflict with ofxBox2d.
so I need to using Triangle in ofxBox2d. but I cannot find any example of this.

anyone help this?

thanks in advance.

Posts: 1

Participants: 1

Read full topic


Manage tangents of ofPolyline command points (bezier curve)

$
0
0

@Gallo wrote:

hello,

First question : why there is no command points in ofPolyline ? do i have to work with an intermediate ofPath shape ?

Now the real question : i have a path from which i get an ofPolyline. I am using command points to deform the shape with the mouse. For a square, everything is ok. But for a circle for instance, when i move the control point, i loose the curve shape probable because the tangent in that control point is not interpolated. (see pics for details)

How can i modify the tangent at this point ? or interpolate the original tangent to the new control point position.

thanks

Posts: 4

Participants: 2

Read full topic

ofMesh and texture : correct settings of detph test and cullface rendering

$
0
0

@taprik wrote:

Dear OF Land,

I'm trying to draw an ofMesh with his texture from a collada file.
but I'm struggling with the depth test and the cullFace.

I've build my mesh and the uv mapping of the texture with Blender, and exported it to as a collada file
I'm loading the mesh vertices and texture coordinates with an home made loader (I can't use the assimp loader as I need continuity in the indices and vertices numerotation)

In my collada loader class there is this settings (imgText is an ofImage)

ofDisableArbTex();
imgText.loadImage(pathImg);
ofEnableArbTex();
mesh.setMode(OF_PRIMITIVE_TRIANGLES);

Then it loads the coordinates ...

then in the setup function of the ofApp

cTest.loadCollada("clown2.dae", "clown2.png",  1); //my home made loader
ofBackground(0);
vertex = 0;

ofEnableDepthTest();

glShadeModel(GL_SMOOTH);

The draw function of the ofApp

ofTexture &tex = cTest.imgText.getTextureReference(); //get texture ref

ofPushMatrix();
ofSetColor(ofColor::white);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
ofTranslate(ofGetWidth()/2, ofGetHeight()/2, 580);
ofRotateY(mouseX);
tex.bind();
cTest.mesh.draw(OF_MESH_FILL);
tex.unbind();
glDisable(GL_CULL_FACE);
ofPopMatrix();

With this code it's rendering correctly the front face and the back face is black, but there is some "transparency" effect when the face is showing his side (left image below). My texture is only transparent in

If I comment this line, there is no transparency effect but the back face is drawn with a texture (You can see the back face in the mouth).

glEnable(GL_CULL_FACE);

I get this

Is there a way to get rid of this transparency effect ?

Posts: 1

Participants: 1

Read full topic

Best way to get stream of speech for text display

$
0
0

@nosarious wrote:

I am designing an installation in which I would like to have a stream of the speech heard being rendered as text on a screen. It will be like an audio vortex, with text spiralling outwards in a variety of lines,

This will be running on a mac mini.

I am currently trying out ofxSpeech, which seems to work only with recognized words, and in the Apple Speech Recognition Reference I cannot find any way to access the 'pre-recognized' information. ( https://developer.apple.com/library/mac/documentation/Carbon/Reference/Speech_Recognition_Manager/ )

What I am hoping for is something similar to what is being used here: https://speechlogger.appspot.com/en/ (only for google chrome right now)

Think of it as a stream-of-consciousness text for all audio heard in a room (it doesn't necessarily have to make sense, but it should be fairly responsive)

I am about to try Google Speech ( https://github.com/gillesdemey/google-speech-v2/ ) and using their suggestion for linking it to google chrome to get an indefinite amount of accesses for a show.

Is there a different technique I should be considering, though? Some part of the apple speech developer tools which will give a pre-recognized string of audio-to-speech elements I can use as a visual representation of audio which is spoken in a gallery setting?

Thank you very much for your help in this.

Posts: 4

Participants: 2

Read full topic

Signals not caught in OF 0.8.4

$
0
0

@Bazard wrote:

Hi !

I'm working on an app with OpenFrameworks 0.8.4, and I want to stop cleanly my app when I receive a signal (SIGINT, SIGABRT or SIGTERM). But I have a problem : when I send any signal, it looks like my app crashes and the sighandler method in ofAppRunner is never called.

I tested on the EmptyExample, and the result is the same.
Here is what I send : killall -2 emptyExampleDebug
And the app seems to always stop in glfwSwapBuffers() function, at line 362 in ofAppGLFWWindow.cpp, instead of calling the sighandler method.

Did I miss something ? I don't understand why the handler doesn't catch signals.
I work on OS X 10.9.5, Xcode v5.1.1

Posts: 3

Participants: 2

Read full topic

Kinect Rotation Angle

Viewing all 1244 articles
Browse latest View live