Re: [osg-users] How to build OSG 2.9.8 for Emulator on linux

2010-08-30 Thread Rakesh Parmar
Hi  List,

Please give me some pointer on this issue.

Thank you.

Cheers,
Parmar.

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





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


Re: [osg-users] OSG using OpenGL ES 2.0 on IPhone

2010-08-30 Thread Robert Osfield
HI Robert,

On Fri, Aug 27, 2010 at 3:50 PM, Robert Timm m...@rtti.de wrote:
 Ok, to keep this up to date, I managed to render a textured model using 
 OpenGL ES 2.0 on the IPhone.

Horay!! ;-)


 But I am not sure whether this is the way to go...

With shaders there are a 101 ways to go :-)


 Using this code I get a textured model with some basic shading. But is this 
 really the way to go? It feels so manual. But what ShaderGen does for 
 OpenGL ES 2.0 does not work at all (does not compile due to usage of 
 undefined variable names). Any hints or suggestions are very welcome!

ShaderGen was written for GL2 so uses GL2 GLSL variables that aren't
available.  I've added some remapping of variables in osg::State to
handle the most common ones but in the end it's only a temporary work
around.  ShaderGen itself is also just a temporary solution.

ShaderComposition will the final solution, but this is still in
development so for now you'll have to write all the shaders yourself.


 Furthermore I get tons of messages like:
 Code:
 Warning: detected OpenGL error GL_INVALID_ENUM after applying GLMode 0xba1
 Warning: Material::apply(State) - not supported.
 Warning: detected OpenGL error GL_INVALID_ENUM after applying GLMode 0xde1
 Warning: detected OpenGL error GL_INVALID_ENUM after applying GLMode 0xb50


 Those modes correspond to GL_NORMALIZE, GL_TEXTURE_2D and GL_LIGHTING. Why 
 does OSG still use them even it is compiled in OpenGL ES 2.0 mode? Am I doing 
 something wrong? Or is it just work in progress?

The OSG just passes OpenGL modes directly on to OpenGL/OpenGL ES
making the assumption that you know what you are doing and the state
you've set up in the scene graph is correct for your target.  In your
case you just need to remove these problem modes.

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


Re: [osg-users] OSG using OpenGL ES 2.0 on IPhone

2010-08-30 Thread Robert Osfield
Hi Paramar,

On Fri, Aug 27, 2010 at 6:48 PM, Rakesh Parmar rakes...@kpitcummins.com wrote:
 How you have compiled and build for es 2.0 .

No doubt he used my original discussions on osg-users the OpenGLES
page that I've wrote and then he used heaps of his own initiative.

 Please explain to me i also want to build for es 2.0 using
 emulator.

You are clearly struggling but no one will know what you are
struggling with as you don't say.  Most others have got far further
than you with less information to go on.  Those that have had problems
have asked in my more useful ways that others can know what to say.

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


Re: [osg-users] Does OSG function over VNC?

2010-08-30 Thread Robert Osfield
Hi Harry,

On Fri, Aug 27, 2010 at 8:08 PM, Harry Johnson
harry_c_john...@yahoo.com wrote:
 Hi Robert,

 Yeah, I understand that the issue is with limited GLX support in the VNC 
 server. However, seeing the glsl_simple.osg actually render, albeit with 
 errors, makes me wonder if there isn't some switch to OSG that would result 
 in it using a 'dumbed down' set of glx features with the understanding that 
 performance/appearance will likely suffer.

There will be two separate issues w.r.t OSG - GLX and OpenGL. You are
reporting errors in both - GLX with bad requests and OpenGL with
missing features (such GLSL).

It might be that the GLX errors will be affecting which OpenGL driver
is being selected.  Unfortunately I'm not an X11 expert, let alone a
VNC one so I can't really help with the specifics.  I have used the
OSG via VNC before it worked OK, but I didn't test it too thoroughly,
and it was long ago I can't recall the details I'm afraid.

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


Re: [osg-users] Change in osgText from 2.8.3 to 2.9.8?

2010-08-30 Thread Robert Osfield
Hi Andreas,

I'm surprised by the problem as I hadn't seen anything like this in my
own work adapting osgText to support GL3/OpenGLES - I had to remove
the glPushAttrib/glPopAttrib and glBegin/glEnd style calls.

Would it be possible to put together a small example app or .osg file
that reproduces the problem?

Robert.

On Sun, Aug 29, 2010 at 8:45 AM, Andreas Goebel a-goe...@gmx.de wrote:
 Hi,

 yesterday I´ve tried the 2.9.8 developer release. I encounter problems with
 osgText-objects, see attached image (all characters should be white with
 black outline).

 Could someone give me a pointer if there is a switch or something to get
 back the old behaviour?

 Regards,

 Andreas

 ___
 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] Two windows with CHECKERBOARD mode

