Re: [osg-users] osgWidget for drawing control panels

2013-09-12 Thread Alberto Luaces
Alberto Luaces writes:

 Hi,

 I am in the process of creating a control panel for a simulator, using
 osgWidget for drawing the controls.

 I want to draw a turning knob, but it is not very clear how to specify
 the origin for the rotation of the widget.  By default, all the widgets
 rotate over (0, 0), that is, their bottom-left corner.

 Has anyone developed a widget similar to a compass or a speedometer with
 osgWidget?

This is what I eventually got — subclassing the window and overwriting
the transform to fit my needs:

--8---cut here---start-8---
class window_pivot_center: public osgWidget::Box
{
public:
  window_pivot_center(const std::string name): osgWidget::Box(name)
  {}

  void update()
  {
osgWidget::Box::update();

osgWidget::point_type w, h;

w = getWidth();
h = getHeight();

osg::Matrix t = osg::Matrix::translate(-w/2, -h/2, 0);
osg::Matrix r = osg::Matrix::rotate(osg::DegreesToRadians(getRotate()), 0, 
0, 1);
osg::Matrix tinv = osg::Matrix::translate(w/2, h/2, 0);

osgWidget::Point p = getPosition();
osg::Matrix pos = osg::Matrix::translate(p[0], p[1], 0);

setMatrix(t * r * tinv * pos);

  }
};
--8---cut here---end---8---


-- 
Alberto

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


Re: [osg-users] Help: issue about NaN detected by CullVisitor.

2013-09-12 Thread Daniel Nick
Hey,


 It has been fixed.
 I have forget to port the getScreenSettings function, once it been ported, 
 the test program can running on the target.


can you tell me how you solved the problem exactly?

Thank you!

Gickl[/quote]

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





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


Re: [osg-users] How to grasp an object in virtual scene by using a CyberGlove and OSG?

2013-09-12 Thread Alexandre Vaillancourt
Hi Junjie,

I don't think there is anything related to physics and collision detection in 
OSG, you might want to look at physics engines like ODE or Bullet and integrate 
them in your application. 

There are things like osgODE and osgbullet out there, but I don't know about 
their status or if they will be adapted for your application. 

... 

Enjoy!
Alexandre

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



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


Re: [osg-users] Aspect Ratio Issue in iOS

2013-09-12 Thread Lenny Becho
Actually the answer you wrote on the mailing list fixed the issue.
I just added this line before the setViewport call:

Code:

_viewer-getCamera()-setProjectionMatrixAsPerspective(45.0,  aspectRatio, 0.5, 
10);




When aspect ratio is the view's frame's width/height.

Thanks!

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





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


Re: [osg-users] Installation process

2013-09-12 Thread Erappa Naik
Hi,
Initially I tried to install osg by per-compiled binaries as explained by 
Loanna |IT by IT in his post
I downloaded OpenSceneGraph-3.0.1-VS9.0.30729-x64-debug-12741.7z and 
OpenSceneGraph-3.0.1-VS9.0.30729-x64-release-12741.7z along with sample dataset 
OpenSceneGraph-Data-3.0.0.zip.I created installation folder in my C: drive. 
setting up all the environment variables I run the command osgversion in 
command prompt  got  error saying osgversion is not recognized as internal or 
external command, operable program or batch file
I tried  to resolve but not succeed.
Then again I tried to install osg with source code by using Cmake. I loaded 
CmakeList.txt file into where is source code and where to build binaries fields 
of Cmake GUI. after clicking the configure button I got Error message error in 
configuration process, project files may be invalid'.
I changed path of where to build binaries to build folder of the installation 
directory. 
please tell me where I am wrong and how to fix the isue. 
 

Thank you!

Cheers,
Erappa

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





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


[osg-users] [osgPlugins] Undocking osg qt widget from tab window

2013-09-12 Thread Thomas Stegemann
Hi, 

I am trying to undock an from a QTabWidget: 


Code:
QWidget* gv = // here is the osgviewer widget (using Qt's OGLWidget)
QDialog* dlg = new QDialog(this); 
dlg-setWindowTitle(hello earth); 
QHBoxLayout* pMainLay = new QHBoxLayout; 
gv-setMinimumSize(100,100); 
gv-setGeometry(100,100,300,300); 
pMainLay-addWidget(gv); 
dlg-setLayout(pMainLay); 
ui-tabWidget-removeTab(ui-tabWidget-currentIndex()); // removes the 
currently active tab 
dlg-show();

 

There is nothing to see in the new dialog. Did I missed something? 
How to copy the earth view properly into a new widget? Should I use a 
composite viewer for this kind of task? It seems there is not even the osg view 
visible (no blue canvas)... 

I also tried: 


Code:
QWidget* tab = ui-tabWidget-currentWidget(); 
tab-setParent(this); 
tab-setWindowFlags(Qt::Dialog); 
tab-setMinimumSize(400, 400); 
tab-setGeometry(100, 100, 500, 500); 
ui-tabWidget-removeTab(ui-tabWidget-currentIndex()); 
tab-show(); 




Everything works as expected when using standard QWidgets but the osg viewer is 
not shown.

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





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


Re: [osg-users] OSG and HMD

2013-09-12 Thread Cor Jansen
Thanks all for the replies.

So what would you do:

A: use OSG and add advanced graphics features to improve picture quality?
B: use prof. engine that already supports HMD and try to minimize latency?

I really like to read your opinions on this!

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





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


Re: [osg-users] How to constantly render a very far object?

2013-09-12 Thread Mengyu Yuan
Hi Robert,

Thank you for response. 

There is a little problem. I'm currently doing a simulation project. All 
parameters ( including camera position and fovy, object  position and size,  
and even texture size ) are assigned based on the real-world situation. And my 
job is to track the target pixel out of many other noise pixels. So zooming 
camera or object my not be a very good idea.

I'd like to try to enable antialising and see what happens.

Thanks.

Mengyu


robertosfield wrote:
 Hi Mengyu,
 
 It's hard to say exactly why it's disappearing but my best guess would
 be the aliasing of a sub pixel sized object is resulting to
 appearing/disappearing.
 
 The way I'd tackle it would be to render the object to a texutre wth
 the camera zoomed into to render the object at a large than pixel
 size.  Then render an oversize quad with this texture on and let
 OpenGL mipmpa filtering of the texture handle the antialiasing for
 you.  This would be a form of impostor/image based rendering.
 
 Another approach would be to scale the object so it's not subpixel in sized.
 
 Robert.
 


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





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


[osg-users] [osgPlugins] [Android + FFmpeg] unable to play audio

2013-09-12 Thread Gioacchino De Fusco
Hi all,

I'm having some troubles trying to play a video file with audio on Android.

Basically, I load a video file with the FFMpeg plugin, the video is correctly 
shown but the audio is not.

In the Logcat, I can see that the FFMpeg Audio stream is succesffully created, 
so there should not be any problem on this side.

I'm using OSG 3.1.9 with FFMpeg 1.0.7.

Someone encountered a similar issue before?
What could you suggest me?

Thank you!

Cheers,
Gioacchino

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





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


Re: [osg-users] 2D Overlay on HUD

2013-09-12 Thread Hen Drik
Thank you for your replies.

@Alexandre: I don't want to move the camera, I only need an overlay of the 
current object on top of the screen.

@Robert: This is not at all what I'd like to have. I think, when I implement it 
in the way you suggest it, the flight object will always be on top. But it 
should also stay in the scene on the given position.

What I have done till now is a second camera for a HUD, which contains 
additional draw objects (like quads, circles, triangles). These object are free 
in position on the 2d screen. Now I want one of these objects to overlay always 
the flight object. These objects shoud stay fixed in their size on the screen, 
indepent of the current zoom level. So it could happen that the overlay objects 
only overlays parts of the flight object or the entire object. 

Another requirement of this, is to show the position of the flight object when 
it's not on the current viewed clip (/scene). So when the flight object moves 
out of the current screen the overlay should stay on the border of the screen 
and show the position of the flight object, so that the user knows where to 
find the specific object.

I hope it's now more understandable.

Thank you!

Hen

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





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


Re: [osg-users] How to get the pixel length of a string

2013-09-12 Thread Xiangfei Cui

robertosfield wrote:
 Hi Xiangfei,
 
 On 24 July 2013 05:55, Xiangfei Cui  wrote:
 
  I have a question.
  I create a osgText::Text and set the CharacterSizeMode to SCREEN_COORDS. 
  How can I get the pixel length of a string ?
  
 
 There isn't a specific function for this.  The Text drawable has a
 getBound() method that returns an osg::BoundingBox that encompasses
 the whole text item, would this be sufficient?
 
 What are you trying to with the pixel length?
 
 Robert.
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


