Re: [osg-users] VPB and terrain normals
Thanks Nickolai ! :) On Thu, Nov 24, 2016 at 7:15 PM, Nickolai Medvedevwrote: > Hi, Nick! :) > > You try to create the implementation of a terrain? > Try this example. > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69496#69496 > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB and terrain normals
Hi, Nick! :) You try to create the implementation of a terrain? Try this example. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69496#69496 18_FindingTriangles.7z Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB and terrain normals
Thanks Robert for the good explanation (as always ;-) ). I was looking for the piece of the code in VPB that generates the normals, was curious about the algo. But found it in the osgUtil::SmoothingVisitor .. This one is actually generating very nice results. Thanks again! Cheers, Nick On Thu, Nov 24, 2016 at 4:49 PM, Robert Osfieldwrote: > On 24 November 2016 at 14:32, Trajce Nikolov NICK > wrote: > > anyone with a knowledge if VPB is generating normals for the terrain skin > > and can point me to the code snippet where these normals are being > > calculated? > > By default VirtualPlanetBuilder creates paged databases that use > osgTerrain::TerrainTile for the representation and rendering of the > individual terrain tiles. The height field component > (HeightFieldLayer) is uses an osg::HeightField internally to store all > the heights, no normals are stored. > > The normals used for rendering at created by the TerrainTechnique, if > you use the default osgTerrain::GeometryTechnhique then it'll create > an osg::Geometry with vertices, normals and texcoords to do the > rendering. If you use the DisplacementMappingTechnique then it'll be > the shaders that that will compute the normals in the vertex shader. > > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB and terrain normals
On 24 November 2016 at 14:32, Trajce Nikolov NICKwrote: > anyone with a knowledge if VPB is generating normals for the terrain skin > and can point me to the code snippet where these normals are being > calculated? By default VirtualPlanetBuilder creates paged databases that use osgTerrain::TerrainTile for the representation and rendering of the individual terrain tiles. The height field component (HeightFieldLayer) is uses an osg::HeightField internally to store all the heights, no normals are stored. The normals used for rendering at created by the TerrainTechnique, if you use the default osgTerrain::GeometryTechnhique then it'll create an osg::Geometry with vertices, normals and texcoords to do the rendering. If you use the DisplacementMappingTechnique then it'll be the shaders that that will compute the normals in the vertex shader. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VPB and terrain normals
Hi Community, anyone with a knowledge if VPB is generating normals for the terrain skin and can point me to the code snippet where these normals are being calculated? Thanks a lot as always -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Having problems running the osgViewerWX example (GLExtensions returning as null)
Hi, I'm trying to get the osgViewerWX example to work. I am using wxWidgets 3.1.0 and OSG 3.4.0. Everything has been compiled under VS2015 for x86. When I first attempted to compile the example there were two errors, the signatures for two functions had changed. One was easy to fix (parameters had moved around) whilst the other is not so clear cut. osgViewerWX.cpp bool GraphicsWindowWX::makeCurrentImplementation(): Code: _canvas->SetCurrent(); This isn't valid anymore as SetCurrent() requires a wxGLContext to be passed to it. I just passed _canvas to the function since it seemed like that was intended originally. It doesn't seem to make a difference if I comment it out. So once I got it compile, on running, I found that an exception would be thrown in Renderer::initialize(osg::State* state). Upon inspection it seems that NULL is being returned when trying to retrieve the extension from the current state: Code: osg::GLExtensions* ext = state->get-osg::-GLExtensions-(); replaced gt and lt symbols with dashes, html filter removes them :( I'm still learning on using OSG so I don't really know what needs to be changed to fix this or if this is actually a problem with my hardware. I would appreciate any help. Thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69490#69490 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Exporting OpenFlight from OSG and DDS textures
Hi, Again, this is not an OSG-related question. You should really train your C++ skills before moving on to advanced topics. Hi,What is the equivalent function for std::max in osg 3.4.0 deltaMax = std::max(deltaMax, delta); showing error not a member of std. Without context (compiler, code, version ) it is impossible to help you. std::max is defined in , so chances a missing include cuases the error are high. You could have gotten this information by using a search machine of your choice btw. This hive-mind is supposed to help with more OSG-related stuff... so please try harder to solve the C++/programming problems before asking them here. Cheers Sebastian ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69489#69489 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Exporting OpenFlight from OSG and DDS textures
Hi,What is the equivalent function for std::max in osg 3.4.0 deltaMax = std::max(deltaMax, delta); showing error not a member of std. ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69489#69489 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] [osgEarth] several problems and questions
Hi, First of all, please excuse me for my English. I'm a beginner in osg and osgEarth (and SIG). I have to make an spatial viewing application with osgEarth, so i have to use osgEarth API. I load an not georeferenced 3D model and i have the geo information in other file : DATUUM, Projection system, EPSG and an offset in meter for cartographic system and in seconds for geo system. I looking for set those informations programatically. Set the SRS is not a big deal, but I don't know how to set the offset. I use a osgEarth::Map object with osgEarth::ModelLayer, I set the layer and put it in my map, then i set the SRS of my map : map->getSRS()->create(".") and i create MapNode from my map. How I can set my offset ? I also have a problem with EarthManipulator::setViewpoint(), it seems to didn't work. even in osgEarth example : osgearth_city, that create boston city and try to set a viewpoint close to boston. in the application, the viewpoint is never set, the view don't move. Thank you! Cheers, Djoé -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69487#69487 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Exporting OpenFlight from OSG and DDS textures
On 24 November 2016 at 10:35, Rambabu Repakawrote: > Hi, > > dynamic_cast (*_oceanSurface->getCullCallback()) > (_oceanSurface.get(), ); > > still showing error .How can i do ? This isn't an OSG or osgEarth question. You need to learn C++ or put in a bit more effort before firing off trivial questions to the community. You need to fix this problem yourself, you have to keep developing your skills as a programmer. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Exporting OpenFlight from OSG and DDS textures
Hi, dynamic_cast (*_oceanSurface->getCullCallback()) (_oceanSurface.get(), ); still showing error .How can i do ? ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69486#69486 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Exporting OpenFlight from OSG and DDS textures
On 24 November 2016 at 09:25, Rambabu Repakawrote: > Hi,In osg 3.2.3 > (*_oceanSurface->getCullCallback())(_oceanSurface.get(), ); is working but > in osg 3.4.0 error is showing > > Error 2 error C2064: term does not evaluate to a function taking 2 > argumentsD:\osgocean-master1\osgocean-master\src\osgOcean\OceanScene.cpp > 884 1 osgOcean > > How can i solve this ? > > in osg 3.2.3 getcullcallback() is in nodecallback > in osg 3.4.0 getcullcallback() is in callback You will need to adjust the problem code to use a dynamic_cast<> to osg::NodeCallback, or change the problem code to call the osg::Callback::run(..) method. The parameter mean and order is identical between the two types of callback. The osg::Callback is more flexible, which is it's reason for use in OSG-3.4 and beyond. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Exporting OpenFlight from OSG and DDS textures
Hi,In osg 3.2.3 (*_oceanSurface->getCullCallback())(_oceanSurface.get(), ); is working but in osg 3.4.0 error is showing Error 2 error C2064: term does not evaluate to a function taking 2 argumentsD:\osgocean-master1\osgocean-master\src\osgOcean\OceanScene.cpp 884 1 osgOcean How can i solve this ? in osg 3.2.3 getcullcallback() is in nodecallback in osg 3.4.0 getcullcallback() is in callback ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69484#69484 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org