2010-08-30 Thread Robert Osfield
Hi Matheus,

On Sun, Aug 29, 2010 at 5:33 PM, Matheus Rosendo
matheusrose...@gmail.com wrote:
 Does anyone know if it is possible to use two cameras with this CHECKERBOARD 
 mode?

I have never tried anything like two outputs with CHECKBOARD mode
before so can't say whether I should expect it to work out of the box
or not.  I would have thought the OSG would create both windows
equally, but then I don't anything about how you've gone about setting
up your windows on each screeen.  I also don't know anything about
what you are expecting on each screen - the same image on each one,
two images side by side, two entirely separate scenes.  There are
really too many unknowns for me to advice further.

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


Re: [osg-users] what's the difference between these two ways of defining light?

2010-08-30 Thread Robert Osfield
Hi Rogerz?

The OSG has to binding positional state like glLight/osg::Light with a
modelview matrix to position it correctly in space, which is why there
is a special node in the scene graph for positioning it - the
osg::LightSource node.  If you don't attach your osg::Light to this
special node then the light will be applied at an arbitrary point with
an arbitrary modelview matrix that is current when it's applied - the
result will be undefined, there is nothing the OSG can do about this -
which is why the LightSource node exists - so use it.

Robert.

On Mon, Aug 30, 2010 at 4:25 AM, myth0904 myth0...@gmail.com wrote:
 I wanna add a head light into the scene, ie.,the light is always attched
 with camera.

 For adding a light source into the scene, there are two different ways as i
 know:

 1 using osg::LightSource::  setLight method


 osg::LightSource* ls = new osg::LightSource;
 ls-setLight(new osg::Light(0));
 ls-setReferenceFrame(osg::LightSource::ABSOLUTE_RF);
 geode-setStateSet(ls-getOrCreateStateSet());


 2 using setAttribute method

 ls-getOrCreateStateSet()-setAttribute(new osg::Light(0));
 geode-setStateSet(ls-getOrCreateStateSet());


 I think two different ways should give the same result. Actually, they are
 different.

 No. 1 Method:  the light behaves like directional light, but not head light.

 No.2 method:  just like head light.


 who could tell me why the two ways are different?
 which is correct?



 
 Rogerz
 2010-08-30
 ___
 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 build OSG 2.9.8 for Emulator on linux

2010-08-30 Thread Robert Osfield
Hi Parmar,

On Mon, Aug 30, 2010 at 7:15 AM, Rakesh Parmar rakes...@kpitcummins.com wrote:
 Please give me some pointer on this issue.

I have done what I can, I've pointed your in the right direction as I
have done to others and they have got on just fine, porting the OSG to
iPhone, Android, Chrome.

Is that you don't under CMake? Is it that you can't install or
understand GLES emulators? People can't help you unless you show a
little initialitive yourself and the ability to communicate clearly
what you've attempted to do and where you've failed.

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


Re: [osg-users] what's the difference between these two w ays ofdefining light?

2010-08-30 Thread myth0904
Hi Robert,

Thanks for reply.

Actually, i have attached osg::light to lightSource node.
What makes me confused is why different results comes up when using the two 
ways of attaching light to lightSource node:

first one: using setLight method
 osg::LightSource* ls = new osg::LightSource;
 ls-setLight(new osg::Light(0));

The other one: using setAttribute
osg::LightSource* ls = new osg::LightSource;
ls-getOrCreateStateSet()-setAttribute(new osg::Light(0));




Rogerz
2010-08-30



发件人: Robert Osfield
发送时间: 2010-08-30 16:19:08
收件人: OpenSceneGraph Users
抄送: 
主题: Re: [osg-users] what's the difference between these two ways ofdefining 
light?