I need to show a legendframe that contains a lenged and relevant 
annotations(Text) beside the legend in the window, as the figure shows. The 
height and width of the legendframe are computed automatically according to 
the annotations. So I need to know the height and width of the annotations. The 
height is easy to get as it's set by SetCharacterSize, but how could I get the 
width, e.g. the pixel length of the annotations. Sorry about my poor English 
and Do I make the question clear ?
getBound is available but it produce a incomprehensible result.[/img]

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




Attachments: 
http://forum.openscenegraph.org//files/qq20130807112838_154.bmp


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


Re: [osg-users] How to return a NULL value of osg::Vec3f type

2013-09-12 Thread Yong Chen
Hi,

Thank you so much for your answers and you helped me a lot. But I don't know 
how to mark this question as solved because I am newbie here.

I raised this question because in the beginning I thought the osg::Vec3f is 
constructed using std::vector template (it seems that I was wrong:( ). So I was 
wondering why it cannot return NULL as vector did. Next I think I need to read 
the source code of osg to better understand the underlying stuff.

Thank you!

Cheers,
Yong

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





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


[osg-users] help~, i used multi-threads loading function, but osg error..?

2013-09-12 Thread CHANG YONG HO
Hi, first i'm sorry for my english writing skill.
i'm begginer ^^;
 :(  :-*  
i try to 28 multi-threaded node loading test.
total polygon is 5*10^6, vertices are 3*10^6.
sometime, osgDB::readNodeFile has error like this,

when the first running,
1. Warning: Could not find plugin to read objects from file xxx02.osg
== this message has random osg file, ex) xxx07 or xxx09 @@;
and the second running,
2. access violation(0x00~~~)
and the third running,
3. no problem, my helicopter was loaded within 2minutes.
and 4,5,... running does not take any error, all success.
only when i was root and running, the 1. 2. error comes to me.

3ds max file has 28 groups like this,
xxx0.osg, xxx1.osg, xxx2.osg . xxx27.osg

later read that osg files by 28 multithreaded readNodeFile(),
i attached to root node by 28 node groups.

why sometimes random loading error?
i attached my very simple source.
check this source
... 

Thank you!

Cheers,
CHANG

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




Attachments: 
http://forum.openscenegraph.org//files/main_737.cpp


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


[osg-users] [3rdparty] Missing plugin

2013-09-12 Thread Erappa Naik
Hi,
I tried to run the sample example osganimation.cpp and I didnt find the 
fallowing files in my insatallation directory.
osgAnimation/UpdateMatrixTransform
osgAnimation/StackedTranslateElement
osgAnimation/StackedRotateAxisElemen

I installed osg by using OpenSceneGraph-installer.exe. where can I get
These missing files/plugins.

cheers
Naik

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





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


[osg-users] General Question:

2013-09-12 Thread mekalarose
Question:
   In which decade was the American Institute of Electrical Engineers 
(AIEE) founded?

Ans:
1880s

Read  More:
Movers in Chennai|Packers Movers Chennai

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





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


[osg-users] General Question:

2013-09-12 Thread mekalarose
Question:
In the last one decade, which one among the following sectors has 
attracted the highest foreign direct investment inflows into India?

Ans:
Telecommunication

Read  More:
Movers in Chennai|Packers Movers Chennai

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





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


Re: [osg-users] General Question:

2013-09-12 Thread Art
Sorry, my fault, accidently approved this message.

The user is already banned :)

Art


On 17.08.2013 08:21, mekalarose wrote:
 Question:
In which decade was the American Institute of Electrical Engineers 
 (AIEE) founded?

 Ans:
 1880s

 Read  More:
 Movers in Chennai|Packers Movers Chennai

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





 ___
 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] osgOcean_River

2013-09-12 Thread 胥耀
Hi,

Running osgRiver, But I can't see water. Can anyone help me? Runnig 
successfully, loading successfully.

Thank you!

Cheers,
胥耀

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





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


[osg-users] There's no water when osgRiver running, please help me?

2013-09-12 Thread 胥耀
Hi,

I've got osgRiver.7z. Building success, Running success, Loading resources 
success. I just can see river.3ds but no water. Can anyone help me?   

Thank you!

Cheers,
胥耀

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





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


[osg-users] using stereo with osgview had a problem

2013-09-12 Thread Liao Jinyi
Hi,

I an new to OSG。And I am tring to use the below command line

Code:

osgviewer -stereo QUAD_BUFFER cow.osg



but it has errors such as
GraphicsWindow32::setPixelFormat() -- No matching pixel found based on traits 
specified.
I dont know how to fix it. please help me!

Thank you!

Cheers,
cloudending

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





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


Re: [osg-users] viewer-getCameraWithFocus() is gone?

2013-09-12 Thread David Zaadstra
Hi,

I had the same question and considered myself lucky to find this solution so 
quickly, but I have a problem:

Sporadically, my application crashes in the std::vector code with vector 
iterator not dereferencable. This happens in the call to back().

Actually I would think that this crash can't happen because I copied your code 
including the empty() query which should ensure that back() works. The only 
difference in my code is that I had to add .get(), but I don't think that makes 
a difference.

Do you have any idea why this could crash? I'd guess it's some kind of 
multithreading issue. Is there anything in osg I should be worrying about here?

Thanks and Regards,
David

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





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


[osg-users] [vpb] creating database compatable to osg

2013-09-12 Thread Swathy Nair
hi,
  i am a beginner to osg. i want to convert the data downloaded from SRTM to a 
database compatible to osg. can i get as tep by step instruction. my os is 
windows 7 and im using visual studio 2010


Thank you!

Cheers,
swathy

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





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


[osg-users] [vpb] osgdem and HAE/MSL

2013-09-12 Thread Nick Modly
Hi,

When providing elevation data to osgdem. is it expected to be in HAE (height 
above ellipoid), or MSL (mean sea level), or can it tell from the input? For 
example, I am providing elevation data in the AIG/Arc/Info Binary Grid  format 
(.adf). The data represents the elevation of the area in meters MSL. However, 
when I osgpick a point and convert it to Lat-Lon-Alt MSL, the altitude is off 
by about 30m (the difference between HAE and MSL at this location).

This are the options I ran osgdem with
$ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/ -t image.tif

Is it possible to specify a vertical datum or coordinate system, such as EGM96?


Thank you!

Cheers,
Nick

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





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


[osg-users] SHould I use overlay

2013-09-12 Thread Srikanth Prahlad
Hi,

To a OTW scenery, I used color on texture to indicate some differentiation to 
the pilot. However, the color fully masks the texture. Is there any way to 
overlay both so that the underlying texture is also visible to some extent ie 
not masked fully.

... 

Thank you!

Cheers, |-) 
Srikanth

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





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


Re: [osg-users] Texturing a node according to its viewport

2013-09-12 Thread Olivier Migliorini
I found a solution using cullMAsks on Camera and NodeMasks on Node. 

Thanks,
Olivier

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





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


Re: [osg-users] [SOLVED] Texturing a node according to its viewport

2013-09-12 Thread Olivier Migliorini
Hi,

I've looked for a similar problem on the forum and haven't found but if there 
is one, then you can hit me :).

I will to be as clear as possible, but ask me if there is something that is not.

So let us say that I have an application like this :

   CompositeViewer
   |--|
  Camera1 Camera2
   |--|
   (   Scene Root   )

I have two cameras part of the same osgViewer, a composite viewer, rendering 
the same scene on different points of view.
There is a drawable in the scenegraph that i want to be textured differently if 
it is rendered by the camera 1 or 2.

As far as I understood, because of the viewer, the rendering of the two cameras 
are more or less at the same time.
So I can not put a predrawcallback on my cameras to change the texture on the 
drawable because the predrawcallback of the second camera would change the 
texture before the first camera has rendered the scene.

What I wanted to be was to but an osg::Drawable::DrawCallback on my drawable to 
change texture according to the camera but it seems that it is not possible.

Code:
virtual void drawImplementation(osg::RenderInfo renderInfo, const 
osg::Drawable* drawable) const


Because the drawable is const and so I can not modify its StateSet to simply 
change the texture.

I obviously could load one scene by viewer, but I was looking for another way 
to achieve this.

I can't see any options remaining so I'm desperately asking for your help :).

A bit of context of my problem, I tried to simplify it to be clearer.
The drawable I'm talking about is in fact a mirror, and i want that the texture 
of the mirror (pre-rendered by other cameras) change according to my point of 
view.

Thanks for reading me and for any clue you can give me.
Regards,
Olivier[/code]

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





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


[osg-users] [build] Cannot find source file VideoFrameDispatcher.cpp

2013-09-12 Thread Edward Moyse
Hi,

I'm trying to compile OpenSceneGraph-3.2.0 on OSX 10.8.4

Unfortunately I get the following error, which I can't work out.

Code:

-- Configuring done
CMake Error at CMakeModules/OsgMacroUtils.cmake:277 (ADD_LIBRARY):
  Cannot find source file:

../QTKIt/VideoFrameDispatcher.cpp




I see the file in 

Code:

OpenSceneGraph-3.2.0/src/osgPlugins/QTKit/VideoFrameDispatcher.cpp



