Re: [osg-users] utf-8?
I think the problem is in visual studio to be honest, i know i can save the cpp as encoded types maybe i save it to wrong unicode type? On Fri, 23 Nov 2007 12:54:41 +0100, Alberto Luaces [EMAIL PROTECTED] wrote: El Friday 23 November 2007 12:29:06 Johan Johnsson escribió: 1. What is the size in bytes of the arial.ttf file you are using? 359 kb Then I think you are using the correct one, that is included with the Windows installation. Would it help to set the OSGNOTIFYLEVEL environment variable to DEBUG and inspect the output of the program? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] small VirtualPlanetBuilder bug
Hi Christoph, Are your elevation and imagery in the same coordinate system? It's been awhile since I've looked at VPB, but if I recall correctly, the last input file on the command line is used to determine the coordinate system of the output database. So, if someGeoTiff_Height is in a geodetic projection and someGeoTiff_Texture is in a UTM projection, the first command will produce a database in geodetic and the second command line will produce a database in UTM. VPB should scale height values appropriately (at least it was at one point) if you are producing a geodetic database, but this is one explanation as to why your output would be different depending on the order of your command line arguments. Good luck! Jason On 11/23/07, Christoph Ehrler [EMAIL PROTECTED] wrote: Hi @ all VTP users and developers, Apparently it's not arbitrary how to arrange the data input for VirtualPlanetBuilder. The first commandline input produces a weired result with texture and heightfield matching but meshing of the heightfield corrupted. Every tile of the heightfield has only one central point to which all triangles converge. The second commandline produces perfect results though -d and -t statements are yust exchanged !?! osgdem -t someGeoTiff_Texture -d someGeoTiff_Height -l 99 -o output osgdem -d someGeoTiff_Height -t someGeoTiff_Texture -l 99 -o output Just to inform you because we spent hours believing it was the compression or the bit depth of the GeoTIFF !! Cheers Christoph ___ 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 capture with multiple cameras
Ok. Thanks for the reply. Followup question: Is there an automagic way to determine what this last camera is or do I need to keep track of that myself? Is it reasonable to attach a camera to the scenegraph set as the last camera just for capture purposes? I wouldn't think there would be much overhead incurred, but never hurts to ask. On Nov 23, 2007 12:46 AM, Berg, Michael [EMAIL PROTECTED] wrote: sherman wilcox wrote: I want to capture my OSG screen and dump it to a jpeg or png file. My understanding is to attach a callback to the main osgViewer camera and perform a osg::Image::readPixels(...) from within the callback. That works in the simple case. But, if I have a basic HUD that is itself a camera alongside other nodes in the scenegraph, then I never see the HUD in my osg::Image::readPixels call. That would make sense since my callback is operating on the main camera and not my child node camerabut leaves the question of how do I perform a complete screen capture on a graph with multiple cameras? Is there an example I missed? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Sherman, I recently ran into the same problem on this list. Robert Osfield responded with some comments on how it might one-day be done more cleanly, but that Until these methods are added, you'll need to make do with a post draw callback on the last camera to be drawn. If your HUD is the last camera drawn, set the post draw callback on your HUD camera, and it will be a complete screen capture. - Michael ___ 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] Proposal to change the way the Colladapluginhandlesthe DAE object
Doh Scene units was what I thought I was typing, just bad typing and spelling ;) thanks for the tip on get units out, But I would argue that loader should have the option to scale the file to the scene units if the format being loaded supports a unit size, its very rare that you would have a scene in say meters and want a model created in say milimeters to come in the size of a small country ;), Its sort of the same thing that we do in our with our imagery and elevation software, you have a projection then we mosaic or re-project every thing passed to the required projection no matter what the source projection is of each component.. BTW I not i'm not suggesting you to do this, just that for me and my 20k+ users this would be a good thing some time down the road, _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger James Sent: Friday, November 23, 2007 12:33 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] Proposal to change the way the Colladapluginhandlesthe DAE object Gordon I don't quite know what you mean by screen units, I suspect it is something like the same units as the rest of the scene graph. I think this function is best done outside the plugin. In the current SVN you can do this using the DAE object and document name returned by the plugin. You need to get hold of the correct domCOLLADA object and then call getAsset on it to get hold of the domAsset object and then call getUnit in that to get the information you need. If you do put any scaling transforms above the model then remember to rescale the normals back to unity as well! stateset-setMode(GL_NORMALIZE, StateAttribute::ON); Roger _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Tomlinson Sent: 23 November 2007 15:24 To: 'OpenSceneGraph Users' Subject: Re: [osg-users] Proposal to change the way the Collada pluginhandlesthe DAE object Need to add scaling the loaded model to correct screen units ;) ( worth a try ;) ) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Proposal to change the way the Collada pluginhandlesthe DAE object
Gordon I don't quite know what you mean by screen units, I suspect it is something like the same units as the rest of the scene graph. I think this function is best done outside the plugin. In the current SVN you can do this using the DAE object and document name returned by the plugin. You need to get hold of the correct domCOLLADA object and then call getAsset on it to get hold of the domAsset object and then call getUnit in that to get the information you need. If you do put any scaling transforms above the model then remember to rescale the normals back to unity as well! stateset-setMode(GL_NORMALIZE, StateAttribute::ON); Roger _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Tomlinson Sent: 23 November 2007 15:24 To: 'OpenSceneGraph Users' Subject: Re: [osg-users] Proposal to change the way the Collada pluginhandlesthe DAE object Need to add scaling the loaded model to correct screen units ;) ( worth a try ;) ) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CMake Search Paths ?
Is there a simpler way to give cmake user defined search paths? So, telling people about the shiny world of 'ccmake' and begging for procedures that are _highly_impractical_ on many people's setup is one thing, This strikes me as a newbie-like question, not an automation (advanced) question so ccmake is a perfectly reasonable answer. That's the reason for the tool's existence. If you disallow these people to modify the required flags on the 'cmake' command line, Nobody disallowed anything. I also gave 3 other perfectly good answers that are geared towards automation and command lines. -Eric ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] utf-8?
Tnxc alot the problem was solved using second parameters in: text1-setText(test, osgText::String::ENCODING_UTF8); with - osgText::String::ENCODING_UTF8 = worked without = not worked. On Fri, 23 Nov 2007 13:35:20 +0100, Thibault Genessay [EMAIL PROTECTED] wrote: You might try to have a look at the Character Set setting of your project (under Configuration Properties / General). If your previous project file was using the Unicode character set, while your new one the multi-byte character set, you might have a difference. I've never had a rea in-depth understanding of this setting, but I kinda suppose it must be set to unicode for unicode-aware apps. You should also try the different combinations of the second parameter to osgText::Text::setText() and the actual encoding of the file on the disk. In my case, I've let this parameter to its default value and also saved the file using the default encoding (unicode codepage 1200 which I suspect is UCS-2 with a microsoft-specific codepage). If you did not read it yet, I really recommend the page http://www.joelonsoftware.com/articles/Unicode.html. I have read it about 10 times and now I'm beginning to understand how this unicode thing works :) It might help you pinpoint the exact source of your problem. Good luck Thibault On Nov 23, 2007 1:18 PM, Johan Johnsson [EMAIL PROTECTED] wrote: I think the problem is in visual studio to be honest, i know i can save the cpp as encoded types maybe i save it to wrong unicode type? On Fri, 23 Nov 2007 12:54:41 +0100, Alberto Luaces [EMAIL PROTECTED] wrote: El Friday 23 November 2007 12:29:06 Johan Johnsson escribió: 1. What is the size in bytes of the arial.ttf file you are using? 359 kb Then I think you are using the correct one, that is included with the Windows installation. Would it help to set the OSGNOTIFYLEVEL environment variable to DEBUG and inspect the output of the program? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ 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 -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] utf-8?
You might try to have a look at the Character Set setting of your project (under Configuration Properties / General). If your previous project file was using the Unicode character set, while your new one the multi-byte character set, you might have a difference. I've never had a rea in-depth understanding of this setting, but I kinda suppose it must be set to unicode for unicode-aware apps. You should also try the different combinations of the second parameter to osgText::Text::setText() and the actual encoding of the file on the disk. In my case, I've let this parameter to its default value and also saved the file using the default encoding (unicode codepage 1200 which I suspect is UCS-2 with a microsoft-specific codepage). If you did not read it yet, I really recommend the page http://www.joelonsoftware.com/articles/Unicode.html. I have read it about 10 times and now I'm beginning to understand how this unicode thing works :) It might help you pinpoint the exact source of your problem. Good luck Thibault On Nov 23, 2007 1:18 PM, Johan Johnsson [EMAIL PROTECTED] wrote: I think the problem is in visual studio to be honest, i know i can save the cpp as encoded types maybe i save it to wrong unicode type? On Fri, 23 Nov 2007 12:54:41 +0100, Alberto Luaces [EMAIL PROTECTED] wrote: El Friday 23 November 2007 12:29:06 Johan Johnsson escribió: 1. What is the size in bytes of the arial.ttf file you are using? 359 kb Then I think you are using the correct one, that is included with the Windows installation. Would it help to set the OSGNOTIFYLEVEL environment variable to DEBUG and inspect the output of the program? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ 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] utf-8?
El Friday 23 November 2007 12:29:06 Johan Johnsson escribió: 1. What is the size in bytes of the arial.ttf file you are using? 359 kb Then I think you are using the correct one, that is included with the Windows installation. Would it help to set the OSGNOTIFYLEVEL environment variable to DEBUG and inspect the output of the program? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] utf-8?
On Fri, 23 Nov 2007 11:59:44 +0100, Alberto Luaces [EMAIL PROTECTED] wrote: El Friday 23 November 2007 11:20:31 Johan Johnsson escribió: yes i have copied them from the characther map in arial Out of curiosity: 1. What is the size in bytes of the arial.ttf file you are using? 359 kb 2. Could it be that you have several copies around and your program is loading the one which hasn't got those characters? I have only one Arial file. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] utf-8?
yes i have copied them from the characther map in arial On Fri, 23 Nov 2007 11:10:28 +0100, Mario Valle [EMAIL PROTECTED] wrote: Does Arial.ttf have those arabic characters? Try change font file. Ciao! mario Johan Johnsson wrote: damnit it worked , but then i incidentaly removed the project, now i cant get it to work: osgText::Text* text1 = new osgText::Text; osgText::String* string = new osgText::String(لْعَرَبيّة, osgText::String::ENCODING_UTF8); std::string test = string-createUTF8EncodedString(); text1-setFont(fonts/arial.ttf); text1-setCharacterSize(characterSize); text1-setPosition(pos); text1-setAxisAlignment(osgText::Text::XY_PLANE); text1-setText(test); geode-addDrawable(text1); just wierd letters, (i use visual studio 2003 if that is to any help, i know i can save the code files in different encoding methods, atm i save them as Unicode(big-endian). On Wed, 21 Nov 2007 13:28:58 +0100, Johan Johnsson [EMAIL PROTECTED] wrote: tnx very much -the problem was the font. On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay [EMAIL PROTECTED] wrote: Hi Johan, Did you check that the font file itself does include the glyphs that you try to display ? Also, try to pass your input data as a wide character string, i.e. Lلْعَرَبيّة I have a similar problem in the past and solved it using wchar_t strings in my source files, and using a different font that actually had the glyphs. Hope this helps Thibault On Nov 21, 2007 1:15 PM, Johan Johnsson [EMAIL PROTECTED] wrote: I may be doing this wrong, because its just showing some wierd letters: osgText::Text* text1 = new osgText::Text; osgText::String* string = new osgText::String(لْعَرَبيّة, osgText::String::ENCODING_UTF8); std::string test = string-createUTF8EncodedString(); On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield [EMAIL PROTECTED] wrote: On Nov 21, 2007 9:04 AM, Johan Johnsson [EMAIL PROTECTED] wrote: Can the scenegraph represent utf-8 on the screen? You mean does osgText support UTF-8 encoding of strings? The answer is yes, have a look at osgText::String for details. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ 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 -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] utf-8?
Does Arial.ttf have those arabic characters? Try change font file. Ciao! mario Johan Johnsson wrote: damnit it worked , but then i incidentaly removed the project, now i cant get it to work: osgText::Text* text1 = new osgText::Text; osgText::String* string = new osgText::String(لْعَرَبيّة, osgText::String::ENCODING_UTF8); std::string test = string-createUTF8EncodedString(); text1-setFont(fonts/arial.ttf); text1-setCharacterSize(characterSize); text1-setPosition(pos); text1-setAxisAlignment(osgText::Text::XY_PLANE); text1-setText(test); geode-addDrawable(text1); just wierd letters, (i use visual studio 2003 if that is to any help, i know i can save the code files in different encoding methods, atm i save them as Unicode(big-endian). On Wed, 21 Nov 2007 13:28:58 +0100, Johan Johnsson [EMAIL PROTECTED] wrote: tnx very much -the problem was the font. On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay [EMAIL PROTECTED] wrote: Hi Johan, Did you check that the font file itself does include the glyphs that you try to display ? Also, try to pass your input data as a wide character string, i.e. Lلْعَرَبيّة I have a similar problem in the past and solved it using wchar_t strings in my source files, and using a different font that actually had the glyphs. Hope this helps Thibault On Nov 21, 2007 1:15 PM, Johan Johnsson [EMAIL PROTECTED] wrote: I may be doing this wrong, because its just showing some wierd letters: osgText::Text* text1 = new osgText::Text; osgText::String* string = new osgText::String(لْعَرَبيّة, osgText::String::ENCODING_UTF8); std::string test = string-createUTF8EncodedString(); On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield [EMAIL PROTECTED] wrote: On Nov 21, 2007 9:04 AM, Johan Johnsson [EMAIL PROTECTED] wrote: Can the scenegraph represent utf-8 on the screen? You mean does osgText support UTF-8 encoding of strings? The answer is yes, have a look at osgText::String for details. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ 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 -- Ing. Mario Valle Visualization Group | http://www.cscs.ch/~mvalle Swiss National Supercomputing Centre (CSCS) | Tel: +41 (91) 610.82.60 v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] utf-8?
damnit it worked , but then i incidentaly removed the project, now i cant get it to work: osgText::Text* text1 = new osgText::Text; osgText::String* string = new osgText::String(لْعَرَبيّة, osgText::String::ENCODING_UTF8); std::string test = string-createUTF8EncodedString(); text1-setFont(fonts/arial.ttf); text1-setCharacterSize(characterSize); text1-setPosition(pos); text1-setAxisAlignment(osgText::Text::XY_PLANE); text1-setText(test); geode-addDrawable(text1); just wierd letters, (i use visual studio 2003 if that is to any help, i know i can save the code files in different encoding methods, atm i save them as Unicode(big-endian). On Wed, 21 Nov 2007 13:28:58 +0100, Johan Johnsson [EMAIL PROTECTED] wrote: tnx very much -the problem was the font. On Wed, 21 Nov 2007 13:24:47 +0100, Thibault Genessay [EMAIL PROTECTED] wrote: Hi Johan, Did you check that the font file itself does include the glyphs that you try to display ? Also, try to pass your input data as a wide character string, i.e. Lلْعَرَبيّة I have a similar problem in the past and solved it using wchar_t strings in my source files, and using a different font that actually had the glyphs. Hope this helps Thibault On Nov 21, 2007 1:15 PM, Johan Johnsson [EMAIL PROTECTED] wrote: I may be doing this wrong, because its just showing some wierd letters: osgText::Text* text1 = new osgText::Text; osgText::String* string = new osgText::String(لْعَرَبيّة, osgText::String::ENCODING_UTF8); std::string test = string-createUTF8EncodedString(); On Wed, 21 Nov 2007 10:50:39 +0100, Robert Osfield [EMAIL PROTECTED] wrote: On Nov 21, 2007 9:04 AM, Johan Johnsson [EMAIL PROTECTED] wrote: Can the scenegraph represent utf-8 on the screen? You mean does osgText support UTF-8 encoding of strings? The answer is yes, have a look at osgText::String for details. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ 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 -- Mr. Johan Johnsson AutoSim AS, Strandveien 106, 9006 Tromsø Visit us at http://www.autosim.no ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Proposal to change the way the Collada plugin handlesthe DAE object
Need to add scaling the loaded model to correct screen units ;) ( worth a try ;) ) Your proposals look ok to me.. The simple fix I submitted last week allowed the use of URI to be passed through and used ( this was being rejected as the findfile func), it did not attempt to convert the path to an URI just made sure it got to the dae _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger James Sent: Friday, November 23, 2007 10:16 AM To: 'OpenSceneGraph Users' Subject: [osg-users] Proposal to change the way the Collada plugin handlesthe DAE object When the Collada plugin was first written it used to create and delete a local DAE object for each read or write operation. At SVN changeset 5572 Per Fahlberg changed the behaviour so that a single DAE object was created at first use and held onto until the plugin was unloaded. This change was to fix crashes in the Collada library when it was used more than once. I believe that these crashes have now been resolved in the latest release of the collada DOM library, so this change could be removed. At SVN changeset 7504 Mattias Linde made a further change to allow a pointer to a DAE object to be passed into and out of the plugin. If pointer was passed in it would be used instead of any internally allocated object, and in all circumstances a pointer to the DAE object actually used would passed back out on completion. I have recently been investigated some issues regarding the use of collada when two or more DAE objects are in existence at the same time. This has uncovered a problem with the collada library which is unlikely to be resolved in the short term. https://sourceforge.net/forum/forum.php?thread_id=1871237 https://sourceforge.net/forum/forum.php?thread_id=1871237forum_id=531264 forum_id=531264 Because of this I think it is better that the collada plugin does not hold onto any dae objects. I suggest that the behaviour is changed as follows: - On entry if a DAE object is supplied then use it otherwise allocate a new one. On exit do not pass back any pointers to the DAE object and if an internally allocated object has been used then delete it. Has anyone got any comments on this, especially Per, Mattias and Robert? I also propose to change the way the filename field is handled on input and output. This will always be treated as if it was a filename path in the current platform format, so the behaviour will be the same as other plugins. Before it is passed to the collada library it will be resolved to an absolute pathname in the current platform format using OSG's search algorithms as required (input only I think) and then converted to a file URI in a format accepted by the collada library. Once again has anyone got any comments on this. I madness takes me completely I will also put in some fixes for transparent texture handling and Google compatibility on output that I have been working on. Roger ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Proposal to change the way the Collada plugin handles the DAE object
When the Collada plugin was first written it used to create and delete a local DAE object for each read or write operation. At SVN changeset 5572 Per Fahlberg changed the behaviour so that a single DAE object was created at first use and held onto until the plugin was unloaded. This change was to fix crashes in the Collada library when it was used more than once. I believe that these crashes have now been resolved in the latest release of the collada DOM library, so this change could be removed. At SVN changeset 7504 Mattias Linde made a further change to allow a pointer to a DAE object to be passed into and out of the plugin. If pointer was passed in it would be used instead of any internally allocated object, and in all circumstances a pointer to the DAE object actually used would passed back out on completion. I have recently been investigated some issues regarding the use of collada when two or more DAE objects are in existence at the same time. This has uncovered a problem with the collada library which is unlikely to be resolved in the short term. https://sourceforge.net/forum/forum.php?thread_id=1871237 https://sourceforge.net/forum/forum.php?thread_id=1871237forum_id=531264 forum_id=531264 Because of this I think it is better that the collada plugin does not hold onto any dae objects. I suggest that the behaviour is changed as follows: - On entry if a DAE object is supplied then use it otherwise allocate a new one. On exit do not pass back any pointers to the DAE object and if an internally allocated object has been used then delete it. Has anyone got any comments on this, especially Per, Mattias and Robert? I also propose to change the way the filename field is handled on input and output. This will always be treated as if it was a filename path in the current platform format, so the behaviour will be the same as other plugins. Before it is passed to the collada library it will be resolved to an absolute pathname in the current platform format using OSG's search algorithms as required (input only I think) and then converted to a file URI in a format accepted by the collada library. Once again has anyone got any comments on this. I madness takes me completely I will also put in some fixes for transparent texture handling and Google compatibility on output that I have been working on. Roger ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] utf-8?
El Friday 23 November 2007 11:20:31 Johan Johnsson escribió: yes i have copied them from the characther map in arial Out of curiosity: 1. What is the size in bytes of the arial.ttf file you are using? 2. Could it be that you have several copies around and your program is loading the one which hasn't got those characters? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Creating shapes using Geometry
Hello Renan, Sorry that I sounded a bit desperate for quick answers, but I really appreciate the hint you've given me. I didn't think about using vectors, having the excuse that I haven't attended any Computer Graphics course. This project I'm participating in is from my Research Internship, and the software is only a small tool ina bigger picture. No problem. I sometimes assume if someone is using OSG then they must have some bases, which is not the case. Sorry about that. Have you made any progress? That offer for example code is still open if you're on a deadline, but as I said, trying to do it will probably be beneficial too. Good luck, J-S -- __ Jean-Sebastien Guay [EMAIL PROTECTED] http://whitestar02.webhop.org/ This message was sent using IMP, the Internet Messaging Program. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] small VirtualPlanetBuilder bug
Hi Christoph, This issue sounds odd, it shouldn't make any difference which order the command line options are given in save for the set up coordinate system info inheriting from left to right, but this isn't the case here. I'll do so testing at my end. Robert. On Nov 23, 2007 2:19 PM, Christoph Ehrler [EMAIL PROTECTED] wrote: Hi @ all VTP users and developers, Apparently it's not arbitrary how to arrange the data input for VirtualPlanetBuilder. The first commandline input produces a weired result with texture and heightfield matching but meshing of the heightfield corrupted. Every tile of the heightfield has only one central point to which all triangles converge. The second commandline produces perfect results though -d and -t statements are yust exchanged !?! osgdem -t someGeoTiff_Texture -d someGeoTiff_Height -l 99 -o output osgdem -d someGeoTiff_Height -t someGeoTiff_Texture -l 99 -o output Just to inform you because we spent hours believing it was the compression or the bit depth of the GeoTIFF !! Cheers Christoph ___ 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 capture with multiple cameras
sherman wilcox wrote: Ok. Thanks for the reply. Followup question: Is there an automagic way to determine what this last camera is or do I need to keep track of that myself? Is it reasonable to attach a camera to the scenegraph set as the last camera just for capture purposes? I wouldn't think there would be much overhead incurred, but never hurts to ask. Sherman, I'm still learning how to fully use OSG myself, but here's the skeleton code I wrote (based on the osghud and other examples). [If anyone more experienced has any corrections/improvements to this code, we'd all appreciate it]. This code works for me in my application, and will hopefully be easier for you to get going with than the 3-styles-in-one osghud example (it took me a few hours of testing settings and reading docs to figure out exactly what was needed for each of the 3 display styles used in that example). The setRenderOrder(osg::Camera::POST_RENDER) on the HUD scene basically makes it the last camera since all other scenes will be rendered before this one. I personally wouldn't bother with a screenshot-only camera as it will be extra overhead and the HUD camera is basically IS that camera with some display widgets in it. [PS: and while the code below is from working code on my system, I did strip out some app-specific parts for this email. If it doesn't compile as a result, my apologies, and I can help if the fix isn't obvious]. - Michael // == osgViewer::CompositeViewer viewer; // Main view { osg::ref_ptrosgViewer::View view = new osgViewer::View(); view-setUpViewAcrossAllScreens();; view-setSceneData(root.get()); // root node of main scene here // black background for the main scene view-getCamera()-setClearColor(osg::Vec4(0.00, 0.00, 0.00, 1.00)); view-addEventHandler(new osgViewer::WindowSizeHandler()); view-addEventHandler(new osgViewer::StatsHandler()); view-addEventHandler(new osgViewer::HelpHandler()); viewer.addView(view.get()); } // get window info from main view osgViewer::Viewer::Windows windows; viewer.getWindows(windows); if (windows.empty()) { return 1; } // HUD view (overlaid on main view) { osg::ref_ptrosgViewer::View view = new osgViewer::View(); view-setSceneData(hud.get()); // root node of hud scene here view-getCamera()-setGraphicsContext(windows[0]); view-getCamera()-setReferenceFrame(osg::Transform::ABSOLUTE_RF); view-getCamera()-setProjectionMatrix (osg::Matrix::ortho2D(0,1600,0,1200)); view-getCamera()-setViewport(0, 0, windows[0]-getTraits()-width, windows[0]-getTraits()-height); view-getCamera()-setViewMatrix(osg::Matrix::identity()); // draw this scene after the main scene (it's the last camera) view-getCamera()-setRenderOrder(osg::Camera::POST_RENDER); // no background (clear) so the main scene shows through view-getCamera()-setClearMask(GL_DEPTH_BUFFER_BIT); // Don't let the HUD camera grab event focus from the // main view's camera. view-getCamera()-setAllowEventFocus(false); // Attach your screen capture draw callback here drawcallback_screenshot = new DrawCallback_Screenshot(screenshot); view-getCamera()-setPostDrawCallback (drawcallback_screenshot.get()); viewer.addView(view.get()); } return (viewer.run()); // == ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org