Re: [osg-users] Issue with setCompileOnNextDraw (Robert Osfield)

2019-12-05 Thread Heitbrink, David A
I am only doing setCompileOnNextDraw, after the load of my main scene. If I do 
not do it, then I get a lot more severe hangs...however after some further 
test I ran into some complications. I have a user set option to use this or 
not. I found if the scene is larger than what can fit on the GPU, I am better 
off not doing this.

I am currently running nodes with 3-4 projectors per node, 2 video cards per 
node. Each projector runs has its own process. What I found from running a 
profiler is glGet*, caused periodic hangs, this included:  

glGetInteger64v(GL_TIMESTAMP, ); 

I setup a condition around where said line is used so it is not being run 
unless stats are enabled. So it turns out when I run without stats enabled, I 
get a lot fewer hangs...but it makes it harder to quantify without stats. I 
am doing ground based simulation, so I have pretty high optical flow rates so 
dropped frames are really noticeable. I don't really see this on my development 
machine, or not to the same degree. My deployment machines are older and are 
running multiple processes. So...problem solved.maybe? 

I am still getting 100's of :
Warning: detected OpenGL error 'invalid enumerant' at after 
stateset.compileGLObjects in GLObjectsVisitor::apply(osg::StateSet& stateset)

After setCompileOnNextDraw, and I am still concerned about these messages. I 
have not tracked down exactly what objects being compiled at the time 
are..or if it's every object for that matter. 

I was also looking at the shared state manager, I am using OSG 3.6.3. Is there 
anything in particular I should do to use this?

-Original Message-
From: osg-users  On Behalf Of 
osg-users-requ...@lists.openscenegraph.org
Sent: Wednesday, December 4, 2019 3:05 PM
To: osg-users@lists.openscenegraph.org
Subject: osg-users Digest, Vol 150, Issue 2

Send osg-users mailing list submissions to
osg-users@lists.openscenegraph.org

To subscribe or unsubscribe via the World Wide Web, visit

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

or, via email, send a message with subject or body 'help' to
osg-users-requ...@lists.openscenegraph.org

You can reach the person managing the list at
osg-users-ow...@lists.openscenegraph.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of osg-users digest..."


Today's Topics:

   1. Issue with setCompileOnNextDraw (Heitbrink, David A)
   2. Re: Issue with setCompileOnNextDraw (Robert Osfield)


--

Message: 1
Date: Wed, 4 Dec 2019 14:49:54 +
From: "Heitbrink, David A" 
To: "osg-users@lists.openscenegraph.org"

Subject: [osg-users] Issue with setCompileOnNextDraw
Message-ID:



Content-Type: text/plain; charset="us-ascii"

I am doing a setCompileOnNextDraw on each render for each camera , (I typically 
only have 1) loading my scene. 

After doing thing I am getting a large number of error messages:

Warning: detected OpenGL error 'invalid enumerant' at after 
stateset.compileGLObjects in GLObjectsVisitor::apply(osg::StateSet& stateset)

It also seems that I am getting a large number of hangs. It looks like I have 
plenty of free memory on the GPU. I am pretty sure this is from loading 
textures.

 When should you use setCompileOnNextDraw? Has any else scene this issue before?
 
-Original Message-
From: osg-users  On Behalf Of 
osg-users-requ...@lists.openscenegraph.org
Sent: Tuesday, December 3, 2019 3:05 PM
To: osg-users@lists.openscenegraph.org
Subject: [External] osg-users Digest, Vol 150, Issue 1

Send osg-users mailing list submissions to
osg-users@lists.openscenegraph.org

To subscribe or unsubscribe via the World Wide Web, visit

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

or, via email, send a message with subject or body 'help' to
osg-users-requ...@lists.openscenegraph.org

You can reach the person managing the list at
osg-users-ow...@lists.openscenegraph.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of osg-users digest..."


Today's Topics:

   1. OpenSceneGraph Forum moved to googlegroups (Robert Osfield)


--

Message: 1
Date: Tue, 3 Dec 2019 10:35:27 +
From: Robert Osfield 
To: OpenSceneGraph Users 
Subject: [osg-users] OpenSceneGraph Forum moved to googlegroups
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hi All,

Our old forum was generously created by a member of our community, but a number 
of years ago the creator/manager of the forum moved on work in an area 
unrelated to the OpenSceneGraph so the forum no longer had a maintainer, 
finally the old server that was hosting has gone too.

Previous discussions in the community d

[osg-users] Issue with setCompileOnNextDraw

2019-12-04 Thread Heitbrink, David A
I am doing a setCompileOnNextDraw on each render for each camera , (I typically 
only have 1) loading my scene. 

After doing thing I am getting a large number of error messages:

Warning: detected OpenGL error 'invalid enumerant' at after 
stateset.compileGLObjects in GLObjectsVisitor::apply(osg::StateSet& stateset)

It also seems that I am getting a large number of hangs. It looks like I have 
plenty of free memory on the GPU. I am pretty sure this is from loading 
textures.

 When should you use setCompileOnNextDraw? Has any else scene this issue before?
 
-Original Message-
From: osg-users  On Behalf Of 
osg-users-requ...@lists.openscenegraph.org
Sent: Tuesday, December 3, 2019 3:05 PM
To: osg-users@lists.openscenegraph.org
Subject: [External] osg-users Digest, Vol 150, Issue 1

Send osg-users mailing list submissions to
osg-users@lists.openscenegraph.org

To subscribe or unsubscribe via the World Wide Web, visit

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

or, via email, send a message with subject or body 'help' to
osg-users-requ...@lists.openscenegraph.org

You can reach the person managing the list at
osg-users-ow...@lists.openscenegraph.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of osg-users digest..."


Today's Topics:

   1. OpenSceneGraph Forum moved to googlegroups (Robert Osfield)


--

Message: 1
Date: Tue, 3 Dec 2019 10:35:27 +
From: Robert Osfield 
To: OpenSceneGraph Users 
Subject: [osg-users] OpenSceneGraph Forum moved to googlegroups
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hi All,

Our old forum was generously created by a member of our community, but a number 
of years ago the creator/manager of the forum moved on work in an area 
unrelated to the OpenSceneGraph so the forum no longer had a maintainer, 
finally the old server that was hosting has gone too.

Previous discussions in the community didn't come up with a replacement, and as 
I don't have any expertise in this direction myself I have adopted the 
osg-users mailing list mirror on googlegroups as the forum, so now when you go 
to forum.openscenegraph you'll be redirected to:

  https://groups.google.com/forum/#!forum/osg-users

The googlegroup doesn't have a record of the membership to the old forum, and I 
don't have a record either, so to use the new googlegroup forum you'll need to 
register with it.

Alternatively, you can use the original osg-users mailing list, and posts will 
be crossed posted automatically.

Cheers,
Robert.
-- next part --
An HTML attachment was scrubbed...
URL: 


--

Subject: Digest Footer

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


--

End of osg-users Digest, Vol 150, Issue 1
*
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] To run this Examples osgdeferred , where to download this osgdeferred about Data Resources ?

2019-10-16 Thread David Heitbrink
They are kept in a separate repo:
https://github.com/openscenegraph/OpenSceneGraph-Data

Do keep in mind the license for said data is different:
>From GitHub:

If not otherwise specified all files in the OpenSceneGraph-Data are provided 
free for non commericial usage. Commericial users may use the data for testing 
and development purposes, but may not distribute these models with commericial 
products.

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





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


Re: [osg-users] OSG BOF at SIGGRAPH 2019 in Los Angeles

2019-07-22 Thread David Glenn
Greetings John!

I will be there! 

I didn't have anything to present this year. I've been digging myself out of 
the Ridgecrest Earthquake so I can get back to work.  I will bring my AV gear 
that you need.

If anyone has an issue messing around with the ".earth" files for OSGEarth I 
could give a brief guidance on that - given that I've been messing around on 
that stuff for a spell now!

... 

Thank you!

Cheers,
David

----
David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


[osg-users] Osing OpenXR in OSG

2019-06-24 Thread David Glenn
Greetings!

I guess that I'm going to gripe on this subject like I did a year ago!
I know that OpenXR is at least in Open Bata and I was wondering what progress 
anyone has made incorporating it in OSG. 

While I was in GDC I did see Khronos make some progress in this area and I even 
got to see someone do a demo of a VR display using HTC Vive. I challenged the 
group that worked on that and never heard from them again.

I think one of the holdbacks was the interactive controls was not set yet, but 
from my perspective, they could have worked at the visual. 

I know that if I had the time and resources that I would hack this out, but one 
of the sad drawbacks of having a job is not having the time. It must be that 
most people still see this technology as a flash in the pan, but I think it’s 
taking on traction.  


... 

Thank you!

David Glenn.


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Keeping camera fixed

2019-06-03 Thread David Grüner
Here the correct code!

 

 

 

/code config

 

 

 

 

 

 

-ipcrash-p74c

 

 

 

set user owner =ip:xxx

 

 

Gesendet: Freitag, 31. Mai 2019 um 12:08 Uhr
Von: "Renzo Scaletta" 
An: osg-users@lists.openscenegraph.org
Betreff: [osg-users] Keeping camera fixed

Hi All,

I am able to animate my scene (bodies translating and rotating in the space) providing a NodeCallback with setUpdateCallback to each PositionAttitudeTransform I want to animate.
What I see is that the camera "follows" in some way the bodies movements without having done anything in the code to trigger that behavior explicitly.

Do you have any tips to keep the camera fixed during the update of nodes position and attitude? Or any details of the OSG code I should focus on (I am quite a beginner)?

Thanks,
Renzo

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





___
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] How to implement a Laser Simulation?

2019-05-29 Thread David Heitbrink
I did a similar project with adaptive headlamps a couple years ago.

The way I would do this is to think about this as sort of a spot light with a 
projector slide. So we can also think about this also a spot light with a 
shadow. 

So what I did was to setup a "slide" scene in which I would render the shape of 
what I wanted projected. So in your case you can setup a pre-render camera with 
like a 512x512 with the clear color set to black. You can then just render a 
single green line. You can do what - ever with this line, or do the laser light 
show thing and do a smiley face - whatever.

Then I would setup a camera do be your sort of laser light head, so you can add 
another camera in your scene for this. With this second pre-render camera we 
can do a depth pass. So with this you aim your depth camera at where you want 
to aim your laser. With this pre-render camera, you basically attach your 
normal scene, then only output the depth.
 
Now once you do your main rendering pass, you pass in the model-view matrix 
from the depth camera into your shader and you treat this like you would doing 
a shadow for a spot light, there are lots of tutorials on how to do this. But 
what you also do is once you have your shadow coordinate, you use this to do a 
texture lookup with your slide scene. 

So then you treat the shadow camera just like say a normal spot light shadow, 
except you  instead of just treating the light like a normal spot like, you 
take the same shadow coordinate, and lookup your slide scene for the light 
color. 

I published a paper on this for the Image Society a couple of years ago.

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





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


Re: [osg-users] osgQt & osgEarth not working with 0 margin in Qlayout

2019-05-29 Thread David Bobavid
Hi,

I have played around with this a bit more, and it seems that after setting the 
margins to 0, the timer update calling upadte() doesn't properly called the 
paintEvent on the widget.

If I make my own slot for the timer's timeout and call the _viewer->frame() on 
my own, it works just fine.

Just posting in case anyone else comes across this issue.

Cheers,
David

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





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


[osg-users] osgQt & osgEarth not working with 0 margin in Qlayout

2019-05-16 Thread David Bobavid
Hi,

I've come across an issue I'm sort of confused about, and hopefully someone can 
help figure it out. 

I'm using osgQt & osgEarth 2.10 & osg 3.6.3 with Qt 5.12 on Windows 10. It all 
seems to work, and I'm following the osgQt Viewer example for setting up my 
program. My osg widget, when added to my frame, has the default margin and 
spacing, so when I set it to my central widget (in a QMainWidget) it has a gray 
border. However, when I set the margins to 0, it won't draw the map at all, and 
it shows some artifacts around the edge of the widget. 

This is what I'm doing:

Code:

OsgViewerQWidget::OsgViewerQWidget(QWidget* parent /*= 0*/, Qt::WindowFlags f 
/*= 0*/, QStatusBar* statusBar /*= 0*/)
: QWidget(parent, f)
{
 _map = new osgEarth::Map();

// add a TMS imagery layer: 
osgEarth::Drivers::TMSOptions imagery;
imagery.url() = "http://readymap.org/readymap/tiles/1.0.0/7/;;
_map->addLayer(new osgEarth::ImageLayer("ReadyMap Imagery", imagery));

// add a TMS elevation layer:
osgEarth::Drivers::TMSOptions elevation;
elevation.url() = "http://readymap.org/readymap/tiles/1.0.0/116/;;
_map->addLayer(new osgEarth::ElevationLayer("ReadyMap Elevation", elevation));

graticuleLayer = new osgEarth::Util::GeodeticGraticule();
_map->addLayer(graticuleLayer);

// That's it, the map is ready; now create a MapNode to render the Map:
_mapNode = new osgEarth::MapNode(_map);

_mapNode->setNodeMask(0x1);

setThreadingModel(osgViewer::ViewerBase::SingleThreaded);

// disable the default setting of viewer.done() by pressing Escape.
setKeyEventSetsDone(0);

QWidget* widget1 = AddViewWidget(CreateGraphicsWindow(0, 0, 100, 100), 
_mapNode, statusBar);

QGridLayout* grid = new QGridLayout;
setLayout(grid);

grid->setSpacing(0);
//grid->setContentsMargins(0, 0, 0, 0);   // with this line commented out, 
it works, with it in, it doesn't work... but, why?!
grid->addWidget(widget1);

connect(&_timer, SIGNAL(timeout()), this, SLOT(update()));
_timer.start(10);
}