so I'm a bit confused

Thank in advance!

Cheers,
Edward[/code]

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





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


[osg-users] [vpb] Culling output geometry for areas not covered by source DEM

2013-09-12 Thread Fred Dorosh
Hi,

I am using OSGDem to combine raster imagery and XYZ elevation data into a 
textured OSG model for a simple patch of terrain. I have used GlobalMapper to 
export XYZ data into an elevation-GeoTIFF as input. However, the XYZ data 
covers a roughly rectangular area which is not axis-aligned, so I have four 
triangles without valid elevation data in my input GeoTIFF.

OSGDem happily produces cliffs in these regions - is there a way to cull out 
geometry for areas not covered by source elevation data?

Thank you!

Cheers,
Fred

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





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


[osg-users] osgQt using QEvents to manipulate the scene

2013-09-12 Thread Mitch Doran
Hi all, 

Firstly, I am not too familiar with osg, so my terminology may be wrong.

Let me outline what I am trying to achieve first before I go into my question. 
I am trying to allow Qt's touch events to be able to manipulate the 

osg scene to perform transformations such as rotation of the 3d object and 
zooming. If you think this is impossible with osg let me know, 

otherwise lets discuss how to use QEvent's such as TouchBegin and TouchUpdate 
to manipulate the scene.

I have worked in Qt before and have created an image viewer that allows me to 
manipulate a image using my multi-touch table to zoom and rotate so 

I know Qt 4.7 and onward supports multi-touch input into various widgets. In Qt 
I was mainly using a QGraphicsView to listen for events and 

performing manipulations on a scene (a jpg image) in this class.

Now I want to take it from manipulating a 2d flat jpg image to manipulating a 
3d object (scene?) which will eventually be a map using OsgEarth. 

For now I have followed the guide in OpenSceneGraph Cookbook 3, chapter 9 
Integrating OSG with Qt and have a cow being displayed using a QWidget 

and GraphicsWindowQt. 

I'm not sure where the QEvents that perform the manipulation on my cow.osg go 
in this example. I tried overrided event(QEvent *) in my 

ViewerWidget : QWidget but don't get any mouse input events so this is 
obviously the wrong class. 

Can anybody tell me which class I need to subclass to get access to the event's 
that are manipulating the scene, in this case the cow.osg node? 

Also has anybody else tried to use osgQt with touch events? I'm just assuming 
this is supported since it has been in Qt since 4.7.

Kind Regards,
Mitch Doran.

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





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


Re: [osg-users] Problems with OSG 3.2.0 (ok with 3.0.1)

2013-09-12 Thread David Liepelt
Hi,

I also encountered a problem after switching from OSG 3.0.1 to 3.2.0, regarding 
texturing using pixel buffer objects.

The application I’m working on draws a video texture which is set up as follows:

Code:

// create instances (m_* indicates that it is a class member)
m_videoTexture = new osg::Texture2D;
m_videoTexture-setDataVariance(osg::Object::DYNAMIC);

m_videoImageBuffer = new osg::Image;

m_videoImageBuffer-setImage(CAM_WIDTH,
CAM_HEIGHT,
1, GL_RGB,
GL_RGB, GL_UNSIGNED_BYTE, 
m_pointerToVideoImageData,
osg::Image::NO_DELETE);

// attach pbo
m_videoImageBuffer-setPixelBufferObject(new 
osg::PixelBufferObject(m_videoImageBuffer.get()));

// assign to texture
m_videoTexture-setImage(m_videoImageBuffer.get());



Each time a new video frame arrives the m_videoTexture is dirtied (-dirty()). 
This approach worked correctly under OSG 3.0.1.
Now under OSG 3.2.0 any geometry textured with the video texture remains black. 
Other objects in the scene are still textured correctly. Furthermore, after 
upgrading to 3.2.0 I’m getting now the following warning during start up:
Warning: detected OpenGL error 'invalid operation' at After Renderer::compile
So I think this has to do with my texturing problem.

Any suggestions how to fix this problem?

Cheers,
David

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





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


Re: [osg-users] View add/remove/change in composite viewer during runtime

2013-09-12 Thread Mat Mayer
Hi,

Ok, I found two ways to do it. 

1. set the clear mask for the several views to ( 0 )
   view-getCamera()-setClearMask(0);
  
  and use cull mask to show or hide the view. 

2. use the addView and removeView function of the compositeViewer and also add 
and remove the graphicsContext of the view.

seems like bougth are working. Is there a reason why I should use idea 1. or 2. 
? 

Thank you!

Cheers,
Mat

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





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


[osg-users] Make a text scroller

2013-09-12 Thread Sebastien le Goff
Hi,

I'm looking for a way to create a text scroller. My pb is that I can move 
dynamicaly the TextBaseElement using a positionAttittudTransform by I can't 
hide the top or the bottom of the Element

Have you got some tips ?

Thank you!

Cheers,
sebastien

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





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


[osg-users] Does osgviewer stereo mode only work with 3D model

2013-09-12 Thread Liao Jinyi
Hi,
I want to apply osgviewer stereo mode to a side-by-side image(or other format 
3D image).but this mode seem not work.How can I implements this function.

Thank you!

Cheers,
liaojinyi

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





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


[osg-users] View add/remove/change in composite viewer during runtime

2013-09-12 Thread Mat Mayer
Hi,

I have 3 views in a composite viewer. I like to show or hind them. 
All three views are using the same graphicscontext. 

in my following approach i try to use a cullmask to turn the views on and off. 
Ofcourse, the gl_clear is called for every renderstage of the views and the 
view is still visible. I would like to hind the complete view, including the 
background. 

I also figured out, that since I use the same graphicscontext it doesn't matter 
if I add the view to the composite viewer or not. I will be shown anyway. 
e.g. When you comment the last lines in the following code.

...
  redView-getCamera()-setGraphicsContext(graphicscontext); 
  blueView-getCamera()-setGraphicsContext(graphicscontext); 
  greenView-getCamera()-setGraphicsContext(graphicscontext); 

  viewer.addView(redView );
//  viewer.addView(blueView );
//  viewer.addView(greenView);
...

For me it seems like the addView is more like a add context. 

I also had a second approach where I use the addView and removeView of the 
composite viewer to show or hind the views. Unfortunately I i hade some other 
problems with this idea.

What else could be a solution for my problem?


Code:

#include osg/Camera
#include osgDB/ReadFile

#include osgViewer/Viewer
#include osgViewer/CompositeViewer
#include osgViewer/ViewerEventHandlers
#include osgGA/Trackballmanipulator
#include osgGA/GUIEventHandler
#include osg/MatrixTransform



class MyEventHandler: public osgGA::GUIEventHandler
{
public:
  osg::ref_ptrosg::Group m_root;
  MyEventHandler(osg::Group * root){
m_root = root;
  }
  virtual bool handle( const osgGA::GUIEventAdapter ea,
osgGA::GUIActionAdapter aa )
  {
switch ( ea.getEventType() )
{
case osgGA::GUIEventAdapter::KEYDOWN:
  switch ( ea.getKey() )
  {
  case 'a': case 'A':
{
  osgViewer::View* view = dynamic_castosgViewer::View*(aa);
  if ( view )
  {
if ( m_root-getNodeMask() == 10)
{
  m_root-setNodeMask(11);
}
else 
{
  m_root-setNodeMask(10);
} 
std::cout viewer cullmask:  m_root-getNodeMask()std::endl;
  }
  else
  {
std::coutnow viewerstd::endl;
  }
}
break;
  default:
break;
  }
}
return true;
  }
};

class pathMaker{
public:
  static osg::AnimationPath* createAnimationPath( float radius, float time)
  {
osg::ref_ptrosg::AnimationPath path =
  new osg::AnimationPath;
path-setLoopMode( osg::AnimationPath::LOOP );
unsigned int numSamples = 32;
float delta_yaw = 2.0f * osg::PI/((float)numSamples - 1.0f);
float delta_time = time / (float)numSamples;
for ( unsigned int i=0; inumSamples; ++i )
{
  float yaw = delta_yaw * (float)i;
  osg::Vec3 pos( sinf(yaw)*radius, cosf(yaw)*radius, 0.0f );
  osg::Quat rot( -yaw, osg::Z_AXIS );
  path-insert( delta_time * (float)i,
osg::AnimationPath::ControlPoint(pos, rot)
);
}
return path.release();
  }
};