Hi Rogerz?
The OSG has to binding positional state like glLight/osg::Light with a
modelview matrix to position it correctly in space, which is why there
is a special node in the scene graph for positioning it - the
osg::LightSource node.  If you don't attach your osg::Light to this
special node then the light will be applied at an arbitrary point with
an arbitrary modelview matrix that is current when it's applied - the
result will be undefined, there is nothing the OSG can do about this -
which is why the LightSource node exists - so use it.
Robert.
On Mon, Aug 30, 2010 at 4:25 AM, myth0904 myth0...@gmail.com wrote:
 I wanna add a head light into the scene, ie.,the light is always attched
 with camera.

 For adding a light source into the scene, there are two different ways as i
 know:

 1 using osg::LightSource::  setLight method


 osg::LightSource* ls = new osg::LightSource;
 ls-setLight(new osg::Light(0));
 ls-setReferenceFrame(osg::LightSource::ABSOLUTE_RF);
 geode-setStateSet(ls-getOrCreateStateSet());


 2 using setAttribute method

 ls-getOrCreateStateSet()-setAttribute(new osg::Light(0));
 geode-setStateSet(ls-getOrCreateStateSet());


 I think two different ways should give the same result. Actually, they are
 different.

 No. 1 Method:  the light behaves like directional light, but not head light.

 No.2 method:  just like head light.


 who could tell me why the two ways are different?
 which is correct?



 
 Rogerz
 2010-08-30
 ___
 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
attachment: b-pou-1.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] increase ocean view range

2010-08-30 Thread issam boughanmi
hi

back to the original question

here two screens that describe the problem i am facing

[Image: http://img90.imageshack.us/img90/183/fsim1.th.jpg ] 
(http://img90.imageshack.us/i/fsim1.jpg/)

[Image: http://img521.imageshack.us/img521/439/fsim2.th.jpg ] 
(http://img521.imageshack.us/i/fsim2.jpg/)

especially in the second screen the effect is more visible

i have just a small square area of sea even with the enableEndless option and 
when the main player is in hight altitude the sea disappears




any help or orientation is welcome

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





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


Re: [osg-users] what's the difference between these two ways ofdefining light?

2010-08-30 Thread Robert Osfield
Hi Rogrz?

On Mon, Aug 30, 2010 at 10:19 AM, myth0904 myth0...@gmail.com wrote:
 Actually, i have attached osg::light to lightSource node.
 What makes me confused is why different results comes up when using the two
 ways of attaching light to lightSource node:

 first one: using setLight method
 osg::LightSource* ls = new osg::LightSource;
 ls-setLight(new osg::Light(0));

 The other one: using setAttribute
 osg::LightSource* ls = new osg::LightSource;
 ls-getOrCreateStateSet()-setAttribute(new osg::Light(0));

Attaching to the StateSet isn't attaching the Light in way that the
LightSource or the OSG's scene graph traversal pick up on so it gets
treated like any normal non positional state - so what I discussed in
my previous applies in this case.

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


Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-30 Thread Dženan Zukić
Hi,

Thanks for sharing, but I did not modify the frame loop of the viewer, and the 
following code in Qt on-click event handler does not produce rotation:

Code:
mainForm.vis-setSceneData(my_object);
osg::Vec3 achse(0.1, 0.2, 0.974); 
osg::Matrixd myRotationMatrix; 
myRotationMatrix.makeRotate(osg::DegreesToRadians(2.0f), achse); 
mainForm.vis-getCameraManipulator()-setByMatrix(mainForm.vis-getCameraManipulator()-getMatrix()
 * myRotationMatrix); 


I thought maybe there was quick and easy way to programmatically imitate user's 
pressbutton-movemouse-releasebutton which gives object rotation. As I said, it 
is for my debugging purposes and is not very important.

Thank you!

Cheers,
Dženan

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





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


Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-30 Thread Werner Modenbach
Hi Dženan,

my issue is to rotate the scene by wheels under and beside the window. 
Unfortunately this is very essential for my application and I didn't manage it 
so far.
But turning (somehow) in general works here.
My solution has 2 differences to what you wrote:
1) I don't set the scene in the same event. I don't know what happens inside 
osg after setting a scene. So maybe you do it somewhere outside.
2) I don't use the clickEvent of the window. Are you sure it is called at all? 
Do some qDebug() output.

And also I'm not sure if an angle of 2 degrees is recognized easily. Make it 
bigger for testing purpose.

Please keep me informed if you have any progress. I'm still searching for the 
correct matrix manipulation.

Bye
- Werner -

Am Montag, 30. August 2010 12:35:09 schrieb DXXenan ZukiXX:
 Hi,
 
 Thanks for sharing, but I did not modify the frame loop of the viewer, and
 the following code in Qt on-click event handler does not produce rotation:
 
 Code:
 mainForm.vis-setSceneData(my_object);
 osg::Vec3 achse(0.1, 0.2, 0.974);
 osg::Matrixd myRotationMatrix;
 myRotationMatrix.makeRotate(osg::DegreesToRadians(2.0f), achse);
 mainForm.vis-getCameraManipulator()-setByMatrix(mainForm.vis-getCameraMa
 nipulator()-getMatrix() * myRotationMatrix);
 
 
 I thought maybe there was quick and easy way to programmatically imitate
 user's pressbutton-movemouse-releasebutton which gives object rotation. As
 I said, it is for my debugging purposes and is not very important.
 
 Thank you!
 
 Cheers,
 Dženan
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=31149#31149
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
TEXION Software Solutions

TEXION GmbH -  Rotter Bruch 26a  -  D 52068 Aachen - HRB 14999 Aachen
Fon: +49 241 475757-0, Fax: +49 241 475757-29, web: http://www.texion.eu

Geschäftsführer/Managing Director: Werner Modenbach
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] FBO render once and display the different buffers in multiple osg viewers

2010-08-30 Thread Mo Flanders
Hi,

i'm using FBOs in osg, everything works fine. I can visualize the color buffer 
i rendered to OR i can visualize the render buffer. Is it possible to use two 
instances of the viewer one for visualize the color buffer AND the other should 
render the render buffer of the same scene?

Please tell me if I made an error in reasoning :O. Perhaps there is another way 
to do this... Any hint?
... 

Thank you!

Cheers,
Mo

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





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


[osg-users] Displaying text as Bold, Italicized and underlined in osg

2010-08-30 Thread Mangesh Joshi
Hi,

Is there any way in osg to display the text in bold and italicized style and 
underline or strikethrough the text?

Thank you!

Cheers,
mangesh

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





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


Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-30 Thread Dženan Zukić
Hi,

I can tell you immediately that I gave up on this :D

Cheers,
Dženan

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





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


Re: [osg-users] FBO render once and display the different buffers in multiple osg viewers

2010-08-30 Thread Robert Osfield
Hi Mo,

You wouldn't need to use two viewers, just one
osgViewer::CompositeViewer with two Views.  See the osgcompositeviewer
for examples of how to set things up.

When doing render to texture you generally want to keep everything on
the graphics card with no round trips to the main memory, so if you
want to use the result of one render to texture pass in some later
rendering then it's best to do that from the same graphics context,
which in essence means the same graphics window.  osgcompositeviewer
supports multiple views sharing the same graphics context so this will
be fine.

You can also use a osgViewer::Viewer with multiple slave Camera to
achieve the same result as using CompositeViewer and multiple Views,
but if you have conceptually separate views that have independent
controls then CompositeView will be more appropriate.  If you have a
simple debug render you want to do ontop of the main window then using
a slave can be the most convenient, the osghud example provides code
that does this, using a camera in the scene graph or in the slave
camera in the viewer, as well as a path that composite viewer.

Robert.

On Mon, Aug 30, 2010 at 12:08 PM, Mo Flanders dreiun...@gmail.com wrote:
 Hi,

 i'm using FBOs in osg, everything works fine. I can visualize the color 
 buffer i rendered to OR i can visualize the render buffer. Is it possible to 
 use two instances of the viewer one for visualize the color buffer AND the 
 other should render the render buffer of the same scene?

 Please tell me if I made an error in reasoning :O. Perhaps there is another 
 way to do this... Any hint?
 ...

 Thank you!

 Cheers,
 Mo

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





 ___
 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] Displaying text as Bold, Italicized and underlined in osg

