Re: [osg-users] Thirty days till OSG BOF at SIGGRAPH 2013
Hi John, On 25 June 2013 00:49, John Richardson richa...@spawar.navy.mil wrote: Thirty days till OSG BOF at SIGGRAPH 2013. Will there be Internet access at the room? I was wondering if we might be able to doing a google hangout and try out the live broadcast option. If this was possible I might be able to do a slot right here from my desk :-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Viewer QT Freeze (refresh problem).
Hi, Same problem using osg 3.0.1-rc3hummm Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54869#54869 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg 3.0.1 Windows: GUIEventAdapter.getUnmodifiedKey() always returning 0 ?
Hi I added this piece of code into a GUI event handler on OSG 3.0.1 My intention was to react to presses of shift-0 through shift-9 in a way that does not depend on the current keyboard layout. if (ea.getModKeyMask() osgGA::GUIEventAdapter::MODKEY_LEFT_SHIFT || ea.getModKeyMask() osgGA::GUIEventAdapter::MODKEY_RIGHT_SHIFT) { fprintf(stderr, Shift-something was pressed! key code %d (unmodified code %d)\n, ea.getKey(), ea.getUnmodifiedKey()); } the issue is that ea.getUnmodifiedKey() returns 0. Could it be that the necessary support for this feature is not available on Windows, or on OSG 3.0.1 stable? Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Viewer QT Freeze (refresh problem).
Hi Dario, I don't know what might be going wrong. Do the non Qt OSG examples work fine? You don't say anything about the hardware and OS you using, this might be an issue - for instance Intel drivers are well known for being buggy. The only other thing I can suggest is to run the viewer SingleThreaded or to try out OSG svn/trunk as it contains various improvements including to osgQt. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg 3.0.1 Windows: GUIEventAdapter.getUnmodifiedKey() always returning 0 ?
Hi Christian, On 25 June 2013 10:22, Christian Buchner christian.buch...@gmail.com wrote: Hi I added this piece of code into a GUI event handler on OSG 3.0.1 My intention was to react to presses of shift-0 through shift-9 in a way that does not depend on the current keyboard layout. if (ea.getModKeyMask() osgGA::GUIEventAdapter::MODKEY_LEFT_SHIFT || ea.getModKeyMask() osgGA::GUIEventAdapter::MODKEY_RIGHT_SHIFT) { fprintf(stderr, Shift-something was pressed! key code %d (unmodified code %d)\n, ea.getKey(), ea.getUnmodifiedKey()); } the issue is that ea.getUnmodifiedKey() returns 0. I used the UnmodifiedKey functionality in my recent work on Keystone correction and it worked fine for me under Linux, I haven't tested under Windows though as I don't have a Windows box here. Could it be that the necessary support for this feature is not available on Windows, or on OSG 3.0.1 stable? I've checked 3.0.1's GraphicsWindowWin32.cpp and I can't spot any chances related the unmodified key. I'm not a Windows users or knowledgable about Windows so will have to defer to Windows devs for getting to the bottom of the problem, for sure you shouldn't be getting 0. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg 3.0.1 Windows: GUIEventAdapter.getUnmodifiedKey() always returning 0 ?
I am doing some Qt integration, which might complicate things. class OpenGLScene : public QGraphicsScene, public osgViewer::Viewer; My osg Viewer is also a QGraphicsScene and displays UI elements in a Qt Window on top of a 3D GUI rendered in osg. I should also test the ea.getUnmodifiedKey() function in a normal osg Viewer. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg 3.0.1 Windows: GUIEventAdapter.getUnmodifiedKey() always returning 0 ?
I used it on both Linux and Windows, and it's NOT always 0. 2013/6/25 Christian Buchner christian.buch...@gmail.com I am doing some Qt integration, which might complicate things. class OpenGLScene : public QGraphicsScene, public osgViewer::Viewer; My osg Viewer is also a QGraphicsScene and displays UI elements in a Qt Window on top of a 3D GUI rendered in osg. I should also test the ea.getUnmodifiedKey() function in a normal osg Viewer. Christian ___ 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] Reverse Traversal Order
Hi, Anyway, can you point me, where to find openscenegraph code for bins number sorting ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54883#54883 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Passing location-based data to a fragment shader
Hi Shahar, answers below. Sebastian Messerschmidt wrote: Hi Shahar Kosti: As you don't provide any exact numbers I can only guess. But usually I'd bind one or more textures per tile of paged set. Depending on your hardware bind of 8192x8192 textures is no problem. Can you be a bit more specific on how big the set is? Also for the hidden textures - I don't really get what you mean. My best guess is, that you mean not displayed. Therefore write a custom fragment shader and bind the data-textures along with you diffuse or whatever textures to the stateset of the tile. As the fragment shader is fully programmable, it is your choice what is done with the data. cheers Sebastian Hi Sebastian, Sorry for my late reply, it took me some time to get the data. One TXP I'm currently looking at, represents a 3000 kmĀ² area with texture resolution of 5m/pixel. Some areas have better resolution, up to 10 cm/pixel. The additional metadata has similar resolution. So obviously wouldn't fit on a single texture. Okay, so the single TXP file represents the whole area? That's kinda hard, I thought you have multiple tiles representing parts of your complete data set. Anyways, First of all, your data sets need to be aligned somehow. Regarding your suggestions, could you elaborate on the bind one or more textures per tile of paged set approach? My current approach (which doesn't work), is to intercept paged nodes using a custom ReadFileCallback, which runs a NodeVisitor. The visitor finds all Geode objects and then the underlying geometries. I can bind a new texture to these geometries, but I'm not sure how to set the values correctly. You don't really need to bind at a level this deep. Usually if the terrain tile is loaded and represent a LOD you want to work with, you can simple add your data texture(s) as uniform to the stateset of the tile. Given you have a texture with the data-image called texture you can do it this way in your callback: osg::StateSet* state_set = node-getOrCreateStateSet(); osg::Uniform* sampler = new osg::Uniform(MyDataSamper, 2 /*texture unit*/); state_set-setTextureAttribute(unit, texture ,osg::StateAttribute::ON); state_set-addUniform(sampler); With this you bind the texture to a sampler for your shader, at the texture unit 2. Depending on how many textures are already bound you might need to modify the unit. In the fragment shader you can now access the texture via: uniform sampler2D MyDataSampler .. .. main() { vec2 tex_coord = gl_TexCoord[0].st; vec4 data = texture2D(MyDataSampler, tex_coord); } Each texel in the new texture, should be set based on the world location of the corresponding texel in the current geometry texture. I'm not sure how to do that using the geometry vertex and texture coordinate indices. I hope this is clear enough. This is a different question. If your terrain-data already contains a base texture (like a satellite photo), the gl_TexCoord[0] might be matching already. If not you might want to use texture coordinate generation in the vertex shader to get world-space texture coordinates. It totally depends on your data. For a first try, I'd load a dummy texture for each tile and pass it to the gl_FragColor in the fragment shader to see how your coordinates are. cheers Sebastian Thanks for the help, Shahar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54810#54810 ___ 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] osg 3.0.1 Windows: GUIEventAdapter.getUnmodifiedKey() always returning 0 ?
A possible reason for unmodifiedKey being unavailable for me seems to be that neither QGraphicsWindowQt.cpp nor QGraphicsviewAdapter.cpp in osgQt contain any code to handle the unmodifiedKey property of osg Events. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg 3.0.1 Windows: GUIEventAdapter.getUnmodifiedKey() always returning 0 ?
On 25 June 2013 14:59, Christian Buchner christian.buch...@gmail.com wrote: A possible reason for unmodifiedKey being unavailable for me seems to be that neither QGraphicsWindowQt.cpp nor QGraphicsviewAdapter.cpp in osgQt contain any code to handle the unmodifiedKey property of osg Events. Using osgQt is the mssing bit of info that makes all the difference. While review a submission last week it came to me attention that lack of suitable code for passing on the unmodified key value. I don't believe the submission handle the task properly so hasn't been merged. Perhaps someone knowledgeable of Qt can spot how to get the unmodified key from Qt. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] screen 0 does not appear to be DRI2 capable
Hi Community, I just started after a while again on Linux, installed Ubuntu 13.04 (fresh install), installed the latest NVIDIA driver did trunk co and here is what I am getting with osgviewer cow.osg. Any clue? Thanks ! libGL: screen 0 does not appear to be DRI2 capable libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/swrast_dri.so libGL error: failed to load driver: swrast Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..) Nick -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Per-view RenderBin
Hi, I'm facing a problem : I use custom RenderBins for custom rendering, but it would be *very* convenient to be able to identity which view use this RenderBin instance. I've tought about this modification on RenderBin::createRenderBin : Code: RenderBin* RenderBin::createRenderBin(const std::string binName[b], osgUtil::CullVisitor* pCullVisitor=NULL[/b]) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list) { RenderBin* prototype = getRenderBinPrototype(binName); if (prototype) { RenderBin* pResult = dynamic_castRenderBin*(prototype-clone(osg::CopyOp::DEEP_COPY_ALL)) if (pResult != NULL) { pResult-setCullVisitor(pCullVisitor); return resultt; } } } OSG_WARN Warning: RenderBin \binName\ implementation not found, using default RenderBin as a fallback.std::endl; return new RenderBin; } This should not modify any existing code (pCullVisitor has a NULL default value) and allow to store the CullVisitor instance (which is a good way to identify a view I think) Any thought about this ? Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54891#54891 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Per-view RenderBin
Hi Aurelien, Might there be another way? Modify the core OSG just for the benefit of the one user isn't an ideal way to go. At what point do you need to determine the View? The RenderInfo object passed in when rendering has the current Camera and View. Might this be sufficient? Robert. Robert. On 25 June 2013 17:00, Aurelien Albert aurelien.alb...@alyotech.fr wrote: Hi, I'm facing a problem : I use custom RenderBins for custom rendering, but it would be *very* convenient to be able to identity which view use this RenderBin instance. I've tought about this modification on RenderBin::createRenderBin : Code: RenderBin* RenderBin::createRenderBin(const std::string binName[b], osgUtil::CullVisitor* pCullVisitor=NULL[/b]) { RenderBinPrototypeList* list = renderBinPrototypeList(); if (list) { RenderBin* prototype = getRenderBinPrototype(binName); if (prototype) { RenderBin* pResult = dynamic_castRenderBin*(prototype-clone(osg::CopyOp::DEEP_COPY_ALL)) if (pResult != NULL) { pResult-setCullVisitor(pCullVisitor); return resultt; } } } OSG_WARN Warning: RenderBin \binName\ implementation not found, using default RenderBin as a fallback.std::endl; return new RenderBin; } This should not modify any existing code (pCullVisitor has a NULL default value) and allow to store the CullVisitor instance (which is a good way to identify a view I think) Any thought about this ? Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54891#54891 ___ 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] screen 0 does not appear to be DRI2 capable
Hi Nick, I'm using Kubuntu 13.04 with Geforce 560Ti without any problems. I haven't installed the NVidia driver manually, rather just let Kubuntu pull it in when I installed. Do you manually install NVidia drivers? From the errors I'd suspect that software GL driver is being invoked. Which suggest something is amiss with picking up the NVidia driver. NVidia or Ubuntu forums would likely be the best place to chase up a solution. Robert. On 25 June 2013 17:08, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Community, I just started after a while again on Linux, installed Ubuntu 13.04 (fresh install), installed the latest NVIDIA driver did trunk co and here is what I am getting with osgviewer cow.osg. Any clue? Thanks ! libGL: screen 0 does not appear to be DRI2 capable libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/swrast_dri.so libGL error: failed to load driver: swrast Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..) Nick -- trajce nikolov nick ___ 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] screen 0 does not appear to be DRI2 capable
Hi Robert, yes, I installed the driver manually. On the web in the forums now :) ... But thanks for the hints! Nick On Tue, Jun 25, 2013 at 6:28 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Nick, I'm using Kubuntu 13.04 with Geforce 560Ti without any problems. I haven't installed the NVidia driver manually, rather just let Kubuntu pull it in when I installed. Do you manually install NVidia drivers? From the errors I'd suspect that software GL driver is being invoked. Which suggest something is amiss with picking up the NVidia driver. NVidia or Ubuntu forums would likely be the best place to chase up a solution. Robert. On 25 June 2013 17:08, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Community, I just started after a while again on Linux, installed Ubuntu 13.04 (fresh install), installed the latest NVIDIA driver did trunk co and here is what I am getting with osgviewer cow.osg. Any clue? Thanks ! libGL: screen 0 does not appear to be DRI2 capable libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/swrast_dri.so libGL error: failed to load driver: swrast Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..) Nick -- trajce nikolov nick ___ 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 -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Per-view RenderBin
Hi Robert, You're right, the RenderInfo is probably enough for my needs. Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54896#54896 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Deprecating vertex indices in osg::Geometry
Hi All, I have just checked in some further refinement to how the deprecated functionality is handled. Rather than providing a #ifdef OSG_USE_DEPRECATED_METHODS to switch on/off the compile of these deprecated methods they have been moved entirely out of osg::Geometry, and placed into a new namespace specifically to help out with compiling old code that uses the deprecated features. The new namespace is deprecated_osg, with deprecated_osg::Geometry now defined within it, this class implements the AttributeBinding_BIND_PER_PRIMITIVE and set*Indices() methods. deprecated_osg::Geometry subclasses from osg::Geometry so gets all the non deprecated functionality as well. This change will mean that code that uses Geometry::set*Indicies() or Geometry::set*Binding(osg::Geometry::BIND_PER_PRIMITIVE) will now fail to compile with a warning that these aren't available, to get these to compile you'll need to replace osg::Geometry with deprecated_osg::Geometry and everything should work. It will still be neccessary to run the Geometry::fixDeprecatedData() on these deprecated geometries. This method is called automatically by Geode::addDrawable() so often you won't need to call it. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] screen 0 does not appear to be DRI2 capable
Doing update and reinstalling the driver helped. Just for log Nick On Tue, Jun 25, 2013 at 6:31 PM, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Robert, yes, I installed the driver manually. On the web in the forums now :) ... But thanks for the hints! Nick On Tue, Jun 25, 2013 at 6:28 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Nick, I'm using Kubuntu 13.04 with Geforce 560Ti without any problems. I haven't installed the NVidia driver manually, rather just let Kubuntu pull it in when I installed. Do you manually install NVidia drivers? From the errors I'd suspect that software GL driver is being invoked. Which suggest something is amiss with picking up the NVidia driver. NVidia or Ubuntu forums would likely be the best place to chase up a solution. Robert. On 25 June 2013 17:08, Trajce Nikolov NICK trajce.nikolov.n...@gmail.com wrote: Hi Community, I just started after a while again on Linux, installed Ubuntu 13.04 (fresh install), installed the latest NVIDIA driver did trunk co and here is what I am getting with osgviewer cow.osg. Any clue? Thanks ! libGL: screen 0 does not appear to be DRI2 capable libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/swrast_dri.so libGL error: failed to load driver: swrast Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..) Nick -- trajce nikolov nick ___ 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 -- trajce nikolov nick -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Per-view RenderBin
Aurelien, I use renderBin-getStage()-getCamera()-getView(). Glenn Waldron / @glennwaldron On Tue, Jun 25, 2013 at 12:24 PM, Aurelien Albert aurelien.alb...@alyotech.fr wrote: Hi Robert, You're right, the RenderInfo is probably enough for my needs. Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54896#54896 ___ 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] Changes to osgDB::fstream
Hi Robert, Thank you for your suggestion, I didn't know it had already been completed. I downloaded the latest dev version (3.1.8) and compiled it with all of the options I need. I've removed any reference of fstream from the headers, and I still get link errors: Warning 4 warning LNK4006: public: void __thiscall std::basic_ofstreamchar,struct std::char_traitschar ::open(char const *,int,int) (?open@?$basic_ofstream@DU?$char_traits@D@std@@@std@@QAEXPBDHH@Z) already defined in Class.obj; second definition ignored osgDBd.lib(osg98-osgDBd.dll) Along with links for ::close, ::~destructor and ::basic_ofstream... I've used /FORCE:multiple to resolve it for now, but I would like to find the correct way to disable these link errors. Any suggestions would be appreciated. Thanks, Braden -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54901#54901 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] An error in the implementation of the old function void View::setUpViewInWindow in OSG-3.1.7
Hi, I have started to use the last version of OSG - 3.1.7, and I found that implementation of old function void View::setUpViewInWindow(int x, int y, int width, int height, unsigned int screenNum) has the mistake: Code: void View::setUpViewInWindow(int x, int y, int width, int height, unsigned int screenNum) { apply(new osgViewer::SingleWindow(x,y,width,screenNum)); } It means that number of monitor (screenNum) is used as the height of window - default is 0 - it means that height of window will be the same like height of primary Screen. The better resolving is: Code: void View::setUpViewInWindow(int x, int y, int width, int height, unsigned int screenNum) { apply(new osgViewer::SingleWindow(x,y,width, height,screenNum)); } I think, that it will be better to say about this bug to senior developers. Thank you! Cheers, Evgeny Code: -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54902#54902 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org