int main (){ 
  int m_maxScreenWidth = 1440;
  int m_maxScreenHeight = 540;

  osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits;
  traits-x = 200;
  traits-y = 400;
  traits-width = m_maxScreenWidth;
  traits-height = m_maxScreenHeight;
  traits-depth = 16;
  traits-windowDecoration = true;
  traits-supportsResize = true;
  traits-windowName = TEST;
  traits-doubleBuffer = true;
  osg::ref_ptrosg::GraphicsContext graphicscontext = 
osg::GraphicsContext::createGraphicsContext(traits);

  if (graphicscontext.valid())
  {
graphicscontext-setClearColor(osg::Vec4f(0.0f, 0.0f, 0.0f, 1.0f));
graphicscontext-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  }


  osg::ref_ptrosg::Group root = new osg::Group;
  osg::ref_ptrosg::MatrixTransform rotateNode =
new osg::MatrixTransform;
  osg::ref_ptrosg::Node n = osgDB::readNodeFile(cessna.osg.0,0,90.rot);
  for ( unsigned int i = 0; i  100 ; i++) // just produce some load for the 
gpu 
  {
osg::ref_ptrosg::MatrixTransform rotateN =
  new osg::MatrixTransform;
rotateN-addChild(n);
osg::Quat rot( -3 * i, osg::X_AXIS );
rotateN-setMatrix(osg::Matrix::rotate(rot));
rotateNode-addChild(rotateN);
  }

  root-addChild( rotateNode.get() );
  osgViewer::CompositeViewer viewer;

  
viewer.setThreadingModel(osgViewer::ViewerBase::ThreadingModel::SingleThreaded);

  osg::ref_ptrosg::AnimationPathCallback apcb = new 
osg::AnimationPathCallback;
  apcb-setAnimationPath( pathMaker::createAnimationPath(50.0f, 6.0f) );
  rotateNode-setUpdateCallback( apcb.get() );

  osgViewer::View * redView = new osgViewer::View();
  osgViewer::View * blueView = new osgViewer::View();
  osgViewer::View * greenView = new osgViewer::View();
  redView-setName(redView);
  blueView-setName(blueView);
  greenView-setName(greenView);
  redView-setSceneData(root);
  

[osg-users] Scale model node to specific size

2013-09-12 Thread Zev Lix
Hi,
I wonder if there is a way of scaling a model to a specific size? So if i have 
two models that have different sizes when loaded into osg, i want to scale 
these two models so that they have the same lenght or width.

Example if i have two models of cars they should both have X length in my osg 
application regardless of how big they were when created in some model program.

I know i could just create the models in the right size to start with. but this 
is a problem when adding models made by other people.

Thank you!

Cheers,
Zev

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





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


[osg-users] [vpb] No locator found in any of the terrain layers when building osg files

2013-09-12 Thread Alex Guo
Hi,

I tried to build .osg files using the parameters as follows:
osgdem -t xxx.tif -o xxx.osg --image-ext jpeg. However, when I
opened the generated .osg file with osgviewer, it crashed and 
reported an error message:
Problem, no locator found in any of the terrain layers.

Has anyone knows what should I do to fix this problem?


Thank you!

Cheers,
Alex

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





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


[osg-users] detected OpenGL error 'out of memory' at After Renderer::compile

2013-09-12 Thread Andrew Nie
Hi,
   I load several model files and encountered the following warning:  
detected OpenGL error 'out of memory' at After Renderer::compile. Here is my 
code:

   int main()
{

osg::ref_ptrosgViewer::Viewer viewer = new osgViewer::Viewer();

osg::ref_ptrosg::Group root = new osg::Group();

osg::ref_ptrosg::Node node1 = 
osgDB::readNodeFile(E:\\Scene\\Background.ive); 
osg::ref_ptrosg::Node node2 = 
osgDB::readNodeFile(E:\\Scene\\N_0.ive);//
osg::ref_ptrosg::Node node3 = 
osgDB::readNodeFile(E:\\Scene\\Q_0.ive);//
osg::ref_ptrosg::Node node4 = 
osgDB::readNodeFile(E:\\Scene\\TH_0.ive);//


osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform();

mt-setMatrix(osg::Matrix::rotate(osg::PI_2,osg::Vec3d(1.0,0.0,0.0)));
mt-addChild(node1);
mt-addChild(node2);
mt-addChild(node3);
mt-addChild(node4);


//
root-addChild(mt);

//
osgUtil::Optimizer optimizer ;
optimizer.optimize(root.get()) ;

osg::ref_ptrosgGA::TrackballManipulator tb = new 
osgGA::TrackballManipulator();
tb-setTrackballSize(0.9);
viewer-setCameraManipulator(tb);
viewer-setSceneData(root.get());

viewer-realize();

viewer-run();

return 0 ;
}

The four ive files (Background.ive,N_0.ive,Q_0.ive,TH_0.ive) are  
400M,260M,211M,410M   
respectively. I found that,if I only load the first two files, the warning 
did't appear, but if load one more file of the other two, the warning show up.  
Has anyone encountered such a problem?Any advice and suggestion will be 
appreciated... 


... 

Thank you!

Cheers,
Andrew

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





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


[osg-users] [vpb] OSGDem - generate OSG terrain with pivot?

2013-09-12 Thread Fred Dorosh
Hi,

I am generating terrain patches which will eventually be parented in the 
scenegraph to transforms relative to a predefined runtime scene origin.

When using OSGDem to generate terrain tiles from UTM-georeferenced data, my 
geometry receives very large coordinates, which I would like to reposition 
relative to a specific UTM origin.

That's my goal - a hamfisted solution would be to translate everything by 
(-origin), including the PagedLOD Center, RangeLists, TerrainTiles and 
Heightfield Origin. There seems to be no built-in option to support this, 
although I imagine it's a common use case.

Am I missing something obvious?

Thank you!

Cheers,
Fred

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





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


[osg-users] Isolation view using override and protected StateSets

2013-09-12 Thread David Zaadstra
Hi everyone,

I have implemented an isolation view (i.e. show only a selection of nodes, and 
render the other ones transparent) by creating one node above the root that 
contains an override StateSet which sets all nodes transparent and then 
creating exception nodes which have override _and_ protected set to protect 
the isolated geodes. And for reverting the isolation I simply remove those 
in-between nodes again.

First of all: Is this a good approach? Or do you have a better one? (My goal 
was to not modify existing nodes, so that I don't need to remember and restore 
a previous state. The way it is now I can just check if there are nodes 
matching a certain naming pattern *-ISOLATE and remove those)

But my actual problem is: 
For some reason the isolated geode changes its color minimally. In normal view 
it is 24,23,24, and in isolated view it's 22,21,22.
That color change is definitely not caused by the top-level override. So it 
must be caused by the protection which I do like this:


Code:

osg::StateSet * stateSet = new osg::StateSet(*(node-getOrCreateStateSet()));
stateSet-setAttributeAndModes(dynamic_castosg::Material*(stateSet-getAttribute(osg::StateAttribute::MATERIAL)),
 osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED);
parentNode-setStateSet(stateSet);




So basically I just take the material of the node that should stay visible, 
copy it to the parent node and set it to protected. I don't see why this 
changes the color. Please help.

Thanks in advance[/code]

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





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


[osg-users] Grabbing osgQt::GLWidget

2013-09-12 Thread Alexander Ofitserov
Hi,

I need to grab instance of osgQt::GLWidget, seems like this widget inherits 
QGLWidget but QGLWidget::renderPixmap() and QGLWidget::grabFrameBuffer() 
methods don't return appropriate result (they return black filled images 
instead of the foreground of the widget). What is the right way to achieve that?

Thank you!

Cheers,
Alexander

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





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


Re: [osg-users] How to constantly render a very far object?

2013-09-12 Thread Robert Osfield
On 4 August 2013 03:38, Mengyu Yuan ymy...@icloud.com wrote:

 There is a little problem. I'm currently doing a simulation project. All
 parameters ( including camera position and fovy, object  position and size,
  and even texture size ) are assigned based on the real-world situation.
 And my job is to track the target pixel out of many other noise pixels. So
 zooming camera or object my not be a very good idea.


You can always render and test using a dedicated camera that runs
independently from your main rendering window and camera.



 I'd like to try to enable antialising and see what happens.


anti-aliasing will help, but won't solve it completely.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] [Android + FFmpeg] unable to play audio

2013-09-12 Thread Robert Osfield
Hi Guiacchino,

FFMpeg itself doesn't support audio output, instead it just supports
reading audio.  The osgmovie example has a code segment that uses SDL to
provide audio for video's read from ffmpeg plugin.  It's not a full general
purpose solution but might help you on your way.  The key will be working
out how to pass the audio data onto the native Android audio libs.

Robert.


On 5 August 2013 11:14, Gioacchino De Fusco maddone1...@gmail.com wrote:

 Hi all,

 I'm having some troubles trying to play a video file with audio on Android.

 Basically, I load a video file with the FFMpeg plugin, the video is
 correctly shown but the audio is not.

 In the Logcat, I can see that the FFMpeg Audio stream is succesffully
 created, so there should not be any problem on this side.

 I'm using OSG 3.1.9 with FFMpeg 1.0.7.

 Someone encountered a similar issue before?
 What could you suggest me?

 Thank you!

 Cheers,
 Gioacchino

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





 ___
 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] Build problems on OSX - VideoFrameDispatcher.cpp

2013-09-12 Thread Jeff Kinross
Hi,