osgQt::GraphicsWindowQt* OsgViewerQWidget::CreateGraphicsWindow(int x, int y, 
int w, int h, const std::string& name /*= ""*/, bool windowDecoration /*= 
false*/)
{
osg::DisplaySettings* ds = osg::DisplaySettings::instance().get();
osg::ref_ptr traits = new 
osg::GraphicsContext::Traits;
traits->windowName = name;
traits->windowDecoration = windowDecoration;
traits->x = x;
traits->y = y;
traits->width = w;
traits->height = h;
traits->doubleBuffer = true;
traits->alpha = ds->getMinimumNumAlphaBits();
traits->stencil = ds->getMinimumNumStencilBits();
traits->sampleBuffers = ds->getMultiSamples();
traits->samples = ds->getNumMultiSamples();

return new osgQt::GraphicsWindowQt(traits.get());
}

QWidget* OsgViewerQWidget::AddViewWidget(osgQt::GraphicsWindowQt* gw, 
osg::ref_ptr scene, QStatusBar *statusBar)
{
osgViewer::View* view = new osgViewer::View;
addView(view);

osg::Camera* camera = view->getCamera();
camera->setGraphicsContext(gw);

// need to do this to make lines show up... o_O  Thanks's Glenn!
osgEarth::Util::GLUtils::setGlobalDefaults(camera->getOrCreateStateSet());

const osg::GraphicsContext::Traits* traits = gw->getTraits();

camera->setClearColor(osg::Vec4(0.2, 0.2, 0.6, 1.0));
camera->setViewport(new osg::Viewport(0, 0, traits->width, traits->height));

// set the draw and read buffers up for a double buffered window with rendering 
going to back buffer
camera->setDrawBuffer(GL_BACK);
camera->setReadBuffer(GL_BACK);

camera->setProjectionMatrixAsPerspective(30.0f, 
static_cast(traits->width) / static_cast(traits->height), 1.0f, 
1.0f);

view->setSceneData(scene);
view->addEventHandler(new osgViewer::StatsHandler);
view->addEventHandler(new 
osgGA::StateSetManipulator(view->getCamera()->getOrCreateStateSet()));
view->addEventHandler(new osgViewer::ThreadingHandler());
view->addEventHandler(new osgViewer::LODScaleHandler());
view->addEventHandler(new osgViewer::ScreenCaptureHandler());

earthManip = new osgEarth::Util::EarthManipulator;
view->setCameraManipulator(earthManip);

ldBuffer = new osgEarth::Util::LogarithmicDepthBuffer;
ldBuffer->install(camera);

gw->setTouchEventsEnabled(true);
return gw->getGLWidget();
}




So it seems to go wrong in my constructor, when I set the grid layout content 
margins to 0. Otherwise this works just fine. I set the margin to 0, and it 
doesn't show anything. 

Any ideas will be greatly appreciated.

Thank you!
David

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





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


Re: [osg-users] adding object models in osgEarth best practices

2019-05-03 Thread David Bobavid
Hi Nick,

Thanks - I'll give it a try! 

Cheers,
David

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





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


Re: [osg-users] adding object models in osgEarth best practices

2019-05-02 Thread David Bobavid
Hi Eran,

Ok, thanks! I'll look into that.

Last question (I think) for now... I'm trying to set my cow's orientation. From 
what you have suggested previously, would I add another MatrixTransform node 
with the rotations set into it? 

Or should I add a PositionAttitudeTransform instead? If so, are there some 
helper classes that I can use that will create the Quat properly based on my 
heading, pitch and roll? I've been looking through the headers and cannot seem 
to find something that will help.

Thank you again!

Cheers,
David

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





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


Re: [osg-users] adding object models in osgEarth best practices

2019-05-02 Thread David Bobavid
Hi Eran,

So, it looks like if I zoom in *a lot* I do see my cow... I was playing around 
with it again and tried getting in real close, and setting the scale much 
larger again, and it's showing up. I guess it's a very small model, and I 
wasn't really looking close enough for it, either.

Thank you again for your help!

Cheers,
David

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





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


Re: [osg-users] adding object models in osgEarth best practices

2019-05-02 Thread David Bobavid
Hi Eran,

Yes, sure... this is what I'm doing:

First to load my map:

Code:

_map = new osgEarth::Map();

osgEarth::Drivers::GDALOptions basemap;
basemap.url() = "I:/Dev/QtOsgTest1/data/world.tif";
_map->addLayer(new ImageLayer(ImageLayerOptions("basemap", basemap)));

_mapNode = new osgEarth::MapNode(_map);





Then later to load the model:

Code:


auto model = osgDB::readNodeFile("I:/Dev/QtOsgTest1/data/cow.osg");
if (!model) {
qDebug() << "Oh shit, model didn't load!";
}

auto transform = new osg::MatrixTransform;
transform->setMatrix(osg::Matrix::scale(100, 100, 100));
if (!transform->addChild(model)) {
qDebug() << "Failed adding model to matrix transform";
}

auto geoTransform = new osgEarth::GeoTransform;
geoTransform->setTerrain(_mapNode->getTerrain());
if 
(!geoTransform->setPosition(osgEarth::GeoPoint(_mapNode->getMapSRS()->getGeographicSRS(),
 -100, 52, 1000))) {
qDebug() << "Setting position failed";
}

if (!geoTransform->addChild(transform)) {
qDebug() << "Adding matrix transform to geotransform failed";
}

_mapNode->addChild(geoTransform);




I don't see the model show up, but I also don't see any of my error statements, 
either. 

Thanks again,
david

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





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


Re: [osg-users] adding object models in osgEarth best practices

2019-05-02 Thread David Bobavid
Hi Eran,

Ok, dumb follow up - I'm trying to add the geoTransform to my mapnode, and 
nothing is showing up. Is there something else I should be doing to add this 
transformed model to my map node?

(Sorry, total newb with osg/osgearth, here)

Thanks again,
David

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





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


Re: [osg-users] adding object models in osgEarth best practices

2019-05-02 Thread David Bobavid
Hi Eran,

Great, thanks so much. I'll give that a shot!

Cheers,
David

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





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


[osg-users] adding object models in osgEarth best practices

2019-05-02 Thread David Bobavid
Hi,

I'm new to OSG and OSGEarth, and I did some googling, but still have some 
trouble finding out the proper way to do this.

So I have an osgEarth program, and I want to add some entity models, such as 
planes, moving around my globe. While I'm good with loading a .earth file for 
the terrain, or adding the textures/elevation data through code, I'm having 
some trouble adding models.

>From the examples (such as the osgearth_annotation), it seems like models are 
>added by way of Styles:

Code:

Style style;
style.getOrCreate()->autoScale() = true;
style.getOrCreate()->url()->setLiteral("../data/red_flag.osg.50.scale");
ModelNode* modelNode = new ModelNode(mapNode, style); 
modelNode->setPosition(GeoPoint(geoSRS, -100, 52));
annoGroup->addChild(modelNode);




Which seems to work all right. I have tried adding another model, such as the 
cow.osg that comes with the osg data, and it doesn't look so good. For 
starters, it's very small, even with the scaling. I tried setting a new scale, 
but it didn't seem to help:

Code:

Style style;
style.getOrCreate()->autoScale() = true;
style.getOrCreate()->url()->setLiteral("../data/cow.osg");
style.getOrCreate()->scale() = 4000;
ModelNode* modelNode = new ModelNode(mapNode, style); 
modelNode->setPosition(GeoPoint(geoSRS, -100, 52));
annoGroup->addChild(modelNode);




The cow seems to the same size (tiny!) and even when I zooom in, it's still 
super small. Also, I tried setting the heading:

Code:

Style style;
style.getOrCreate()->autoScale() = true;
style.getOrCreate()->url()->setLiteral("../data/red_flag.osg.50.scale");
style.getOrCreate()->heading() = 180;
ModelNode* modelNode = new ModelNode(mapNode, style); 
modelNode->setPosition(GeoPoint(geoSRS, -100, 52));
annoGroup->addChild(modelNode);




And in this case, it seems like the model is 180degrees from where it was 
facing, not 180 from North.

So - what is the best way to go about adding a model and orienting it properly? 
Is this styles approach the correct way? I have seen some reference in another 
post about an osgEarthUtil::ObjectPlacer, but that class doesn't seem to exist 
any more.


Thank you!

Cheers,
David

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





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


Re: [osg-users] Best Practices and Switches

2019-04-30 Thread David Heitbrink
Thank you for your reply.

In general my CPU load is pretty good, what I am really concerned about is 
reducing the number of OpenGL calls/driver overhead. If I have 200 signs all 
under there own switch, each sign is only 4-64 triangles each, and all the 
signs share the same texture mosaic.  Having 200 unique drawls can get 
expensive, especially for such a low poly objects. Ideally the 200 street signs 
would get combined in the same draw object. My assumption was this cannot 
happen with each sign being under its own switch.

My second question is 2 part, if I remove the switches, would I want to then 
export the result to a file and reload the file run, then run the optimizer. Or 
would the performance of the optimizer be all the same if I ran it on a graph 
that I had just programmatically removed the switches from. I am basically 
concerned with running into "nodeWeCannotRemove".  

Also, the second part is..what criteria does the MERGE_GEOMETRY option use 
to merge geometry. 

For example lets say I wanted to go a step further, and remove the textures 
from the state sets, and add an attribute for a texture index for each vertex. 
Then I could say use a texture array or bindless texture in the shader to 
reference the texture to use. We should be able to start combining nodes with 
dissimilar textures.

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





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


[osg-users] Best Practices and Switches

2019-04-30 Thread David Heitbrink
I have some scenes with tons of osgSim::MultiSwitch's, I think for some of my 
scenes it can be in the low 1000s. For a scene these are typically setup once, 
and then rarely changed. From what I understand a lot of the optimize 
operations do not work across switches, which makes sense, I would think it 
would be hard to merge geometry with something that can change.

Since these switches rarely change, I was thinking about loading my switch 
options from a file, then just removing the switches, and attaching the 
selected child of the multi-switch to its parent. In general is this a solid 
approach, or is just setting "DataVariance" to static for the switch good 
enough?

Typically the object size under these switches are pretty small. Often times 
they are just 4 triangles.

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





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


[osg-users] SSBO Instancing

2019-02-27 Thread David Heitbrink
I currently have a hardware instancing system that is setup for cars. I 
currently have the transform data stored in a TBO (texture buffer object). 

What I want to do is to change over to using a SSBO (shader storage buffer 
object), and to only copying the minimum amount of data I need per frame. 
Looking through the OSG code, I see glBufferSubData, is being used but I am not 
sure how I can specify the offset + size I want it to use, so I am not 
uploading the maximum size of my buffer every frame.

>From what I have read SSBOs are faster than TBOs, and I want to upload the 
>minimum amount of data to the GPU each frame. 

So my question is, how can I specify the size of data to use every frame, 
instead of just updating the entire buffer? (FYI I am using OSG 3.6.3).  

Some background: 

For each car I have a proxy node that is a osg group setup with a bounding box, 
and position that matches the instanced car, and a cull call back to my buffer 
management system, that marks the object as "in view". 

Every frame I then compile my transform data. I have multiple cars objects that 
are being instanced, they are all sharing the same TBO. So for each model it 
gets a "base index" set via a uniform. So in the vertex shader the model matrix 
is fetched by taking "base index" + gl_InstanceID, then doing a little math to 
get the address, and doing 5 texelFetch calls to get model matrix + options.

This all works fine..except my buffer supports like 500+ cars, each car has 
multiple 4x5 matricies (4x4 model matrix +1 row for rendering options), each 
car has 2-18 wheels each with its own transform. I am doing a dirty every frame 
on my bound image, so it updates the entire image buffer, even if I only have 
like 2 cars in a view.

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





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


Re: [osg-users] Scale object based on camera distance

2019-01-07 Thread David Mitchell
Thanks, Trajce.  That looks like it will do what I need.  Since this was my 
first post to the forums, apparently it wouldn't show up until an admin 
approved it and during that time I was able to modify the 
GeoPositionNodeAutoScaler class from osgEarth to do what I need it to.  Looking 
at osg::AutoTransform, it looks like it's doing more or less the same thing, 
but is more involved.  My solution ended up being a little more specialized for 
my use case.

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





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


[osg-users] Scale object based on camera distance

2019-01-06 Thread David Mitchell
I have certain nodes/objects in my scene that I always want to be the same size 
regardless of their distance from the camera and I'm trying to figure out the 
best way to go about doing this.  My first thought is to create a custom 
NodeCallback to add to the node as a cull callback and then get the distance 
from the node to the camera and apply the appropriate scale to the node (as a 
MatrixTransform).  Is that a reasonable approach?

