tl;dr: after 3 to 4 hours running the project my 3d mesh/model disappears ;/
i hacked together a little xmess eyecandy from some of the examplecodes.
first i tried using 3dmodelloader, which didnt work as expected, second i tried
ofxAssimp, which failed to compile due to lack of assimp.h although path and file
exists (probably a raspberry problem, read something about it in the tubes), so
i used ofMesh after converting my 3d object to .ply … now all worked as supposed,
added some snow particle from the particle demo and wanted the snow to kinda bounce
off the 3dmodell, which i didn’t got working so i faked it a bit.
anyway, some transparent faces occure, dunno why, but let’s call this the art of glitches,
i can live with. my only problem is, after a couple of hours running that thing, around 3 to 4
hours the 3d modell/mesh disappears, no verbose log message or whatsovever, the snow
still runs and the app too.
i try to attach the source. thnx for help in advance. and of coz feel free to use the source.
used latest of 0.8.0 and also tried against a nightly git trunk.
your code doesn’t compile out of the box so I am not sure this is the latest (“src/main.cpp:4:19: fatal error: ofFBO.h: No such file or directory” ofFbo.h is what you are looking for but you don’t need to include it as you are already including ofMain.h)
I would first remove the ofGetElapsedTimef code/check its value
I thought maybe the float was going out of range of 32bit - numbers are tricky in c++ and limits can vary on platform. I’m going to run ofGetElapsedTimef for a while on the RPi and see what it outputs. In the meantime I would maybe try to modify your code to use ofGetElapsedTimeMicros() as it is an unsigned long long.
Yes - it compiles when I removed the include. The error is because Linux is case-sensitive so ofFBO.h is different than ofFbo.h. I understand that that is not the root of your issue - I was just trying to make you aware that people looking at it will probably not be able to compile it without modifying it.
ofGetElapsedTimef is endless (not technically endless, but can count up to MAX_FLOAT) but the further away from 0 you get, the less precise the float is. I had an installation up recently where I used sin(ofGetElapsedTimef()) as an animation source and after about a day, it would get sort of crunchy, since floating point numbers make bigger jumps the further away from zero they get (one way to imagine it is you have 7 or so decimal places of resolution, as the number gets bigger 1, 10, 100, 1000, you loose decimal resolution on the decimal places). A quick solution is to use a double based on this:
aside from the hopefully ofGetElapsedTimef-problem anyone get the transparent faces on the 3d model?
any hints/comments on why is that, i’m a noob when it comes to opengl, i usually do stuff in vvvv which is quite different approach as you might know.
went over the code and got rid of the use of ofFbo, i had it used it initially to
use shaders, but since i dropped this idea for the particle system there was no
reason to use FBO and voila, the problem with the backfaces are gone.