I ran into the same problem and I am using a case sensitive file system.
I had some issues with the attached CMakeList.txt file but it pointed me in the 
right direction.

The files OSXAvFoundationCoreVideoTexture.h/cpp in the directory need to be 
renamed to OSXAVFoundationCoreVideoTexture.h/cpp as well.

Also there is case problem in OSXAVFoundationCoreVideoTexture.cpp where the 
include needs updated to OSXAVFoundationVideo.h

Thanks,
Jeff

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





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


Re: [osg-users] Scale model node to specific size

2013-09-12 Thread Alberto Luaces
Zev Lix writes:

 Hi, I wonder if there is a way of scaling a model to a specific size?
 So if i have two models that have different sizes when loaded into
 osg, i want to scale these two models so that they have the same
 lenght or width.

 Example if i have two models of cars they should both have X length in
 my osg application regardless of how big they were when created in
 some model program.

 I know i could just create the models in the right size to start
 with. but this is a problem when adding models made by other people.

Hi Zev, you can get the total dimensions with the osg::BoundingBox of
the object.  Later you can scale it to the right size placing it under a
osg::MatrixTransform node with a scale matrix.

-- 
Alberto

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


Re: [osg-users] Make a text scroller

2013-09-12 Thread Eric Sokolowsky
I use a osgText::Text object, put the text into it with all the appropriate
attributes. I put the osgText::Text under an osg::Geode with addDrawable().
I put the geode under an osg::MatrixTransform (I believe it may have
changed name in the latest version of OSG) with addChild(). Then I use a
osg::Projection and put the transform under that. Then you can change the
position of the object by calling text-setPosition().


On Fri, Aug 30, 2013 at 6:35 AM, Sebastien le Goff se.leg...@gmail.comwrote:

 Hi,

 I'm looking for a way to create a text scroller. My pb is that I can move
 dynamicaly the TextBaseElement using a positionAttittudTransform by I can't
 hide the top or the bottom of the Element

 Have you got some tips ?

 Thank you!

 Cheers,
 sebastien

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





 ___
 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] Hi, Robert, Already find the reason of why OSG3.2 not anti aliased in win7 x64 GTX 760 4G DDR5 SLI

2013-09-12 Thread webmaster
   After many times testing and trying,finally find in GTX760 Nvidia's driver 
just like other previouse hardware versions,in the hardware driver's early 
version the FXAA option conflicted with normal anti alias settings,if FXAA is 
on,and the normal anti alias is also set on,then in fact not anti alias is 
doing,so only turn off fever FXAA,then all is OK,and in SLI MODE the 64x anti 
alias is very very beautiful!
In other conditions will also caused the anti alias is not working,but we have 
no time to deep explore the reasons!


 zhuwan

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


Re: [osg-users] Problems with OSG 3.2.0 (ok with 3.0.1)

2013-09-12 Thread Robert Osfield
Hi Ale,


On 28 August 2013 17:03, Ale Maro sash...@teletu.it wrote:

 I solved in an unespected way.
 When I setup a the view camera I did the following:

 camera = new osg::Camera;
 ... my camera settings

 Now I get the camera pointer from the osg::View

 camera = view-getCamera();
 ... my camera settings

 So it seems that, in OSG 3.2.0, camera settings in the default constructor
 are not correct and are different from default camera settings on osg::View.
 Can you confirm?


It's actually OSG-3.2.0 that is correct, and OSG-3.0.x and previous
versions were broken, but broken in way that hide the fact that a View's
master Camera's StateSet was empty() in your case.

What was happening is the internally osgUtil::SceneView that is used
internally by osgViewer to manage the rendering backend was overriding the
View's Camera's StateSet with it's own values and clearing the ones set by
the View's Camera.  This normally didn't produce problems as SceneView
didn't set useful defaults for most common usage models, but if the user
ever wanted to apply their own StateSet settings view the View's Camera
these could be lost resulting in bugs.

The implemention in OSG-3.2.0 now doesn't override the View's Camera's
StateSet, it uses it directly to set up OpenGL state.  If the View's
Camera's StateSet is empty() then it'll do nothing - and in your case where
you apply a default constructed Camera to View it'll be have an empty
StateSet.  What result you are getting is *exactly* the result you are
asking the OSG to provide for you.  It might not what you want, but in
previous OSG versions there was a bug so hid this problem.

If however you use the View's master Camera that is attached by default
then it automatically calls stateset-setGlobalDefaults(); for you and it's
this provides the same settings the SceneView was forcing on all usages, so
you'll get the same behaviour as in OSG-3.0.x and before.  Alternatively
you can just create your own Camera but you'll need to add the line:

   camera-getOrCreateStateSet()-setGlobalDefaults();


Again, I will re-interate this change in behaviour is a bug fix that is
reveals a bug in the way you were setting up the OSG, so it's a case of bug
hiding a bug, when you remove the bug a bug appears seemingly out of
nowhere, but it's been sitting their latent in your application.

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


Re: [osg-users] Problems with OSG 3.2.0 (ok with 3.0.1)

2013-09-12 Thread Robert Osfield
Hi David,

The issue looks likely to be totally un-related to the bug in Ale's program
revealed by the bug fix to OSG-3.2.  There is chance that your own
application has this bug in the setup if you are applying your own
osg::Camera to a View(er) without setting up state correctly, but as this
is niche usage of the OSG it's likely the issue you have is unrelated.  It
may be worth double checking this though.

From your code snippet and warning report it's not possible to guess what
might be wrong. It could be a bug in your app, your particular build, the
OSG or OpenGL driver.  Which is the culprit isn't possible to say at this
point.

Could you create a small code example that reproduces the problem so that
others can recreate the problem?

Robert.


On 30 August 2013 12:03, David Liepelt david.liep...@gmail.com wrote:

 Hi,

 I also encountered a problem after switching from OSG 3.0.1 to 3.2.0,
 regarding texturing using pixel buffer objects.

 The application I’m working on draws a video texture which is set up as
 follows:

 Code:

 // create instances (m_* indicates that it is a class member)
 m_videoTexture = new osg::Texture2D;
 m_videoTexture-setDataVariance(osg::Object::DYNAMIC);

 m_videoImageBuffer = new osg::Image;

 m_videoImageBuffer-setImage(CAM_WIDTH,
 CAM_HEIGHT,
 1, GL_RGB,
 GL_RGB, GL_UNSIGNED_BYTE,
 m_pointerToVideoImageData,
 osg::Image::NO_DELETE);

 // attach pbo
 m_videoImageBuffer-setPixelBufferObject(new
 osg::PixelBufferObject(m_videoImageBuffer.get()));

 // assign to texture
 m_videoTexture-setImage(m_videoImageBuffer.get());



 Each time a new video frame arrives the m_videoTexture is dirtied
 (-dirty()). This approach worked correctly under OSG 3.0.1.
 Now under OSG 3.2.0 any geometry textured with the video texture remains
 black. Other objects in the scene are still textured correctly.
 Furthermore, after upgrading to 3.2.0 I’m getting now the following warning
 during start up:
 Warning: detected OpenGL error 'invalid operation' at After
 Renderer::compile
 So I think this has to do with my texturing problem.

 Any suggestions how to fix this problem?

 Cheers,
 David

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





 ___
 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] using stereo with osgview had a problem

2013-09-12 Thread Laurens Voerman

Hi cloudending,

Quad buffered stereo requires a nvidia quadro or ati firepro videocard, 
with OpenGL stereo enabled in the driver.
If you have a capable videocard you will need to enable this option in 
the driver.

Regards, Laurens.

On 8/23/2013 4:45 PM, Liao Jinyi wrote:

Hi,

I an new to OSG。And I am tring to use the below command line

Code:

osgviewer -stereo QUAD_BUFFER cow.osg



but it has errors such as
GraphicsWindow32::setPixelFormat() -- No matching pixel found based on traits 
specified.
I dont know how to fix it. please help me!

Thank you!

Cheers,
cloudending

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





___
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] viewer-getCameraWithFocus() is gone?

2013-09-12 Thread Robert Osfield
Hi David,

Given the details it's not possible to know what might be going wrong.  You
are the person best placed to dig into the code and run it in a debugger to
see what is happening.  It could be a threading issue, but really can't say
with just small code segments to work with.  Try running the application
SingleTheaded to see if it makes any difference.

Also if you are accessing any data structures try copying them or taking a
ref_ptr to them before you start working on them, perhaps the data
structure is be deleted by another thread.

Robert.





On 21 August 2013 15:23, David Zaadstra
david.zaads...@telespazio-vega.dewrote:

 Hi,

 I had the same question and considered myself lucky to find this solution
 so quickly, but I have a problem:

 Sporadically, my application crashes in the std::vector code with vector
 iterator not dereferencable. This happens in the call to back().

 Actually I would think that this crash can't happen because I copied your
 code including the empty() query which should ensure that back() works. The
 only difference in my code is that I had to add .get(), but I don't think
 that makes a difference.

 Do you have any idea why this could crash? I'd guess it's some kind of
 multithreading issue. Is there anything in osg I should be worrying about
 here?

 Thanks and Regards,
 David

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





 ___
 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] help~, i used multi-threads loading function, but osg error..?