The other thing I'm struggling with is how to calculate the proper scale.  What 
I'd like is for the object's geometry to translate to pixel units, meaning if 
the vertices range from (-10, -10, -10) to (10, 10, 10), then it would take up 
roughly 20x20 pixels on the screen when scaled.  Rather than fumbling around 
with different matrices and transforms trying to get this to work, I thought 
I'd try asking first.

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





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


Re: [osg-users] osg apps on gpu cluster

2018-10-04 Thread David Heitbrink
GPU affinity is really only available with Quadro cards. AMD has there own 
system that is a little more complicated, and has a few more featuresbut I 
am not really experienced with those, and I believe they are only usable on the 
FirePro/Radeon Pro cards.

We have found setting the GPU affinity is an absolute must for multi GPU 
systems on windows.

Basically from what I understand, windows will by default dispatch the OpenGL 
commands to what it thinks is the fastest GPU in the system, then copies the 
result to the other GPU(s). Linux by default dispatches the commands to the GPU 
attached to the display the window is on..so setting the GPU affinity is 
most likely only worth while if you are using windows.

FYI I think this was the talk I sat through on the subject:
https://docplayer.net/29825650-Programming-multi-gpus-for-scalable-rendering-shalini-venkataraman-senior-applied-engineer-nvidia.html

I do have an modification of OSG I could share that sets the GPU affinity 
mask.but its ugly. 

You might also have to think about synchronization if you are driving multiple 
projectors that are blended to form a single image...and if you have a decent 
amount of motion, you can get noticeable tearing in the blend regions.

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





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


Re: [osg-users] Latency

2018-10-04 Thread David Heitbrink
I am not running it in Quadro mosaic mode. I do have a slightly older version 
of the program running on a render cluster with 5  2-gpu nodes driving 16 
displays that runs fine on windows 7.

I am starting to suspect it has something to do with the Windows - Desktop 
Window Manager (DWM) composition. This can no longer be disabled in windows 10.

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





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


[osg-users] Latency

2018-10-01 Thread David Heitbrink
I currently have an odd problem I am stuck on. I have a system with 2 Quadro 
P5000 cards- driving 3 displays that are warped and blended on a 120 degree 
dome. Running Windows 10.  The application is ground vehicle simulation -  I 
have pretty high rates of optical flow. Each display is running its own 
process, they receive a UDP broadcast with position update information. What I 
am seeing is 1 of the displays is off by 1 frame 95% of the time. When this 
happensmy blending fails and I get a large seam in my scene. I added 
logging as to the eye point position as well as high frequency counter time. 

>From what I can tell from the logs, the return from the VSync's 
>(viewer->frame() ) are all within 200 microseconds, and the eye point position 
>and data frame number (i.e. the frame number for my incoming data) is the same 
>across all of the channels. 

So I strongly suspect this has something to do with the graphics card/driver's 
own internal frame bufferingand there is not a lot I can do about it. 

This leaves me with a couple of real issues.
1) Programmatically cannot tell if a channel is a frame behind or not. 
Basically I added buffering for the other 2 channels for position 
information..and my seam goes away 95% of the time
2) Since things are not 100% the same...I randomly get a seam 5% of the 
time (assuming I am buffering).

At this point I don't know what to do.I have talked to NVidia about this, 
they mentioned making sure DPI scaling in windows is set to 100% and/or setting 
up the app to be DPI aware. I have done this.but I get the same result.


Any advice and/or speculative guesses on this would be great.

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





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


Re: [osg-users] Image containing floats

2018-09-20 Thread David Heitbrink
yes this is doable. You need to set the internal format to something like: 
GL_RGBA32F

and the source type to float on your texture.

You might look at the OSG forest example, and its use of osg::TextureBuffer. 
Basically with the forest example, its doing instancing where the transforms 
are loaded into a texture, and the data is used in the vertex shader.

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





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


Re: [osg-users] Unbounded growth in OpenFlight ReaderWriter

2018-07-31 Thread David Glenn


robertosfield wrote:
> On Tue, 31 Jul 2018 at 15:40, Chris Hanson <> wrote:
> 
> > I think Brede Johansson wrote that loader once upon a time. I'm hoping to 
> > connect with him in Oslo this week. Maybe I'll ask him about this if I do.
> > 
> 
> Brede's original OpenFlight plugin back in fall of 2000 was our first
> major community submission and probably one of the most important in
> the history of the OpenSceneGraph project.
> 
> Being able to load OpenFlight models made it possible for the vis-sim
> market to quickly evaluate the OSG and solidify it as a serious
> contender.  Brede's work and his companies willingness to donate it to
> the open source community is something we should all celebrate :-)
> 
> Robert.
> ___
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  --
> Post generated by Mail2Forum


Your not going to get any argument from me on that one Robert! I have leaned so 
much about and from the open flight format by creating models  and useing them 
in my OSG projects. Hands down, it's still my faveret format for Sim models - 
dispight me being pushed into using FBX and OBJ formats by my handlers. Cheers 
to Brede Johansson!


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] osgSim::MultiSwitch Serialization

2018-07-29 Thread David Stephan
Attached is a little test.

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



/* OpenSceneGraph example, osgmultiswitchtest.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the "Software"), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/

#include 
#include 
#include 

#include 

void assert2(bool success) {
if (!success) throw std::runtime_error("");
}

void testSerializer(const osgSim::MultiSwitch::SwitchSetList ,
const osgSim::MultiSwitch::SwitchSetNameList ) {

osg::ref_ptr ms(new osgSim::MultiSwitch);
if (values.size() > 0) {
int nchildren = values[0].size();
for (int i = 0; i < nchildren; i++) {
ms->addChild(new osg::Node);
}
}

ms->setSwitchSetList(values);
for (int i = 0; i < names.size(); i++) {
ms->setValueName(i, names[i]);
}

osgDB::ReaderWriter *rw = 
osgDB::Registry::instance()->getReaderWriterForExtension("osgb");
osg::ref_ptr options = new osgDB::Options;
std::stringstream ss;

// write
auto wresult = rw->writeNode(*ms, ss, options);

// read
auto rresult = rw->readNode(ss, options);
osg::ref_ptr node = rresult.takeNode();

osg::ref_ptr 
ms2(dynamic_cast(node.get()));
assert2(ms2 != nullptr);

assert2(ms2->getSwitchSetList() == values);
for (int i = 0; i < values.size(); i++) {
assert2(ms2->getValueName(i) == names[i]);
}
assert2(ms->getNumChildren() == ms2->getNumChildren());
}

int main( int argc, char **argv )
{
testSerializer(
{
{false, false},
{true, true}
},
{ "offs", "ons" }
);

testSerializer({}, {});

testSerializer(
{
{ true, true, false, true, false, true }
},
{"stuff"}
);

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


[osg-users] osgSim::MultiSwitch Serialization

2018-07-26 Thread David Stephan
osgSim::MultiSwitch and flt files support named switches, but the names aren't 
saved. It seems like an easy fix, though I'm not sure how to mess with the 
serializer in a backwards compatible way.

relevant files:
src/osgSim/MultiSwitch.cpp
src/osgWrappers/serializers/osgSim/MultiSwitch.cpp

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





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


Re: [osg-users] Twenty one (21) days till the OpenScenegrapg BOF in Vancouver

2018-07-24 Thread David Glenn
Greetings John!

As you know, I'm all set for siggraph. If there is anything you what me to 
bring let me know asap so I can pack accordingly! 

... 

Thank you!

Cheers,
David


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


[osg-users] OSG BOF at SIGGRAPH 2018

2018-06-19 Thread David Glenn
Greetings All!
I was just wondering if there is any plans to have the OSG BOF at SIGGRAPH 2018?


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Large number of occluder nodes

2018-06-01 Thread David Heitbrink
We do have a city scene at ground levels with lots of cars, pedestrian, 
construction zone clutter. The cars tend to be the worst as they can have up to 
8 transparent object each from them. Large parking lots can have 500+ vehicles. 

OK so it sounds like what we need to do is to try to combine occluder nodes the 
best we can. These were generated via a script and placed in the center of each 
building...we just have lots of building with alleys between them. 

It also sounds like we will need to come up with some sort of paging/LOD scheme 
ourselves to remove nodes more than say 2500m from the camera.

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





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


Re: [osg-users] Large number of occluder nodes

2018-05-31 Thread David Heitbrink
I am using OccluderNode: 
for each "building" in config file{
auto _pair = vecs[i];
osg::OccluderNode* onode = new osg::OccluderNode();
osg::ConvexPlanarOccluder* occl = new osg::ConvexPlanarOccluder();
osg::ConvexPlanarPolygon& polly = occl->getOccluder();

vector pnts;
... get pnts from current building in custom config file
... most often 4 points

 
for (unsigned int j =0; j < pnts.size(); j++){
polly.add(pnts[j]);
}

onode->setOccluder(occl);
m_group->addChild(onode);
}

The performance without the occluders is bad. Basically the rendering of 
buildings is not bad, its pretty quick even without the occluders. Where we get 
in trouble is with the parked cars, pedestrians and various scene clutter. 
These are relatively small objects, and lots of them have transparency. 

We want to add some form of OIT which should help us to avoid having some many 
depth sorted objects, but we are not there yet.

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





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


[osg-users] Large number of occluder nodes

2018-05-30 Thread David Heitbrink
I have a scene with a large number of occluder nodes. Its a large city scene, 
and most of the nodes are relatively small, like 10-50 meters wide, like 10-30 
meters tall, in a database that is maybe 20 km x 20 km. I have 1000's of these. 
They are basically extracted semi-automatically. Most of them are simple just a 
4 points. 

My cull time is getting up to the 40ms range. They really help in some regions, 
but I really don't think I need them being considered during the culling stage 
for anything node that is more than about 5000 meters out.

What is the best way of managing occluder node lode?

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





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


[osg-users] So what is the status of VR camera to be used in OSG in 2018?

2018-04-09 Thread David Glenn
So what is the status of VR camera to be used in OSG in 2018?
I know that Khonos has the OpenXR project that as far as I know is taking over 
the OpenVR idea. 

I don't think anything has been established in terms of a SDK for it yet, but I 
could be wong! 

The way I see it: it would be a self motivated double camera for a start. Add 
the controlers after that for ancer points for hands + plus a call back for 
contol actions later. 

For somthing like OSG, you what to keep it low level and simple for maximum 
flexibility. 

So, does anyone got anything like that I can Play with and make some proof of 
concept demo?

Time to shine!  

D Glenn


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


[osg-users] OpenThreads Doxygen documentation

2018-01-10 Thread Montgomery, David
The OpenSceneGraph 3.4.0 documentation will build (after adding 
EXTENSION_MAPPING = "no_extension=C++" to the doxyfile).

However, the OpenThreads documentation will not build even with that additional 
line.

Errors on Windows 7 include the following along with numerous additional ones 
of the same variety:

2>CUSTOMBUILD : error : Problems running dot: exit code=-1, command='dot', 
arguments='"C:/Sandbox/OpenSceneGraph-3.4.0/build/doc/OpenThreadsReferenceDocs/a00035.dot"
 -Tpng -o 
"C:/Sandbox/OpenSceneGraph-3.4.0/build/doc/OpenThreadsReferenceDocs/a00035.png"'

2>CUSTOMBUILD : error : problems opening map file 
C:/Sandbox/OpenSceneGraph-3.4.0/build/doc/OpenThreadsReferenceDocs/a00035.map 
for inclusion in the docs!

The necessary PNG and MAP files are not generated anywhere. Any thoughts on 
what the problem could be?




--

Notice: This e-mail is intended solely for use of the individual or entity to 
which it is addressed and may contain information that is proprietary, 
privileged and/or exempt from disclosure under applicable law. If the reader is 
not the intended recipient or agent responsible for delivering the message to 
the intended recipient, you are hereby notified that any dissemination, 
distribution or copying of this communication is strictly prohibited. This 
communication may also contain data subject to U.S. export laws. If so, data 
subject to the International Traffic in Arms Regulation cannot be disseminated, 
distributed, transferred, or copied, whether incorporated or in its original 
form, to foreign nationals residing in the U.S. or abroad, absent the express 
prior approval of the U.S. Department of State. Data subject to the Export 
Administration Act may not be disseminated, distributed, transferred or copied 
contrary to U. S. Department of Commerce regulations. If you have received this 
communication in error, please notify the sender by reply e-mail and destroy 
the e-mail message and any physical copies made of the communication.
 Thank you. 
*
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] multiple views + instancing

2017-11-15 Thread David Heitbrink
I am using osg 3.4.0. I am in a position where I could switch to a newer build.

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





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


[osg-users] multiple views + instancing

2017-11-15 Thread David Heitbrink
Right now I having problems setting unique uniforms and num instances on a per 
view basis (camera). 

Right now I am using hardware instancing, with a scene with 1000's of 
relatively complex objects, but only a handful of actual models. I was able to 
encode index's to textures + position and rotation transforms into a single 
texture buffer.

To do the viewport culling for this I added "proxy" nodes, which are just 
osg::group nodes, with a compute bound + cull call backs. The cull call back, 
calls back to a class tracking which instances are visible in which view. Each 
view has a group attach to it between the camera and the main scene. In said 
group, the texture buffer object is attached here.

The instanced models are further down in the scene graph. I in a draw callback 
from camera, I update each models uniform for its offset into the texture 
buffer, its instance count, plus texture buffer (transforms + some options for 
the fragment shader).  All of this works great until I have multiple cameras.

 Basically I cannot figure out a good way of modifying the instance count + 
offset uniform so I get unique values for each camera. Does anyone have some 
advice for this?

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





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


[osg-users] model matrix

2017-10-24 Thread David Heitbrink
Instead of multiplying the modelview matrix by the inverse view matrix in the 
vertex shader, does any one have a workable solution to get the model matrix 
setup as a uniform to begin with?

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





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


Re: [osg-users] Faster framerate under Windows debugger?

2017-09-11 Thread David Heitbrink
Is the GPU time spiking when not running the debugger? Basically are you 
getting like 99% of your frames hitting your frame, then 1% that are taking 4-5 
times longer than they are supposed to. 

I suspect you may have some kind of threading issue. Its easy to see slightly 
changing the timing of a few calls can put things into conflict over sharing a 
resource where as before they where not. Seeing if you have a continues load 
difference versus one with high peaks may help this. 

Improving batching may help if the conflicts are on the driver side of things...

On a somewhat related issue I ran into an a while back where the windows system 
call:

::timeBeginPeriod

was used. This caused the Nvidia driver to dead-lock, with large periodic 
hangs, and from time to time, just plane crashing.

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





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


Re: [osg-users] [osgPlugins] Open Flight

2017-09-08 Thread David Heitbrink
FYI I forgot to mention this from OSG 3.4.0, looking at the git repo, I does 
not look like anything has changed since with the plugin.

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





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


[osg-users] [osgPlugins] Open Flight

2017-09-08 Thread David Heitbrink
I have an issue I have some nodes with day, night , dusk flags set. I need this 
data for time of day control, as nodes set for night time have emissive 
properties, that do not work for day time, and the converse is true, and even 
worse is if both are active at the same time. I traced down into the plugin 
where the is read:



Code:
 
class Object : public PrimaryRecord .
  if (document.getReadObjectRecordData())
{
osgSim::ObjectRecordData* ord = new osgSim::ObjectRecordData;
ord->_flags = in.readUInt32();
ord->_relativePriority = in.readInt16();
ord->_transparency = in.readUInt16();
ord->_effectID1 = in.readInt16();
ord->_effectID2 = in.readInt16();
ord->_significance = in.readInt16();

_object->setUserData( ord );
}
else
{
/*uint32 flags =*/ in.readUInt32();
}

