I’m trying to use the ofxAruco addon to draw a 3d model over a marker.
Works fine for openframeworks primitives but when I try drawing a model with drawFaces() nothing appears?
void ofApp::setup()
{
model.loadModel("penguin.3ds");
webcam.setup(640, 480);
aruco.setup("intrinsics.int", webcam.getWidth(), webcam.getHeight(), "boardConfiguration.yml");
aruco.getBoardImage(webcam.getPixels());
}
//--------------------------------------------------------------
void ofApp::update() {
webcam.update();
aruco.detectBoards(webcam.getPixels());
}
void ofApp::draw() {
ofSetColor(255, 255, 255);
webcam.draw(0, 0, ofGetWidth(), ofGetHeight());
ofEnableDepthTest();
for (int i = 0; i < aruco.getNumMarkers(); i++)
{
int id = aruco.getMarkers()[i].id;
ofDrawBitmapString(ofToString(id), 20, 20 + i * 10);
aruco.begin(i);
ofSetColor(255, 255, 255);
model.drawFaces();
aruco.end();
}
}