2013-09-12 Thread Robert Osfield
Hi Chang,

This is probably due to a static initialization of the various proxy
objects.

OSG-3.2 has a few bug fixes related to initialization and might help, but
in general I have to say the plugins aren't written to handle
multi-threaded initialization.  Once they are initialized it should be safe
to run them multi-threaded.


Robert.


On 14 August 2013 10:40, CHANG YONG HO hou...@hanmail.net wrote:

 Hi, first i'm sorry for my english writing skill.
 i'm begginer ^^;
  :(  :-*
 i try to 28 multi-threaded node loading test.
 total polygon is 5*10^6, vertices are 3*10^6.
 sometime, osgDB::readNodeFile has error like this,

 when the first running,
 1. Warning: Could not find plugin to read objects from file xxx02.osg
 == this message has random osg file, ex) xxx07 or xxx09 @@;
 and the second running,
 2. access violation(0x00~~~)
 and the third running,
 3. no problem, my helicopter was loaded within 2minutes.
 and 4,5,... running does not take any error, all success.
 only when i was root and running, the 1. 2. error comes to me.

 3ds max file has 28 groups like this,
 xxx0.osg, xxx1.osg, xxx2.osg . xxx27.osg

 later read that osg files by 28 multithreaded readNodeFile(),
 i attached to root node by 28 node groups.

 why sometimes random loading error?
 i attached my very simple source.
 check this source
 ...

 Thank you!

 Cheers,
 CHANG

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




 Attachments:
 http://forum.openscenegraph.org//files/main_737.cpp


 ___
 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] Does osgviewer stereo mode only work with 3D model

2013-09-12 Thread Robert Osfield
Hi Liao,

Have a look at the osgstereoimage example for an illustration of how to
render stereo image/video pairs with the OSG.  The key is having two
subgraphs, one for the left eye and one for the right eye, each subgraph
has it's onw NodeMask and Left/Right Cull traversal masks that select the
appropriate subgraph for the appropriate eye.

Robert.


On 1 September 2013 12:27, Liao Jinyi cloudend...@qq.com wrote:

 Hi,
 I want to apply osgviewer stereo mode to a side-by-side image(or other
 format 3D image).but this mode seem not work.How can I implements this
 function.

 Thank you!

 Cheers,
 liaojinyi

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





 ___
 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] View add/remove/change in composite viewer during runtime

2013-09-12 Thread Robert Osfield
Hi Mat,

I was about to recommend trying option 1 as it's the most lightweight
approach.

Option 2 is fine too, but requires stopping any viewer threads that are
running, changing the views/added removed and then restarting any viewer
threads.

Robert.


On 2 September 2013 16:10, Mat Mayer external.matthias.maye...@de.bosch.com
 wrote:

 Hi,

 Ok, I found two ways to do it.

 1. set the clear mask for the several views to ( 0 )
view-getCamera()-setClearMask(0);

   and use cull mask to show or hide the view.

 2. use the addView and removeView function of the compositeViewer and also
 add and remove the graphicsContext of the view.

 seems like bougth are working. Is there a reason why I should use idea 1.
 or 2. ?

 Thank you!

 Cheers,
 Mat

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





 ___
 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] [vpb] OSGDem - generate OSG terrain with pivot?

2013-09-12 Thread Robert Osfield
Hi Fred,

You shouldn't need to do anything to handle dataset with large values, the
OSG and VPB are built to manage things for you.  When VPB builds databases
it decorates subgraphs with local transforms that place the subgraphs into
world coordinates, whilst the subgraph containing the geometry have a local
origin.  By default the OSG uses doubles for Transforms in the scene graph
and doubles in the Camera matrices, and the cull traversal accumulates
these all in doubles before finally passing a single modelview matrix to
OpenGL.  This approach ensures that you be the best possible precision when
rendering whole earth datasets.

So the answer is, stop trying so hard, everything is being done for you
already ;-)

Robert.


On 3 September 2013 14:16, Fred Dorosh fred.dor...@gmail.com wrote:

 Hi,

 I am generating terrain patches which will eventually be parented in the
 scenegraph to transforms relative to a predefined runtime scene origin.

 When using OSGDem to generate terrain tiles from UTM-georeferenced data,
 my geometry receives very large coordinates, which I would like to
 reposition relative to a specific UTM origin.

 That's my goal - a hamfisted solution would be to translate everything by
 (-origin), including the PagedLOD Center, RangeLists, TerrainTiles and
 Heightfield Origin. There seems to be no built-in option to support this,
 although I imagine it's a common use case.

 Am I missing something obvious?

 Thank you!

 Cheers,
 Fred

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





 ___
 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] detected OpenGL error 'out of memory' at After Renderer::compile

2013-09-12 Thread Robert Osfield
Hi Andrew,

If you have too much data for OpenGL to handle it will report an error.
 What you have to do is work out how to work with small models or create
the models in such a way that they don't have such a large OpenGL footprint.

You say nothing about what your models contain, or what type of application
behavior you want when managing these models, given this there really isn't
much we can advice, it's simply too open ended.

Robert.


On 5 September 2013 13:59, Andrew Nie zsunpl1...@hotmail.com wrote:

 Hi,
I load several model files and encountered the following warning:
 detected OpenGL error 'out of memory' at After Renderer::compile. Here
 is my code:

int main()
 {

 osg::ref_ptrosgViewer::Viewer viewer = new osgViewer::Viewer();

 osg::ref_ptrosg::Group root = new osg::Group();

 osg::ref_ptrosg::Node node1 =
 osgDB::readNodeFile(E:\\Scene\\Background.ive);
 osg::ref_ptrosg::Node node2 =
 osgDB::readNodeFile(E:\\Scene\\N_0.ive);//
 osg::ref_ptrosg::Node node3 =
 osgDB::readNodeFile(E:\\Scene\\Q_0.ive);//
 osg::ref_ptrosg::Node node4 =
 osgDB::readNodeFile(E:\\Scene\\TH_0.ive);//


 osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform();


 mt-setMatrix(osg::Matrix::rotate(osg::PI_2,osg::Vec3d(1.0,0.0,0.0)));
 mt-addChild(node1);
 mt-addChild(node2);
 mt-addChild(node3);
 mt-addChild(node4);


 //
 root-addChild(mt);

 //
 osgUtil::Optimizer optimizer ;
 optimizer.optimize(root.get()) ;

 osg::ref_ptrosgGA::TrackballManipulator tb = new
 osgGA::TrackballManipulator();
 tb-setTrackballSize(0.9);
 viewer-setCameraManipulator(tb);
 viewer-setSceneData(root.get());

 viewer-realize();

 viewer-run();

 return 0 ;
 }

 The four ive files (Background.ive,N_0.ive,Q_0.ive,TH_0.ive) are
  400M,260M,211M,410M
 respectively. I found that,if I only load the first two files, the warning
 did't appear, but if load one more file of the other two, the warning show
 up.
 Has anyone encountered such a problem?Any advice and suggestion will be
 appreciated...


 ...

 Thank you!

 Cheers,
 Andrew

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





 ___
 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] [vpb] creating database compatable to osg

2013-09-12 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
I would recommend that you become familiar with VirtualPlanetBuilder and
osgdem. These tools specifically build to osg databases.

Here's one way to build your SRTM data to an osg database...

osgdem.exe --geocentric -d SRTM_dir --terrain -o outputfile.ive

Then you can look at it by...

osgviewer outputfile.ive

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Swathy Nair
Sent: Thursday, August 22, 2013 5:13 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [vpb] creating database compatable to osg

hi,
  i am a beginner to osg. i want to convert the data downloaded from SRTM to
a database compatible to osg. can i get as tep by step instruction. my os is
windows 7 and im using visual studio 2010


Thank you!

Cheers,
swathy

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





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


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] Hi, Robert, Already find the reason of why OSG3.2 not anti aliased in win7 x64 GTX 760 4G DDR5 SLI

2013-09-12 Thread webmaster
hello Jan,


My friend,Glad to hear from you,and get the correct answer!


Thanks