// Postpone add-to-parent until we know a bit more.




Tracing through the code, the user data block is never added to a node, the 
object goes out of scope and the data is lost.

I strongly suspect this section of code was never finished, and I will have to 
finish writing it myself. That being said A: is this true? B: if I do have to 
finish is there a place to start? I think my output data is in version 15.0, I 
can have the data exported from our tools in something newer. [/code]

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





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


[osg-users] Light Map Sub

2017-09-06 Thread David Heitbrink
I have a number of scenes with a large number of old fashioned light maps. 
These light maps are basically textures that are set with blending and  I have 
a number of issues with these. 

I have 100's of these lights in the scene, but only a few a handful should be 
active in a scene at a time. At worst like 10. Its a really big scene.

So I wrote a cull-callback that would calculate a model view projection matrix 
for the light, and provide a texture index. This then calls back to a manager 
that sorts these by the X number of closest lights, and updates a uniform that 
contains a list of active lights for the current view.

I seem to be having an issue with the issue with my cull call back getting 
called when the light should be visible. At certain view angles I have lights 
just disappear. My question is, instead of trying to compile the lights by 
using a cull callback, would I be better creating my own drawable? and have it 
just make a callback to a manager handling the uniform with the light 
references instead of actually drawling anything.

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





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


Re: [osg-users] OpenGL

2017-07-24 Thread David Heitbrink
yes this is possible, but I am afraid its likely not going to be simple, 
depending on how much integration between the two you are looking for. 

Most likely the easiest path for you is to just create a OSG program, and 
create your python program, and use sockets 
(https://docs.python.org/2/howto/sockets.html), to have your python program 
tell your OSG program what to do. 

Other than that you can setup your c++ program to compile to a DLL, then call 
the C++ dll from Python, and have it create your OSG window, and handle 
everything OSG. Or you can progress further and look at say the MFC OSG 
example, assuming you are working in windows, and look at how the device 
context are used, and look to pass the DC between your python and c++ sides. 

I would just recommend making two separate programs, particularly if you are 
new to programming, or at least just to start with.

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





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


[osg-users] OSG forum error: phpBB : Critical Error - Could not connect to the database

2017-06-29 Thread Glenn, David E CTR NAVAIR, 535100D
Greetings!
Subject OSG forum error:
Got message:

phpBB : Critical Error

Could not connect to the database

That is all!

David Glenn
Senior Graphics Software Engineer
TARIF Lab!
david.e.glenn@navy.mil
760-939-3291



smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to improve frame rate when loading multiple buildings ??

2017-02-22 Thread David Heitbrink
I would try to look at instancing. The OSG Forest is a good example. 

Instancing is were you tell the GPU to draw an object X number of times, and  
in the vertex shader you get a built in var gl_InstanceID, that tells you which 
item it is drawling (i.e. if you are drawling 100 versions, this will go from 0 
to 99). So in the vertex shader you move each vertex to a new position, based 
the instance ID.

You might have to get a little creative in terms of textures management/mapping 
so each building has a different texture. You could say create a large texture 
mosaic, and adjust the texture coordinates based on your instance ID.

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





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


Re: [osg-users] first attempts with PagedLODs

2017-01-24 Thread David Glenn
Hi,
I assume that you have looked at the virtual Planet builder? That is how I 
learned about how Paged LOD's work. 

If you overlap maps made with VPB, you have to make sure you use the same data 
and even then your going to have some Z fighting that might look odd.


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Replies with "Incident ID"'s returned for every post I sent to this list... Is that normal?

2017-01-20 Thread David Glenn
Greetings Robert!

Just to let you know! I'm getting that message.  Goggle it and I wound up here! 
So, I guess that you all chose to ignore it or I'm doing something wrong and 
the men in black are going to take me away! Bye!

... 

Thank you!

Cheers,
David


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] OpenVR, Oculus or HTC - Vive in OSG? Status as of Nov 2016!

2017-01-20 Thread David Glenn

Jan Ciger wrote:
> Hello,
> 
> On Tue, Dec 13, 2016 at 4:18 AM, Ran Ling < ()> wrote:
> 
> > Hi, Jan, I've used osgopenvrviewer too.
> > I have some troubles when I try to get a complete mirror on computer 
> > screen, not divided by left eye and right eye.Because main camera has been 
> > overwritten by the swap texture.
> > Do you have any ideas about this? or any better choice?
> > Thank you!
> > 
> 
> 
> I am not quite sure what you are trying to achieve - the HMD needs the split 
> left/right image, so if you are mirroring that, that's what you will get. If 
> you want a non-split image, you may have to add an extra camera. 
> 
> 
> Otherwise, for Rift there is the 
> https://github.com/bjornblissing/osgoculusviewer 
> (https://github.com/bjornblissing/osgoculusviewer) which works quite well. 
> 
> 
> Regards,
> 
> 
> J.
> 
>  --
> Post generated by Mail2Forum


Hay J!
in that OSG Oculus Viewer,  have they gotten the chance to try or add the Touch 
Controllers Yet?

Just wondering!


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Mip Maps

2017-01-19 Thread David Heitbrink
Thanks, this seems to mostly fix my issue. The texture filtering should have 
already been set for the model, but it looks like along the way,  things that 
were supposed to be NEAREST_MIPMAP_LINEAR were getting set to LINEAR.

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





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


[osg-users] Mip Maps

2017-01-18 Thread David Heitbrink
I having an issue with rendering models with mip maps, when I render my scene I 
get some strange aliasing on text in the texture.

I am mostly using DDS files, some texture have mip maps, some do not. If they 
do not have a mip map defined I am setting: 

texture->allocateMipmapLevels();


So to test this I added some test code to my shaders to manualy cycle through 
the mip map levels (FrameNum is a uniform that is incremented every frame):

Code:

vec4 texel = texture2D(TextureId,TexCoord[0]);
int txtLvl = textureQueryLevels(TextureId);
int lvl ;
if (txtLvl > 1){
lvl = (FrameNum/10) % txtLvl;
texel = textureLod(TextureId,TexCoord[0],float(lvl));
if (lvl == 0 ) texel.r+=0.5;
} 




In most of my scene I am getting the red flashing every couple of seconds or 
so. But the texture does not blur out. In a handful of cases I have some 
textures that do blur out, but most do not. 

Does any one have any ideas on what could be causing this issue?

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





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


Re: [osg-users] Visualizing a light cone in scene

2017-01-17 Thread David Heitbrink
Basically What you want is the situation where the peak of the cone is at 
0,0,0, and the base is at your negative direction pointed towards the ground. 
You may have to put transform between say the DOF node, and the cone. You might 
also just forgo the OSG cone, and have a model where the peak of the cone is at 
0,0,0. 

You might end up with a graph that looks something like this:

(osg::MatrixTransform) -> (your Aircraft model), (DOF Node) 
->(osg::MatrixTransform) ->(your cone).

You could just use a Matrix transform, instead of the DOF Node. The DOF node is 
basically to aim the light. 

The point of the first matrix transform is to move your aircraft mode + your 
cone at the same time. Both the DOF and model would be children of the 
transform, the DOF node is basically there to rotate the light cone, which 
might be just straight down. You the last Matrix Transform is to setup the cone 
so it rotates about the point of the cone.

You will most likely want to read up Hierarchical Modeling in Computer 
Graphics. There are lots of examples + lecture notes on the topic.

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





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


Re: [osg-users] Visualizing a light cone in scene

2017-01-13 Thread David Heitbrink
How are you planning on doing the search light? Are you planning on doing it as 
a semi-transparent cone? If so I would basically recommend looking at the DOF 
nodes (osgSim::DOFTransform), and look to attach the DOF node to your aircraft, 
and then placing your code under the DOF node.  

As per lighting model for the cone of light, it partially depends on what you 
are going for, doing a spot light is more realistic, but is going to be more 
work if you want to sort of pillar of light effect. If you are just looking to 
visualize what a search light would highlight, it just going to be easier to do 
a semi transparent cone.

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





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


Re: [osg-users] Heap Corruption

2017-01-10 Thread David Heitbrink
What threading model are you using?

One thing you need to be conscious of is when you update/modify your scenegraph 
and who is using it at that time. Some operations might better be served using 
different callback mechanisms, such as using viewer->addUpdateOperation.

You might try switching your threading model to single threaded, and see if 
that improves/ or changes the situation. This may or may be related to the 
issue, heap corruption errors are notoriously difficult to debug.

Also keep in mind when you get a heap corruption exception, what is happening 
behind the scenes is typically for debug builds every X number of heap 
operations, the CRT will check the consistency of the heap. If it fails then, 
it throws a exception. Often the location of what corrupts the memory is not 
related to where it is detected. You can use:

_CrtSetDbgFlag
_CrtCheckMemory

To have some control over when and how often the CRT checks the heap. If you 
are really aggressive about this, this will totally kill performance.

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





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


[osg-users] OpenVR, Oculus or HTC - Vive in OSG? Status as of Nov 2016!

2016-11-28 Thread David Glenn
Greetings All!
I'm just wondering what is the status for doing OpenVR or anything else VR in 
OSG! 

I've been so tied up in the Game Engine stuff lately that I haven't given the 
chance to give it much thought. All I know is that some of you have been 
working on adding the Oculus display to OSG. 

Oh! and I got a little home sick and thought I would drop buy and ask how 
things are coming along! :)

Any Progress?
...


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] blending with shader

2016-11-11 Thread David Heitbrink
yeah basically you want to use un-warped coordinates for your blending image, 
and warped coordinates for your scene image. If not you would have to warp your 
blending image, which may be easier for you depending on process. 

As per passing your texture width, you can use the function textureSize, that 
will get the dimensions of the image:
https://www.opengl.org/sdk/docs/man4/html/textureSize.xhtml

Do keep in mind, you need to set the version number in your shader to use this. 

In our case case we basically hard coded texture width as we generated the 
shader code with our blending image, as well as a few parameters for color 
correction and a few other other things. 

You can also query the size of your texture and do a text replace on your 
shader code before loading it.

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





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


Re: [osg-users] blending with shader

2016-11-10 Thread David Heitbrink
OK, I see it now. Taking a quick look at the code, it seems what you want to do 
is to add a vertex shader, and pass the texture coordinates from you Mesh, into 
your fragment shader. Then in your fragment shader use the texture coordinates 
in this line:

"vec4 sceneColor = texture2D(sceneTexture, texCoord); \n"
 
