[osg-users] memory issue about x-windows in Linux
Hi, I know it is not be an osg problem. Just want to know anyone here may met the same problem. We use reahat linux 6.5 to run our osg app .The desktop is kde4.3.4. . After 7 to 20 days,we found the X-windows Process (X) suddenly took all of system's memory ,and force linux to kill the process itself ,which result to force the redhat back to it's login windows. I have observe both the osg and X problem every single day,it seems every stable ,not any trace of memory leak problem.Then just one short moment,the X process suddenly eats up all system memory . My question is what the link with osg and x-windows?Is it because our app has some memory leak problem to make the X process eat up too many memory ? Or just the X process cause the problem only due to itself? ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=71357#71357 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to disable Antialiasing of an osg::Text
Hi, Thx Robert! I use one of osgEarth fuction to rendering my text. Code: osg::ref_ptr PowerPlaceNode::createPlaceNodeTextDrawable(const std::string& text, const TextSymbol* symbol, const osg::Vec3& positionOffset) { osg::ref_ptr < osgText::Text > t = new osgText::Text(); osgText::String::Encoding text_encoding = osgText::String::ENCODING_UNDEFINED; if (symbol && symbol->encoding().isSet()) { switch (symbol->encoding().value()) { case TextSymbol::ENCODING_ASCII: text_encoding = osgText::String::ENCODING_ASCII; break; case TextSymbol::ENCODING_UTF8: text_encoding = osgText::String::ENCODING_UTF8; break; case TextSymbol::ENCODING_UTF16: text_encoding = osgText::String::ENCODING_UTF16; break; case TextSymbol::ENCODING_UTF32: text_encoding = osgText::String::ENCODING_UTF32; break; default: text_encoding = osgText::String::ENCODING_UTF8; break; //editby lvqing 20140509 } } t->setText(text, osgText::String::ENCODING_UTF8); if (symbol && symbol->pixelOffset().isSet()) { t->setPosition( osg::Vec3(positionOffset.x() + symbol->pixelOffset()->x(), positionOffset.y() + symbol->pixelOffset()->y(), positionOffset.z())); } else { t->setPosition(positionOffset); } osgText::Font* font = 0L; if (symbol && symbol->font().isSet()) { font = osgText::readFontFile(*symbol->font()); // read font*/ } t->setFontResolution(256,256); t->setAutoRotateToScreen(false); t->setCharacterSizeMode(osgText::Text::OBJECT_COORDS); if (symbol != NULL) { if (symbol->size() != NULL) { t->setCharacterSize( symbol && symbol->size().isSet() ? *symbol->size() : 20.0f ); } else { t->setCharacterSize( 20.0f ); } } if (!font) font = Registry::instance()->getDefaultFont(); if (font) { t->setFont(font); } t->setColor(symbol && symbol->fill().isSet() ? symbol->fill()->color() : Color::White); if (symbol) { // they're the same enum. osgText::Text::AlignmentType at = (osgText::Text::AlignmentType) symbol->alignment().value(); t->setAlignment(at); } if (symbol && symbol->halo().isSet()) { t->setBackdropColor(symbol->halo()->color()); t->setBackdropType(osgText::Text::OUTLINE); if (symbol->haloOffset() != NULL) { if (symbol->haloOffset().isSet()) { t->setBackdropOffset(*symbol->haloOffset(), *symbol->haloOffset()); } } } else if (!symbol) { // if no symbol at all is provided, default to using a black halo. t->setBackdropColor(osg::Vec4(.3, .3, .3, 1)); t->setBackdropType(osgText::Text::OUTLINE); } // this disables the default rendering bin set by osgText::Font. Necessary if we're // going to do decluttering. // TODO: verify that it's still OK to share the font stateset (think so) or does it // need to be marked DYNAMIC if (t->getStateSet()) t->getStateSet()->setRenderBinToInherit(); //osg::StateSet* stateSet = new osg::StateSet(); //t->setStateSet( stateSet ); //#if 0 // OBE: the decluttering bin is now set higher up (in OrthoNode) osg::StateSet* stateSet = t->getOrCreateStateSet(); if ( symbol && symbol->declutter().isSet() ) { Decluttering::setEnabled( stateSet, *symbol->declutter() ); } else { // stateSet->setRenderBinToInherit(); stateSet->setMode(GL_LIGHTING,osg::StateAttribute::OFF); } t->setStateSet( stateSet ); #if 0 // OBE: shadergenerator now takes care of all this // add the static "isText=true" uniform; this is a hint for the annotation shaders // if they get installed. static osg::ref_ptr s_isTextUniform = new osg::Uniform(osg::Uniform::BOOL, UNIFORM_IS_TEXT()); s_isTextUniform->set( true ); stateSet->addUniform( s_isTextUniform.get() ); #endif
Re: [osg-users] How to disable Antialiasing of an osg::Text
robertosfield wrote: > HI Lv, > > osgText::Text renders into a 3D scene using OpenGL, which is quite > different than Qt rendering to a 2D window where font resolutions can > exactly matched to the pixels on screen, so you can't really compare > the two. > > osgText::Text itself doesn't implement anti-aliasing, anti-aliasing is > a property of the GraphicsWindow that you've created. For the > blurriness you reporting it's unlikely to be an high level > anti-aliasing issue. > > My guess is that it's more likely an issue of undersampling of the > glyph texture (magnification) if the size of glyph on screen is lower > than the font resolution, or possible magnification if the glyph on > screen is smaller than the font resolution. A 1:1 ratio will likely > minimize these effects. > > You don't provide any guidance on how you are rendering so I can't > provide any more details than this. > > Robert. > > On 2 March 2017 at 17:41, Lv Qing <> wrote: > > > Hi, > > > > In linux we are using osg::Text to display some chinese characters.Then > > we find the osg::Text looks a little blur when the size of characters is > > small.Or,the Black characters seems a little gray when the character size > > is small.I have setFontSolution(128,128),it not help. > > > > Then I fond our old app which using QT to draw text,and with the same > > font,QT text looks better than osg::Text. > > > > I fond QT use QPaint to loading font and drawing text ,and It can enable or > > disable Antialiasing of text like below. > > > > > > > > Code: > > class Q_GUI_EXPORT QPainter > > { > > Q_DECLARE_PRIVATE(QPainter) > > Q_GADGET > > Q_FLAGS(RenderHint RenderHints) > > > > public: > > enum RenderHint { > > Antialiasing = 0x01, > > TextAntialiasing = 0x02, > > SmoothPixmapTransform = 0x04, > > HighQualityAntialiasing = 0x08, > > NonCosmeticDefaultPen = 0x10 > > }; > > > > > > > > > > So my question is ,does osg can enable or disable Antialiasing to an > > osg::Text? > > > > > > > > > > ... > > > > Thank you! > > > > Cheers, > > Lv > > Code: > > > > > > > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=70395#70395 > > > > > > > > > > > > ___ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum Thx! robert! You mention A 1:1 ratio will likely minimize these effects.Which function excatly I should call? ThX again! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70406#70406 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to disable Antialiasing of an osg::Text
Hi, In linux we are using osg::Text to display some chinese characters.Then we find the osg::Text looks a little blur when the size of characters is small.Or,the Black characters seems a little gray when the character size is small.I have setFontSolution(128,128),it not help. Then I fond our old app which using QT to draw text,and with the same font,QT text looks better than osg::Text. I fond QT use QPaint to loading font and drawing text ,and It can enable or disable Antialiasing of text like below. Code: class Q_GUI_EXPORT QPainter { Q_DECLARE_PRIVATE(QPainter) Q_GADGET Q_FLAGS(RenderHint RenderHints) public: enum RenderHint { Antialiasing = 0x01, TextAntialiasing = 0x02, SmoothPixmapTransform = 0x04, HighQualityAntialiasing = 0x08, NonCosmeticDefaultPen = 0x10 }; So my question is ,does osg can enable or disable Antialiasing to an osg::Text? ... Thank you! Cheers, Lv Code: -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70395#70395 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] a linux dialog starting to blur while draging towards to an OSG QT widgets
Hi, Sorry for my poor english description. The word "Blur" more like Image-Retention or afterimage or ghost image。 ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69534#69534 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] a linux dialog starting to blur while draging towards to an OSG QT widgets
Hi, we have integrated an osgViewerQT window to a QT based app. There are four subWindows in our app,one is an osgViewerQT widget,the others are normal QT widgets. We forced the osgViewerQT viewer running under a slow frames,about 10FPS. Then we drag any other linux dialog to the osgViewerQT widget,the linux dialog becomes blur.If we drag the linux dialog to the other three QT widgets,it dose not blur. it seems the slower the osgViewerQT widget running ,the much it blur。 We do this experiment because we have ran the osgViewerQT window with a complex scene.It is very hard to maintain the frames when a lot things are running.So we do not want the performance of an osg scene influence other linux dialogs's updating. A 10FPS osg scence is acceptable,but a blur dialog means bad User Experience:). So any advice?Is it something about double buffer setting? ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69533#69533 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] performance of QT GUI when integrated with OSG
Hi, I have used class ViewerWidget(: public QWidget, public osgViewer::CompositeViewer) to integrate OSG into a QT application. Like this: viewer3DWindow = new ViewerWidget; QMdiSubWindow *tmpsubwin_3D = new QMdiSubWindow ; tmpsubwin_3D->setWidget(viewer3DWindow); And there are other QT GUIs like QT::Dialog,QT::LineEdit etc,they are in the same application but in different QMdiSubWindow. When our 3D widget (osg widget) has a lot of thing to render,the frame is down to 10 fps or even lower.It is totally acceptable for the 3D widget. However,the GUI widget seems also have low performance as the 3D widget.For example,when we tap some words to a QT::LineEdit,it take a long time to react our input. When 3D widget's frame back to normal,the QT GUI widget's performance is back to normal too. So it looks like the 3D OSG widget and QT GUI widget share the same graphic resource .When cpu or gpu usage is high,the 3D OSG widget try it best to keep performance ,while the QT GUI widget dose not have enough resource to react. We use linux.Any advice? ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69092#69092 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] how to show osg::Text respectively?
Hi, Here is the situation ,I want to draw dozens of osg::Text,all as children of one osg::Geode.And I want to show some of the osg::Text ,and some not.I failed to see osg::Text has a setNodeMask funciton,I can only call the osg::Geode setNodeMask ,but it show all osg::Text or not.If I add each one osg::Text to each one osg::Geode,it dose not look like an efficient way. So need help! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65489#65489 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to set width and Stipple of a osgText::BoundingBox?
Thx!Robert! The situation is,we have modified the text.cpp to create some other styles rather than boundingbox. Like a BoundingLine,one end to one of the corner of a BoundingBox,the other end linked to a osg::Node. So if a text have a BoundingLine and a BoundingBox,I just want draw the BoundingBox as normal,but draw the BoundingLine with LineStipple .So I think one osg::StateSet may not solve this problem. I am not quiet familiar with the openGL programming since I use osg at first.I search the web found people use this code to set Linewidth and Stipple glLineWidth (2.0); glLineStipple (1, 0x0F0F); And I look into text.cpp,found lots of code like use openGL directly,such as : //glClear(GL_STENCIL_BUFFER_BIT); // enable stencil buffer glEnable(GL_STENCIL_TEST); // write a one to the stencil buffer everywhere we are about to draw glStencilFunc(GL_ALWAYS, 1, 1); // write only to the stencil buffer if we pass the depth test glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); // Disable writing to the color buffer so we only write to the stencil // buffer and the depth buffer glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); // make sure the depth buffer is enabled //glEnable(GL_DEPTH_TEST); //glDepthMask(GL_TRUE); //glDepthFunc(GL_LESS); // Arrrgh! Why does the code only seem to work correctly if I call this? glDepthMask(GL_FALSE); So I think use the openGL code to draw different style may be the qucik way. ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65462#65462 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] how to set width and Stipple of a osgText::BoundingBox?
Hi, I want to modify text.cpp so can set osgText::BoundingBox's width and line Stipple. Here is how osg draw BOUNDINGBOX in text.cpp: if (_drawMode & BOUNDINGBOX) { if (_textBB.valid()) { state.applyTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OFF); const osg::Matrix& matrix = _autoTransformCache[contextID]._matrix; osg::Vec3 c00(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix); osg::Vec3 c10(osg::Vec3(_textBB.xMax(),_textBB.yMin(),_textBB.zMin())*matrix); osg::Vec3 c11(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMin())*matrix); osg::Vec3 c01(osg::Vec3(_textBB.xMin(),_textBB.yMax(),_textBB.zMin())*matrix); gl.Color4f(colorMultiplier.r()*_textBBColor.r(),colorMultiplier.g()*_textBBColor.g(),colorMultiplier.b()*_textBBColor.b(),colorMultiplier.a()*_textBBColor.a()); gl.Begin(GL_LINE_LOOP); gl.Vertex3fv(c00.ptr()); gl.Vertex3fv(c10.ptr()); gl.Vertex3fv(c11.ptr()); gl.Vertex3fv(c01.ptr()); gl.End(); } } I have added this two line before gl.Begin(GL_LINE_LOOP): glLineWidth (2.0); glLineStipple (1, 0x0F0F); It seems not work,need help! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65460#65460 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] how to convert a QPixmap to a osg::Image ?
Hi, Our picture has storge as a QPixmap(a image format used by QT4.8) in database,when I got a QPixmap object,how to convert to a osg::Image ? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63619#63619 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to re-compute a osg::Text heading when camera changes?
Hi, problem solved! Is is actually a "compass" thing,just get Earthmanipulate's viewpoint,then add to the text's heading,each frame. Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63272#63272 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to rotate a osg::Text heading when camera changes?
Hi, [Image: http://forum.osgearth.org/file/n7587273/无标题.jpg ] ... like pictures above,we use some icon to display a plane,this icon is osg::Text which using some special fonts file.we dynamic set this plane's heading to this osg::Text,like the left picture ,if the camera head to "north",this osg::Text looks like head to the plane's heading.If we rotate the camera a bit ,like right pitcure ,it dosen't work. I know the reason,but not to know how to solve it .is there some way to re-computer the osg::Text heading when camera angle changes? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63203#63203 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] performance of a fbx 3D model
Hi, ... I just buy some fbx 3D model with some animation,each 3D model have one main part .fbx file and some separate animation .fbx file. main part .fbx dose not has animation effect if not loading other animation .fbx file . The problem is,when loaded a main part .fbx with osgviewer ,I found the update frame is extremely higher than a normal 3D model which without animation.Like pitcure below: [img]http://bbs.osgchina.org/forum.php?mod=attachment&aid=NjE2NHw4OTNhYTA4M3wxNDI1Mz [/img] the update frame is 6.8 . If I convert main part .fbx to main part .ive ,the update frame is 0.0~0.01 more than 100 main part .fbx will drop performance of our app significantly. I think a fbx file may attach some bone updatecallback even it does not run a animation , so the question is ,may i close the updatecallback of a fbx file when i do not need the animation ,or other way just improve the performance of a fbx 3D model? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62939#62939 Attachments: http://forum.openscenegraph.org//files/1_688.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Any way to optimize the performance of massive osg::Text?
Hi: In our case we need draw 5~10 osg::Text spreading all over the earth,the result is not optimistic,the frame is down to 2~3 fps,we can barely pan the earth,so is there any way to optimize such mount of osg::Text? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62284#62284 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to link a line between a osg::Text and a 3D model ?
Hi, I have failed to draw a line between a osg::Text and a 3D model,like image below So far,I have managed modify osg::Text to draw a linking line ,like draw a bounding box . One end of the line is linked to the text,but I do not know how to link another end to a moving 3D model. I figure must do something to compute the world matrix of the 3D model ,then convert it to the local matrix of the osg::Text,then draw another end of the line to the local matrix. here is what I have done,and the result is not good. 1. a class to get the text Wolrd To Local class GetWolrdToLocalVisitor:public osg::NodeVisitor { public : GetWolrdToLocalVisitor(): osg::NodeVisitor(NodeVisitor::TRAVERSE_PARENTS),done(false) { wcMatrix = new osg::Matrixd(); } virtual void apply(osg::Node& node) { if(!done) { if (0 == node.getNumParents()) { wcMatrix->set(osg::computeWorldToLocal(this->getNodePath())); done = true; } traverse(node); } } virtual void apply(osg::Geode& node) { apply((osg::Node&)node); traverse(node); } osg::Matrixd* giveUpDaMat() { return wcMatrix; } private: bool done; osg::Matrix* wcMatrix; }; osg::Matrixd* getTextWorldToLocalCoords(osg::Geode* node) { osg::ref_ptr< GetWolrdToLocalVisitor> nwl = new GetWolrdToLocalVisitor(); if (node && nwl) { node->accept(*nwl); // osg::notify(osg::NOTICE)<<"GetLocalToWolrdVisitor: node->accept(*nwl);"
[osg-users] How to link a line between a osg::Text and a 3D model ?
Hi, I have failed to draw a line between a osg::Text and a 3D model,like image below So far,I have managed modify osg::Text to draw a linking line ,like draw a bounding box . One end of the line is linked to the text,but I do not know how to link another end to a moving 3D model. I figure must do something to compute the world matrix of the 3D model ,then convert it to the local matrix of the osg::Text,then draw another end of the line to the local matrix. here is what I have done,and the result is not good. 1. a class to get the text Wolrd To Local class GetWolrdToLocalVisitor:public osg::NodeVisitor { public : GetWolrdToLocalVisitor(): osg::NodeVisitor(NodeVisitor::TRAVERSE_PARENTS),done(false) { wcMatrix = new osg::Matrixd(); } virtual void apply(osg::Node& node) { if(!done) { if (0 == node.getNumParents()) { wcMatrix->set(osg::computeWorldToLocal(this->getNodePath())); done = true; } traverse(node); } } virtual void apply(osg::Geode& node) { apply((osg::Node&)node); traverse(node); } osg::Matrixd* giveUpDaMat() { return wcMatrix; } private: bool done; osg::Matrix* wcMatrix; }; osg::Matrixd* getTextWorldToLocalCoords(osg::Geode* node) { osg::ref_ptr< GetWolrdToLocalVisitor> nwl = new GetWolrdToLocalVisitor(); if (node && nwl) { node->accept(*nwl); // osg::notify(osg::NOTICE)<<"GetLocalToWolrdVisitor: node->accept(*nwl);"
dynamically change icon color like change text color?
Hi: I have some .png image use as a icon,the Original icons just have a single color symbol,like black,and the icon's background is transparent. Then in our app,we need draw the icon's with different colors under different conditions。 We want change the symbol's color or change the background color ,both will fine. So,dose the osg::Image::Util class provide such function? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=59740#59740 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] memory releasing problem by addchild and removechild
robertosfield wrote: > Hi Lv, > > On 10 March 2014 14:40, Lv Qing < ()> wrote: > > > Hi, > > > > ... > > I have read some posts about memory releasing problem by addchild and > > removechild. > > > > > There are no problems with memory management with addChild and removeChild. > It's been working very robustly for many years. > > > There are known bugs with the VS memory tracking tools though > > > > > > Here is my situation ,we developed osg app by qt in win7, we use class > > ViewerWidget to adding our viewer as a qt widget. > > > > We did a test to simply adding 5 osg::Node to a osg::Group then > > removing all nodes and the group.After first adding ,it increase about > > 4000K memory ,I think it is the proper storage of 5 osg::Node,then by > > the first removing,it only decrease 400K。Then by another 5 adding ,it > > only increase 400K instead 4000K,if we removing all nodes again ,it still > > decrease 400K. > > > > No matter how many time we tried to adding or remove nodes ,if we keep > > the max test node to 5,It always hold the 4000K memory even we remove > > all nodes. > > > > It looks like osg still hold the first 5 osg::Node as a Cache ,not > > releasing it immediately。 > > > > But I must admit ,it do releasing the memory properly in osgViewer > > or other osg examples by the same test! > > > > We use win7 ,osg2.9.16 ,osg3.2.0,we observe memory change by windows > > resource management > > > > > Might I suggest you try more reliable tools for tracking memory than provided > by windows? > > > Robert. > > -- > Post generated by Mail2Forum Thx!Mr Robert! what is your recommendation reliable tools for tracking memory by windows? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58572#58572 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] memory releasing problem by addchild and removechild
Hi, ... test code like this: class Test { osg::ref ptr root = new osg::Group(); osg::ref ptr testGroup = NULL; } void Test::TestForMeomory(bool value) { if (value) //adding 5 nodes { testGroup = new osg::Group(); for (int i = 0, i < 5,i++) { osg::ref ptr node = new osg::Node(); testGroup->addChild(node.get()); } root ->addChild(testGroup .get()); }else//remove all chilren { testGroup->removeChildren(0,testGroup->getNumChildren()); root ->removeChild(testGroup .get()); testGroup = NULL; } } Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58543#58543 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] memory releasing problem by addchild and removechild
Hi, ... I have read some posts about memory releasing problem by addchild and removechild. Here is my situation ,we developed osg app by qt in win7, we use class ViewerWidget to adding our viewer as a qt widget. We did a test to simply adding 5 osg::Node to a osg::Group then removing all nodes and the group.After first adding ,it increase about 4000K memory ,I think it is the proper storage of 5 osg::Node,then by the first removing,it only decrease 400K。Then by another 5 adding ,it only increase 400K instead 4000K,if we removing all nodes again ,it still decrease 400K. No matter how many time we tried to adding or remove nodes ,if we keep the max test node to 5,It always hold the 4000K memory even we remove all nodes. It looks like osg still hold the first 5 osg::Node as a Cache ,not releasing it immediately。 But I must admit ,it do releasing the memory properly in osgViewer or other osg examples by the same test! We use win7 ,osg2.9.16 ,osg3.2.0,we observe memory change by windows resource management. Need help! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58542#58542 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] how to zoom in and out a earth model with two fingers when using a Multi-touch screen
Hi, It is actually a osgEarth problem.but I have lost track of it in osgEarth forum,and someone there said it is something about GraphicsWindowQT and osg 3.1.3,so I think I may get help here. By osg 3.2.0 ,osgEarth 2.5, qt 4 ,win 7,I can zoom in and out earth with two fingers when running osgEarth_viewer or osgEarth_manip example,but when ingreated osgEarth to qt,like the osgEarth_qt_package example,the zoom funcion fails. In osgEarth forum ,Mr jasonbeverageReply said : " If you're using QT I think you need some patches to the GraphicsWindowQT to get it to work. I've attached a patch GraphicsWindowQt. It's been modified against osg 3.1.3 and not the trunk osg so I haven't submitted it to Robert yet. You should be able to see what I did to patch it and apply it locally." then I lost the track,what should I do? ThX! how to zoom in and out with two fingers when using a Multi-touch screen Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58503#58503 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can I make a png image's background transparent?
Hi, I use powerpoint to erase the background Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53107#53107 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How can I change the color of osg::PolygonMode?
Hi, ... when I push "w",osg cyclePolygonMode among line,point,fill. My question is How can I change the color of these osg::PolygonMode? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53052#53052 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Can I make a png image's background transparent?
Hi, ... I have attached one png image to the placenode,however the image has a white background ,is it possible to make the backgound transparent? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53051#53051 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] the original QT events seems conflicted with osg's event handle.
Thx!Aurelien ! Problem solved! Just implementing a dropEnterEvent method as well. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53047#53047 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to loaded the VPB generated terrain into osgearth?
Hi, ... 5 11 this parameters must as same sa the parameters you input in the osgDem command. Even that ,the ive you loaded with osgEarth may much slower than loaded from osg directly. Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53031#53031 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] the original QT events seems conflicted with osg's event handle.
Hi, I used "class ViewerWidget : public QWidget, public osgViewer::CompositeViewer" to integrate osg with qt. Then I used osg's event handle to handle some mouse push or release event ,it works fine. But there are some other QWidgets may pass event to my 3D ViewerWidget . For example ,I drag some symbols from one qt dialog to my 3D ViewerWidget ,which should activate the 3D ViewerWidget's drop event. Since I do not find osg has the drop event,so I define and realize one as follow in ViewerWidget .h virtual void dropEvent( QDropEvent* event ) { printf("drop"); } It is not functional. The I try other QtEvents like mousePushEvent or mouseMoveEvent,none works.It seems the osg or osgEarth's event handle may block the original QT events. Need help! Thx! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53033#53033 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to set a node invisible but not its children?
Hi, ... It sounds strange,but sometimes I want to use setNodemask(0) to set a node invisible,but still want its children all visible. Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52962#52962 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] a transparent MFC dialog blink problem
Hi, ... We create some dialogs (qt or MFC) which showed above the osg App,then we set them transparent as a message tip. We find these dialogs always blink:) Our OS is Winxp,We found if the Winxp's start menu block the osg App,the start menu blinks too!I heard Win 7 seems not have this problem. Need help! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52744#52744 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] how to buildethe debug version of osg under Linux?
Hi, When I cmake the osg source under Linux,it seems to bulid the release version by default.Just want to know how to bulid the debug version :) ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52005#52005 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is it necessary to re-compile osg when graphics card been changed?
Hi, Thank both of you.Your replays are very professional .I will try Valgrind to check the code. Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51999#51999 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Is it necessary to re-compile osg when graphics card been changed?
Hi, I have changed my graphics card from GTX260 to Quadro FX 370 . Recently I find my app sometimes crashed as below: in free() from /lib/libc.so.6 libnvidia-glcore.so.260.19.44 which seems untraceable. Then I find a mistake ,I still use the GTX260 driver after changing to the FX 370 . However ,the linux system seemd recognise the FX 370 without problem. Sure,It is easy to reinstall the correct driver,but since our app is already deployed to customer.I may trade this problem carefully. So my question is: Is a incorrect driver may cause the libnvidia-glcore.so. problem? and If I change the driver ,Is it necessary to re-compile osg under Linux? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51988#51988 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dead locking problem of osgDB::DatabasePager::DatabaseThread under QT/linux
robertosfield wrote: > HI Lv, > > On 29 October 2012 10:16, Lv Qing <> wrote: > > > I update 2.9.16 ,same problem!Not ready for osg3.0 ,too much change. > > > > 3.x might not address the problem you have, as it's likely down to > some peculiarity of how the custom threading is behaving, but I would > certainly recommend moving the 3.0.x. 2.9.16 is a developer version > and won't contain all the fixes and improvements available in 3.0.x. > The API changes between the two versions should be pretty minor, given > that it could fix bugs I would say that spending time upgrading to a > stable release would be much better than trying to get by with a > unsupported developer release. > > Robert. > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum I will try ,Thx! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50856#50856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dead locking problem of osgDB::DatabasePager::DatabaseThread under QT/linux
hybr wrote: > Hi > > at first try to update osg, may be you find this problem solved. > > Cheers. > > 27.10.2012, 17:39, "Lv Qing" <>: > > > Hi, > > > > My osg2.9.11 app is working under QT/Linux.Occasionally it suffers a dead > > lock as follows: > > #0 in _kernel_vsyscall() > > #1 in pthread_cond_wait_@@GLIBC_2.3.2 from/lib/libpthread > > #2 in Openthreads::Condition::wait from libOpenThreads > > #3 in osgDB::DatabasePager::DatabaseThread::run from libosgDB > > #4 in OpenThreads::ThreadPrivateActions::StartThread from > > libOpenThreads > > #5 in ?? from/usr/lib/libGL.so > > > > The only function I use from libosgDB is just loading a osgDEM terrain > > file,nothing else.So I think maybe DatabasePager rendering terrian file > > conflict about something. > > > > Another clue is my osg thread is integrated with other qt thread,just > > use the AdpateWidget.cpp example.Previously,I found DatabasePager rendering > > confilic with some QT signal.It presents just loading and runing a terrain > > file may affect some other thread's share memory and leading some unusual > > crash.I solve this problem by blocking these QT signals before every > > fram() function. > > > > I do not know if this two problem is relevant.I am just a 3D programmer > > ,not so good with muti-threding programing.I know there may be nothing > > about OSG,but I know there are so many experienced programmer in this forum > > can help me. > > > > This problem is so serious,it beyond my knowledge and it may be affect > > my career ,so anyone give a lead may be hlepful. > > > > Thank you! > > > > Cheers, > > Lv > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=50829#50829 > > > > ___ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum ThX for your reply! I update 2.9.16 ,same problem!Not ready for osg3.0 ,too much change. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50854#50854 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] dead locking problem of osgDB::DatabasePager::DatabaseThread under QT/linux
Hi, My osg2.9.11 app is working under QT/Linux.Occasionally it suffers a dead lock as follows: #0 in _kernel_vsyscall() #1 in pthread_cond_wait_@@GLIBC_2.3.2 from/lib/libpthread #2 in Openthreads::Condition::wait from libOpenThreads #3 in osgDB::DatabasePager::DatabaseThread::run from libosgDB #4 in OpenThreads::ThreadPrivateActions::StartThread from libOpenThreads #5 in ?? from/usr/lib/libGL.so The only function I use from libosgDB is just loading a osgDEM terrain file,nothing else.So I think maybe DatabasePager rendering terrian file conflict about something. Another clue is my osg thread is integrated with other qt thread,just use the AdpateWidget.cpp example.Previously,I found DatabasePager rendering confilic with some QT signal.It presents just loading and runing a terrain file may affect some other thread's share memory and leading some unusual crash.I solve this problem by blocking these QT signals before every fram() function. I do not know if this two problem is relevant.I am just a 3D programmer ,not so good with muti-threding programing.I know there may be nothing about OSG,but I know there are so many experienced programmer in this forum can help me. This problem is so serious,it beyond my knowledge and it may be affect my career ,so anyone give a lead may be hlepful. Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50829#50829 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] where is libosgQt in osg2.9.16?
Hi, ... I used QOSGWidget which requies libosgQt of osg 2.9.11 . Then I notice there is none libosgQt when I compiled osg 2.9.16 in the same envirement,it is even not in the makefile. where is libosgQt in osg2.9.16?I realy need it for my app,thx! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43988#43988 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] the near/far plane of two terrain model
Hi, ... I have two osga terrain model,A is a quite large country model,B is a quite small city model. I just put the city model above the country model,then I zoom in to see the city model ,it seems to been culled.Then I set the near/far plane ratio to 0.01 which solve the problem,however it take great cpu usage(from 10% to 60%),is there a better way to solve the problem?Thx! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42486#42486 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] crush __lll_lock_wait_private () from /lib/libc.so.6
Hi, ... I build a osg app on one machine with linux5.x and Nvidia GTX 260 which works fine. Then in another maching my osg sometimes crash as follows: #0 0x00fad402 in __kernel_vsyscall () #1 0x0522ede3 in __lll_lock_wait_private () from /lib/libc.so.6 #2 0x051be6f6 in _L_lock_15258 () from /lib/libc.so.6 #3 0x051bdbb4 in free () from /lib/libc.so.6 #4 0x02755709 in ?? () from /usr/lib/libGL.so.1 #5 0x091fc9f8 in ?? () #6 0x1000 in ?? () #7 0x0004 in ?? () #8 0x in ?? () I am not sure what is wrong casue the core file leading me to libGL or libc.so which I never care before. I suspect it is some thing wrong with Nvidia driver,casue the new maching has a different card Nvidia Quadar 400,and I just copy my old osg lib to the new maching without recompiling it. There is another crash wich related to NvidiaCore.so and there are some 2D apps work with my osg app,so I am not quit sure what is wrong. so anyone face the sanme problem? Need advice! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42484#42484 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText:FadeText attaching small object seems invisible initiatly
Hi, ... setCullingActive(false) works Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42452#42452 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] vector layer made by osgGIS take too much cpu usage
Hi, ... Here is the vector model ,25mb, nothing special。please just osgviewer it. I am a little supraise no one had this problem before,I think it's common for a globle world GIS system. Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42221#42221 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] vector layer made by osgGIS take too much cpu usage
Hi, ... Hi, ... No one know what I am talking about?or just no better solution? The problem seems small,but it really affect the pefermence of my app. Robert,need your advise! Thank you! Cheers, Lv Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42199#42199 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] what is the difference between pacthing and making two terrain models?
robertosfield wrote: > Hi Lv, > > You need to provide the master source file that the vpbmaster will > have created during the first run in the second run, otherwise > vpbmaster won't know what to patch. > > Robert. > > On Tue, Aug 23, 2011 at 1:06 PM, Lv Qing <> wrote: > > > Hi, > > > > ... I made a low resolution world.ive like this: > > > > vpbmaster --geocentric -t world-t.tif -d world-d.tif -l 8 -o > > world/world-8.ive > > > > then I wan to pitch a high resolution level of dem and image like this: > > > > vpbmaster --patch world/world-8.ive --levels 1 8 -d USA-d.tif -t USA-t.tif; > > > > > > It did take a long time of processing,but seems nothing change with the > > world-8.ive ,and the size of world-8.ive is still the same. > > > > > > do not know what's wrong,may be somthing about --levels ?need help! > > > > > > > > Thank you! > > > > Cheers, > > Lv > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=42191#42191 > > > > > > > > > > > > ___ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum sorry, robert ,i found the problem is not --patcing but my newly compiled vbp 0.9.12 .It seems failed add my dem data to the model I used VPB 0.9.10 and osg2.8 before , osgdem -t t.tif -d h.tif --geocentric -l 2 -o test.ive this Command always woked well before. I have newly compiled vbp 0.9.12 with osg2.9.16,then the same Command failed add the dem data h.tif to the model. Do know why,I use the same data,I didn't record any failure when compiling vpb0.9.12.need help! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42196#42196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText:FadeText attaching small object seems invisible initiatly
robertosfield wrote: > Hi Lz, > > Could this be small feature culling culling the text? You can disable > small feature via > > viewer.getCamera()->setCullingMode(viewer.getCamera()->getCullingMode() > | ~osg::CullSettings::SMALL_FEATURE_CULLING); > > Robert. > > On Wed, Aug 10, 2011 at 9:32 AM, Lv Qing <> wrote: > > > Hi, > > > > ... > > > > I have used osgText:FadeText attaching a model for displaying it's text > > information.I set the osgText:FadeText always > > > > It is OK in most case.Then I found if the model's size is small enough and > > the distance from viewer is too long(like 3000KM),the osgText:FadeText is > > not visible when the model been loaded the first time. > > > > Then I zoom the viewer in,the osgText:FadeText is visible in certain > > distance,if I zoom the viewer out again,the osgText:FadeText is still > > visible.Then nomatter how far the osgText:FadeText away from the viewer,it > > is OK like normal. > > > > It means when the first time I loaded the model ,the osgText:FadeText may > > keep invisible and waiting me to find it. > > > > It is certainly something about model's size,if it is big enough ,the > > problem will never happen. > > > > Need help! > > > > Thank you! > > > > Cheers, > > Lv > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=41967#41967 > > > > > > > > > > > > ___ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum Thx! Robert! I try viewer.getCamera()->setCullingMode(viewer.getCamera()->getCullingMode() | ~osg::CullSettings::SMALL_FEATURE_CULLING); it indeed solve the probem,however it instantly took a lot more cpu usage which make it unacceptable. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42192#42192 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] what is the difference between pacthing and making two terrain models?
Hi, ... I made a low resolution world.ive like this: vpbmaster --geocentric -t world-t.tif -d world-d.tif -l 8 -o world/world-8.ive then I wan to pitch a high resolution level of dem and image like this: vpbmaster --patch world/world-8.ive --levels 1 8 -d USA-d.tif -t USA-t.tif; It did take a long time of processing,but seems nothing change with the world-8.ive ,and the size of world-8.ive is still the same. do not know what's wrong,may be somthing about --levels ?need help! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42191#42191 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] vector layer made by osgGIS take too much cpu usage
Hi, ... No solution? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41969#41969 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg::Lod and osgText::FadeText
Hi, I have used osgText::FadeText for displaying some GIS lables. I also want to use osg::Lod for displaying the FadeText in a certain distance away from viewer. osg:OD* lod = new osg:od; lod->setRangeMode(osg:OD:ISTANCE_FROM_EYE_POINT); lod->addChild(textGeod,0,3000*1000); //textGeod already attacting a FadeText which set fixed size to the screen. root->addChild(lod.get()); I can not see the FadeText ,then I set lod->addChild(textGeod,0,1*1000); the FadeText is visible,but it is meaningless. Do not know why,need help. Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41968#41968 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgText:FadeText attaching small object seems invisible initiatly
Hi, ... I have used osgText:FadeText attaching a model for displaying it's text information.I set the osgText:FadeText always It is OK in most case.Then I found if the model's size is small enough and the distance from viewer is too long(like 3000KM),the osgText:FadeText is not visible when the model been loaded the first time. Then I zoom the viewer in,the osgText:FadeText is visible in certain distance,if I zoom the viewer out again,the osgText:FadeText is still visible.Then nomatter how far the osgText:FadeText away from the viewer,it is OK like normal. It means when the first time I loaded the model ,the osgText:FadeText may keep invisible and waiting me to find it. It is certainly something about model's size,if it is big enough ,the problem will never happen. Need help! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41967#41967 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] vector layer made by osgGIS take too much cpu usage
Hi, I use vpb made a globle Earth model which size is about 3G,when I use osgviewer to view the model ,it took me only 10%~15% cpu usage. [img]http://wush.net/trac/osggis/browser/images/Round1.jpg?format=raw[/img] then I use osgGIS to make a layer model base on the globle Earth model and a country boundries .shp vector file,the layer model is about 25 MB. when I use osgviewer to view the layer model ,it took me 50%~65% cpu usage!woo~ Is there something wrong about osgGIS or osg itself?Is there a better solution? ... Thank you! Cheers, Lv[img][/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41754#41754 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] what is the difference between pacthing and making two terrain models?
Hi, ... I will try it,another question,if two independent model is 2G each,pachting one to another make a 4G model,is right? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41536#41536 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] Is the VPB 1.0.0 available?
Hi, just look forward it ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41514#41514 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] what is the difference between pacthing and making two terrain models?
Hi, ... I know the new vpbmaster offer patching a new data to a existing VirtualPlanetBuilder database. In my app.I made a low resolution earth model,and a high resolution area terrain model,then just load both of them,it ljust looks like palace a high resolution area above the low resolution earth.It looks OK but not perfect. So my question is what is the difference between pacthing and making two terrain models?Thx! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41512#41512 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Computing Near and Far problem when viewing large terrain and small object
Hi, My applicaiton use a quiet large terrain model (about 4000KM*4000KM),and when I viewing some very small flying objects(about 20m*20m) above the terrain ,the object seems been culled. I know it is the Near and Far Plane issue,so I setComputeNearFarMode(osg::CullSetting::COMPUTE_NEAR_FAR_USING_PRIMITIVES); setNearFarRation(0.0001); It solves the problem,make the small objects visible. However it causes another problem ,I have also loaded some vector GIS models (such as roads,country boundraies) which made by osgGIS. When I COMPUTE NEAR FAR USING PRIMITIVES,the vector models cause me 50% ~60% CPU usage!When I disabled COMPUTE NEAR FAR USING PRIMITIVES,or hiding the vector models ,it only cost me 10%~15% CPU usage.The vector models is only 3.5mb. Is there a better solution to solve this problem? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40196#40196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] include conflict while compiling osg 2.9.11
robertosfield wrote: > Hi Lv, > > I have now a couple experiments of including the X11 headers before > includeDB/Serializer and adding your suggested addition to the > osgviewerQt example and find that X11 either screws up lots of other > OSG files or Qt headers. This isn't something that is wrong with > wither OSG or Qt, but the way that X11 headers use common names used > methods, typedefs and classes polluting any attempt of C++ files to > use these. The C++ files might be good citizens and use namespaces so > they don't polute third part code, but they can't protect themselves > from pollution from C headers included before them. > > If you are going to use headers that pollute in an uncontrolled way > like the X11 ones then you are left having to included them after any > of the other headers that would be polluted by them. > > I would add that with the latest version of the OSG we now have a > osgQt library with it's own GraphicsWindowQt that simplifies the > process of integating the OSG and Qt so that you no longer need to > play with window handles, so no need to go explictly include X11, so > the proplem you are seeing right now is something you shouldn't need > to come across. > > Robert. > > On Sat, May 7, 2011 at 4:55 PM, Lv Qing <> wrote: > > > Hi, > > > > > > When I integrating my osg application into a QT application ,I found some > > conflicting while using osg 2.9.11. > > > > /usr/local/include/osgDB/Serializer:640: error:expected unqualified-id > > before numeric constant > > /usr/local/include/osgDB/Serializer:640: error:expected `)' before numeric > > constant > > /usr/local/include/osgDB/Serializer:642: error:‘Setter’ undefined > > /usr/local/include/osgDB/Serializer:690: error:‘Setter’ undefined > > /usr/local/include/osgDB/Serializer: In constructor > > ‘osgDB::EnumSerializer::EnumSerializer(const char*, P, P > > (C::*)()const, int)’: > > /usr/local/include/osgDB/Serializer:643: error class > > ‘osgDB::EnumSerializer’ no ‘_setter’ > > /usr/local/include/osgDB/Serializer: In member function ‘virtual bool > > osgDB::EnumSerializer::read(osgDB::InputStream&, osg::Object&)’: > > /usr/local/include/osgDB/Serializer:663: error:‘_setter’ undefined > > /usr/local/include/osgDB/Serializer:668: error:‘_setter’ undefined > > > > I dig a little up found it conflics when I include: > > > > #include > > typedef Window WindowHandle; > > typedef osgViewer::GraphicsWindowX11::WindowData WindowData; > > > > in osgviewerQT.cpp. > > > > I have faced some other conflicting problems while using older > > osg version ,I have just changed the order sever times to solve > > the problem.But this time change the order causing other conflicting wtih > > other application's code. > > > > woo~I know it's not something wrong with OSG, just need help. > > > > > > > > > > > > > > > > > > > > ... > > > > Thank you! > > > > Cheers, > > Lv > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=39154#39154 > > > > > > > > > > > > ___ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum Hi, Thx ,Robert ! Never thought you do experiments yourself for me! I have already given up X11 and try osgviewerQtContext. However there is a new problem,when I run the osgviewerQtContext example,it seems OK in siglethread mode.When I set it to the ThreadPerCamera mode and resize the widget,it prints such error: QGLContext::makeCurrent(): Failed. After a few times resizing,it crashed and prints: Xlib: unexpected async reply (sequence 0x0)! X Error: 0 0 Major opcode: 0 () Resource id: 0x0 X Error: 0 0 Major opcode: 0 () Resource id: 0x0 Is it because osgviewerQtContext do not support muti-threading yet? Or is there a better way? THX! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39182#39182 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] performance while viewering a OSGGIS layer model
Hi, ... I mean why viewering a much small model (3.5mb) takes as much cpu usage as a large one(3.0G)? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39156#39156 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] different performance while viewering a VPB terrain model between osg2.8.4 and osg2.9.11
Chris 'Xenon' Hanson wrote: > On 5/7/2011 9:24 AM, Lv Qing wrote: > > > Is it because osg2.9.11 made improvements dealing with VPB generated > > terrain model ? > > > > OSG continues to improve. 2.9.11 will have lots of changes that could impact > performance. What is the purpose of your question -- if 2.9.11 works better, > why not just > use it instead of questioning why? > > -- > Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/ > Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. > Contracting. > "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum Thank you very much! The reason I cannot using 2.9.11 right now results in here: http://forum.openscenegraph.org/viewtopic.php?t=8300 -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39155#39155 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] include conflict while compiling osg 2.9.11
Hi, When I integrating my osg application into a QT application ,I found some conflicting while using osg 2.9.11. /usr/local/include/osgDB/Serializer:640: error:expected unqualified-id before numeric constant /usr/local/include/osgDB/Serializer:640: error:expected `)' before numeric constant /usr/local/include/osgDB/Serializer:642: error:‘Setter’ undefined /usr/local/include/osgDB/Serializer:690: error:‘Setter’ undefined /usr/local/include/osgDB/Serializer: In constructor ‘osgDB::EnumSerializer::EnumSerializer(const char*, P, P (C::*)()const, int)’: /usr/local/include/osgDB/Serializer:643: error class ‘osgDB::EnumSerializer’ no ‘_setter’ /usr/local/include/osgDB/Serializer: In member function ‘virtual bool osgDB::EnumSerializer::read(osgDB::InputStream&, osg::Object&)’: /usr/local/include/osgDB/Serializer:663: error:‘_setter’ undefined /usr/local/include/osgDB/Serializer:668: error:‘_setter’ undefined I dig a little up found it conflics when I include: #include typedef Window WindowHandle; typedef osgViewer::GraphicsWindowX11::WindowData WindowData; in osgviewerQT.cpp. I have faced some other conflicting problems while using older osg version ,I have just changed the order sever times to solve the problem.But this time change the order causing other conflicting wtih other application's code. woo~I know it's not something wrong with OSG, just need help. ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39154#39154 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] performance while viewering a OSGGIS layer model
Hi, ... Hi, I have a VPB generated terrain model (.osga),about 4000KM*4000KM and near 3 G. When I use osg2.8.4 viewering this model ,it cost me 15%~25% cpu usage. I also make a province boundary layer model using OSGGIS,it convers some vector shp file to a .ive model (all lines) which is about 4000KM*4000KM and only 3.5 MB. When I use osg2.8.4 viewering this layer model ,it cost me 15%~25% cpu usage too! Do not know why,need help,thx! Thx! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39150#39150 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] different performance while viewering a VPB terrain model between osg2.8.4 and osg2.9.11
Hi, I have a VPB generated terrain model (.osga),about 4000Km*4000KM and near 3 G. When I use osg2.9.11 viewering (osgviewer) this model ,it costs me only 5%~10% cpu usage. When I use osg2.8.4 viewering this model ,it cost me 15%~25% cpu usage. Is it because osg2.9.11 made improvements dealing with VPB generated terrain model ? Thx! ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39149#39149 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4
Hi, ... Problem solved! It is about some qt q_timer not-blocking signal issue,it is indeed nothing wrong with osg or vpb.I dont excatly know why,but I hope it will help others. Thank you all for your assistances in my most difficult time! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38847#38847 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4
Hi, ... use osg2.9.12 and vpb 0.9.10 ,it still fails。so desperate~~ Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38731#38731 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4
Hi, ... I dig up a littlte more this morning.I replace origina terrain.osga(about 2G) with a small terrain.osga(10mb) ,problem remains,my total memory is 4G. The error is printed within a net data send/receive management application which works normaly without osg application.The osg application seems distubed its or others share memory . I will try osg2.9.12 this afternoon. My VirtualPlanetBuilder is a very old version 0.9.1 ,I will also try a new version . I really hope it is not something wrong with Qt itself which is beyond my knowledge and capability,thx! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38724#38724 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4
Hi, ... Thank you for reply so soon!I build osg2.8.4 on linux only release no debug. I just notic that since osg2.9.8 there is some improvement of VirtualPlanetBuilder suppot and DatabasePager memory management and QT support.Maybe I should try this? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38710#38710 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4
Hi, ... linux qt4 osg2.8.4 I have use ViewerQT to integrate an osg application to a qt4 application witch has other developer's none-osg application. Then something strange happen,the ViewerQT seems disturb qt4 application's shared memory ,which cause some memory crash however not direct to my osg code but other developer's none-osg code.I removed my osg code entirely,everything is OK,so I pretty sure it is related to my osg code. Then I remove every osg code but just loading an vpb generated .osga terrain model,the shared memory disturbing issure return! Instead I load a commen .osga model like cow.ive ,it is OK! Thank you! Cheers, Lv Code: class CompositeViewerQT : public osgViewer::CompositeViewer, public AdapterWidget { public: CompositeViewerQT(QWidget * parent = 0, const char * name = 0, const QGLWidget * shareWidget = 0, WindowFlags f = 0): AdapterWidget( parent, name, shareWidget, f ) { setThreadingModel(osgViewer::CompositeViewer::SingleThreaded); setCameraManipulator(new osgGA::TrackballManipulator); osg::ref_ptr loadedModel= osgDB::readNodeFile("terrain.osga"); //vpb generated .osga model .error osg::ref_ptr loadedModel= osgDB::readNodeFile("cow.ive"); //OK setSceneData(loadedModel.get()); connect(&_timer, SIGNAL(timeout()), this, SLOT(updateGL())); _timer.start(10); } virtual void paintGL() { frame(); } protected: QTimer _timer; }; -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38705#38705 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with osgFX::SpecularHighlights
Hi, It works! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38558#38558 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] problem with osgFX::SpecularHighlights
Hi, when shl->setLightNumber(8) it prints " Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..) " when set Light Numbe below 8 ,it is OK. Code: int main() { osgViewer::Viewer* viewer = new osgViewer::Viewer(); osg::Group* root = new osg::Group(); osg::Node* node = new osg::Node() ; node = osgDB::readNodeFile("test.ive"); osgFX::SpecularHighlights* shl = new osgFX::SpecularHighlights(); shl->setTextureUnit(0); shl->setLightNumber(8); shl->setSpecularColor(osg::Vec4(1.0f,0.0f,0.0f,1.0f)); shl->setSpecularExponent(16.0f); shl->addChild(node); root->addChild(shl); osgUtil::Optimizer optimizer ; optimizer.optimize(root) ; viewer->setSceneData(root); viewer->realize(); viewer->run(); return 0 ; } ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38529#38529 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VSync & Linux & NVidia
Hi, ... I'm currently having a problem with NVidia hardware on Linux, it's not directly OSG related, but I hope someone here can help me. Here is my setup : linux NVidia GTX 260 graphic cards I have already enable "Sync to VBlank" in the Nvidia-settings.Every time I first start the computer and run the osg applicaiton,the VSync seemes not effect,the fps is about 100. Then I re-enter in the Nvidia-settings,just click the exit button and do nothing else.Then I restart the osg applicaiton ,the VSync works well ,the fps is about 60.It is OK since then until I restart the computer next time. Strange,is it? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38528#38528 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with osgviewerQT/AdapterWidget.cpp Using ViewetQT MDI version
Hi, solved as this,thx! void AdapterWidget::resizeGL( int width, int height ) { if (width < 1) width = 1; if (hight < 1) hight = 1; _gw->getEventQueue()->windowResize(0, 0, width, height ); _gw->resized(0,0,width,height); } Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38074#38074 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Is a MultiThreaded ViewetQT MDI version in unix possible?
Hi, The example of osgviewerQT MDI version only run in SigleThreaded mode. Is a MultiThreaded ViewetQT MDI version in unix possible? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38073#38073 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] problem with osgviewerQT/AdapterWidget.cpp Using ViewetQT MDI version
Hi, ... I wan to use ViewetQT MDI version. I load a simple model but it is not shown by following the example of osgviewerQT . Then I see the osgviewerQT/AdapterWidget.cpp soucecode,it writes std::cout<<"Using ViewetQT MDI version"
Re: [osg-users] [3rdparty] NodeTrackerManipulator for a globe Earth (Geocentric coordinate system)
zonk wrote: > Hi Lv (is that your realname?), > > what in detail does not work with the manipulator together with a round earh > database? > > Do you mean the up-vector of the camera, which is not updated and lead to an > misalligned orientation relativ to the tracked node? > > > Cheers, > Torben Yes!(Lv is my real name) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36722#36722 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [3rdparty] NodeTrackerManipulator for a globe Earth (Geocentric coordinate system)
Hi, ... NodeTrackerManipulator works fine for a flat Earth,I want to modify it for a Geocentric globe Earth like EarthManipulator dose in osgEarth. Has anyone done it before? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36576#36576 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] bulid a geocentric database with large image(.img )bigger than 4G
Hi, I have splite the big image to 4 small image ,then use osgdem -t testA.tiff -t testB.tiff -t testC.tiff -t testD.tiff,the prpblem seem to solved! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33562#33562 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] bulid a geocentric database with large image(.img )bigger than 4G
zonk wrote: > Hi, > > Another solution could be to use libtiff newer than 4.0, with support for > bigTiff (Tiff files larger than 4 GB) > > > Cheers, > Torben Thx,Zank! I try to compile GDAL1.70 which seems to support for bigTiff .But when VPB reprojecting the BigTiff image ,it report the .tiff file size is too big as the same. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33561#33561 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] bulid a geocentric database with large image(.img )bigger than 4G
robertosfield wrote: > Hi Lv, > > One approach you could take would be to reproject the imagery using > gdal_translate to the desired coordinate system and then set up VPB to > use the reprojected imagery. > > Robert. > > On Fri, Oct 29, 2010 at 1:10 PM, Lv Qing <> wrote: > > > Hi, > > > > ... > > Thx!But according this thread > > http://www.osgeo.org/pipermail/gdal-dev/2009-January/019638.html > > > > Geocentric coordinate systems are not supported by OGRSpatialReference > > and OGRCoordinateTransformation classes?! > > > > How can I use the gdal_translate command to reproject the imagery > > (test.img) to a > > Geocentric coordinate system? > > > > > > I want to build a geocentric database with large image(.img )bigger than 4G. > > > > Everytime VPB must reproject the .img image to a temp .tiff file first,the > > problem is .tiff file can not hold data larger than 4GB,so there also have > > problem when reprojecting the original image.I try to modify VPB source to > > make it reprojecting to a .img file,I don't know if it works correct,or is > > there a better way? > > > > > > > > > > > > Thank you! > > > > Cheers, > > Lv > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=33246#33246 > > > > > > > > > > > > ___ > > osg-users mailing list > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33560#33560 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to delete a NodeCallback*?
Hi, ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33297#33297 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to delete a NodeCallback*?
Hi, //simply define a node and a NodeCallback osg::Node* node = new osg::Node; osg::NodeCallback* nc = new osg::NodeCallback; //setup the nodecallback,no problem node -> setUpdateCallBack(nc ); //remove the nodecallback,no problem node -> setUpdateCallBack(NULL); or node -> removeUpdateCallBack(nc ); //want to release the osg::NodeCallback* memory ,crash every time! if (nc ) delete nc; Don't know why,need help! ... Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33283#33283 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] bulid a geocentric database with large image(.img )bigger than 4G
Hi, ... I want to build a geocentric database with large image(.img )bigger than 4G. Everytime VPB must reproject the .img image to a temp .tiff file first,the problem is .tiff file can not hold data larger than 4GB,so there also have problem when reprojecting the original image.I try to modify VPB source to make it reprojecting to a .img file,I don't know if it works correct,or is there a better way? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33246#33246 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] rotate a arrow to a point
Hi, I have create a arrow up to the sky ,its position is OSG::Vec3(x,y,z),its rotation is osg::quat quat1(osg::degreetoradians(90.0)*osg::Vec3(0,0,1)). I just want to rotate this arrow ,make it point to another point(osg::Vec3(x1,y1,z1)). Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27017#27017 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] use osgSim::SphereSegment to create a cone
Hi, ... I am using osgSim::SphereSegment to create a cone.like this: SphereSegment::SphereSegment(osg::Vec3(0,0), 100,0,360,-50,0). It looks OK,but there always has a secton betwen the acme and the bottom.I try to disable side color,surface color,spoke color,edgeLine color,there always has the secton,need help! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26759#26759 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] which is the best Manipulator for a globe Earth?
Hi, ... I have try the osgGA::TerrainManipulator to manipulat a globle Earth,it does not work very well .I also tried the EarthManipulator of osgEarth,it does well to a .earth model,but it seems work fail to a vpb generated (.osga) model.Can there be a solution? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26233#26233 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] High CPU usage problems with multi-monitor(TwinView) using Nvidia card, osg2.8
Hi, Need help, please Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=21380#21380 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] convertLatLongHeightToXYZ problem with a geocentric coordinate earth
lq37 wrote: > Hi, > > Thank you Glenn ! > Please tell me how to use local up vector to set the orientation > (pitch,roll,yaw) of my model. > > Thank you! > > Cheers, > Lv Already solve the "orientation " issue,Thanks everyone! Only the "height" issue remain. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=21084#21084 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] convertLatLongHeightToXYZ problem with a geocentric coordinate earth
Hi, Thank you Glenn ! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20979#20979 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] convertLatLongHeightToXYZ problem with a geocentric coordinate earth
Glenn Waldron wrote: > Lv, > > convertLatLongHeightToXYZ gives you a point on the surface of the ellipsoid, > but the actual polygons in the terrain model are just a tessellated > approximation of that ellipsoid. So if you want the point on the triangulated > surface, you have to convert to XYZ and then "clamp" down to the surface > (using the local up-vector at that point). > > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com > (http://pelicanmapping.com) : +1.703.652.4791 > > > On Sat, Dec 5, 2009 at 10:19 AM, Lv Qing < ()> wrote: > > > Hi, > > > > I have build a geocentric coordinate earth model using VPB and want to put > > a simple model on the suface of the earth. > > > > I use the convertLatLongHeightToXYZ function to convert the > > BLH(Lat,Long,Height) of the simple model to XYZ of the > > geocentric coordinate system.The result of X and Y seems OK,but the Z > > coordinate is always a bit higher above the earth suface(about 5000 m). > > > > > > > > Code: > > > > // load the earth model > > osg::CoordinateSystemNode* csn = new osg::CoordinateSystemNode; > > csn->setEllipsoidModel(new osg::EllipsoidModel()); > > osg::Node* TerrainNode= osgDB::readNodeFile("earth.osga"); > > csn->addChild(TerrainNode); > > > > //convert the BLH(50,130,0) to XYZ,I set height 0. > > osg::Vec3d m_surface; > > csn->getEllipsoidModel()->convertLatLongHeightToXYZ(osg:egreesToRadians(50.0f),osg:egreesToRadians(130.0f),0.0f,double(m_surface.x()),double(m_surface.y()),double(m_surface.z())); > > > > //draw a simple yellow line from center of the earth (osg::Vec3(0,0,0)) to > > the surface (osg::Vec3d m_surface); > > > > osg::Geode *geode_line = new osg::Geode; > > osg::Geometry *geom = new osg::Geometry(); > > geode_line->addDrawable(geom); > > csn->addChild(geode_line); > > osg::Vec3Array *v = new osg::Vec3Array(); > > v->push_back(osg::Vec3(0,0,0)); > > v->push_back(m_center); > > geom->setVertexArray(v); > > osg::Vec4Array *vc = new osg::Vec4Array(); > > vc->push_back(osg::Vec4(1.0f,0.5f,0.0f,1.0f)); > > geom->setColorArray(vc); > > geom->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE); > > geom->addPrimitiveSet(new osg:rawArrays(osg:rimitiveSet:INES,0,2)); > > > > > > > > > > > > As the result ,the end of the yellow line is obviously higher than the > > surface.Please tell me where I am wrong,THX! > > Thank you! > > > > Cheers, > > Lv > > > > -- > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=20950#20950 > > (http://forum.openscenegraph.org/viewtopic.php?p=20950#20950) > > > > > > > > > > Attachments: > > http://forum.openscenegraph.org//files/getattachment1_418.jpg > > (http://forum.openscenegraph.org//files/getattachment1_418.jpg) > > > > > > ___ > > osg-users mailing list > > () > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) > > > > > -- > Post generated by Mail2Forum Thank you !How can I use the local up-vector at that point? Is that? Code: osg::Vec3d m_center; csn->getEllipsoidModel()->convertLatLongHeightToXYZ(osg::inDegrees(40.0f),osg::inDegrees(120.0f),0.0f,double(m_center.x()),double(m_center.y()),double(m_center.z())); osg::Vec3d center; center.set(csn->getEllipsoidModel()->computeLocalUpVector(m_center.x(),m_center.y(),m_center.z())); -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20973#20973 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] convertLatLongHeightToXYZ problem with a geocentric coordinate earth
Hi, I have build a geocentric coordinate earth model using VPB and want to put a simple model on the suface of the earth. I use the convertLatLongHeightToXYZ function to convert the BLH(Lat,Long,Height) of the simple model to XYZ of the geocentric coordinate system.The result of X and Y seems OK,but the Z coordinate is always a bit higher above the earth suface(about 5000 m). Code: // load the earth model osg::CoordinateSystemNode* csn = new osg::CoordinateSystemNode; csn->setEllipsoidModel(new osg::EllipsoidModel()); osg::Node* TerrainNode= osgDB::readNodeFile("earth.osga"); csn->addChild(TerrainNode); //convert the BLH(50,130,0) to XYZ,I set height 0. osg::Vec3d m_surface; csn->getEllipsoidModel()->convertLatLongHeightToXYZ(osg:egreesToRadians(50.0f),osg:egreesToRadians(130.0f),0.0f,double(m_surface.x()),double(m_surface.y()),double(m_surface.z())); //draw a simple yellow line from center of the earth (osg::Vec3(0,0,0)) to the surface (osg::Vec3d m_surface); osg::Geode *geode_line = new osg::Geode; osg::Geometry *geom = new osg::Geometry(); geode_line->addDrawable(geom); csn->addChild(geode_line); osg::Vec3Array *v = new osg::Vec3Array(); v->push_back(osg::Vec3(0,0,0)); v->push_back(m_center); geom->setVertexArray(v); osg::Vec4Array *vc = new osg::Vec4Array(); vc->push_back(osg::Vec4(1.0f,0.5f,0.0f,1.0f)); geom->setColorArray(vc); geom->setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE); geom->addPrimitiveSet(new osg:rawArrays(osg:rimitiveSet:INES,0,2)); As the result ,the end of the yellow line is obviously higher than the surface.Please tell me where I am wrong,THX! Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20950#20950 Attachments: http://forum.openscenegraph.org//files/getattachment1_418.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] High CPU usage problems with multi-monitor(TwinView) using Nvidia card, osg2.8
Hi, Here is my setup: -- Intel Core 2 6420 2.13GHZ -- 3G RAM -- Nvidia GeForce GTX 260 (drivers: 6.14.11.8242 2009-3-9) -- winxp sp2,vs2005 -- osg2.8 In single monitor mode everything is working fine.When I run my application,CPU usage is a constant 10%~15%. But when I use two monitors and set the Nvidia card to "TwinView" mode ,the CPU usage dramatically raise to 50%.It is basically using an entire CPU core since I use a 2 core machine.Then I find the same problem happens when I run any OSG example or any OSG application in TwinView mode!It is OK when I use other multi-monitor mode such as "horizontal pan ". So I think maybe it is something wrong with the OSG2.8 and the "TwinView" mode of Nvidia card? Any one can help me? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20353#20353 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] High CPU usage problems with multi-monitor(TwinView) using Nvidia card, osg2.8
Hi, Here is my setup: -- Intel Core 2 6420 2.13GHZ -- 3G RAM -- Nvidia GeForce GTX 260 (drivers: 6.14.11.8242 2009-3-9) -- winxp sp2,vs2005 -- osg2.8 In single monitor mode everything is working fine.When I run my application,CPU usage is a constant 10%~15%. But when I use two monitors and set the Nvidia card to "TwinView" mode ,the CPU usage dramatically raise to 50%.It is basically using an entire CPU core since I use a 2 core machine.Then I find the same problem happens when I run any OSG example or any OSG application in TwinView mode!It is OK when I use other multi-monitor mode such as "pan mode". So I think maybe it is something wrong with the OSG2.8 and the "TwinView" mode of Nvidia card? Any one can help me? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20353#20353 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] Is it possible to combine the effect of osgOcean to the terrain model which is build by VPB?
Hi, ... I have build some terrain model by VPB(VirtualPlanetBuilder) which including some area of ocean.Is it possible to combine the effect of osgOcean to the terrain model which is build by VPB? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18802#18802 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] Can I build a round earth with DEM?
Hi, ... I have created an earth model with VPB ( an ellipsoid with earth texture) by the instruction post in http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem. (osgdem --bluemarble-west -t land_shallow_topo_west.tif --bluemarble-east -t land_shallow_topo_east.tif -l 8 -o earth.ive -a earth.osga) Can I just add some small area of DEM in the suface of this round earth? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18801#18801 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org