zhuwan
 -原始邮件-
 发件人: Jan Ciger jan.ci...@gmail.com
 发送时间: 2013-9-13 0:42:32
 收件人: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 抄送: 
 主题: Re: [osg-users] Hi, Robert, Already find the reason of why OSG3.2 not 
 anti aliased in win7 x64  GTX 760 4G DDR5 SLI
 
 Hello,
 
 Zhuwan, I believe that FXAA is a quick-and-dirty antialiasing method
 used by the Nvidia driver to provide something like antialiasing for
 less computational cost. See here:
 http://www.kotaku.com.au/2011/12/what-is-fxaa/
 
 Quote: FXAA stands for Fast Approximate Anti-Aliasing, and it’s an
 even more clever hack than MSAA, because it *ignores polygons and line
 edges*, and simply analyses the pixels on the screen (emphasis mine)
 
 Regards,
 
 Jan
 
 
 On Thu, Sep 12, 2013 at 3:23 PM, webmaster webmas...@3dvri.com wrote:
 After many times testing and trying,finally find in GTX760 Nvidia's
  driver just like other previouse hardware versions,in the hardware driver's
  early version the FXAA option conflicted with normal anti alias settings,if
  FXAA is on,and the normal anti alias is also set on,then in fact not anti
  alias is doing,so only turn off fever FXAA,then all is OK,and in SLI MODE
  the 64x anti alias is very very beautiful!
  In other conditions will also caused the anti alias is not working,but we
  have no time to deep explore the reasons!
 
   zhuwan
 
 
  ___
  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] [vpb] osgdem and HAE/MSL

2013-09-12 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Nick,

Osgdem will work with the input elevation. It will build the database based
on the input source. For example if you're using DTED and the geocentric
option, it will place the point at the specified elevation (in meters) above
the ellipsoid. The point is represented in the Cartesian ECEF geocentric
space (e.g. x,y,z). 

The default ellipsoid used is WGS84. You can specify the polar and
equatorial radii  in osgdem to fit to another ellipsoid. Just make sure you
specify those radii in your EllipsoidModel class on the rendering side so
that things match up. The EllipsoidModel class also defaults to WGS84...

HTH

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Nick Modly
Sent: Sunday, August 25, 2013 11:46 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [vpb] osgdem and HAE/MSL

Hi,

When providing elevation data to osgdem. is it expected to be in HAE (height
above ellipoid), or MSL (mean sea level), or can it tell from the input? For
example, I am providing elevation data in the AIG/Arc/Info Binary Grid
format (.adf). The data represents the elevation of the area in meters MSL.
However, when I osgpick a point and convert it to Lat-Lon-Alt MSL, the
altitude is off by about 30m (the difference between HAE and MSL at this
location).

This are the options I ran osgdem with
$ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/ -t image.tif

Is it possible to specify a vertical datum or coordinate system, such as
EGM96?


Thank you!

Cheers,
Nick

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





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


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] [vpb] osgdem and HAE/MSL

2013-09-12 Thread Glenn Waldron
Shayne,
Correct, for each height value in your DTED grid, you have to sample the
EGM96 geoid at that point and add the two together. That will give you HAE.
I don't know of any tools off the cuff, sorry. osgEarth has vertical datum
support so you could probably write a tool using that.

Glenn Waldron / @glennwaldron / osgEarth


On Thu, Sep 12, 2013 at 2:19 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:

 Glenn,

 VPB does reference to the WGS84 for the --geocentric option.

 So to do the conversion, do you have to remove the contribution of the
 geoid
 (gravitational equipotential surface) from the raw DTED first before
 pumping
 it into VPB? Is there an application that does this?

 Thanks,
 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn
 Waldron
 Sent: Thursday, September 12, 2013 12:04 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] [vpb] osgdem and HAE/MSL

 Nick, Shayne,

 I have not looked at VPB in a while, but I believe it expects height values
 to be referenced to the WGS84 ellipsoid. If that's the case you'll need to
 convert it first to HAE.

 By the way: DTED heights are referenced to the EGM96 geoid (not to the
 WGS84
 ellipsoid). So they need conversion in order to be properly displayed. GDAL
 (up until recently?) does not convey this information so there's no way for
 the application to know. You just have to know :)


 Glenn Waldron / @glennwaldron


 On Thu, Sep 12, 2013 at 1:45 PM, Tueller, Shayne R Civ USAF AFMC 519
 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:


 Nick,

 Osgdem will work with the input elevation. It will build the
 database based
 on the input source. For example if you're using DTED and the
 geocentric
 option, it will place the point at the specified elevation (in
 meters) above
 the ellipsoid. The point is represented in the Cartesian ECEF
 geocentric
 space (e.g. x,y,z).

 The default ellipsoid used is WGS84. You can specify the polar and
 equatorial radii  in osgdem to fit to another ellipsoid. Just make
 sure you
 specify those radii in your EllipsoidModel class on the rendering
 side so
 that things match up. The EllipsoidModel class also defaults to
 WGS84...

 HTH

 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
 Nick Modly
 Sent: Sunday, August 25, 2013 11:46 PM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] [vpb] osgdem and HAE/MSL

 Hi,

 When providing elevation data to osgdem. is it expected to be in
 HAE
 (height
 above ellipoid), or MSL (mean sea level), or can it tell from the
 input? For
 example, I am providing elevation data in the AIG/Arc/Info Binary
 Grid
 format (.adf). The data represents the elevation of the area in
 meters MSL.
 However, when I osgpick a point and convert it to Lat-Lon-Alt MSL,
 the
 altitude is off by about 30m (the difference between HAE and MSL at
 this
 location).

 This are the options I ran osgdem with
 $ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/ -t
 image.tif

 Is it possible to specify a vertical datum or coordinate system,
 such as
 EGM96?


 Thank you!

 Cheers,
 Nick

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





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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





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


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


Re: [osg-users] [vpb] osgdem and HAE/MSL

2013-09-12 Thread Glenn Waldron
Nick, Shayne,

I have not looked at VPB in a while, but I believe it expects height values
to be referenced to the WGS84 ellipsoid. If that's the case you'll need to
convert it first to HAE.

By the way: DTED heights are referenced to the EGM96 geoid (not to the
WGS84 ellipsoid). So they need conversion in order to be properly
displayed. GDAL (up until recently?) does not convey this information so
there's no way for the application to know. You just have to know :)


Glenn Waldron / @glennwaldron


On Thu, Sep 12, 2013 at 1:45 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:

 Nick,

 Osgdem will work with the input elevation. It will build the database based
 on the input source. For example if you're using DTED and the geocentric
 option, it will place the point at the specified elevation (in meters)
 above
 the ellipsoid. The point is represented in the Cartesian ECEF geocentric
 space (e.g. x,y,z).

 The default ellipsoid used is WGS84. You can specify the polar and
 equatorial radii  in osgdem to fit to another ellipsoid. Just make sure you
 specify those radii in your EllipsoidModel class on the rendering side so
 that things match up. The EllipsoidModel class also defaults to WGS84...

 HTH

 -Shayne

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Nick
 Modly
 Sent: Sunday, August 25, 2013 11:46 PM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] [vpb] osgdem and HAE/MSL

 Hi,

 When providing elevation data to osgdem. is it expected to be in HAE
 (height
 above ellipoid), or MSL (mean sea level), or can it tell from the input?
 For
 example, I am providing elevation data in the AIG/Arc/Info Binary Grid
 format (.adf). The data represents the elevation of the area in meters MSL.
 However, when I osgpick a point and convert it to Lat-Lon-Alt MSL, the
 altitude is off by about 30m (the difference between HAE and MSL at this
 location).

 This are the options I ran osgdem with
 $ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/ -t image.tif

 Is it possible to specify a vertical datum or coordinate system, such as
 EGM96?


 Thank you!

 Cheers,
 Nick

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





 ___
 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] [vpb] osgdem and HAE/MSL

2013-09-12 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Good stuff to know. Thank you.

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn
Waldron
Sent: Thursday, September 12, 2013 12:34 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] [vpb] osgdem and HAE/MSL

Shayne,
Correct, for each height value in your DTED grid, you have to sample the
EGM96 geoid at that point and add the two together. That will give you HAE.
I don't know of any tools off the cuff, sorry. osgEarth has vertical datum
support so you could probably write a tool using that.


Glenn Waldron / @glennwaldron / osgEarth


On Thu, Sep 12, 2013 at 2:19 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:


Glenn,

VPB does reference to the WGS84 for the --geocentric option.

So to do the conversion, do you have to remove the contribution of
the geoid
(gravitational equipotential surface) from the raw DTED first before
pumping
it into VPB? Is there an application that does this?

Thanks,

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org

[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Glenn
Waldron
Sent: Thursday, September 12, 2013 12:04 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] [vpb] osgdem and HAE/MSL

Nick, Shayne,

I have not looked at VPB in a while, but I believe it expects height
values
to be referenced to the WGS84 ellipsoid. If that's the case you'll
need to
convert it first to HAE.

By the way: DTED heights are referenced to the EGM96 geoid (not to
the WGS84
ellipsoid). So they need conversion in order to be properly
displayed. GDAL
(up until recently?) does not convey this information so there's no
way for
the application to know. You just have to know :)


Glenn Waldron / @glennwaldron


On Thu, Sep 12, 2013 at 1:45 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:


Nick,

Osgdem will work with the input elevation. It will build the
database based
on the input source. For example if you're using DTED and
the
geocentric
option, it will place the point at the specified elevation
(in
meters) above
the ellipsoid. The point is represented in the Cartesian
ECEF
geocentric
space (e.g. x,y,z).

