Re: [osg-users] Qt resouce and osgDB::readImageFile
Hi Heiko, I solved the problem this way: 1. Create an own subclass of osgDB::ReadFileCallback and override the readImage method. 2. Check inside the readImage() method, if the filename starts with :/ or qrc:/// 3. If the filename is a Qt resource, then load the image into a QImage and convert it to an osg::Image. 4. Call osgDB::Registry::instance()-setReadFileCallback() with a new instance of your own osgDB::ReadFileCallback from step 1. Now you should be able to load Qt resources by calling osgDB::readImageFile(:/Test/Test.jpg) etc. Best regards, André 2014-09-11 16:51 GMT+02:00 Heiko Thiel osgfo...@tevs.eu: Hi, I currently bind files wich our application need as resource. But is there a way, that osg automatically use the resource system (accept filepathes starting with qrc:/). Or how I can load a file from a qrc with something like readImageFile, where a filepathes is accepted, but I don't see an alternate with a stream? Thank you! Cheers, Heiko -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61020#61020 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [3rdparty] Animated 3d-models for OSG
Hi, I have .osgt file with valid 3d-model. It has one animation for all elements of the scene. As I saw in OSG examples (nathan.osg and bignathan.osg) it is possible to create a file with some separate animations. But as far as I know, 3dsmax and Blender can make animations in one timeline only, i.e. one animation per scene. So the question is - what 3d-editor was used to create nathan.osg and bignathan.osg? In other words, what 3d-editor may be used for creation of one scene with some separate animations? Thank you! Cheers, Maxim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61102#61102 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgVolume. Rendering of multiple intersected volumes
HI Jesus, osgVolume doesn't yet support multiple over-lapping volumes. To handle multiple intersecting volumes one will have to have the osgVolume rendering back end and shaders handle both volumes at the same time where the volumes overlap and separately handle the areas where only one volume has influence. Robert. On 22 September 2014 10:29, Jesús Zarzoso jesus.zarz...@mirage-tech.com wrote: Hello. We are using osgVolume in our latest project. It is working perfectly as long as we don´t try to render more than one volume in the same view, and those volumes intersect with each other. In this case, we are having what it looks as depth problems. Please look at the attached images. First of all, is this case supported by the OsgVolume library? We are using the MultipassTechnique, so, at the root of the graph, there is a VolumeScene node. Then, some levels below, each volume is created as an individual Volume node, with its corresponding VolumeTile, ImageLayer and their Locators. We have tried also using a unique Volume node and creating multiple VolumeTiles, but with the same result. Regarding the properties set to the layers, we are using this code: osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(0.02f); osgVolume::SampleDensityProperty* sd = new osgVolume::SampleDensityProperty(0.001); osgVolume::SampleDensityWhenMovingProperty* sdwm = new osgVolume::SampleDensityWhenMovingProperty(0.002); The OSG version is the Developer Release 3.3.2.on Windows 7 64 bit. Any clue why this is happening? Thank you. Jesús. -- Jesús Zarzoso jesus.zarz...@mirage-tech.com Mirage Technologies S.L http://www.mirage-tech.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgVolume. Rendering of multiple intersected volumes
Hello Robert. Thanks for your quick reply! We´ll try to solve this problem ourselves then. Regards. Jesús. 2014-09-22 11:37 GMT+02:00 Robert Osfield robert.osfi...@gmail.com: HI Jesus, osgVolume doesn't yet support multiple over-lapping volumes. To handle multiple intersecting volumes one will have to have the osgVolume rendering back end and shaders handle both volumes at the same time where the volumes overlap and separately handle the areas where only one volume has influence. Robert. On 22 September 2014 10:29, Jesús Zarzoso jesus.zarz...@mirage-tech.com wrote: Hello. We are using osgVolume in our latest project. It is working perfectly as long as we don´t try to render more than one volume in the same view, and those volumes intersect with each other. In this case, we are having what it looks as depth problems. Please look at the attached images. First of all, is this case supported by the OsgVolume library? We are using the MultipassTechnique, so, at the root of the graph, there is a VolumeScene node. Then, some levels below, each volume is created as an individual Volume node, with its corresponding VolumeTile, ImageLayer and their Locators. We have tried also using a unique Volume node and creating multiple VolumeTiles, but with the same result. Regarding the properties set to the layers, we are using this code: osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(0.02f); osgVolume::SampleDensityProperty* sd = new osgVolume::SampleDensityProperty(0.001); osgVolume::SampleDensityWhenMovingProperty* sdwm = new osgVolume::SampleDensityWhenMovingProperty(0.002); The OSG version is the Developer Release 3.3.2.on Windows 7 64 bit. Any clue why this is happening? Thank you. Jesús. -- Jesús Zarzoso jesus.zarz...@mirage-tech.com Mirage Technologies S.L http://www.mirage-tech.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jesús Zarzoso jesus.zarz...@mirage-tech.com Mirage Technologies S.L http://www.mirage-tech.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Animated 3d-models for OSG
Hi Maxim, I do not work with animations much for quite a while, so take this with grain of salt, Either fbx or collada files could have multiple animations. As they are text files ( as well as osgt itself ) - it is possible just do some cut an paste work with text editor. when being converted to osg - those animations will be preserved. Otherwise such packages as Motion Builder allow to put several animations. Regards Sergey On Mon, Sep 22, 2014 at 12:54 PM, Maxim Kuzmin maxri...@mail.ru wrote: Hi, I have .osgt file with valid 3d-model. It has one animation for all elements of the scene. As I saw in OSG examples (nathan.osg and bignathan.osg) it is possible to create a file with some separate animations. But as far as I know, 3dsmax and Blender can make animations in one timeline only, i.e. one animation per scene. So the question is - what 3d-editor was used to create nathan.osg and bignathan.osg? In other words, what 3d-editor may be used for creation of one scene with some separate animations? Thank you! Cheers, Maxim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61102#61102 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Problem with version 3.2.1 and Qt 4.8
Hi, I've downloaded the new version (3.2.1) and built it with support for Qt 4.8. When I tried to use the libs in my app (which worked fine with version 3.0.1) I got two errors. First one, from QGraphicsWindowQt: Code: GraphicsWindowQt:24:21: fatal error: QGLWidget: No such file or directory I solved this changing the include QGLWidget to QtOpenGL/QGLWidget. Second one and still there, it happened when running the app: Code: QPixmap: Must construct a QApplication before a QPaintDevice In my code where I use OSG, there's no call to QPixmap. I use other things from Qt, like QPolygon and QDialog, but no explicitly call to QPixmap. And as I said, this worked fine with version 3.0.1. The app crashes when doing this call: Code: camera-setViewport(new osgQt::GraphicsWindowQt( traits.get() ) ) Any help will be appreciated. ... Thanks and cheers! Andrés[/i] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=6#6 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Debug build apps crash at startup
I built OSG 3.2.0 (windows) from the command line in release and debug modes as follows: Code: cd %OSG% mkdir debug_build cd debug_build cmake ../ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../ -G NMake Makefiles nmake nmake install cd .. mkdir release_build cd release_build cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -G NMake Makefiles nmake nmake install Apps compiled using release mode work fine. Apps build in debug mode crash at startup with the following error dialog : [Image: http://i1363.photobucket.com/albums/r720/pleopard777/Work%20Stuff/Capture_zps8c0a3d67.jpg ] Setting a break point at the first line of a program doesn't help any ... I setup the 3rd party dir (OSG_3RDPARTY_DIR) pointing to my 3rdParty_VC9sp1_x86_x64_V7 created by unzipping the dependencies from http://www.openscenegraph.org/index.php/download-section/dependencies Any ideas? Thanks, Paul [/code][/quote] things are more like they are now than they have ever been before -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61112#61112 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgViewerQT example question
Hi, I'm looking at extending the osgViewerQT example by being able to add items to the QGraphicsView (by setting a QGraphicsScene and adding items to that). These items include some QT controls that need to be embedded in the window with transparency enabled. When I simply create the scene and add the controls (using a GraphicsProxyWidget), the view begins flickering black and white and the log prints QGLContext::makeCurrent(): Failed. over and over. It seems like QT and OSG are fighting over the context. I've heard that you can get around this by subclassing the QGraphicsScene and doing your OSG rendering in the drawBackground() method, storing and retrieving the context before/after, but I'm not exactly sure what that means - calling frame() there? Thank you! Cheers, Nick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61113#61113 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Debug build apps crash at startup
Hi Paul, Googeling indicates that error is most likely produced by a missing runtime dependency. [1] Try to check it with the dependency walker or check if you have the correct dlls copied. Cheers Sebastian [1] http://lmgtfy.com/?q=application+unable+to+start+0x0007b+error+code I built OSG 3.2.0 (windows) from the command line in release and debug modes as follows: Code: cd %OSG% mkdir debug_build cd debug_build cmake ../ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../ -G NMake Makefiles nmake nmake install cd .. mkdir release_build cd release_build cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -G NMake Makefiles nmake nmake install Apps compiled using release mode work fine. Apps build in debug mode crash at startup with the following error dialog : [Image: http://i1363.photobucket.com/albums/r720/pleopard777/Work%20Stuff/Capture_zps8c0a3d67.jpg ] Setting a break point at the first line of a program doesn't help any ... I setup the 3rd party dir (OSG_3RDPARTY_DIR) pointing to my 3rdParty_VC9sp1_x86_x64_V7 created by unzipping the dependencies from http://www.openscenegraph.org/index.php/download-section/dependencies Any ideas? Thanks, Paul [/code][/quote] things are more like they are now than they have ever been before -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61112#61112 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Problem with version 3.2.1 and Qt 4.8
Hi Andres, I would guess that there might be some mistakes when you build your program, e.g. mix debug and release build. see also: http://www.qtcentre.org/threads/10959-QWidget-Must-construct-a-QApplication-before-a-QPaintDevice?p=263303#post263303 best, Shao On Mon, Sep 22, 2014 at 2:56 PM, Andrés Barrionuevo abarrionu...@gmx.com wrote: Hi, I've downloaded the new version (3.2.1) and built it with support for Qt 4.8. When I tried to use the libs in my app (which worked fine with version 3.0.1) I got two errors. First one, from QGraphicsWindowQt: Code: GraphicsWindowQt:24:21: fatal error: QGLWidget: No such file or directory I solved this changing the include QGLWidget to QtOpenGL/QGLWidget. Second one and still there, it happened when running the app: Code: QPixmap: Must construct a QApplication before a QPaintDevice In my code where I use OSG, there's no call to QPixmap. I use other things from Qt, like QPolygon and QDialog, but no explicitly call to QPixmap. And as I said, this worked fine with version 3.0.1. The app crashes when doing this call: Code: camera-setViewport(new osgQt::GraphicsWindowQt( traits.get() ) ) Any help will be appreciated. ... Thanks and cheers! Andrés[/i] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=6#6 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org