2010-08-30 Thread Jeremy Moles
On Mon, 2010-08-30 at 12:27 +0200, Mangesh Joshi wrote:
 Hi,
 
 Is there any way in osg to display the text in bold and italicized style and 
 underline or strikethrough the text?

You can mix these kinds of decorations in a single string in osgPango,
though I haven't added support for underline yet.

http://osgpango.googlecode.com

If you need to only use osgText, perhaps someone here will have some
advice.

 Thank you!
 
 Cheers,
 mangesh
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=31148#31148
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

-- 
Follow us on Twitter! http://twitter.com/emperorlinux

EmperorLinux, Inc.
http://www.emperorlinux.com
1-888-651-6686

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


Re: [osg-users] Displaying text as Bold, Italicized and underlined in osg

2010-08-30 Thread Trajce (Nick) Nikolov
you can do it by changing the font. obviously there is file per style. For
example, for Courier New font, the regular font is cour.ttf, for bold you
have courbd.ttf and so on

-Nick


On Mon, Aug 30, 2010 at 5:45 PM, Jeremy Moles jer...@emperorlinux.comwrote:

 On Mon, 2010-08-30 at 12:27 +0200, Mangesh Joshi wrote:
  Hi,
 
  Is there any way in osg to display the text in bold and italicized style
 and underline or strikethrough the text?

 You can mix these kinds of decorations in a single string in osgPango,
 though I haven't added support for underline yet.

 http://osgpango.googlecode.com

 If you need to only use osgText, perhaps someone here will have some
 advice.

  Thank you!
 
  Cheers,
  mangesh
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=31148#31148
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

 --
 Follow us on Twitter! http://twitter.com/emperorlinux

 EmperorLinux, Inc.
 http://www.emperorlinux.com
 1-888-651-6686

 ___
 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] FBO render once and display the different buffers in multiple osg viewers