The default ellipsoid used is WGS84. You can specify the
polar and
equatorial radii  in osgdem to fit to another ellipsoid.
Just make
sure you
specify those radii in your EllipsoidModel class on the
rendering
side so
that things match up. The EllipsoidModel class also defaults
to
WGS84...

HTH

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On
Behalf Of
Nick Modly
Sent: Sunday, August 25, 2013 11:46 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [vpb] osgdem and HAE/MSL

Hi,

When providing elevation data to osgdem. is it expected to
be in HAE
(height
above ellipoid), or MSL (mean sea level), or can it tell
from the
input? For
example, I am providing elevation data in the AIG/Arc/Info
Binary
Grid
format (.adf). The data represents the elevation of the area
in
meters MSL.
However, when I osgpick a point and convert it to
Lat-Lon-Alt MSL,
the
altitude is off by about 30m (the difference between HAE and
MSL at
this
location).

This are the options I ran osgdem with
$ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/
-t
image.tif

Is it possible to specify a vertical datum or coordinate
system,
such as
EGM96?


Thank you!

Cheers,
Nick

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org

  

Re: [osg-users] [vpb] osgdem and HAE/MSL

2013-09-12 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Glenn,

VPB does reference to the WGS84 for the --geocentric option.

So to do the conversion, do you have to remove the contribution of the geoid
(gravitational equipotential surface) from the raw DTED first before pumping
it into VPB? Is there an application that does this?

Thanks,
-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn
Waldron
Sent: Thursday, September 12, 2013 12:04 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] [vpb] osgdem and HAE/MSL

Nick, Shayne,

I have not looked at VPB in a while, but I believe it expects height values
to be referenced to the WGS84 ellipsoid. If that's the case you'll need to
convert it first to HAE.

By the way: DTED heights are referenced to the EGM96 geoid (not to the WGS84
ellipsoid). So they need conversion in order to be properly displayed. GDAL
(up until recently?) does not convey this information so there's no way for
the application to know. You just have to know :)


Glenn Waldron / @glennwaldron


On Thu, Sep 12, 2013 at 1:45 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC shayne.tuel...@hill.af.mil wrote:


Nick,

Osgdem will work with the input elevation. It will build the
database based
on the input source. For example if you're using DTED and the
geocentric
option, it will place the point at the specified elevation (in
meters) above
the ellipsoid. The point is represented in the Cartesian ECEF
geocentric
space (e.g. x,y,z).

The default ellipsoid used is WGS84. You can specify the polar and
equatorial radii  in osgdem to fit to another ellipsoid. Just make
sure you
specify those radii in your EllipsoidModel class on the rendering
side so
that things match up. The EllipsoidModel class also defaults to
WGS84...

HTH

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Nick Modly
Sent: Sunday, August 25, 2013 11:46 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [vpb] osgdem and HAE/MSL

Hi,

When providing elevation data to osgdem. is it expected to be in HAE
(height
above ellipoid), or MSL (mean sea level), or can it tell from the
input? For
example, I am providing elevation data in the AIG/Arc/Info Binary
Grid
format (.adf). The data represents the elevation of the area in
meters MSL.
However, when I osgpick a point and convert it to Lat-Lon-Alt MSL,
the
altitude is off by about 30m (the difference between HAE and MSL at
this
location).

This are the options I ran osgdem with
$ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/ -t
image.tif

Is it possible to specify a vertical datum or coordinate system,
such as
EGM96?


Thank you!

Cheers,
Nick

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





___
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






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] Hi, Robert, Already find the reason of why OSG3.2 not anti aliased in win7 x64 GTX 760 4G DDR5 SLI

2013-09-12 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

On 09/12/2013 07:00 PM, webmaster wrote:
 hello Jan,
 
 My friend,Glad to hear from you,and get the correct answer!

I am glad to see that you are still around too :)

Best regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iD8DBQFSMg1Bn11XseNj94gRAj3mAJ0SHcIWG60iGKCqTNDxuGbNzj9p5QCg4UvD
6/udNP8De0ci7u0c1UpGsNE=
=M4hz
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] detected OpenGL error 'out of memory' at AfterRenderer::compile

2013-09-12 Thread Cary, Karl A.
We have had this issue as well and simply converting our textures to dds
fixed everything. We can now load 100x what we could before in terms of
number of models. I would look at that type of option first.

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Thursday, September 12, 2013 11:04 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] detected OpenGL error 'out of memory' at
AfterRenderer::compile

 

Hi Andrew,

 

If you have too much data for OpenGL to handle it will report an error.
What you have to do is work out how to work with small models or create
the models in such a way that they don't have such a large OpenGL
footprint.

 

You say nothing about what your models contain, or what type of
application behavior you want when managing these models, given this
there really isn't much we can advice, it's simply too open ended.

 

Robert.

 

On 5 September 2013 13:59, Andrew Nie zsunpl1...@hotmail.com wrote:

Hi,
   I load several model files and encountered the following warning:
detected OpenGL error 'out of memory' at After Renderer::compile. Here
is my code:

   int main()
{

osg::ref_ptrosgViewer::Viewer viewer = new
osgViewer::Viewer();

osg::ref_ptrosg::Group root = new osg::Group();

osg::ref_ptrosg::Node node1 =
osgDB::readNodeFile(E:\\Scene\\Background.ive);
osg::ref_ptrosg::Node node2 =
osgDB::readNodeFile(E:\\Scene\\N_0.ive);//
osg::ref_ptrosg::Node node3 =
osgDB::readNodeFile(E:\\Scene\\Q_0.ive);//
osg::ref_ptrosg::Node node4 =
osgDB::readNodeFile(E:\\Scene\\TH_0.ive);//


osg::ref_ptrosg::MatrixTransform mt = new
osg::MatrixTransform();

 
mt-setMatrix(osg::Matrix::rotate(osg::PI_2,osg::Vec3d(1.0,0.0,0.0)));
mt-addChild(node1);
mt-addChild(node2);
mt-addChild(node3);
mt-addChild(node4);


//
root-addChild(mt);

//
osgUtil::Optimizer optimizer ;
optimizer.optimize(root.get()) ;

osg::ref_ptrosgGA::TrackballManipulator tb = new
osgGA::TrackballManipulator();
tb-setTrackballSize(0.9);
viewer-setCameraManipulator(tb);
viewer-setSceneData(root.get());

viewer-realize();

viewer-run();

return 0 ;
}

The four ive files (Background.ive,N_0.ive,Q_0.ive,TH_0.ive) are
400M,260M,211M,410M
respectively. I found that,if I only load the first two files, the
warning did't appear, but if load one more file of the other two, the
warning show up.
Has anyone encountered such a problem?Any advice and suggestion will be
appreciated...


...

Thank you!

Cheers,
Andrew

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





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

 

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


Re: [osg-users] Hi, Robert, Already find the reason of why OSG3.2 not anti aliased in win7 x64 GTX 760 4G DDR5 SLI

2013-09-12 Thread Jan Ciger
Hello,

Zhuwan, I believe that FXAA is a quick-and-dirty antialiasing method
used by the Nvidia driver to provide something like antialiasing for
less computational cost. See here:
http://www.kotaku.com.au/2011/12/what-is-fxaa/

Quote: FXAA stands for Fast Approximate Anti-Aliasing, and it’s an
even more clever hack than MSAA, because it *ignores polygons and line
edges*, and simply analyses the pixels on the screen (emphasis mine)

Regards,

Jan


On Thu, Sep 12, 2013 at 3:23 PM, webmaster webmas...@3dvri.com wrote:
After many times testing and trying,finally find in GTX760 Nvidia's
 driver just like other previouse hardware versions,in the hardware driver's
 early version the FXAA option conflicted with normal anti alias settings,if
 FXAA is on,and the normal anti alias is also set on,then in fact not anti
 alias is doing,so only turn off fever FXAA,then all is OK,and in SLI MODE
 the 64x anti alias is very very beautiful!
 In other conditions will also caused the anti alias is not working,but we
 have no time to deep explore the reasons!

  zhuwan


 ___
 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] When is the DatabasePager created and destroyed?

2013-09-12 Thread Chris Stankevitz
On Wed, Sep 11, 2013 at 10:39 AM, Robert Osfield
robert.osfi...@gmail.com wrote:
 First up I'd create a single graphics context, this can would be a pbuffer
 in your case.  This graphics context would live for life of the application.

 Second I'd have a single CompositeViewer that lives throughout your
 application.

 I'd then have a working set of View's that share the scene graph, and share
 the same graphics context.  All these Views would be added to the
 CompositeView.  At start up these View's would be disabled by setting their
 View Camera's NodeMask to 0x0.

Robert,

Thank you.  I implemented this and it is rock solid.  I had to do some
head scratching as all my viewers might be running at different
resolutions but I solved this by 1) making the pbuffer large enough
and 2) changing the camera viewports as needed.

Thanks again,

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