[osg-users] Change Perspective to Orthogonal View
Hi, I like to change the current perspective view of my camera to an orthogonal projection, keeping the same position. How can I do this? My current code of perspective camera: Code: _viewer->getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); _viewer->getCamera()->setProjectionMatrixAsPerspective(fovY * 180.0 / M_PI, aspectRatio, 0.1, 1000); ... Thank you! Cheers, Rômulo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70409#70409 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgvolume multipass (hybrid geometric/volumic) bug...?
I...have achieve something... I removed line 394 in VolumeScene.cpp Code: viewData->_backdropSubgraph->accept(*cv); and it works for me but I can't tell if it's good A few doc on the underlying osgvolume design would be cool... mp3butcher wrote: > Hi Robert et al > > It's been a while I use a customized osgVolume::MultipassTechnique and > experienced a bug I think was coming from my code but in fact it affect > osgvolume application too. > to reproduce > > Code: > osgvolume image --multipass --model cessna.osg > > > It seams there a bug in texgen (or somerhing like that) when writing back Pre > rendered scene FB to the main FB.. > It lead to artifacts when rotating the view such as > 1)models out of volume tend to disappears (experienced in osgvolume ex > rotating the view-when cessna comes out of the hull 2D projection-) > 2)models duplication (one is deformed and shouldn't be there) > > > > I would like to debug but would like to be sure how it work, > I tend to understand the following, stop me if I'm wrong: > 1/VolumeScene children (except tiles) is rendered as in depth and color > textures in prerender and copy back to main FBO > 2/Tiles Frontface then backface Hull are rendered to determine per pixels ray > lengths and then per pixel numiterations ( so rays can be casted in BFHull > pass) > > It's been a while I haven't dive in there. Can you tellme if I'm wrong and > give me directions of what could possibly go wrong in the current > MultipassTechnique... > > Thank you! > > Cheers, > Julien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70408#70408 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgvolume multipass (hybrid geometric/volumic) bug...?
Hi Robert et al It's been a while I use a customized osgVolume::MultipassTechnique and experienced a bug I think was coming from my code but in fact it affect osgvolume application too. It seams there a bug in texgen (or somerhing like that) when writing back Pre rendered scene FB to the main FB.. It lead to artifact such as 1)models out of volume tend to disappears (experienced in osgvolume ex) 2)In my own code it cause all sort of strange artifacts to reproduce Code: osgvolume image --multipass --model cessna.osg I would like to debug but would like to be sure how it work, I tend to understand the following, stop me if I'm wrong: 1/VolumeScene children (except tiles) is rendered as in depth and color textures 2/Frontface then backface Hull are rendered to determine per pixels ray lengths and then per pixel numiterations ( so rays can be casted in BFHull pass) It's been a while I haven't dive in there. Can you tellme if I'm wrong and give me directions of what could possibly go wrong in the current MultipassTechnique... Thank you! Cheers, Julien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70407#70407 ___ 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
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