Re: [osg-users] Convert .earth file to .osg format

2019-04-25 Thread Chris Hanson
I don't have a ready to consume tutorial, but your first goal is to use
osgEarth to build a dataset by merging all your data together.

The second is to feed that to VPB.

Let me think on the matter a bit.


On Thu, Apr 25, 2019 at 7:09 PM Steven Jones  wrote:

> Chris - Is there a tutorial of some sort that would cover the basic steps
> to begin building a database in VPB using GeoTiff elevation and imagery
> data for the input?
>
> I've downloaded and compiled VPB (MS Windows), but since it's mainly
> command-line driven, it's not all that intuitive. Also, most of what I've
> found online deals with modifying an existing database (that already has an
> .osgb master file).
>
> Any help/tips/tricks would be greatly appreciated!
>
> Cheers,
>
> Steven
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75900#75900
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer GraphicsWindowX11 Event Handling

2019-04-25 Thread Eric Stancliff
Chris,

I want to move away from using QOpenGLContexts because they limit my ability to 
implement the improved threading models compatible with 
osgViewer::CompositeViewer.  One of my devs has also bumped into issues with 
assumptions made by some low level osgEarth code for gpu techniques and draping.

Previously we were converting QEvents to osg events and adding to our event 
queue, which theoretically I could still do with this new approach.  But it 
would only be necessary for the X11 window as the events happen naturally for 
windows.  If there's a bug I can find to prevent the need for this translation 
it would be preferred.

Eric

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75901#75901





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Convert .earth file to .osg format

2019-04-25 Thread Steven Jones
Chris - Is there a tutorial of some sort that would cover the basic steps to 
begin building a database in VPB using GeoTiff elevation and imagery data for 
the input? 

I've downloaded and compiled VPB (MS Windows), but since it's mainly 
command-line driven, it's not all that intuitive. Also, most of what I've found 
online deals with modifying an existing database (that already has an .osgb 
master file).

Any help/tips/tricks would be greatly appreciated!

Cheers,

Steven

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75900#75900





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer GraphicsWindowX11 Event Handling

2019-04-25 Thread Chris Hanson
My first question would be why you didn't like the existing Qt OSG options.

What were you seeking to improve?

On Thu, Apr 25, 2019, 11:49 AM Eric Stancliff 
wrote:

> Hello!
>
> I'm currently working on embedding an osgViewer into a QWidget (using
> Qt).  We've historically done this using QGLWidget and the
> EmbeddedGraphicsWindow, letting Qt manage the OpenGL contexts.  I'd like to
> move away from using QGLWidget and using contexts managed by OSG.  I've
> accomplished this on windows but am running into issues on Linux.  I'm
> creating the window as follows:
>
> Code:
>
> #include 
>
> #ifdef WIN32
> #include 
> #define OSG_PLATFORM_WINDOW osgViewer::GraphicsWindowWin32
> #define WINDOW_HANDLE HWND
> #else
> #include 
> #define OSG_PLATFORM_WINDOW osgViewer::GraphicsWindowX11
> #define WINDOW_HANDLE Window
> #endif
>
> osg::GraphicsContext::Traits* createWindowTraits(QWidget* OwningWidget)
> {
> auto traits = new osg::GraphicsContext::Traits();
> traits->x = 0;
> traits->y = 0;
> traits->width = 1080;
> traits->height = 720;
> traits->doubleBuffer = true;
> traits->useCursor = true;
> //traits->installEventHandler = true;
> if (OwningWidget)
> {
> OSG_PLATFORM_WINDOW::WindowData* data = new
> OSG_PLATFORM_WINDOW::WindowData((WINDOW_HANDLE)OwningWidget->winId());
> traits->inheritedWindowData = data;
> }
> return traits;
> }
>
>
>
>  and then in my class derived from Viewer with the traits created
> above 
>
> Code:
>
>
> getCamera()->setGraphicsContext(osg::GraphicsContext::createGraphicsContext(traits));
>
>
>
>
> Everything is working as expected on Windows.  The problem I'm having is
> that on Linux (RHEL7), my event handlers never get any mouse/keyboard
> events.  I'm unclear whether QWidget's X11 implementation for the owning
> widget is eating my events, or if the inherited window implementation of
> the GraphicsWindowX11 has a bug.  The resize events I'm passing from
> QWidget's resize and pushing to my viewers event queue are effective so my
> window is successfully embedded in the correct widget and rendering
> properly. Just events aren't working.
>
> Any suggestions?
>
> Thanks!
>
> Eric
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75893#75893
>
>
>
>
>
> ___
> 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] Convert .earth file to .osg format

2019-04-25 Thread Chris Hanson
You're welcome. It may also be conceivable to use osgearth tools to produce
a composite tilemap set to feed to VPB, giving you some of the best of both
worlds.



On Thu, Apr 25, 2019, 4:50 PM Steven Jones  wrote:

> I'd considered VPB previously, but now it looks like it may be the most
> practical  solution to meet our needs. Wish me luck, and thanks again Chris!
>
> Cheers,
>
> Steven
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75897#75897
>
>
>
>
>
> ___
> 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] Convert .earth file to .osg format

2019-04-25 Thread Steven Jones
I'd considered VPB previously, but now it looks like it may be the most 
practical  solution to meet our needs. Wish me luck, and thanks again Chris!

Cheers,

Steven

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75897#75897





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Optimizer FLATTEN_STATIC_TRANSFORMS not all transforms are flattened

2019-04-25 Thread Sergey Lukashev
Thank you for responses!

Turns out my scene contained hanging leaf transforms and it was the issue. I 
removed them and now it works just fine.

Regarding the root node issue you have mentioned. I've noticed the variable 
name "nodeWeCannotRemove" and already tried adding a dummy Group above it but 
without it Optimizer will just apply the transform and set its matrix to 
identity. So it should work anyway.

