Re: [osg-users] cull setting inheritance
Good morning, On Tuesday 04 March 2008 16:13, Robert Osfield wrote: It a matter of expediency and history, reusing the CullSettings class in various roles rather than creating different classes that store the same parameters. The history comes down to how the OSG has evolved with new capabilities being dovetailed into existing classes or collaborating with different classes whilest trying to minimize the amount of existing user code that might break as consequence of this evolution. This does lead to some code not always being perfect from all perspectiveness. I will go ahead an merge the change, but since we have the old code in place still we can always revert amend as required. Sure, I know ... I do not think that the inheritance mask move will break much. Anyway, looking at that amount of CullSettings we have in osg/osgViewer, I am somehow curious how it works. osg has Cull settings that serve as base setting for a View, right? These CullSettings just reside in the Master Camera of a view? Or do the master settings reside in the SceneView that is contained in the Renderer? Then on cull the SceneView copies the CullSettings into the CullVisitor. The CullVisitor enters the topmost Camera and inherits the cull settings from that Camera according to the top Cameras mask. The child Cameras use their own CullSettings according to their masks. Looking at the current implementation it is unclear to me where the topmost CullSettings reside? Also it is unclear to me why the topmost settings need an inheritance mask. As well as the CullVisitors cull settings. It would be more clear to me if the cull settings are just copied from the master source to the cull visitor before traversal. Then as the cull visitor hits a camera - including the topmost one - the cull visitors settings are partly overwritten by the camera according to the cameras inheritance mask. I believe that it is worth streamlining that a bit. Using that code would be much more clear then - at least to me :) GReetings MAthias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Wavefront OBJ Material Names appear to get lost when read. (UNCLASSIFIED)
On Tue, Mar 4, 2008 at 8:04 PM, Day, Michael A. AMRDEC/SimTech [EMAIL PROTECTED] wrote: Howdy, I searched the mailing lists, FAQs, Wikis, etc. and could not find anything on this. When OSG load .obj files, the material name appears to get lost from the state set. I noticed someone had a similar problem with 3DS files some time ago (see text after my sig). Can anyone confirm that this issue has not already been brought up/resolved? I don't recall anyone raising this as an issue relating to the OBJ loader. Almost all the plugins are contributions from the community, and ongoing contributions tend to come from the community as well - this means that if the names are missing then no one yet has seen a need for them to be mapped over. If you do have a need yourself feel to dig into the OBJ loader code and see what its doing, and make changes which you think are appropriate - if they look sensible then I'll merge them with SVN. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem when create a button in openscenegraph
On Wed, Mar 5, 2008 at 3:13 AM, Tran Thanh Hiep [EMAIL PROTECTED] wrote: hi all ,in my project i create a button as CButton of mfc. i have a problem in function mousein and mouseout when i change state of object button program break down The OSG has nothing really to do with widgets in 3rd party GUI's like MFC, so if you have a problem with such a 3rd party GUI then I'd recommend reviewing documentation or checking with communities that develop support them. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] cull setting inheritance
Hi Mathias, The inheritance of state, transforms and cull settings should all be down top down, so the highest objects in the OSG world being the view(er) then the view's Camera's, then the scene graph below them - this is public face of the scene graph. The rendering traversal is just a back end feature that just needs to honour that relationship of settings provided in the public face. If the rendering back end doesn't honour this then it needs fixing, the change I made yesterday I feel is a step in this direction. As for worrying about the fact that a topmost CullSetting still has a inhertiance mask, well that's fine by me, even if its a non op. Perhaps in the future we might add an even high level CullSetting that get inherited down to the viewer. How knows, I certainly don't. As for implementations, if they are broke then I'll go help fix them, but changing things to streamline them is something that is way down on my set of priorities. Bug fixes, completing existing features and getting the next releases of OSG and VPB out the door is what is critical for me right now. Robert. On Wed, Mar 5, 2008 at 8:17 AM, Mathias Fröhlich [EMAIL PROTECTED] wrote: Good morning, On Tuesday 04 March 2008 16:13, Robert Osfield wrote: It a matter of expediency and history, reusing the CullSettings class in various roles rather than creating different classes that store the same parameters. The history comes down to how the OSG has evolved with new capabilities being dovetailed into existing classes or collaborating with different classes whilest trying to minimize the amount of existing user code that might break as consequence of this evolution. This does lead to some code not always being perfect from all perspectiveness. I will go ahead an merge the change, but since we have the old code in place still we can always revert amend as required. Sure, I know ... I do not think that the inheritance mask move will break much. Anyway, looking at that amount of CullSettings we have in osg/osgViewer, I am somehow curious how it works. osg has Cull settings that serve as base setting for a View, right? These CullSettings just reside in the Master Camera of a view? Or do the master settings reside in the SceneView that is contained in the Renderer? Then on cull the SceneView copies the CullSettings into the CullVisitor. The CullVisitor enters the topmost Camera and inherits the cull settings from that Camera according to the top Cameras mask. The child Cameras use their own CullSettings according to their masks. Looking at the current implementation it is unclear to me where the topmost CullSettings reside? Also it is unclear to me why the topmost settings need an inheritance mask. As well as the CullVisitors cull settings. It would be more clear to me if the cull settings are just copied from the master source to the cull visitor before traversal. Then as the cull visitor hits a camera - including the topmost one - the cull visitors settings are partly overwritten by the camera according to the cameras inheritance mask. I believe that it is worth streamlining that a bit. Using that code would be much more clear then - at least to me :) GReetings MAthias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ 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] problem when create a button in openscenegraph
Hi Tran , Please note that you must change the state of an object in a protected ( i.e. update ) portion of your OSG code . Maybe MFC has nothing to do with your problem. Regards Rémy Tran Thanh Hiep a écrit : hi all ,in my project i create a button as CButton of mfc. i have a problem in function mousein and mouseout when i change state of object button program break down Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ%20 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3dconnexion for windows
The point is that it is not obvious to me how you convert the rotation information from the 3Dconnexion driver into an osg rotation... Dieter Pfeffer a écrit : Hi I don' t use a MatrixManipulator but would like to set the camera viewmatrix: viewer.getCamera()-setViewMatrix (vMatrix * osg::Matrix::rotate (-(osg::PI_2),1,0,0)); with tMatrix = rot * trans; vMatrix = tMatrix.inverse (tMatrix); Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rémy Deslignes Sent: Tuesday, 04 March, 2008 11:02 To: OpenSceneGraph Users Subject: Re: [osg-users] 3dconnexion for windows I guess that this is deeply related to the MatrixManipulator you are using . What MM are you using ? Please also note that there is a setting in the 3D connexion driver to set the translation as dominant . Rémy Dieter Pfeffer a écrit : Hi has s.o. implemented the 3dconnexion input device and can give me a hint (or source) how to match it to the viewmatrix in osg. I have no problems in translation but I can't figure out how to set the corrrect rotation. If I use only heading it's correct but not heading and pitch together. Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ 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 --- Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem when create a button in openscenegraph
hi Robert Osfield and rdeslignes I create my button with an 3d object. it is a child of camrea node, when i click this button and i want change state of it. but when and change state of node with nodevisitor program break and down R�my Deslignes [EMAIL PROTECTED] wrote: Hi Tran , Please note that you must change the state of an object in a protected ( i.e. update ) portion of your OSG code . Maybe MFC has nothing to do with your problem. Regards R�my Tran Thanh Hiep a �crit : hi all ,in my project i create a button as CButton of mfc. i have a problem in function mousein and mouseout when i change state of object button program break down Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org - Never miss a thing. Make Yahoo your homepage.___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3dconnexion for windows
I have used the 3dconnexion cityfly example (function: SbMotionEvent) - one try: eye_to_world matrix as vMatrix or: MatrixToHpr (rot, eye_to_world) //(extracting the rotation from the matrix) but this is not really osg; my idea was whether s.o. has implemented it in osg and could give me a hint how to get the rotation and set the viewmatrix Thanks Mike - I will have a look at osgVRPN Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rémy Deslignes Sent: Wednesday, 05 March, 2008 10:40 To: OpenSceneGraph Users Subject: Re: [osg-users] 3dconnexion for windows The point is that it is not obvious to me how you convert the rotation information from the 3Dconnexion driver into an osg rotation... Dieter Pfeffer a écrit : Hi I don' t use a MatrixManipulator but would like to set the camera viewmatrix: viewer.getCamera()-setViewMatrix (vMatrix * osg::Matrix::rotate (-(osg::PI_2),1,0,0)); with tMatrix = rot * trans; vMatrix = tMatrix.inverse (tMatrix); Dieter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Rémy Deslignes Sent: Tuesday, 04 March, 2008 11:02 To: OpenSceneGraph Users Subject: Re: [osg-users] 3dconnexion for windows I guess that this is deeply related to the MatrixManipulator you are using . What MM are you using ? Please also note that there is a setting in the 3D connexion driver to set the translation as dominant . Rémy Dieter Pfeffer a écrit : Hi has s.o. implemented the 3dconnexion input device and can give me a hint (or source) how to match it to the viewmatrix in osg. I have no problems in translation but I can't figure out how to set the corrrect rotation. If I use only heading it's correct but not heading and pitch together. Thanks Dieter Unclassified Mail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ 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 -- - Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. Aucun virus connu a ce jour par nos services n'a ete detecte. -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 === Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr === ___ 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] [Re: to draw landscapes beginning from a matrix]
Hi! why getGeometry doesn't it work? during the execution it launches an exception. my code is: osgTerrain::GeometryTechnique* geometryTechnique = new osgTerrain::GeometryTechnique(); terrainNode-setTerrainTechnique(geometryTechnique); osg::Vec3d center= geometryTechnique-computeCenterModel(terrainNode-getLocator()); osgTerrain::Locator* locator= terrainNode-getLocator(); geometryTechnique-generateGeometry(locator, center); Thanks Aurora ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] example osgterrain.cpp
Hi Robert! I don't want to know how this file is made, on the contrary where I can find it to perform the example osgterrain.cpp passing the file in commandline, as the same example requires. Thanks Aurora Robert Osfield ha scritto: On Tue, Mar 4, 2008 at 3:43 PM, aurora restivo [EMAIL PROTECTED] wrote: Hi! in the example osgterrain there is an object masterOperation; it takes in input a string masterFilename... where can I find this file? Its file you provide via the -m masterfile option on the commandline. This feature of osgterrain is rather advanced section where is does loading of terrain data in a back ground there and compiles it in compile context with its own compile thread. I wouldn't recommend getting into this code until you are very versed in the OSG and threading. Robert. ___ 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] PagedLOD and DatabasePager API
hi all, i'm working on model-paging in flightgear. it works fine so far, but i had to introduce some quirks to get around the limited hooks in PagedLOD and DatabasePager. so i'd like to propose a few changes to PagedLOD and DatabasePager APIs. 1. DatabasePager: requestNodeFile (const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp, ReaderWriter::Options *loadOptions) should be published published in osg::NodeVisitor::DatabaseRequestHandler so that loadOptions can be set separately for each PagedLOD. 2. PagedLOD: i suggest adding a new virtual function in PagedLOD: requestNodeFile(osg::NodeVisitor::DatabaseRequestHandler *dbrh, const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp). in PagedLOD::traverse(osg::NodeVisitor nv) this function should be called, so a subclass can modify the call to the DatabaseRequestHandler::requestNodeFile(), as described above. the default implementation could just do what it does now. i.e. call osg::NodeVisitor::DatabaseRequestHandler::requestNodeFile (const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp) with no special loadOptions. 3. DatabasePager looking through the archives i have found other people needing a hook in addLoadedDataToSceneGraph(). should we add one? i now think i could just as well reimplement PagedLOD::addChild() to see when a new child gets paged in. if you are in support of 1 and 2 i'd be happy to prepare the modified files and send them. cheers, -till p.s. sorry. it is really hard to describe such things with words ;-) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] example osgterrain.cpp
On Wed, Mar 5, 2008 at 11:44 AM, aurora restivo [EMAIL PROTECTED] wrote: I don't want to know how this file is made, on the contrary where I can find it to perform the example osgterrain.cpp passing the file in commandline, as the same example requires. There isn't an public example file available. The files I've used for it are were put together for testing of multi-threading usage of osgTerrain and compile contexts. The test files I used just contained a list of external .osg files that are loaded by the background thread - that is only created when you use the appropriate options. I'm afraid you're looking at something parts of the example that I wrote as a unit test, rather than introductory text part, I don't recommend looking too deeply into these parts till you are ready to go do multi-threaded apps. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
Hi Till, You could you explain the motivation behind these changes, i.e. what problem do they solve that is currently limiting your work? It may well be another solution to the problems you are solving, or it may be that are refactor elsewhere or in a differnt form is more appropriate, but without more information about the problem you are trying to solve its impossible to know. Robert. On Wed, Mar 5, 2008 at 11:58 AM, till busch [EMAIL PROTECTED] wrote: hi all, i'm working on model-paging in flightgear. it works fine so far, but i had to introduce some quirks to get around the limited hooks in PagedLOD and DatabasePager. so i'd like to propose a few changes to PagedLOD and DatabasePager APIs. 1. DatabasePager: requestNodeFile (const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp, ReaderWriter::Options *loadOptions) should be published published in osg::NodeVisitor::DatabaseRequestHandler so that loadOptions can be set separately for each PagedLOD. 2. PagedLOD: i suggest adding a new virtual function in PagedLOD: requestNodeFile(osg::NodeVisitor::DatabaseRequestHandler *dbrh, const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp). in PagedLOD::traverse(osg::NodeVisitor nv) this function should be called, so a subclass can modify the call to the DatabaseRequestHandler::requestNodeFile(), as described above. the default implementation could just do what it does now. i.e. call osg::NodeVisitor::DatabaseRequestHandler::requestNodeFile (const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp) with no special loadOptions. 3. DatabasePager looking through the archives i have found other people needing a hook in addLoadedDataToSceneGraph(). should we add one? i now think i could just as well reimplement PagedLOD::addChild() to see when a new child gets paged in. if you are in support of 1 and 2 i'd be happy to prepare the modified files and send them. cheers, -till p.s. sorry. it is really hard to describe such things with words ;-) ___ 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] PagedLOD and DatabasePager API
hi robert, in flightgear we have xml-files that describe models. the code that reads these files needs options passed in: osg::Node * sgLoad3DModel( const string fg_root, const string path, SGPropertyNode *prop_root, double sim_time_sec, osg::Node *(*load_panel) (SGPropertyNode *), SGModelData *data, const SGPath externalTexturePath ) for DatabasePager to work in flightgear i have added a ReaderWriterXML with ReaderWriterXMLOptions that carry the parameters the above function needs. this is how model paging works right now: i have subclassed PagedLOD to SGPagedLOD ReaderWriterOptions (with the parameters above) are stored in SGPagedLOD nodes. i have copy-pasted PagedLOD::traverse(osg::NodeVisitor nv) to SGPagedLOD and added ReaderWriterOptions to the requestNodeFile() call in there (casting the DatabaseRequestHandler to a DatabasePager, first). the good thing is that the databaseRequests themselves already contain a ReaderWriterOptions-object per request. so i didn't need to change anything in DatabasePager. cheers, -till On Wednesday 05 March 2008, Robert Osfield wrote: Hi Till, You could you explain the motivation behind these changes, i.e. what problem do they solve that is currently limiting your work? It may well be another solution to the problems you are solving, or it may be that are refactor elsewhere or in a differnt form is more appropriate, but without more information about the problem you are trying to solve its impossible to know. Robert. On Wed, Mar 5, 2008 at 11:58 AM, till busch [EMAIL PROTECTED] wrote: hi all, i'm working on model-paging in flightgear. it works fine so far, but i had to introduce some quirks to get around the limited hooks in PagedLOD and DatabasePager. so i'd like to propose a few changes to PagedLOD and DatabasePager APIs. 1. DatabasePager: requestNodeFile (const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp, ReaderWriter::Options *loadOptions) should be published published in osg::NodeVisitor::DatabaseRequestHandler so that loadOptions can be set separately for each PagedLOD. 2. PagedLOD: i suggest adding a new virtual function in PagedLOD: requestNodeFile(osg::NodeVisitor::DatabaseRequestHandler *dbrh, const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp). in PagedLOD::traverse(osg::NodeVisitor nv) this function should be called, so a subclass can modify the call to the DatabaseRequestHandler::requestNodeFile(), as described above. the default implementation could just do what it does now. i.e. call osg::NodeVisitor::DatabaseRequestHandler::requestNodeFile (const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp) with no special loadOptions. 3. DatabasePager looking through the archives i have found other people needing a hook in addLoadedDataToSceneGraph(). should we add one? i now think i could just as well reimplement PagedLOD::addChild() to see when a new child gets paged in. if you are in support of 1 and 2 i'd be happy to prepare the modified files and send them. cheers, -till p.s. sorry. it is really hard to describe such things with words ;-) ___ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] cull setting inheritance
Hi Robert, On Wednesday 05 March 2008 10:35, Robert Osfield wrote: The inheritance of state, transforms and cull settings should all be down top down, so the highest objects in the OSG world being the view(er) then the view's Camera's, then the scene graph below them - this is public face of the scene graph. The rendering traversal is just a back end feature that just needs to honour that relationship of settings provided in the public face. If the rendering back end doesn't honour this then it needs fixing, the change I made yesterday I feel is a step in this direction. Ok, that sounds good. But the View does not have CullSettings itself. So, which one is currently the View's 'master setting' before the cull visitor will hit the topmost Camera with its settings and mask? Well this is an offer to help, not a demand to make you code something! Tell me what you like ... Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] General Question about setAttribute and removeAttribute
Hi folks, just some thoughts about texture attributes (or all other attributes in general): If we first setup a texture attribute on a StateSet, lets say for the texture unit 0. After some time we remove this attribute and assign it to texture unit 1. This would end up in the texture bounded to texture unit 0 and 1, since there is no explicit call like : glActiveTexture(GL_TEXTURE0) + glBindTexture(.., 0) to unbind the texture from the unit 0. Shouldn't there be a method like, unbound texture unit x ? Currently I do this always manually if I need it, however this can not be the solution ;-) Best regards, Art __ Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker. www.yahoo.de/clever ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] General Question about setAttribute and removeAttribute
HI Art, OpenGL doesn't have a concept of unbinding attributes, and neither does the OSG. OpenGL has the concept of enabling and disabling via mode, and the OSG maps this via StateSet::setMode(..) and setTexureMode(uint unit,...); My guess is that you are looking for : statest-setTextureMode(1, GL_TEXTURE_2D, osg::StateAttribute::OFF); Which effectively disables the second texture unit. Robert. On Wed, Mar 5, 2008 at 12:25 PM, Art Tevs [EMAIL PROTECTED] wrote: Hi folks, just some thoughts about texture attributes (or all other attributes in general): If we first setup a texture attribute on a StateSet, lets say for the texture unit 0. After some time we remove this attribute and assign it to texture unit 1. This would end up in the texture bounded to texture unit 0 and 1, since there is no explicit call like : glActiveTexture(GL_TEXTURE0) + glBindTexture(.., 0) to unbind the texture from the unit 0. Shouldn't there be a method like, unbound texture unit x ? Currently I do this always manually if I need it, however this can not be the solution ;-) Best regards, Art __ Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker. www.yahoo.de/clever ___ 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] RE Plugin loading problems....
Hi All, I think I can now shed some more light on this problem, and perhaps I have found a potential bug. In the last update to this issue I had tracked the problem down to something to do with osgSim not wanting to load as a dependency of osgDB_ive.dll - and osgDB_flt.dll. On further investigation I think this is ultimately the issue. If in my ActiveX control I force an explicit, fully qualified dynamic load to osgSim, and then try saving as an ive file, everything is fine and all works. However, if I don't force the explicit load, the save fails as the plugin dlls for the ive format fails to load because it fails to load the osgSim dll. In order to get around this issue I forced an explicit linkage to osgSim in my activeX control - merely by creating and deleteing an osgSim::LightPoint object. The ActiveX control subsequently needed to link to osgSim, and hence when the control starts, osgSim is loaded - not as part of the plugin process , but as a consequence of the control loading up. When I now save as an ive file everything is fine. Clearly there is an issue, with osgSim loading as a consequence of a plugin, rather than an explicit linkage. Any thoughts ? Neil ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] General Question about setAttribute and removeAttribute
Hi Robert, yes this is one of the solutions, however I am wondering why this is not done automagically by the removeAttribute method? However I also found what I have also looked for. If I just add an empty texture to the stateset (stateset-setTextureAttribute(X, new osg::Texture2D()); this will just bind the texture with id 0 to the unit, which is per default always returns 0. Thank you. cheers, Art --- Robert Osfield [EMAIL PROTECTED] schrieb: HI Art, OpenGL doesn't have a concept of unbinding attributes, and neither does the OSG. OpenGL has the concept of enabling and disabling via mode, and the OSG maps this via StateSet::setMode(..) and setTexureMode(uint unit,...); My guess is that you are looking for : statest-setTextureMode(1, GL_TEXTURE_2D, osg::StateAttribute::OFF); Which effectively disables the second texture unit. Robert. On Wed, Mar 5, 2008 at 12:25 PM, Art Tevs [EMAIL PROTECTED] wrote: Hi folks, just some thoughts about texture attributes (or all other attributes in general): If we first setup a texture attribute on a StateSet, lets say for the texture unit 0. After some time we remove this attribute and assign it to texture unit 1. This would end up in the texture bounded to texture unit 0 and 1, since there is no explicit call like : glActiveTexture(GL_TEXTURE0) + glBindTexture(.., 0) to unbind the texture from the unit 0. Shouldn't there be a method like, unbound texture unit x ? Currently I do this always manually if I need it, however this can not be the solution ;-) Best regards, Art __ Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker. www.yahoo.de/clever ___ 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 Lesen Sie Ihre E-Mails auf dem Handy. www.yahoo.de/go ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Threading problems when setting up viewer window
Hello Robert, Robert Osfield wrote: This suggests that display being used is the incorrect one for the thread you are doing it from. This is something osgViewer::GraphicsWindowX11 should manage internally though, so this is a bug that needs to be better solved than it is now. A proper fix will need to better manage the two Display's that GraphicsWindowX11 maintained - one for the graphics thread and one for the main thread - this one is for events etc. Ok As a quick workaround in your code could call viewer.stopThreading(); doTheWindowResizeCode; viewer.startThreading(); Thanks, that works... Is there an core OSG example that we can piggyback you code on to illustrate this problem? I'm think of been able to get something that reproduces the problem checked into the core OSG so we can use it as a unit test for this problem. The osgcompositeviewer currently also sets its window size at startup, but uses a different method. Looks like it gives the window a specific size at creation time, instead of resizing it after creation. Perhaps that one is suitable? But do you see a way to make this into a unit test that can be run automatically? I guess it would be more of a manual thing: try to run it and see if any X errors/crashes occur. Paul Robert. On Tue, Mar 4, 2008 at 10:42 AM, Paul Melis [EMAIL PROTECTED] wrote: I'm using the code below to give the viewer window a specific size at startup (for movie capturing purposes). See the attached file based on applications/osgviewer.cpp, to which I added this piece of code. ... viewer.realize(); osgViewer::Viewer::Windows windows; viewer.getWindows(windows); for (osgViewer::Viewer::Windows::iterator it = windows.begin(); it != windows.end(); ++it) { (*it)-setWindowDecoration(true); (*it)-setWindowRectangle(10, 10, 960, 540); } ... This works fine if the threading model is set to SingleThreaded, but with the default threading model (which I seem to remember is multi-threaded in some way) I get all kinds of trouble ranging from errors like Xlib: unexpected async reply (sequence 0x2c)! + a hanging program to an X server crash in the worst case. This is with a very recent SVN version. Paul ___ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
Hi Till, To summerise (just to double check I know where you coming form): 1) You have your own loaded that requires more information that can be encoded into a std::string via the filename. 2) This extra information is per Node rather so can't use the osgDB::Registry one, but must be assigned to each PagedLOD (or subclass thereof). 3) The DatabaseRequestHandler needs extending to allow one to pass this info to DatabasePager. Looking at your original suggested changes, I understand the motivation, but... also see that wanting to extend osg::NodeVisitor::DatabaseRequestHandler with a class from osgDB is problematic. The core OSG knows nothing of osgDB, if you were to add such a reference you'd have a circular library reference. Ouch, so right away I can say the suggestion isn't viable. The closest you could get is to have a a osg::Referenced* pointer passed as an extra parameter into DatabaseRequestHandler, and have this pointer dynamically cast to a ReaderWriter::Option*. One could possible pass the PagedLOD's UserData to the DatabaseRequestHandler. Or perhaps one could just use a modification to the DatabaseRequestHandler implementation to do a getUseData from the Group* passed in. Robert. On Wed, Mar 5, 2008 at 12:27 PM, till busch [EMAIL PROTECTED] wrote: hi robert, in flightgear we have xml-files that describe models. the code that reads these files needs options passed in: osg::Node * sgLoad3DModel( const string fg_root, const string path, SGPropertyNode *prop_root, double sim_time_sec, osg::Node *(*load_panel) (SGPropertyNode *), SGModelData *data, const SGPath externalTexturePath ) for DatabasePager to work in flightgear i have added a ReaderWriterXML with ReaderWriterXMLOptions that carry the parameters the above function needs. this is how model paging works right now: i have subclassed PagedLOD to SGPagedLOD ReaderWriterOptions (with the parameters above) are stored in SGPagedLOD nodes. i have copy-pasted PagedLOD::traverse(osg::NodeVisitor nv) to SGPagedLOD and added ReaderWriterOptions to the requestNodeFile() call in there (casting the DatabaseRequestHandler to a DatabasePager, first). the good thing is that the databaseRequests themselves already contain a ReaderWriterOptions-object per request. so i didn't need to change anything in DatabasePager. cheers, -till On Wednesday 05 March 2008, Robert Osfield wrote: Hi Till, You could you explain the motivation behind these changes, i.e. what problem do they solve that is currently limiting your work? It may well be another solution to the problems you are solving, or it may be that are refactor elsewhere or in a differnt form is more appropriate, but without more information about the problem you are trying to solve its impossible to know. Robert. On Wed, Mar 5, 2008 at 11:58 AM, till busch [EMAIL PROTECTED] wrote: hi all, i'm working on model-paging in flightgear. it works fine so far, but i had to introduce some quirks to get around the limited hooks in PagedLOD and DatabasePager. so i'd like to propose a few changes to PagedLOD and DatabasePager APIs. 1. DatabasePager: requestNodeFile (const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp, ReaderWriter::Options *loadOptions) should be published published in osg::NodeVisitor::DatabaseRequestHandler so that loadOptions can be set separately for each PagedLOD. 2. PagedLOD: i suggest adding a new virtual function in PagedLOD: requestNodeFile(osg::NodeVisitor::DatabaseRequestHandler *dbrh, const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp). in PagedLOD::traverse(osg::NodeVisitor nv) this function should be called, so a subclass can modify the call to the DatabaseRequestHandler::requestNodeFile(), as described above. the default implementation could just do what it does now. i.e. call osg::NodeVisitor::DatabaseRequestHandler::requestNodeFile (const std::string fileName, osg::Group *group, float priority, const osg::FrameStamp *framestamp) with no special loadOptions. 3. DatabasePager looking through the archives i have found other people needing a hook in addLoadedDataToSceneGraph(). should we add one? i now think i could just as well reimplement PagedLOD::addChild() to see when a new child gets paged in. if you are in support of 1 and 2 i'd be happy to prepare the modified files and send them. cheers, -till p.s. sorry. it is really hard to describe such things with words ;-) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] cull setting inheritance
On Wed, Mar 5, 2008 at 12:34 PM, Mathias Fröhlich [EMAIL PROTECTED] wrote: But the View does not have CullSettings itself. Sorry, trying to do a quick reply without doing background research. So, which one is currently the View's 'master setting' before the cull visitor will hit the topmost Camera with its settings and mask? The view's master Camera is the topmost object controlling cull settings, this decorates any slave camera, and then this is passed on to SceneView that passes it on to the CullVisitor in turn. Well this is an offer to help, not a demand to make you code something! Tell me what you like ... To leave this exactly as they are unless there is an actual bug. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RE Plugin loading problems....
Hi Neil, Which version of the OSG are you working with? I have just checked the SVN version of the CmakeLists.txt for ive and OpenFlight plugins and both correctly list osgSim as part of the list of dependencies. Unless the build system isn't working this should ensure that the libs are linked in correctly. The association with ActiveX is not something I have any expertise in, but normally one would have expected loading of libraries to be orthogonal to this, but perhaps MS have overridden the usual .dll loading mechanism and are doing something odd. The only likely room for an OSG bug would be in the build system and not linking osgSim.lib/dll as required. From the sound of it it does look like a MS bug of kind though. Robert. On Wed, Mar 5, 2008 at 12:45 PM, [EMAIL PROTECTED] wrote: Hi All, I think I can now shed some more light on this problem, and perhaps I have found a potential bug. In the last update to this issue I had tracked the problem down to something to do with osgSim not wanting to load as a dependency of osgDB_ive.dll - and osgDB_flt.dll. On further investigation I think this is ultimately the issue. If in my ActiveX control I force an explicit, fully qualified dynamic load to osgSim, and then try saving as an ive file, everything is fine and all works. However, if I don't force the explicit load, the save fails as the plugin dlls for the ive format fails to load because it fails to load the osgSim dll. In order to get around this issue I forced an explicit linkage to osgSim in my activeX control - merely by creating and deleteing an osgSim::LightPoint object. The ActiveX control subsequently needed to link to osgSim, and hence when the control starts, osgSim is loaded - not as part of the plugin process , but as a consequence of the control loading up. When I now save as an ive file everything is fine. Clearly there is an issue, with osgSim loading as a consequence of a plugin, rather than an explicit linkage. Any thoughts ? Neil ___ 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] General Question about setAttribute and removeAttribute
On Wed, Mar 5, 2008 at 12:48 PM, Art Tevs [EMAIL PROTECTED] wrote: Hi Robert, yes this is one of the solutions, however I am wondering why this is not done automagically by the removeAttribute method? Because removeAttribute removes an attribute not any modes. However I also found what I have also looked for. If I just add an empty texture to the stateset (stateset-setTextureAttribute(X, new osg::Texture2D()); this will just bind the texture with id 0 to the unit, which is per default always returns 0. Ack, please just disable the texture mode. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
On Wednesday 05 March 2008 13:51, Robert Osfield wrote: The closest you could get is to have a a osg::Referenced* pointer passed as an extra parameter into DatabaseRequestHandler, and have this pointer dynamically cast to a ReaderWriter::Option*. One could possible pass the PagedLOD's UserData to the DatabaseRequestHandler. Or perhaps one could just use a modification to the DatabaseRequestHandler implementation to do a getUseData from the Group* passed in. May be a pointer to just that PagedLOD Node the request is comming from? Then the loader can ask for user data on that node or dynamic upcaast the PagedLOD pointer to whatever it expects to be? Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
On Wed, Mar 5, 2008 at 1:13 PM, Mathias Fröhlich [EMAIL PROTECTED] wrote: On Wednesday 05 March 2008 13:51, Robert Osfield wrote: The closest you could get is to have a a osg::Referenced* pointer passed as an extra parameter into DatabaseRequestHandler, and have this pointer dynamically cast to a ReaderWriter::Option*. One could possible pass the PagedLOD's UserData to the DatabaseRequestHandler. Or perhaps one could just use a modification to the DatabaseRequestHandler implementation to do a getUseData from the Group* passed in. May be a pointer to just that PagedLOD Node the request is comming from? Then the loader can ask for user data on that node or dynamic upcaast the PagedLOD pointer to whatever it expects to be? This Group* pointer passed in by requestNode will be the PagedLOD in question, so this is already there. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
On Wednesday 05 March 2008 14:20, Robert Osfield wrote: This Group* pointer passed in by requestNode will be the PagedLOD in Thanks! So, Till should you take this one? Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
hi mathias, On Wednesday 05 March 2008, Mathias Fröhlich wrote: On Wednesday 05 March 2008 14:20, Robert Osfield wrote: This Group* pointer passed in by requestNode will be the PagedLOD in well. i'd really like to avoid replacing the DatabasePager in osgviewer, since the one that is there by default already provides all i need. and unless i overlooked something obvious, i'd need to do just that. -till ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
On Wednesday 05 March 2008, Robert Osfield wrote: Hi Till, To summerise (just to double check I know where you coming form): 1) You have your own loaded that requires more information that can be encoded into a std::string via the filename. yes 2) This extra information is per Node rather so can't use the osgDB::Registry one, but must be assigned to each PagedLOD (or subclass thereof). exactly. 3) The DatabaseRequestHandler needs extending to allow one to pass this info to DatabasePager. yeah. that's what i thought. but of course i ignored the fact that these are separete libraries. so no option. what about just making the requestNodeFile through a virtual function in PagedLOD then. i'll happily cast the DatabaseRequestHandler to a DatabasePager in there. i need to subclass PagedLOD anyway. and that would remove the need to reimplemnt traverse() which is a rather complex function. - till ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
On Wednesday 05 March 2008 14:52, till busch wrote: well. i'd really like to avoid replacing the DatabasePager in osgviewer, since the one that is there by default already provides all i need. and unless i overlooked something obvious, i'd need to do just that. Hmm, I have overlooked something I guess ... What about a callback funktion in the request handler that gets the PagedLOD Node and returns an options instance? You would then check in that callback if it is a flightgear LOD Node and if so return the options belonging to that aircraft model instead of taking the default registries options? Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Florian Geyer, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Prof. Dr. Hanns Ruder Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
hi, as tim moore told me (off-list), we already have a subclass of DatabasePager in flightgear. so i took the solution to reimplement requestNodeFile() there, with a dynamic_cast from osg::Group to SGPagedLOD. nonetheless i still think that a function in PagedLOD would be nice... the issue solved for my purpose, thanks for all input to robert, mathias and tim -till ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fixes for VRML2 plugin
* Gino van den Bergen -- Wednesday 05 March 2008: 1) Full DOS paths are now correctly opened by OpenVRML. A URL containing a DOS path should be file:///C:data/blah rather than file://C:data/blah. AFAIK the first is right and the second is wrong. I don't know how the C: is handled (as a dir or as a prefix to the first dir name), but apart from that the syntax is supposed to look like this: file://hostname/C:data/blah ... whereby a localhost can be left away: file:///C:data/blah... which can be shortened to: file:/C:data/blah But file://C:data/blah is most certainly wrong. m. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD and DatabasePager API
On Wed, Mar 5, 2008 at 4:47 PM, till busch [EMAIL PROTECTED] wrote: hi, as tim moore told me (off-list), we already have a subclass of DatabasePager in flightgear. so i took the solution to reimplement requestNodeFile() there, with a dynamic_cast from osg::Group to SGPagedLOD. nonetheless i still think that a function in PagedLOD would be nice... What function do you have in mind? the issue solved for my purpose, Good to hear. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fullscreen Flickering without windowDecoration
Hi, I get a flickering problem on windows xp when I display a full screen window with a smaller viewport and without window decoration. The rendering inside the viewport is ok, but the rest of the screen is flickering and I can see my desktop as the background. I don't have this problem when I'm using the window decoration. Here's a sample of the code: osg::ref_ptrosg::GraphicsContext::Traits traits = new osg::GraphicsContext::Traits; traits-x = 0; traits-y = 0; traits-width = 1280; traits-height = 1024; traits-windowDecoration = false; // Is flickering when turned to false traits-doubleBuffer = true; traits-sharedContext = 0; osg::ref_ptrosg::GraphicsContext gc = osg::GraphicsContext::createGraphicsContext(traits.get()); viewer.getCamera()-setGraphicsContext(gc.get()); srcUnit-viewer.getCamera()-setViewport( new osg::Viewport(100, 100, 640, 480) ); - I get the same problem when instead using: - viewer.realize(); // Fullscreen mode by default without windowDecoration viewer.getCamera()-setViewport( new osg::Viewport(100, 100, 640, 480) ); - Any clues? Thanks in advance, J-A ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fixes for VRML2 plugin
Hello Franz, AFAIK the first is right and the second is wrong. I don't know how the C: is handled (as a dir or as a prefix to the first dir name), but apart from that the syntax is supposed to look like this: file://hostname/C:data/blah ... whereby a localhost can be left away: file:///C:data/blah... which can be shortened to: file:/C:data/blah But file://C:data/blah is most certainly wrong. Can you quote some documentation for that? I'm not trying to be difficult, but as I said I remember going through this with Jan a while ago, so I just think we should make sure we have the real facts instead of AFAIKs before we change it again. As a reference, in Visual Studio (of course, MS could have just messed up, but it's kind of the only reference I have right now) I see this when I build: Build log was saved at file://c:\dir1\dir2\dir3\BuildLog.htm When I paste that into Firefox, it's changed to: file:///c:/dir1/dir2/dir3/BuildLog.htm So 3 slashes before the drive, and then a slash after the colon. Which one do we believe? I would tend to believe Firefox, but I'd like to have some concrete facts either way... J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RE Plugin loading problems....
Hi Robert, thanks for coming back to me. I think you're correct. I think this is an issue within MS and ActiveX controls. It does appear that that the LoadLibrary has issues resolving dependencies of libraries that are being loaded, when issued from within an ActiveX control. Obviously this isn't one for OSG as you can only use the call that is available - LoadLibrary. Having now got to a point where I can fix the issue with a relatively small alteration to the ActiveX control, I'm not too concerned. Hopefully if anyone else encounters this problem, this thread might be of use. Kind regards Neil Perhaps ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fixes for VRML2 plugin
* Jean-Sébastien Guay -- Wednesday 05 March 2008: Can you quote some documentation for that? RFC2396 Just type the lines in the address field of a standards compliant web browser (which probably rules out MSIE; try Firefox :-) with a file path that exists on your machine.line with a file path on your disc. m. PS: Sorry for replying to the wrong list. I threw both lists in one mailbox, as I hadn't intended to post, but this has now changed. I fixed my system. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fixes for VRML2 plugin
Hi Franz, try Firefox :-) I do, daily :-) as you saw further down in my message. Sorry about this whole thread, I guess I was remembering my conversation with Jan wrong. Gino, could you add a comment saying that the URI needs to comply to RFC2396 along with your change? Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RE Plugin loading problems....
On Wed, Mar 5, 2008 at 5:21 PM, [EMAIL PROTECTED] wrote: Obviously this isn't one for OSG as you can only use the call that is available - LoadLibrary. Having now got to a point where I can fix the issue with a relatively small alteration to the ActiveX control, I'm not too concerned. Hopefully if anyone else encounters this problem, this thread might be of use. If LoadLibrary is not finding the lib, then is does it mean that ActiveX is override the default search paths used by MS? Might there be a way of telling the windows what paths to check? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Font Quality / osgWidget
I've attached a screenshot of some text rendered in a very standard way using osgText: text-setFont(std::string(fonts/monospace.ttf)); text-setCharacterSize(size); text-setFontResolution(size, size); text-setText(label); text-setColor(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)); In the screenshot, a the very bottom, you'll see a bit of text called label 6 (copy). Take a close look at the following characters: a, e, 6, ( ...and you'll notice that the glyphs are 1 (perhaps 2) pixels chopped off at the left. I've been hunting this down forever--in fact, I've made a lot of similar posts in the past--but I simply cannot prevent this occurrence in a predictable way. If I play with the font sizes I can sometimes achieve nearly perfect font quality, but it's all guess-work. So I've decided to go back to square one and ask the mailing lists: can anyone with any heavy osgText experience give me any hints as to what is going on? I've tried all of the KERNING options (though this is a monospace font), I've tried hacking Text/TextBase.cpp so that each Glyph absolutely is pixel aligned, I've tried all manner of different fonts--but nothing seems to give predictable rendering results. My suspicion is that the GlyphQuads object's _texcoords values are getting calculated slightly wrong in some cases, but I'm not sure. Having precise font quality in osgWidget will be really important, so I'm willing to make any code changes necessary to facilitate this... attachment: orig.png___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Font Quality / osgWidget
I'd like to add another bit of info to this thread; attached are two screenshots (good.png bad.png) rendered using almost identical code: good.png (sharp, crisp) text-setFontResolution(...) text-setCharacterSize(...) text-setText(...) bad.png (very blurry) text-setText(...) text-setFontResolution(...) text-setCharacterSize(...) text-update() Is there something wrong with my 2nd usage of osgText::Text such that I get the poorer quality? I understand that in the first usage the font sizes are already set before the initial text is rendered internally, but shouldn't the 2nd usage produce identical results, given that I call update after setting the new values? (My assumption here, however, could be woefully wrong, but will be useful information either way. :)) On Wed, 2008-03-05 at 16:10 -0500, Jeremy Moles wrote: I've attached a screenshot of some text rendered in a very standard way using osgText: text-setFont(std::string(fonts/monospace.ttf)); text-setCharacterSize(size); text-setFontResolution(size, size); text-setText(label); text-setColor(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)); In the screenshot, a the very bottom, you'll see a bit of text called label 6 (copy). Take a close look at the following characters: a, e, 6, ( ...and you'll notice that the glyphs are 1 (perhaps 2) pixels chopped off at the left. I've been hunting this down forever--in fact, I've made a lot of similar posts in the past--but I simply cannot prevent this occurrence in a predictable way. If I play with the font sizes I can sometimes achieve nearly perfect font quality, but it's all guess-work. So I've decided to go back to square one and ask the mailing lists: can anyone with any heavy osgText experience give me any hints as to what is going on? I've tried all of the KERNING options (though this is a monospace font), I've tried hacking Text/TextBase.cpp so that each Glyph absolutely is pixel aligned, I've tried all manner of different fonts--but nothing seems to give predictable rendering results. My suspicion is that the GlyphQuads object's _texcoords values are getting calculated slightly wrong in some cases, but I'm not sure. Having precise font quality in osgWidget will be really important, so I'm willing to make any code changes necessary to facilitate this... ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org attachment: bad.pngattachment: good.png___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org