2010-08-30 Thread Mo Flanders
Hi,

First of all, thank you for your prompt response. However another quick 
question:
Is it also possible to display both buffers based on RTT and stored in the 
texture memory in different windows or on multiple displays?

What I want to do:
1. Pre-Render the scene using FBOs
2. Store the color buffer and the appropriate render buffer in the texture 
storage
3. Create 2 Windows with an Orthographic Camera
4. Display the Color Buffer and the Render Buffer on Planes

... 

Thank you!

Cheers,
Mo

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





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


Re: [osg-users] [osgOcean] increase ocean view range

2010-08-30 Thread Trajce (Nick) Nikolov
I think the endless option will not produce real endless ocean you can see
it from any range. I think it is rather following your eyepoint and render
enough so you can see it all the time. Just my thoughts, might be good to
check it actually
-Nick


On Mon, Aug 30, 2010 at 1:24 PM, issam boughanmi amigof...@gmail.comwrote:

 hi

 back to the original question

 here two screens that describe the problem i am facing

 [Image: http://img90.imageshack.us/img90/183/fsim1.th.jpg ] (
 http://img90.imageshack.us/i/fsim1.jpg/)

 [Image: http://img521.imageshack.us/img521/439/fsim2.th.jpg ] (
 http://img521.imageshack.us/i/fsim2.jpg/)

 especially in the second screen the effect is more visible

 i have just a small square area of sea even with the enableEndless option
 and when the main player is in hight altitude the sea disappears




 any help or orientation is welcome

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





 ___
 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] increase ocean view range

2010-08-30 Thread issam boughanmi
yes from i have read the endless option adapt only the point of view to 
simulate endless effect

that's said : how to get endless effect with osgocean especially in high 
altitude 


thanks and good day

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





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


Re: [osg-users] [osgOcean] increase ocean view range

2010-08-30 Thread Trajce (Nick) Nikolov
I guess you would need to put some LOD on the ocean culture.

-Nick


On Mon, Aug 30, 2010 at 6:44 PM, issam boughanmi amigof...@gmail.comwrote:

 yes from i have read the endless option adapt only the point of view to
 simulate endless effect

 that's said : how to get endless effect with osgocean especially in high
 altitude


 thanks and good day

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





 ___
 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] [consulting] OSG terrain consultant/contractor needed for short-term project

2010-08-30 Thread Mike Moskowitz
Hello OSG community:

 

We're newbies to OSG, so forgive me if this kind of posting is not
allowed. 

 

Jetstream Software is a small consulting company located in greater
Seattle. We're developing a demo application using OSG for a client. The
demo needs to be completed in the next couple weeks. We're experienced
C++ (and C#) developers and we've decided on OSG and Sundog Software's
SilverLining cloud system for this application.

 

The application is effectively a simple flight simulator with a few
twists. We could really use some help with:

 

- deciding on how we're going to model the terrain (virtual planet
builder, osgTerrain, flight simulators, et al)

- obtaining terrain data and creating tiled CLOD files

- code to translate the camera and portions of the models over time

 

Our requirements are pretty modest. This should be very straightforward
for people who have terrain experience. 

 

We're looking for a consultant/contractor to assist us. Demonstrable
experience with building and using OSG terrain in simulator-like
applications required. You need be able to start right away as we have
very limited time. This could be full-time or part-time, local or
remote, depending on your availability. We'd prefer somebody in the
Seattle area as this will help things go smoothly but are not opposed to
out of area if necessary.

 

If this matches you, or somebody you know, please email or call me
immediately to discuss.

 

Thanks so much,

Mike

 

mike moskowitz | ceo | jetstream software
http://www.jetstreamsoftware.com/  | (425) 827-9273 x 114

 

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


Re: [osg-users] FBO render once and display the different buffers in multiple osg viewers

2010-08-30 Thread Robert Osfield
HI Mo,

If you want to use the result in a separate window/display you'll need
to copy the result back to an osg::Image and then use this image on
another texture on the other windows.  osg::Camera supports attaching
an osg::Image to it and will automatically copy the frame buffer(or
FBO) to the image, and osg::Texture* all are able to detect an update
to an osg::Image so will automatically download the result, so it's
possible to do this wiring up relatively easily, but.. performance
won't be great as it requires a round trip to the CPU/main memory.