If you use the texCoord, texture coordinate for the sceneColor, its just going 
to pull the pixel from your first rendering pass from its space on the screen. 
The point of the warping mesh is it maps the pixel to a new place. 

You will still want to use texCoord to get the blending value.

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





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


Re: [osg-users] blending with shader

2016-11-10 Thread David Heitbrink
Can you post your shader code? For testing you might try just rendering your 
texture coordinates for the scene texture, and the texture coordinates for your 
blending texture, they should be different.

If you are still using this:

" vec4 sceneColor = texture2D(sceneTexture, texCoord);\n"
" vec4 blendingColor = texture2D(blendTexture, texCoord);\n" 

Using the screen space coordinate for your sceneColor, is basically going to 
have the affect of undoing the warping. You need a texture coordinate from your 
warping geometry.

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





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


[osg-users] Context specific UniformBufferObject

2016-11-09 Thread David Heitbrink
I am currently using a UniformBufferObject, to setup bindless textures. I have 
a UniformBufferObject, that I am using to upload to bind an array of texture 
handles.  I added extensions, glGetTextureHandle, and 
glMakeTextureHandleResident to setup the texture handles - UBO. 

I have a class I have extended Texture2D with, and on the first time apply is 
called, I setup my array of textures. With that being said, to extend this to 
support multiple context, what would be the best way to setup a UBO with 
context specific data?

I can post my code, if any one wants. I did extend OSG to support 64 bit 
uniforms, #extension, and the added extensions relevant to bindless textures to 
OSG, and do plan on submitting the code once I have this last part figured out. 

The extended Texture2D object is part of an OSG example, so not needed for the 
code changes I made to OSG.

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





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


Re: [osg-users] OSG SIGGRAPH was a TOTALLY Massively Success

2016-11-09 Thread David Heitbrink
Can you send them to me as well?

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





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


Re: [osg-users] Rendering Model in color

2016-11-03 Thread David Heitbrink
Two places where I have personally seen such issues, one from using code ported 
using an older version of OSG, the other was shader/driver differences between 
computers. 

If I remember some methods for setting color were removed moving from version 
3.0 to 3.2, and I had some code where the incompatible line was commented out, 
and not changed.

The with the shaders, basically I had a shader that worked with a AMD system, 
and but would fail to compile on a Nvidia system due to the Nvidia driver being 
pickier about syntax. With the shader program failing, it would default back to 
fixed pipeline, in which the uniform to set the color for the entire model of 
course would not work, and I was left with a black shape. In this case I did 
not recompile, and it was the same exact version of OSG on both systems.

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





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


Re: [osg-users] blending with shader

2016-10-05 Thread David Heitbrink
Taking a quick look at the code, yes it seems like it is a good example. 

So basically taking a quick read of this, you render your scene to a texture, 
then render a dome basically setup to do your warping, with the results from 
the render to texture, as its texture. You basically want to attach your 
blending shader to this 2nd rendering pass where you render the dome.

You might also look at osg::viewer::PanoramicSphericalDisplay. 

Also a quick tip when you do the render to texture, you need to set the 
multisampleSamples, and multisampleColorSamples, this basically sets your 
anti-aliasing. At least the last time I checked, the over-ride program settings 
for most graphics drivers do not effect render to texture rendering.

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





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


Re: [osg-users] blending with shader

2016-10-03 Thread David Heitbrink
You should be able to grab the state set in the pre-render callback and bind 
your image for blending + add any uniforms you need there. You will want to 
pick a texture level that you are not going to use rendering your scene. You 
will also need to bind your shader the the scene as well. 


One thing you might consider if you are using a NVidia Quardro card, is they do 
have API for warping and blending which will work at the driver level, so you 
will not make any coding changes with your application to use it:

http://on-demand.gputechconf.com/gtc/2012/presentations/S0322-Warping-Blending-for-Multi-Display-Systems.pdf

I think ATI has something similar for there professional cards as well but I am 
not familiar with them. 

One thing you will likely run into problems with if you do not use a 
professional card is dealing with sync. From past experience we have had two 
identical displays attached to the same video card not run at the same, and 
have had different vertical syncs on each display. Having the vertical syncs 
different on each display can lead to tear lines in your blend regions.
 
Also there a few companies like Scalable Display 
(Http://www.scalabledisplay.com/) that have warping + blending software.

What I have done for warping and blending is to write my own Shader for doing 
blending, and then to use the API I mentioned above for the warping. We did our 
own blending to deal with the gamma curve for the projectors.

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





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


Re: [osg-users] blending with shader

2016-09-30 Thread David Heitbrink
Its kind of tough to say without having a good idea about what exactly you can 
do with your plugin. I can say what you most likely need to do is to bind a 
texture with your blend map to your scene some how.

Ideally you would do this in a 2nd rendering pass. Basically you want to 
perform blending on a final image. 

In your fragment shader you can use gl_FragCoord, this will get you the screen 
coordinate of the current fragment (basically pixel). Then you can use 
texelFetch to lookup a scaler for your output pixel. For example if you had 
this function you called last in your fragment shader:

uniform sampler2D blendTexture;
void BlendFunct(inout vec4 color){
vec4 blendVal = texalFetch(blendTexture,gl_FragCoord.xy,0);
color.rgb = color.rgb * blendVal.rgbl;
} 

In practical terms you often have to deal with the gamma settings for your 
projectors, and things are not always linear. When you have things in your 
scene with transparency were things get blended together, its ideal to do a 
multi-pass rendering.

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





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


Re: [osg-users] Creating a glowing sun in scene

2016-09-26 Thread David Heitbrink
I think looking at the osgblenddrawbuffers or osgmultiplerendertargets might be 
a good start. Neither of these are really doing what you are aiming for, but  
shows you how to add the color buffers and shaders.

You might also look at the OSGPPU project. It I think it has some more relevant 
examples, although the OSG PPU project is not being actively maintained at this 
time.

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





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


Re: [osg-users] Creating a glowing sun in scene

2016-09-23 Thread David Heitbrink
There are a few ways of doing this. What you most likely want to do is to look 
up information on high dynamic range rendering. This involves multi-pass 
rendering where you use some kind of blur filter to make the brighest parts of 
your scene bleed out.
This is a resonable example:
http://learnopengl.com/#!Advanced-Lighting/Bloom

Basically this would involve using shaders, and attaching a color buffer to 
your camera.

Another way, although cheep and crappy, is to just add textured quad, with 
transparency set on it. And just overlay it on your scene.

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





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


Re: [osg-users] Bindless Textures

2016-08-04 Thread David Heitbrink
Thanks for posting the code it helped a lot. I did get the code to eventually 
work. What I found was I needed to make sure the shader was active first, then 
do the texture binds/ handle fetches. So what I found was I needed a top level 
node with the shader activated at the state set, then a child under that node 
with the textures attached.

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





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


Re: [osg-users] Get monitor resolutions on extended desktops

2016-07-15 Thread David Heitbrink
if you are using windows you can use EnumDisplayMonitors, this will go through 
your list of physical displays attached to your computer.

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





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


Re: [osg-users] Speedup simplifier

2016-07-15 Thread David Heitbrink
what you can do is run the simplifier, then use osgDB::writeNodeFile() to save 
the simplified result then load that the next time you run.

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





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


[osg-users] Bindless Textures

2016-07-15 Thread David Heitbrink
Has any one implemented bindless textures? I am trying to add this to my app to 
improve batching. I have a large scene, with lots of unique draw calls. We do 
use texture atlas's, the number of small objects is limited. I would like to 
further improve batching without having to redo textures. I do have LODs and 
occluder nodes as well.

Conveniently most of my objects use triangle list, so merging those worked out 
pretty well. I am using a shader storage buffer object to upload the texture 
handles to the shader. I have confirmed the value for the handles that I have 
set are getting into the shader. 

Here is the segment of my shader where I get the texture:

Code:


layout (binding = 0, std140) coherent buffer TEXTURE_BLOCK   
{ 
uint64_t  tex[512];
}; 
uniform int textureIndex;
void doTexture(inout vec4 color) { 
   sampler2D s = sampler2D(tex[textureIndex]);
   vec4 texel = texture2D(s,TexCoord[0]);
   color.rgb = texel.rgb*color.rgb;
}




I have a draw call back that grabs the extensions:
glGetTextureHandleARB
glMakeTextureHandleResidentARB

Also it grabs the texture handles, I have visitor go and grab references to all 
the relevant textures (when the scene is loaded and the objects are merged), 
and I do:

Code:

osg::UIntArray* array = 
static_cast(m_ssbo->getBufferData(0));
vector  = array->asVector();
GLuint64* raw64ptr = (GLuint64*)(rawData.data());
   

if (!bindings)
return false;
for (auto itr = m_textureIdMap.begin(); itr != m_textureIdMap.end(); ++itr){
osg::Texture* text=   m_textureMap[itr->first];
int id = itr->second;
auto textObject  = text->getTextureObject(rinfo.getContextID());
 if (!textObject){
   text->apply(*rinfo.getState());
   textObject  = text->getTextureObject(rinfo.getContextID());
   if (!textObject) return false;
 }
 uint64 textId = glGetTextureHandleARB(textObject->_id);
 if (glIsTextureHandleResidentARB(textId)==GL_FALSE)
glMakeTextureHandleResidentARB(textObject->_id);
 raw64ptr[id] = textId;
} 
 


Right now I am getting black for my texture, I cycle through textureIndex from 
my first texture to my last, I plan on replacing this with an attribute later, 
but there is not much point right now if I cannot get any textures to show up. 
If I do get this to work I do plan on building an example app and submitting 
it. 

#version 430 compatibility 
#extension GL_NV_bindless_texture : require
#extension GL_NV_shader_buffer_load : require  
#extension GL_NV_gpu_shader5 : require // uint64_t  

I am not sure doing a apply() to the texture and grabbing the id is the best 
idea. 

I am using OSG 3.4.0, I did make some modifications to support unsigned 64 bit 
uniforms, and to built OSG built-ins to after the last #extension. I have not 
checked to see if some has added this to the most recent development branch, if 
not I would gladly

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





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


Re: [osg-users] PolytopeIntersector LIMIT_NEAREST (or LIMIT_ONE) different distances for different groupnodes

2016-06-01 Thread David Knipp
Hi robertosfield,

Thank you for you reply. 

This absolutley understandable. Every group can have it's own transformation 
and so every group has it's own local coordinates. Quite clear.

So i guess there is absolutley no way to caluclate distances in 
Worldcoordinates?

I admit, I don't understand much about how the IntersectionVisitor works and I 
still searching for the right lines in the osgUtil Project. 

I've just written simpel boolean collision code before.

PS: Would you mind to remove my email address from the qoute? : D I actually 
like that to be private. : ) 

Cheers,
NoxxKn

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





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


[osg-users] PolytopeIntersector LIMIT_NEAREST (or LIMIT_ONE) different distances for different groupnodes

2016-06-01 Thread David Knipp
Hi,

I'm very sorry that i have to create a new post. I'm currently facing a problem 
i can't solve on my own. 

Im working on a single Model which has a lot of group nodes and geometry nodes. 
This model is categorized in a few "main" groups. 

In the beginning i worked only with one of this main groups at once. 

The application does view this group and handle pickings on them. Everything 
worked nice and cleanly. After i was mixing some of the groups the results of 
the picker got strange. 

Groups got different distances and also the differences change if i just change 
the angle i'm looking at the model. (orbit manipulator! I don't change the 
distance!)

The strange behavior is that i start picking nodes that where BEHIND of the 
nodes i wanted to pick (in viewer).

I'm working with a picker like so:

int x = GET_X_LPARAM(lParam); // windows mouse pos
int y = GET_Y_LPARAM(lParam); // windows mouse pos

float _x = static_cast(x);
float _y = static_cast(y);

_x = 2.f * (_x - 0.f) / (window_width - 0.f) - 1.f;
_y = -(2.f * (_y - 0.f) / (window_height - 0.f) - 1.f);

double w = 0.005, h = 0.005;
osgUtil::PolytopeIntersector * picker = new 
osgUtil::PolytopeIntersector(osgUtil::Intersector::CoordinateFrame::PROJECTION, 
_x - w, _y - h, _x + w, _y + h);

picker->setIntersectionLimit(osgUtil::Intersector::LIMIT_NEAREST);
picker>setPrecisionHint(osgUtil::Intersector::PrecisionHint::USE_DOUBLE_CALCULATIONS);
picker->setDimensionMask(osgUtil::PolytopeIntersector::AllDims);

osgUtil::IntersectionVisitor iv(picker);
iv.setTraversalMode(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN);

viewer->getCamera()->accept(iv);

if (picker->containsIntersections()) {
   const osg::NodePath& nodePath = 
   picker->getFirstIntersection().nodePath;
   unsigned int idx = nodePath.size();
   while (idx--) {
// bla bla specifc
}
}

What i mean is described in Attachments.

First Image "pick-error.png":

Red: Calculated nearer (but are in viewer BEHIND!)
Green: Calculated further away (Actually the node i wanted to pick)

Second Image "pick-error2.png":

I just change the angle of the orbit viewer for about 30 degrees and don't 
change the distance to object. The Distances just explode to much higher 
values. (Note the Model should only be about "2.f" heigh!)