Regards, Sergey.

25.04.2019, 11:26, "Robert Osfield" :
> Hi Sergey,
>
> The FLATTEN_STATIC_TRANSFORMS operation is not able to remove the
> topmost node so can't flatten this MatrixTransform you've added. This
> limitation is due to the optimization being called with external code
> holding a pointer/reference to that topmost node. To be able to
> optimize this topmost node away we'd need to come up with a new API
> that requires users to replace the pointer references they have.
>
> Without any API changes the way to get round this limitation is to
> have a Group node as the topmost node, then have the new
> MatrixTransform as a child of this group, then the original scene
> graph below the MatrixTransform.
>
> Robert.
>
> On Wed, 24 Apr 2019 at 21:16, Sergey Lukashev  wrote:
>>  Hello, osg folks!
>>
>>  I've used FLATTEN_STATIC_TRANSFORMS and it works quite good. However, now I 
>> need to rotate the scene, so I added a MatrixTransform on top of the root 
>> node. But it does not get flattened for SOME models. I properly set 
>> DataVariance of every Transform to STATIC before running the Optimizer. Can 
>> somebody point out where issue could come from and how to debug or solve it?
>>
>>  --
>>  Regards, Sergey.
>>  ___
>>  osg-users mailing list
>>  osg-users@lists.openscenegraph.org
>>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgViewer GraphicsWindowX11 Event Handling

2019-04-25 Thread Eric Stancliff
Hello!

I'm currently working on embedding an osgViewer into a QWidget (using Qt).  
We've historically done this using QGLWidget and the EmbeddedGraphicsWindow, 
letting Qt manage the OpenGL contexts.  I'd like to move away from using 
QGLWidget and using contexts managed by OSG.  I've accomplished this on windows 
but am running into issues on Linux.  I'm creating the window as follows:

Code:

#include 

#ifdef WIN32
#include 
#define OSG_PLATFORM_WINDOW osgViewer::GraphicsWindowWin32
#define WINDOW_HANDLE HWND
#else
#include 
#define OSG_PLATFORM_WINDOW osgViewer::GraphicsWindowX11
#define WINDOW_HANDLE Window
#endif

osg::GraphicsContext::Traits* createWindowTraits(QWidget* OwningWidget)
{
auto traits = new osg::GraphicsContext::Traits();
traits->x = 0;
traits->y = 0;
traits->width = 1080;
traits->height = 720;
traits->doubleBuffer = true;
traits->useCursor = true;
//traits->installEventHandler = true;
if (OwningWidget)
{
OSG_PLATFORM_WINDOW::WindowData* data = new 
OSG_PLATFORM_WINDOW::WindowData((WINDOW_HANDLE)OwningWidget->winId());
traits->inheritedWindowData = data;
}
return traits;
}



 and then in my class derived from Viewer with the traits created above 

Code:

getCamera()->setGraphicsContext(osg::GraphicsContext::createGraphicsContext(traits));




Everything is working as expected on Windows.  The problem I'm having is that 
on Linux (RHEL7), my event handlers never get any mouse/keyboard events.  I'm 
unclear whether QWidget's X11 implementation for the owning widget is eating my 
events, or if the inherited window implementation of the GraphicsWindowX11 has 
a bug.  The resize events I'm passing from QWidget's resize and pushing to my 
viewers event queue are effective so my window is successfully embedded in the 
correct widget and rendering properly. Just events aren't working.

Any suggestions?

Thanks!

Eric

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75893#75893





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Optimizer FLATTEN_STATIC_TRANSFORMS not all transforms are flattened

2019-04-25 Thread Robert Osfield
Hi Sergey,

The FLATTEN_STATIC_TRANSFORMS operation is not able to remove the
topmost node so can't flatten this MatrixTransform you've added.  This
limitation is due to the optimization being called with external code
holding a pointer/reference to that topmost node.  To be able to
optimize this topmost node away we'd need to come up with a new API
that requires users to replace the pointer references they have.

Without any API changes the way to get round this limitation is to
have a Group node as the topmost node, then have the new
MatrixTransform as a child of this group, then the original scene
graph below the MatrixTransform.

Robert.

On Wed, 24 Apr 2019 at 21:16, Sergey Lukashev  wrote:
>
> Hello, osg folks!
>
> I've used FLATTEN_STATIC_TRANSFORMS and it works quite good. However, now I 
> need to rotate the scene, so I added a MatrixTransform on top of the root 
> node. But it does not get flattened for SOME models. I properly set 
> DataVariance of every Transform to STATIC before running the Optimizer. Can 
> somebody point out where issue could come from and how to debug or solve it?
>
>
>
>
>
> --
> Regards, Sergey.
> ___
> 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] Optimizer FLATTEN_STATIC_TRANSFORMS not all transforms are flattened

2019-04-25 Thread Voerman, L.
Hi Sergey,
without example I can only guess what might go wrong,
maybe you need
FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS
or some of the nodes have a name, nodemask or userdata or stateset.
all of those could prevent the optimizer from removing the transform.
I also had some trouble getting the optimizer to remove the top node of a
graph, so adding a simple Group on top might also help.
Regards, Laurens.

On Wed, Apr 24, 2019 at 10:16 PM Sergey Lukashev  wrote:

> Hello, osg folks!
>
> I've used FLATTEN_STATIC_TRANSFORMS and it works quite good. However, now
> I need to rotate the scene, so I added a MatrixTransform on top of the root
> node. But it does not get flattened for SOME models. I properly set
> DataVariance of every Transform to STATIC before running the Optimizer. Can
> somebody point out where issue could come from and how to debug or solve it?
>
>
>
>
>
> --
> Regards, Sergey.
> ___
> 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