Robert.

On Mon, Aug 30, 2010 at 3:20 PM, Mo Flanders dreiun...@gmail.com wrote:
 Hi,

 First of all, thank you for your prompt response. However another quick 
 question:
 Is it also possible to display both buffers based on RTT and stored in the 
 texture memory in different windows or on multiple displays?

 What I want to do:
 1. Pre-Render the scene using FBOs
 2. Store the color buffer and the appropriate render buffer in the texture 
 storage
 3. Create 2 Windows with an Orthographic Camera
 4. Display the Color Buffer and the Render Buffer on Planes

 ...

 Thank you!

 Cheers,
 Mo

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





 ___
 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] Getting the List of Triangles from an osg model

2010-08-30 Thread Sanat Talmaki
Hi,

I am having trouble figuring out how I can get the list of triangles (vertices) 
that make up an osg object to use in another algorithm that needs a list of 
triangle vertices that make up the model. (I have seen the models I intend to 
use in osgviewer using the 'w' key and they are made up of only triangles.

So if I am using either a .osg model or a model loaded through 
osgDB::readNodeFile(...), I would like to store in memory the list as above. 

I was hoping to get some tips on how I can start approaching this. (I hope I 
have been able to explain my problem clearly enough)

Thank You

Sincerely,
Sanat.

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





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


Re: [osg-users] Getting the List of Triangles from an osg model

2010-08-30 Thread Trajce (Nick) Nikolov
you need to write a node visitor and when you hit a Geode, then go over the
drawables. There is a functor somewhere that gets you triangles from the
drawables (have a look at TriangleFunctor)
-Nick


On Mon, Aug 30, 2010 at 9:07 PM, Sanat Talmaki sanat.sch...@gmail.comwrote:

 Hi,

 I am having trouble figuring out how I can get the list of triangles
 (vertices) that make up an osg object to use in another algorithm that needs
 a list of triangle vertices that make up the model. (I have seen the models
 I intend to use in osgviewer using the 'w' key and they are made up of only
 triangles.

 So if I am using either a .osg model or a model loaded through
 osgDB::readNodeFile(...), I would like to store in memory the list as above.

 I was hoping to get some tips on how I can start approaching this. (I hope
 I have been able to explain my problem clearly enough)

 Thank You

 Sincerely,
 Sanat.

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





 ___
 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] Getting the List of Triangles from an osg model

2010-08-30 Thread Paul Martz

Sanat Talmaki wrote:

Hi,

I am having trouble figuring out how I can get the list of triangles (vertices) 
that make up an osg object to use in another algorithm that needs a list of 
triangle vertices that make up the model. (I have seen the models I intend to 
use in osgviewer using the 'w' key and they are made up of only triangles.

So if I am using either a .osg model or a model loaded through osgDB::readNodeFile(...), I would like to store in memory the list as above. 


I was hoping to get some tips on how I can start approaching this. (I hope I 
have been able to explain my problem clearly enough)


Have you considered using TriangleFunctor? Wrapped in a NodeVisitor with support 
for apply(Drawable), this would give you a list of all triangles. It's used all 
over the place in OSG; see, for example, ReaderWriterSTL.cpp.


I'm about to write some code that needs to convert tri strips and fans to 
triangles, and I figured I'd use TriangleFunctor for that task.


If you just need the list of vertices, then one very simple way to do it would 
be to copy all the vertex arrays, though this risks including unused vertices 
(if they exist). The OpenFlight exporter does this.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Switch node and update traversal

2010-08-30 Thread Tom Pearce
Hi everyone,

I have a quick question regarding switch nodes and update callbacks:

I'm working on a system where users control objects in an osg scene (ie move 
around, etc).  I'm using switch nodes to turn various objects in the scene on 
and off.  I'd like to test for collisions between objects in the scene, even if 
they may be hidden.  I already have collisions working fine as long as I have 
the transform matrix of the object.  I'd like to be able to use an update 
callback to get the accumulated transformed coordinates of different objects, 
whether they are hidden or not.  It would also be nice if the update callback 
could tell me whether a particular node is off or on (under a switch).  So, two 
questions:

1)  Does the update traversal visitor visit off children of switches, so that 
the accumulated matrix would be accurate even if the object was not shown?
2)  Is there an easy way for an update callback to find out if its node is on 
or off - similar to how a callback can use ComputeWorldToLocal, for example, to 
get the accumulated transforms.

Thank you!

Cheers,
Tom

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





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


Re: [osg-users] Switch node and update traversal

2010-08-30 Thread Paul Martz