I guess the second image error was allways present, but i didn't realised it, 
because the picker worked allways right.

Another side node, the model seems to doesn't stand in the right position. It 
should be in 0 0 0 but is located anywhere like 1 -11 -180 or something like 
that. Which is very strange but never made a problem. 
For loading i do: 

// ... osg::MatrixTransform mt
const double angle = osg::DegreesToRadians(90.);
const osg::Vec3d axis(1, 0, 0);
mt->setMatrix(osg::Matrix::rotate(angle, axis));
mt->addChild(model);
root->addChild(mt);
..

I can't upload the model because it's not for public use.

I hope the informations are enough that some kind person can give me a hint.

I worked to all coordinate frames. Only Projection seemd to work for me. Never 
found the right matrices to make View or Model working. Precision Hint can be 
float which has the same errors. Intersection Limit can be "NO_LIMIT" and 
wouldn't change a thing.

A LineSegmentIntersector never found a result.

Cheers,
NoxxKn

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




Attachments: 
http://forum.openscenegraph.org//files/pick_error2_941.png
http://forum.openscenegraph.org//files/pick_error_165.png


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


Re: [osg-users] Techniques to shift CPU load to GPU

2016-05-18 Thread David Heitbrink
This is a pretty broad topic. It largely depends on what you are trying to 
display. 

If you are displaying a lot of the same thing, (say a warehouse filled with 
1000's of identical boxes) you can use hardware instancing, there are a of 
sources you can look up on the subject. The OSG forest example is pretty good. 
This is a pretty good link:

http://3dcgtutorials.blogspot.com/2013/08/instancing-with-openscenegraph.html

 The osg GPU Cull example is a bit more complicated example, but pretty good, 
but this also depends on displaying a lot of the same thing. 

You can look at tessellation and geometry shaders and what can be done with 
those.  

Other things you may look at are simpler like combining geometries. If you have 
1000's of objects with with a handful of triangles each, combining them into a 
single primitive set can help a lot. You may need to use a texture atlas to get 
this done. 

Simply drawling less stuff, by using occlusion nodes can help a lot.  

These may or may not be applicable for you depending on your scene. Whats in 
your scene-graph? How is it being updated every frame. Is it a static scene, 
are you manipulating a lot meshes every frame? 

Overall this is really broad, and some of it can get complicated fast. Without 
knowing what you are trying to do it is really hard to give any meaningful 
advice.

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





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


Re: [osg-users] OpenSceneGraph 3.4.0, latest git master: build of ffmpeg plugin fails after upgrade to ffmpeg 3.0+

2016-04-26 Thread David Evans
On 4/25/16 2:27 PM, Ben Woods wrote:
> Hi,
> 
> Please see attached a patch which allows openscenegraph to build successfully 
> against ffmpeg 3.0.x.
> 
> This was obtained from ArchLinux.
> 
> Cheers,
> Ben
> 

Thanks, Ben.  This patch, indeed, does the trick.  With patch applied, both OSG 
3.4.0 and OSG 3.5.2 git master
build correctly with either ffmpeg 2.8.6 or 3.0.1.  Now committed to MacPorts 
repository.

Dave

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


[osg-users] OpenSceneGraph 3.4.0, latest git master: build of ffmpeg plugin fails after upgrade to ffmpeg 3.0+

2016-04-24 Thread David Evans
Hi,

MacPorts is in the process of upgrading from ffmpeg 2.8.6 to latest version 
3.0.1.  Currently both OpenSceneGraph build
fine with ffmpeg 2.8.6, but 3.0+ is a problem due to long deprecated API 
(get_buffer, release_buffer) that has now been
removed in favor of get_buffer2 and friends.

See the MacPorts ticket at https://trac.macports.org/ticket/51223 for details 
of the failure, build log, etc.

Is this a known problem and is anyone working on it?  What's the best way to 
report the bug?

Thanks for any help

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


Re: [osg-users] Point Selection in Point Cloud

2016-04-04 Thread David Knipp
Hi Bruno,

You can choose many different ways. OSG is not a collision detection library 
but it has some functionality you can play with. Also you can use bullet 
physics which is a free physics library. Also this is a pretty easy detection 
implementation and you can just do it on your own.

1. osg:

look at: 
osg::PolytopyIntersector:


Code:

osgUtil::PolytopeIntersector * picker = new 
osgUtil::PolytopeIntersector(osgUtil::Intersector::CoordinateFrame::PROJECTION, 
rectangle_min_x, rectangle_min_y, rectangle_max_x, rectangle_maxy);

// setup picker ...
osgUtil::IntersectionVisitor intersecvisitor(picker);
// setup iv
viewer->getCamera()->accept(iv);




I'm not shure if it's possible to select a SINGLE Point from a geometry with 
this.

2. bullet physics

ask at bullet physics for this

3. own implementation:

an easy point in rectangle implementation:

Code:

bool point3DinsideRectangle2D(Position p, Rectangle r) {
   if(p.x < r.minPos.x || p.y < r.minPos.y)
   return false;
   if(p.x > r.maxPos.x || p.y > r.maxPos.y)
   return false;
   
}




If you would check every point like this it would take hours. So make this test 
above for each point after you checked the boundingbox of a geometry or 
drawable:


Code:

bool boundingBox3DinsideRectangle2D(BoundingBox bb, Rectangle r) {
   if(bb.xMin() < r.minPos.x || bb.yMin() < r.minPos.y)
   return false;
   if(bb.xMax() > r.maxPos.x || bb.yMax() > r.maxPos.y)
   return false;
   
}




You can implement this with a simple NodeVisitor. For the Rectangle make shure 
to transform the choosen min and max right.


Code:

   Rectangle r;
   
   // minP, maxP from selection
// transform them
   minP = this->mViewer->getCamera()->getProjectionMatrix() * 
this->mViewer->getCamera()->getViewMatrix() * minP;
   maxP = this->mViewer->getCamera()->getProjectionMatrix() * 
this->mViewer->getCamera()->getViewMatrix() * maxP;
   // compute new min max
  r.min.x = min(minP.x, maxP.x);
  r.min.y = min(minP.y, maxP.y);
  r.max.x = max(minP.x, maxP.x);
  r.max.y = max(minP.y, maxP.y);




Something like this should work. But using a Rectangle isn't actually right. A 
rectangle drawn on display will actually create a frustum with the view. (If 
look at a cuboid in 3D, you will see a frustum that you'r brain will interpret 
as cuboid)

If you like to use frustum google for:
"Point in Frustum"
And
"Intersection BoundingBox and Frustum"

I guess you will find plenty of stuff.

Cheers,
NoxxKn

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





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


Re: [osg-users] Get all vertices of an OSG Group

2016-03-31 Thread David Knipp
Hi Bemt,

i think you got something wrong in the beginning. There are 3 possible ways to 
apply a color to a vertex:

- Material: 
  Materials define how the surface is interacting with lights. 
  Most times you are only intereseted in diffuse value.

osg::Material * mat = 
dynamic_cast(geometry)->getOrCreateStateSet()->getAttribute(osg::StateAttribute::MATERIAL));
mat->getDiffuse(osg::Material::Face::FRONT_AND_BACK));

- ColorArray:
  A simple color value that is just applied to a vertex

ptrOSGNode->getColorArray()

- Texture:
  An image applied on the surface:

osg::Texture2D * texture = 
dynamic_cast(geometry)->getOrCreateStateSet()->getTextureAttribute(0,
 osg::StateAttribute::TEXTURE));

All these are DIFFERENT ways to apply a color to a vertex. You should have said 
in the beginning that you apply a texture to all vertices. : )

Your answer should be for one position:

i : index of current vertex

osg::Vec2Array * texCoords = dynamic_cast(geometry->getTexCoordArray(0)); 
osg::Vec4 color = texture->getImage()->getColor(texCoords->operator[](i));

Cheers,
NoxxKn

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





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


Re: [osg-users] determining new size of rendering window after a user resizing

2016-03-31 Thread David Knipp
Hi,

if you are working under windows you can cast a window to GraphicsHandleWin32 
as far as i know:

osgViewer::ViewerBase::Windows wins;
viewer->getWindows(wins);
osgViewer::GraphicsHandleWin32* win32Window = 
dynamic_cast(wins[0]);

if(win32Window) {
 // windows.h
 RECT r;
 GetWindowRect(win32Window->getHWND(), );
 // now use r.width and r.height
}

Cheers,
NoxxKn

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





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


Re: [osg-users] Tesselation on Model

2016-03-23 Thread David Knipp
Thank you very much Sebastian! You are awesome!

You really made my day. I can see the tesselation it's working now. : )

If I'm allowed to add one question for personal advancing. 

What do i have to change in the shader so that the model is normal again? 
My Model is looking like it was pressed to 2D papper and then got wrapped 
arround a ball. 

Is this because of the geometryshader of the example?

Cheers,
David

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





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


[osg-users] Tesselation on Model

2016-03-23 Thread David Knipp
Hi osg-Forum,

I'm kind of stuck with a problem in how to combine a tesslation shader in osg 
with a normal model right now. I really searched over google a couple of times 
and over the osg forum. I can't find an answer to my problem. Normally i prefer 
to not ask and just resolve it myself because thats my problem and not yours. 
As you can see this is my first post and i just registered here to ask that. 
I'm really sry for that.

The thing is that I'm currently working on is an application that will just 
display a model. The model i'm working on is a huge bunch of GroupNodes that 
resolve down in the tree to geode-group-nodes and then geometrynodes. I guess 
thats pretty normal. With default osg shaders everty thing works nice and 
smooth.

Now comes the problem. I have to tesselate the Model. 
I admit that im not used to programm shaders and only did it with DirectX 11. 
But the easy things worked back then. 
For this project i used the "osgtesselateshaders" example of yours and did just 
copy the shaders there. I know that now all the texture, material and own 
lightning won't work with this shaders. I just want to see if the wireframe 
will get tesselated. For that i create the osg::Program variable in a ref_ptr 
and then set the pointer of it to all geometrynodes of the model. Every 
Geometrynode will get his own uniform with "innerTesselation", 
"outerTesselation" variables and so own. I also created hotkeys for "+" and "-" 
that will change the values of all Geoemtrynode as pleased. 

The default shader of osg works perfectly fine with my programm but of course 
no tesselation will hapen. Now if i start the programm with the osg 
tesselateion shaders of "osgtesselateshaders" it will just print this in Visual 
Studio:

"Warning: detected OpenGL error 'invalid operation' at after 
RenderBin::draw(..)"

This warning pretty much says nothing as far as i have googeld it. Just says 
"some Problem ist here". Of course the viewer will show nothing of my model.

So now my question what do i have to change to make the shaders of the example 
work with a loaded model? Is it even possible to make this example work with a 
model? Isn't a model just a bunch of triangles (+ texture and materials) as the 
Icosahedron in the example? Whats the difference here?

It would be cool if somebody allready has an example on how to use an 
tesselation shader with a simpel model that he can (is allowed) to post here. 

I'm sry for the post if the problem is just a simple coding error.


Code:

// init of the programm
this->mShader = new osg::Program();
this->mShader->addShader(new osg::Shader(osg::Shader::VERTEX,   
shader::Shader::vertSource));
this->mShader->addShader(new osg::Shader(osg::Shader::TESSCONTROL,  
shader::Shader::tessControlSource));
this->mShader->addShader(new osg::Shader(osg::Shader::TESSEVALUATION,   
shader::Shader::tessEvalSource));
this->mShader->addShader(new osg::Shader(osg::Shader::GEOMETRY, 
shader::Shader::geomSource));
this->mShader->addShader(new osg::Shader(osg::Shader::FRAGMENT, 
shader::Shader::fragSource));
this->mShader->setParameter(GL_GEOMETRY_VERTICES_OUT_EXT, 3);
this->mShader->setParameter(GL_GEOMETRY_INPUT_TYPE_EXT, GL_TRIANGLES);
this->mShader->setParameter(GL_GEOMETRY_OUTPUT_TYPE_EXT, GL_TRIANGLE_STRIP);

n->setShader(this->mShader.get());





Code:

void scene::GroupNode::setShader(osg::Program * p) {
NodeIDMap::iterator itr;
for (itr = this->mChildren.begin(); itr != this->mChildren.end(); ++itr)
itr->second->setShader(p);
}





Code:

void scene::GeometryNode::setShader(osg::Program * p) {
auto *ss = this->mOSGNode->getOrCreateStateSet();
ss->setAttribute(p);
}





Code:

scene::GeometryNode::GeometryNode(osg::Geometry * ptrOSGNode) {
  
this->mTessInnerU = new osg::Uniform("TessLevelInner", 1.0f);
this->mTessOuterU = new osg::Uniform("TessLevelOuter", 1.0f);

osg::StateSet * state;
state = ptrOSGNode->getOrCreateStateSet();
state->addUniform(new osg::Uniform("AmbientMaterial", osg::Vec3(0.04f, 
0.04f, 0.04f)));
state->addUniform(new osg::Uniform("DiffuseMaterial", osg::Vec3(0.0f, 
0.75f, 0.75f)));
state->addUniform(new osg::Uniform("LightPosition", osg::Vec3(0.25f, 
0.25f, 1.0f)));
state->addUniform(this->mTessInnerU.get());
state->addUniform(this->mTessOuterU.get());
state->setAttribute(new osg::PatchParameter(3));
}