Tom Pearce wrote:

1)  Does the update traversal visitor visit off children of switches, so that 
the accumulated matrix would be accurate even if the object was not shown?


Yes. From UpdateVisitor.cpp:

UpdateVisitor::UpdateVisitor():NodeVisitor(UPDATE_VISITOR,TRAVERSE_ALL_CHILDREN)
{
}


2)  Is there an easy way for an update callback to find out if its node is on 
or off - similar to how a callback can use ComputeWorldToLocal, for example, to 
get the accumulated transforms.


Typecast the parent as a Switch, then ask the Switch if 'this' is on or off...?

--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Legacy question about MFC and Producer::Viewer

2010-08-30 Thread John Stokes
Hello all,

  I realize that OSG has long since deprecated support for Producer::Viewer in 
favor of the Viewer class, but I am hoping that someone might be able to point 
me in the right direction.. 

  I am working on updating a display that use OSG 0.9.9 (and for other support 
reasons we can't reasonably upgrade to the latest version). We use the 
following code to create a viewer and attach a NodeTrackerManipulator object 
called CameraTracker to track events with a plane node.


Code:

MyCode::initializeViewer()
{
osgProducer::Viewer* viewer; 

viewer-setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS);

//perform other setup

nodeTracker = new CameraTracker();

unsigned int num = viewer-addCameraManipulator(nodeTracker);
viewer-selectCameraManipulator(num);
...
viewer-realize();
}

//NodeTrackerManipulator that handles mouse events
bool CameraTracker::handle(const GUIEventAdapter ea,GUIActionAdapter us)
{

_thrown = false;
switch(ea.getEventType())
{
case(GUIEventAdapter::PUSH):
{
flushMouseEventStack();
addMouseEvent(ea);
if (calcMovement()) us.requestRedraw();
us.requestContinuousUpdate(false);
_thrown = false;
return true;
}
}
}





The NodeTracker object receives events correctly in the initial implementation, 
but I have recently added a simple line of code to embed
the OSG Display inside an MFC dialog window:


Code:

if(m_mfcParentWndHandle != NULL)
{
//Attach OSG viewer display to an existing MFC dialog frame using HWND
viewer-getCameraConfig()-getCamera(0)-getRenderSurface()-setWindow(m_mfcParentWndHandle);
...
viewer-realize();
}




This new code segment attaches the display to the MFC parent correctly, and 
FRAME events still seem to be processed (so the display can be redrawn on 
frame()), but my NodeTrackerManipulator class doesn't receive mouse events 
anymore. 

I've looked at the old OSGMFC example, but it doesn't seem to address this 
particular situation. I've also tried capturing the MFC mouse events in the 
parent dialog, but I can't figure out how to create new GUIEventAdapter objects 
that can be passed to my handle function.

Does anyone with knowledge of MFC or this old implementation have a suggestion 
as to where to look next? 


Thanks,
John

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





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


Re: [osg-users] Change in osgText from 2.8.3 to 2.9.8?

2010-08-30 Thread Andreas Goebel

Hi Robert,

One addition: I was able to reproduce the problem too when using a 
geometry instead of a shapeDrawable for the long thin cylinder.


So this has nothing to do with the ShapeDrawable. I´m completely lost here.

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


[osg-users] [3rdparty] Qt, Collada OSG

2010-08-30 Thread Samuel Grant
Hi,

I am trying to get the three to play nice together. Can someone please give me 
a quick tutorial on getting OSG w/Collada working in QT?


Thank you!

Cheers,
Samuel

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





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


Re: [osg-users] Switch node and update traversal

2010-08-30 Thread Tom Pearce
Hi Paul,

Thanks for the response.  In regards to question 2, if I'm understanding you 
right this will work if the node in question is the direct child of a switch.  
However, if there are intervening nodes (such as a switch at the root of a 
sub-graph, with a number of levels of nodes underneath it), I would essentially 
need to follow the node path (obtained from the node visitor) all the way up to 
the camera, checking to see if any of the nodes are switches with the child 
along the path set to off.  Does that sound right?  Last question - since I 
only need to know if any given node is on/off occasionally, like when a 
collision is detected, would it be safe to apply a method to traverse the node 
path in this way from a separate thread without halting the viewer loop or 
using a callback?  I suspect it would not be safe, that it would cause 
crashes...

Thank you!

Cheers,
Tom

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





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


Re: [osg-users] Getting the List of Triangles from an osg model

2010-08-30 Thread Sanat Talmaki
Hi Paul,

Thanks for your suggestion. I take a look at tiranglefunctor.