Thank you!

Cheers,
NoxxKn[/code]

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





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


[osg-users] SCaLE 14x and LAVR Winter Conference

2016-01-22 Thread David Glenn
Hi,
I don't know who is in the LA area and is attending SCaLE 14x or going to 
attend LAVR Winter Conference this weekend, but I'm planning to be at both one 
way or another. If your attending, I might see you there!

Cheers!
...


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Anyone Experimenting with OSVR

2016-01-14 Thread David Glenn

dimi christop wrote:
> I also just got my Unit.
> The say that the HDK 1.3 hav superior lenses compared to the DK2.
> OSG support should be possible taking the osvrtrackviewer code as a starting 
> point . They use side-side split screen stereo.
> 
> 
> Dimi
> 
> 
> 
> 
> 
> 
> 
> On Tuesday, December 8, 2015 8:50 PM, David Glenn <> wrote:
> 
> 
> 
> Greetings All!
> 
> Got my OSVR HDKv1.3 last week! I had to wait till the weekend to really try 
> it out and there are still parts of it that I have not tried out yet (like 
> the IR camera). So far most of the effort has been testing what works and 
> what is a work in progress. One thing that I noticed off the bat is that the 
> screen is only at an HD level. 
> 
> Also, I'm evaluating it using game development software. So I'm going off the 
> deep end right out of the box. I feel comfortable doing this given that I 
> have already been dabbling in Oculus Rift from the start, so I can compare 
> and contrast. So far, I have dealt with Dev Kit 1 and have dabbled with DK2 
> and other demos and this is just another notch in the belt for me, but most 
> of this has been done using Unity because it more geared to what my handlers 
> expect me to develop to theses days. 
> 
> However, I am always looking at subjects that I can learn and give talks 
> about and I'm getting a little sick of talking terrain. VR has a little more 
> meat on bones and it would be nice to get something working in VR for the 
> next SIGGRAPH BOF. 
> 
> Oh, and it looking at it, there seems to be at least one OSVR test app that 
> uses OSG, but it's not a VR Demo as it is just a way to test head tracking 
> movement. 
> 
> ... 
> 
> Thank you!
> 
> Cheers,
> David
> 
> 
> David Glenn
> ---
> D Glenn 3D Computer Graphics Entertainment.
> www.dglenn.com
> 
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65828#65828 
> (http://forum.openscenegraph.org/viewtopic.php?p=65828#65828)
> 
> 
> 
> 
> 
> ___
> 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


So far I have only tried the IR camera once with limited success! The internal 
accelerometer seems to work well enough for me so I've just been using that 
alone for now. They have a Unity plug-in and it has it's own version of the 
server that I've been using. I have made some Unity test Demos using that and 
it has been working well. 

I'm going to whip up some simulation demo and attach OSVR (and later Oculus 
Rift) to it. Maybe John will let me demo it at one of his BOF's at Siggraph 
this year. I may give a pretention at one of the fan cons - like at Dragon Con. 
 

I'm almost putting the PowerPoint presentation together as I speak.

Using this stuff, I'm reminded of the tracking stuff that I used to do when was 
working in immersive simulation. Especially the tracking! I used to use that 
tracking hardware that InterSense made long ago! I know that it's exactly like 
the good old days, but it surprisingly close - even better in some ways! :)


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Anyone Experimenting with OSVR

2015-12-08 Thread David Glenn
Greetings All!

Got my OSVR HDKv1.3 last week! I had to wait till the weekend to really try it 
out and there are still parts of it that I have not tried out yet (like the IR 
camera). So far most of the effort has been testing what works and what is a 
work in progress. One thing that I noticed off the bat is that the screen is 
only at an HD level. 

Also, I'm evaluating it using game development software. So I'm going off the 
deep end right out of the box. I feel comfortable doing this given that I have 
already been dabbling in Oculus Rift from the start, so I can compare and 
contrast. So far, I have dealt with Dev Kit 1 and have dabbled with DK2 and 
other demos and this is just another notch in the belt for me, but most of this 
has been done using Unity because it more geared to what my handlers expect me 
to develop to theses days. 

However, I am always looking at subjects that I can learn and give talks about 
and I'm getting a little sick of talking terrain. VR has a little more meat on 
bones and it would be nice to get something working in VR for the next SIGGRAPH 
BOF. 

Oh, and it looking at it, there seems to be at least one OSVR test app that 
uses OSG, but it's not a VR Demo as it is just a way to test head tracking 
movement. 

... 

Thank you!

Cheers,
David


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Anyone Experimenting with OSVR

2015-11-19 Thread David Glenn
Greetings All!

I've been messing with Rift at work for some time now but mostly on Unity, so I 
wanted to get a feel of how others are out there and I did get a taste of OSVR 
at the razor booth at GDC. So when it came to getting one for my own 
experimentation, I decided to try the HDK out! I Figure that it might not be at 
the level of Crescent Bay, but it can't be any worse than DK1. 

That's about the level that I've been able to study at in given that I'm not a 
AAA game developer. 

FYI: My lone game credit in my resume was WWII-online!


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


[osg-users] Anyone Experimenting with OSVR

2015-11-09 Thread David Glenn
Greetings All!

Is anyone experimenting with OSVR yet?

I know that there is some Oculus stuff that people have tried with some limited 
success, but just wondering if anyone looked at it from the OSVR standpoint!  

... 

Thank you!

Cheers,
David


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Visual Studio 2015 3rd_party

2015-10-21 Thread David Callu
Hi Bjorn

Have you consider to use cmake's module named ExternalProject
<https://cmake.org/cmake/help/v3.0/module/ExternalProject.html>
You could Download/Update/Patch/Configure/Build/Install{/add custom step}
in few lines of cmake code

I recently use it to build lots of dependencies and immediately think to
use it for OSG

HTH
David


2015-10-21 12:11 GMT+02:00 Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de>:

> Hey Björn,
>
> Thats fantastic news. I'll test them as soon as I can :-)
>
> Cheers
> Sebastian
>
> Chris Hanson wrote:
>>
>>> We're working towards getting our own in-house build system up to modern
>>> compilers shortly.
>>>
>>
>> Hi Chris,
>>
>> On a related note. I have tried to automate the building of the 3rd party
>> dependencies via a toplevel CMake script which builds the desired
>> dependencies from source. And then via the install feature collects the
>> relevant headers, libraries and DLLs into one directory.
>>
>> The project can be found here:
>> https://github.com/bjornblissing/osg-3rdparty-cmake
>>
>> Best regards
>> Björn
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=65396#65396
>>
>>
>>
>>
>>
>> ___
>> 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


Re: [osg-users] OSG BOF at SIGGRAPH was a SUCCESS

2015-10-19 Thread David Glenn
Greetings all!

Just to let you all know that I got some interest in showing how to add 
excursions (a.k.a. buildings like the Boston demo that Pelican wiped up).
I know that there was a lot of questions that I had in the BOF on this and I 
did a similar map for someone else's demo and I would like to do an illustrated 
how-to video on YouTube if there is any interest in that subject! 

For others that don't know, I have done a how-to for Virtual Planet Builder 
that included how to compile the code in MS Windows using Visual Studio Express 
2010. 

... 

Thank you!

Cheers,
David


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Crash when application closes if linking with OSG

2015-10-05 Thread David Siñuela
Hello,

Thanks for your input. We can wait for an upstream fix, in the meanwhile we
will patch it in our development branch.

I tried your proposed solution, calling DisplaySettings::instance() from
main(), and it didn't work, when s_InitRegistry is destroyed the
DisplaySettings::s_displaySettings has been destroyed already. It can be
fixed by defining a static initializer like InitRegistry that simply calls
DisplaySettings::instance() in our program. If I understood it correctly
this works because the compiler/linker will see this static member and
DisplaySettings::s_displaySettings before InitRegistry, changing the order
of initialization so that DisplaySettings::s_displaySettings is allocated
before s_InitRegistry and deallocated after.

It can also be fixed by calling "osgDB::DatabasePager::prototype()" or
"osg::DisplaySettings::instance()" from InitRegistry's constructor.

Regards,
David



On Fri, Oct 2, 2015 at 6:28 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi David,
>
> Curious bug.  Perhaps another solution would be to call
> DisplaySettings::instance() at the start of main.
>
> An actual bug fix might be to put in a proxy object into
> src/osg/DisplauySettings.cpp that forces that DisplaySettings::instance()
> to be constructed during static initialization, this would obviously
> require a patch to the core OSG, something I'm happy to do, but won't help
> you right away.
>
> Robert.
>
>
>
> On 2 October 2015 at 17:07, David Siñuela <david.sinu...@pix4d.com> wrote:
>
>> Hello,
>>
>> We have a Qt application that uses OSG for the 3D viewer/editor, but the
>> OSG viewer may not be used if the user does not open the 3D view tab. We
>> are in the process of upgrading to OSG 3.4 and we noticed that the
>> application crashes when the user quits if the 3D view is never open.
>>
>> The problem seems to be the order in which the static variables are
>> destroyed at shutdown. The stacktrace looks like this:
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x01d8a0b0 in
>> osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint (this=0x0) at
>> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/include/osg/DisplaySettings:203
>> (gdb) bt
>> #0  0x01d8a0b0 in
>> osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint (this=0x0) at
>> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/include/osg/DisplaySettings:203
>> #1  0x01d86b47 in osgDB::DatabasePager::DatabasePager
>> (this=0x3a10fb0) at
>> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgDB/DatabasePager.cpp:
>> #2  0x01d87815 in osgDB::DatabasePager::prototype () at
>> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgDB/DatabasePager.cpp:1235
>> #3  0x01d1ceef in InitRegistry::~InitRegistry (this=0x32cc6f3
>> , __in_chrg=) at
>> /home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgViewer/ViewerBase.cpp:53
>> #4  0x7fffec82df88 in __run_exit_handlers () from /usr/lib/libc.so.6
>> #5  0x7fffec82dfd5 in exit () from /usr/lib/libc.so.6
>> #6  0x7fffec818617 in __libc_start_main () from /usr/lib/libc.so.6
>> #7  0x00ea3709 in _start ()
>>
>> As shown in the trace calling DatabasePager::prototype() is creating the
>> static DatabasePager for the first time and this one calls
>> osg::DisplaySettings::instance() which was released already. It is easily
>> reproducible on linux with gcc. Removing the
>> osgDB::DatabasePager::prototype() = 0; line fixes the crash but I am not
>> sure about the intent of that line.
>>
>> Regards,
>>
>> --
>> David Sinuela Pastor
>>
>>
>> *Pix4D SA*
>> *EPFL Innovation Park*
>> *Building D*
>> *1015 Lausanne - Switzerland*
>> *Email: <david.sinu...@pix4d.com>david.sinu...@pix4d.com
>> <david.sinu...@gmail.com>*
>> *Skype: david.sinuela.pix4d*
>> *www.pix4d.com* <http://www.pix4d.com>
>>
>> ___
>> 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
>
>


-- 
David Sinuela Pastor


*Pix4D SA*
*EPFL Innovation Park*
*Building D*
*1015 Lausanne - Switzerland*
*Email: <david.sinu...@pix4d.com>david.sinu...@pix4d.com
<david.sinu...@gmail.com>*
*Skype: david.sinuela.pix4d*
*www.pix4d.com* <http://www.pix4d.com>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Crash when application closes if linking with OSG

2015-10-05 Thread David Siñuela
Hello Robert,

It is working fine now, I tested it on Linux and Windows.

Thanks!
David

On Mon, Oct 5, 2015 at 12:48 PM, Robert Osfield <robert.osfi...@gmail.com>
wrote:

> Hi David,
>
> I have removed the InitRegistry proxy object from
> src/osgViewer/ViewerBase.cpp and introduced OSG_INIT_SINGLETON_PROXY usage
> in DatabasePager.cpp and Registry.cpp which should ensure that the
> singleton's are initialized in a single threaded way and destructed in an
> appropriate order.  I have checked this change into svn/trunk and the
> OSG-3.4 branch. Changes are:
>
> Index: src/osgDB/DatabasePager.cpp
> ===
> --- src/osgDB/DatabasePager.cpp (revision 15130)
> +++ src/osgDB/DatabasePager.cpp (working copy)
> @@ -1236,6 +1236,8 @@
>  return s_DatabasePager;
>  }
>
> +OSG_INIT_SINGLETON_PROXY(ProxyInitDatabasePager,
> DatabasePager::prototype())
> +
>  DatabasePager* DatabasePager::create()
>  {
>  return DatabasePager::prototype().valid() ?
> Index: src/osgDB/Registry.cpp
> ===
> --- src/osgDB/Registry.cpp  (revision 15130)
> +++ src/osgDB/Registry.cpp  (working copy)
> @@ -214,7 +214,9 @@
>  return s_registry.get(); // will return NULL on erase
>  }
>
> +OSG_INIT_SINGLETON_PROXY(ProxyInitRegistry, Registry::instance())
>
> +
>  // definition of the Registry
>  Registry::Registry()
>  {
> Index: src/osgViewer/ViewerBase.cpp
> ===
> --- src/osgViewer/ViewerBase.cpp(revision 15142)
> +++ src/osgViewer/ViewerBase.cpp(working copy)
> @@ -40,23 +40,6 @@
>
>  using namespace osgViewer;
>
> -
> -struct InitRegistry
> -{
> -InitRegistry()
> -{
> -osgDB::Registry::instance();
> -}
> -
> -~InitRegistry()
> -{
> -osgDB::DatabasePager::prototype() = 0;
> -osgDB::Registry::instance(true);
> -}
> -};
> -
> -static InitRegistry s_InitRegistry;
> -
>  ViewerBase::ViewerBase():
>  osg::Object(true)
>  {
>
> This patch is also attached, under unix you can apply this with:
>
>   cd OpenSceneGraph
>   patch -p0 < singletons.patch
>
> Could you test this out and let me know if it works fine or not.
>
> Cheers,
> Robert.
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
David Sinuela Pastor


*Pix4D SA*
*EPFL Innovation Park*
*Building D*
*1015 Lausanne - Switzerland*
*Email: <david.sinu...@pix4d.com>david.sinu...@pix4d.com
<david.sinu...@gmail.com>*
*Skype: david.sinuela.pix4d*
*www.pix4d.com* <http://www.pix4d.com>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Crash when application closes if linking with OSG

2015-10-02 Thread David Siñuela
Hello,

We have a Qt application that uses OSG for the 3D viewer/editor, but the
OSG viewer may not be used if the user does not open the 3D view tab. We
are in the process of upgrading to OSG 3.4 and we noticed that the
application crashes when the user quits if the 3D view is never open.

The problem seems to be the order in which the static variables are
destroyed at shutdown. The stacktrace looks like this:

Program received signal SIGSEGV, Segmentation fault.
0x01d8a0b0 in osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint
(this=0x0) at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/include/osg/DisplaySettings:203
(gdb) bt
#0  0x01d8a0b0 in
osg::DisplaySettings::getNumOfHttpDatabaseThreadsHint (this=0x0) at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/include/osg/DisplaySettings:203
#1  0x01d86b47 in osgDB::DatabasePager::DatabasePager
(this=0x3a10fb0) at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgDB/DatabasePager.cpp:
#2  0x01d87815 in osgDB::DatabasePager::prototype () at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgDB/DatabasePager.cpp:1235
#3  0x01d1ceef in InitRegistry::~InitRegistry (this=0x32cc6f3
, __in_chrg=) at
/home/siu/src/pix4dmapper/2.1/external_tmp/build/openscenegraph/src/osgViewer/ViewerBase.cpp:53
#4  0x7fffec82df88 in __run_exit_handlers () from /usr/lib/libc.so.6
#5  0x7fffec82dfd5 in exit () from /usr/lib/libc.so.6
#6  0x7fffec818617 in __libc_start_main () from /usr/lib/libc.so.6
#7  0x00ea3709 in _start ()

As shown in the trace calling DatabasePager::prototype() is creating the
static DatabasePager for the first time and this one calls
osg::DisplaySettings::instance() which was released already. It is easily
reproducible on linux with gcc. Removing the
osgDB::DatabasePager::prototype() = 0; line fixes the crash but I am not
sure about the intent of that line.

Regards,

-- 
David Sinuela Pastor


*Pix4D SA*
*EPFL Innovation Park*
*Building D*
*1015 Lausanne - Switzerland*
*Email: <david.sinu...@pix4d.com>david.sinu...@pix4d.com
<david.sinu...@gmail.com>*
*Skype: david.sinuela.pix4d*
*www.pix4d.com* <http://www.pix4d.com>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] pfDCS replacement

2015-08-28 Thread David Callu
Hi Tony

Have you take a look to osg/src/osgPlugins/pfb/* source code ?
this plugin load pfb fie in osg, so I think many answers of your question
will be there.

HTH
David

2015-08-28 5:34 GMT+02:00 Tony Vasile ming...@gmail.com:

 Okay today I am wondering which class replaces pfDCS in OSG? A Google
 search shows there use to be  a class osg::DCS but this has been removed.
 To get the same functionality do I use PositionAttitudeTransform?

 Tony V

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





 ___
 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] DDS textures not loading on Mac OSX and the latest trunk(3.5.0)

2015-08-24 Thread David Guthrie
Hi,

I had modified the code to just ignore all loaded mipmaps in a few of the 
plugins to fix it, but everything work in older versions of OSG.  The code is 
so different now, it's hard to tell what change triggered the problem.

David

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





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


Re: [osg-users] OSG BOF at SIGGRAPH was a SUCCESS

2015-08-19 Thread David Glenn
Greetings!

If you what, I have three YouTube videos:

One is the Boston Demo that Pelican Mapping did:
its only a demonstration of the boston.earth file  to show off what osgEarth 
can do! Later, I would like to do a breakdown of what is being displayed and 
how to do it, but that is for another talk down the road or anther video.

Boston Demo https://youtu.be/Z_7afNznnRs

Next is one that I made up from two examples that is part of the test set of 
xml files provided in the source. It shows nexrad data on top of Open Street 
Map. 

Nexrad on OSM https://youtu.be/ctdNF5wHpMk

BTW: If anyone out there has used wms data other than the source example I 
used, please let me know, I'm trying to find other weather radar sources to try 
out and I'm by no means an expert of this stuff.

Finally I did a mixture of something old and something new. I mixed some of the 
data that I used to make the Virtual Planet Builder map and mixed it in with 
Open Street Map. 

VPB data on OSM https://youtu.be/Mh7Yd6bh0BQ

I also have other files from the Pelican Mapping that I will post as soon as I 
can get myself settled down from all this travel - I've been away from home for 
nearly two weeks.  

Sorry for any mistakes or misspellings I made.

Hopefully the YouTube videos that I plan to make will cover all the questions 
that you just can't cover in a BOF. 

Using osgEarth is a lot of fun and I have found to be very useful!
... 

Thank you!

D Glenn


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] OSG BOF at SIGGRAPH 2015 is 6 weeks away

2015-07-08 Thread David Glenn
Greetings!

I was hoping to work on osgEarth this year, but most of my efforts has been 
diverted due to the demands of my handlers.  
Mostly VR and Unity related stuff!
But I will be at SIGGRAPH this year!

D Glenn


David Glenn
---
D Glenn 3D Computer Graphics Entertainment.
www.dglenn.com

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





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


Re: [osg-users] Error when using osgShadow

2015-06-29 Thread david boublil
Hi Robert,

thanks for your answer! 
What do you mean by tracking with a debugger? I attached to my previous message 
the output obtained with in the osg debug mode... 
Concerning the other info, I am running my code on linux, with 2.8.1 osg 
version. 
The code I attached is working if I am removing the ShadowMap technique and is 
showing the scene without shadow. 
I also tried to replace ShadowMap by other technique but: whether it's running 
without showing any shadow (for example using ShadowTexture,ShadowTexture 
techniques) or it's just not working (SoftShadowMap, ParallelSplitShadowMap) 
and the same floating point exception error is obtained.

Thank you in advance!

Cheers,
david

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





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


Re: [osg-users] Error when using osgShadow

2015-06-29 Thread david boublil
 '' is not supported.
Done DatabasePager::addLoadedDataToSceneGraph0ms,   0.001ms  objects0

OpenGL extension 'GL_ARB_pixel_buffer_object' is supported.
OpenGL extension 'GL_ARB_fragment_program' is supported.
OpenGL extension 'GL_EXT_framebuffer_object' is supported.
OpenGL extension 'GL_EXT_framebuffer_blit' is supported.
OpenGL extension 'GL_EXT_framebuffer_multisample' is not supported.
OpenGL extension 'GL_NV_framebuffer_multisample_coverage' is not supported.
OpenGL extension 'GL_EXT_packed_depth_stencil' is supported.
OpenGL extension 'GL_ARB_shader_objects' is supported.
OpenGL extension 'GL_ARB_vertex_shader' is supported.
OpenGL extension 'GL_ARB_fragment_shader' is supported.
OpenGL extension 'GL_ARB_shading_language_100' is supported.
OpenGL extension 'GL_EXT_geometry_shader4' is not supported.
OpenGL extension 'GL_EXT_gpu_shader4' is not supported.
glVersion=2.1, isGlslSupported=YES, glslLanguageVersion=1.1
OpenGL extension 'GL_ARB_vertex_program' is supported.
Setting up osg::Camera::FRAME_BUFFER_OBJECT
OpenGL extension 'GL_ARB_multitexture' is supported.
OpenGL extension 'GL_EXT_texture_filter_anisotropic' is not supported.
OpenGL extension 'GL_ARB_texture_compression' is supported.
OpenGL extension 'GL_EXT_texture_compression_s3tc' is not supported.
OpenGL extension 'GL_IBM_texture_mirrored_repeat' is supported.
OpenGL extension 'GL_EXT_texture_edge_clamp' is supported.
OpenGL extension 'GL_ARB_texture_border_clamp' is supported.
OpenGL extension 'GL_SGIS_generate_mipmap' is supported.
OpenGL extension 'GL_ARB_shadow' is supported.
OpenGL extension 'GL_ARB_shadow_ambient' is supported.
OpenGL extension 'GL_APPLE_client_storage' is not supported.
OpenGL extension 'GL_ARB_texture_non_power_of_two' is supported.
OpenGL extension 'GL_EXT_texture_integer' is not supported.
Setting up osg::Camera::FRAME_BUFFER

Compiling FRAGMENT source:
uniform sampler2D osgShadow_baseTexture; 
uniform sampler2DShadow osgShadow_shadowTexture; 
uniform vec2 osgShadow_ambientBias; 

void main(void) 
{ 
vec4 color = gl_Color * texture2D( osgShadow_baseTexture, gl_TexCoord[0].xy 
); 
gl_FragColor = color * (osgShadow_ambientBias.x + shadow2DProj( 
osgShadow_shadowTexture, gl_TexCoord[1] ) * osgShadow_ambientBias.y); 
}

Linking osg::Program  id=1 contextID=0
Floating point exception
./a.out: Floating point exception
 
Thank a lot!

Cheers,
David

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





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


Re: [osg-users] OpenSceneGraph for driving simulation framework?

2015-06-19 Thread David Heitbrink
I work at the National Advanced Driving Simulator, at the University of Iowa. 
We running OSG on a 16 projector system, and one of the world's largest motion 
bases. I think we are #2 at this point. And we also use OSG in single PC 
simulators that we provide to a number of universities and other entities (some 
in Europe and middle east).  

That being said, as almost every else here has said, yes it is considerable 
effort to build everything else too. Overall we have poured way more resources 
into everything else (scenario control, logical database, dynamics, visual 
assets) than our Image Generator. 

Also there is a lot work modeling you have to consider. You need to build 
visual models and produce a correlated logical database, i.e. you need a system 
that know about the roads, intersections + traffic control devices, and can be 
queried by your scenario control system.
 
Unless you have considerable resources to spend, you should consider starting 
with an existing driving simulator. You might consider:
Open DS (Open Driving Simulator, I honestly don't know too much about it)
https://opends.de/

My organization works with a number of entities 
(http://www.nads-sc.uiowa.edu/minisim/index.php) .

Also with that being said what area of research are you looking at?

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





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


Re: [osg-users] OS X (10.9) Texture2D with hardware compression results in no texture data.

2015-05-28 Thread David Guthrie
I did do a diff between 3.2.1 in Texture and Texture2D, but there are so many 
changes it got muddy.  I have a lot to do before next week, so unless someone 
else finds it before then, I'll just have to stick with what I have until then.

Thank you all for the quick replies.
David

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





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


[osg-users] OS X (10.9) Texture2D with hardware compression results in no texture data.

2015-05-28 Thread David Guthrie
Hello everyone,

I started upgrading delta3d to use osg 3.3.x, but I ran into a strange problem 
that that seems like it must be something that changed in the osg::Texture 
code, thought it only manifests on OS X.  The texture is setting compressed 
mode, I think it turns on mip mapping correctly, and it ends up calling 
extensions-glCompressedTexSubImage2D().  

The only reason I think it has to be in this code, is that I tried it with an 
ive file that has compressed textures.  Those load straight into the image 
object from the ive file, and into the Texture2D.

I can export the textures from the ive, and read them in an image tool, and I 
can load the ive and works fine on Windows.  In case you get the wrong idea, I 
have an application with many different file formats and both extrernal and 
embedded textures.  Not a single compressed image we have will load properly on 
OS X, but they all work on in OSG 3.2.1.  

Any thoughts would be appreciated!

Thanks,
David

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





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


Re: [osg-users] OS X (10.9) Texture2D with hardware compression results in no texture data.

2015-05-28 Thread David Guthrie
Hey,

You are a lifesaver. I took it out in the ive plugin as well, and between the 
two, all my textures came back. 

Thank you!

Cheers,
David

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





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


Re: [osg-users] Problem with Shadow Map

2015-05-21 Thread David Heitbrink
when I run the OSG Shadow example, it works. I also modified the example to use 
a composite viewer and that works as well.

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





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


  1   2   3   4   5   6   7   8   9   10   >