I am trying to get the list of vertices like this: (the algorithm that I'm 
trying to use, uses a file type called TRI or TRIS which is basically a list of 
triangle vertices that it then uses to compare with another model's vertices:

Code:
TRI

1000

1996

-0.42173630748 -0.002298619180003688 0.001594571375850673
-0.04134986807655005 0.05770563707444018 -0.4949345894761177
-0.4529553837855104 0.1495382066464429 0.1498991162505212
0.4346928959408253 -0.2437053375790935 0.04061766431046052
0.3309653461123563 -0.2704424251427986 -0.2594664416752355
0.02970019333516602 0.1638967733743646 -0.4714400769910478
-0.1165843492451138 -0.477629262623616 -0.09098558675261177



Thanks

Sincerely,
Sanat

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





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


Re: [osg-users] Switch node and update traversal

2010-08-30 Thread Paul Martz

Tom Pearce wrote:

Thanks for the response.  In regards to question 2, if I'm understanding you 
right this will work if the node in question is the direct child of a switch.  
However, if there are intervening nodes (such as a switch at the root of a 
sub-graph, with a number of levels of nodes underneath it), I would essentially 
need to follow the node path (obtained from the node visitor) all the way up to 
the camera, checking to see if any of the nodes are switches with the child 
along the path set to off.  Does that sound right?


Yes, I figured that's what you meant about the time I hit 'send'. But yes, 
you're correct: the NodeVisitor has the NodePath that got you to where you are, 
so just stepping through that path would tell you whether or not any ancestor 
nodes are Switch objects, then you'd do the same test I described.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Getting the List of Triangles from an osg model

2010-08-30 Thread Sanat Talmaki
Hi,

I was running a small test program to understand the concept a little better:


Code:
int main()
{
  int numChildren, num1, num2, num3;
  const char* geodeName;
  const char* cowChildrenName;
  osg::Group* root = new osg::Group();
  osg::Node* cow = osgDB::readNodeFile(cow.osg);
  
  root-addChild(cow);  
  geodeName = cow-asGroup()-getChild(0)-className();
  numChildren = root-getNumChildren();  
  num1 = cow-asGroup()-getChild(0)-asGeode()-getNumDrawables();  
  num2 = cow-asGroup()-getNumChildren();
  num3 = cow-asGeode()-getNumDrawables();
  _getch();
  
  return 0;
}



The cow Node has 1 child i.e. a Geode. But when I try and query it for number 
of drawables using the line  num3 = cow-asGeode()-getNumDrawables(); I get an 
exception error.

So how do I query it or get the number of drawables ?

Thanks.

Sincerely,
Sanat.

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





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


Re: [osg-users] Getting the List of Triangles from an osg model

2010-08-30 Thread Jean-Sébastien Guay

Hello Sanat,


   num1 = cow-asGroup()-getChild(0)-asGeode()-getNumDrawables();
   num2 = cow-asGroup()-getNumChildren();
   num3 = cow-asGeode()-getNumDrawables();


This line makes no sense. You have confirmed in the line before that cow 
is a Group, why do you then try to cast cow as a Geode? It can't be a 
Geode and a Group at the same time... (unless it were an instance of a 
weird class that multiply-inherits from Group and Geode, but that's a 
slippery slope indeed...)


num1 already gives you the number of drawables under the Geode that is 
under the cow (root node of the loaded file).


Also note that this is not a safe way to traverse a graph (either loaded 
from file or not). It's safer to write a visitor that will traverse down 
to the Geodes and then check the drawables. That way you don't write 
code that assumes a graph structure. Get used to writing visitors, they 
are simple and powerful.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-08-30 Thread Ulrich Hertlein
Hi Dženan,

On 30/08/10 20:35 , Dženan Zuki wrote:
 mainForm.vis-setSceneData(my_object);
 osg::Vec3 achse(0.1, 0.2, 0.974); 
 osg::Matrixd myRotationMatrix; 
 myRotationMatrix.makeRotate(osg::DegreesToRadians(2.0f), achse); 
 mainForm.vis-getCameraManipulator()-setByMatrix(mainForm.vis-getCameraManipulator()-getMatrix()
  * myRotationMatrix); 

If you're using a camera manipulator it might be overwriting the matrix you're 
setting
with its own values.  Remove the camera manipulator and set the camera view 
matrix instead
and it should be fine.

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


Re: [osg-users] Getting the List of Triangles from an osg model

2010-08-30 Thread Sanat Talmaki
Hi Jean,

Yes, I realize my mistake. I went through that section in the Quick Start Guide 
to refresh my memory. 

Thanks.

Sanat

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





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