[osg-users] how to run the example osgViewerQt

2009-06-29 Thread gopal goenka
Hi,

I am a newbie in osg.

I am trying to run the osgViewerQT example in QT4.4 on the linux platform

but i am getting error such as undefined refferences to osg/srgumentparser 

please help n tell me how to run the example 

Thank you!

Cheers,
gopal

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





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


Re: [osg-users] Copying a FBO texture render target

2009-06-29 Thread J.P. Delport

Hi,

you can also make another RTT camera that looks at a part of the first 
camera's output and just renders to another texture at the time you 
want. You can put cameras under a switch to turn them on and off. See 
the osggameoflife example.


jp

Craig Bosma wrote:

Hi all,

I have an osg::Camera that renders to an FBO texture, and at some
given point in time, I want to take a snapshot (for later rendering)
of a sub-region of that render target's texture. I've tried two
methods, one that works but is not optimal, and another that doesn't:

The first is to attach an osg::Image to the camera for a single frame.
This works, but seems needlessly costly since I don't need to read
data back into main memory, I just need a texture snapshot in graphics
memory to render onscreen later.

My second approach was to create a new osg::Texture object and use
osg::Texture::copyTexImage2D in a camera post-draw callback, but I
only succeeded in copying a region of the framebuffer (as the
documentation indicates -- I thought it was worth a shot anyway).

Anyone out there know of a better way to accomplish what I'm trying to do here?

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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] how to run the example osgViewerQt

2009-06-29 Thread Pierre Bourdin (gmail)
Hi Gopal,
you just need to pass a model to draw, like : osgViewerQT cow.osg

You can open any model supported by OpenSceneGraph...

Pierre.

Le lundi 29 juin 2009 à 06:47 +, gopal goenka a écrit :
 Hi,
 
 I am a newbie in osg.
 
 I am trying to run the osgViewerQT example in QT4.4 on the linux platform
 
 but i am getting error such as undefined refferences to osg/srgumentparser 
 
 please help n tell me how to run the example 
 
 Thank you!
 
 Cheers,
 gopal
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=14628#14628
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com


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


Re: [osg-users] Open Gl command in OSG^^

2009-06-29 Thread Ulrich Hertlein

Hello Ba(?),

On 29/6/09 6:38 AM, buidinhba5 wrote:

I know that OSG is extend library from Open GL but I don't find more
OpenGl command as Gl.GlSphere,Gl.GlLighting .. and more ^^


These certainly aren't GL commands, they might be additions from whatever library/language 
that's from.


The OpenGL lighting functionality is wrapped in osg::Light and osg::LightSource.

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


Re: [osg-users] how to run the example osgViewerQt

2009-06-29 Thread gopal goenka
Hi,

what I have done is I have imported the the QOSGWidget.cpp  AdapterWidget.cpp
and copied the code of the osgviewerQT.cpp main into the main of my QT4.4 
project.

now it is giving error

undefined reference to `osg::ArgumentParser::ArgumentParser(int*, char**)'  

or there is another way to integrate it with QT...

Thank you!

Cheers,
gopal

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





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


[osg-users] [vpb] Resolution of levels?

2009-06-29 Thread Massimo Tarantini
Hi all,

i am building some terrains using Geotiff 1meter/pixel and DEM 40meter.
I use the option -l 30: osgdem generates 6 levels, numbered from 0 to 5.

My question is: what is the resolution of last level 5? The same of the Geotiff?
And of the other levels?

Thanks

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





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


Re: [osg-users] how to run the example osgViewerQt

2009-06-29 Thread Robert Osfield
Hi Gopal,

On Mon, Jun 29, 2009 at 8:33 AM, gopal
goenkagopal.goe...@hed.ltindia.com wrote:
 now it is giving error

 undefined reference to `osg::ArgumentParser::ArgumentParser(int*, char**)'

 or there is another way to integrate it with QT...

You'll need to link to the OSG libraries to compile against the OSG.

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


Re: [osg-users] [vpb] Resolution of levels?

2009-06-29 Thread Robert Osfield
Hi Massimo,

The resolution of each level depends entirely on the extents of the
source data, and the resolution chosen for the destination tiles.  The
later default to 256x256 for imagery and 64x64 for DEMs, but extents
of the source data depends entirely on your data so it'd not something
I can comment on.

Robert.

On Fri, Jun 19, 2009 at 7:26 PM, Massimo Tarantinisubbi...@yahoo.it wrote:
 Hi all,

 i am building some terrains using Geotiff 1meter/pixel and DEM 40meter.
 I use the option -l 30: osgdem generates 6 levels, numbered from 0 to 5.

 My question is: what is the resolution of last level 5? The same of the 
 Geotiff?
 And of the other levels?

 Thanks

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





 ___
 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] Best video format for a fullscreen video rendering ?

2009-06-29 Thread Pierre Bourdin (gmail)
Hia all,
I want to show small video with sound and if possible subtitles in an
OSG application.
I guess the best way is now to use ffmpeg plugin like in osgmovie... 

I think, for the sound it needs some external tool like SDL to play the
audio part.

Have you got any feedback about the compression format to use ?

Is there somebody working on integration of Qt Phonon in
OpenSceneGraph ?


Thanks, Pierre.


Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com


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


[osg-users] Android and a mix of Java + native C++ now possible

2009-06-29 Thread Robert Osfield
This morning I came across a new article about the newly released
Android 1.5 Android Native Development Kit (NDK):

   http://developer.android.com/sdk/ndk/1.5_r1/index.html

What this looks like is that we'll be able to mix native C/C++ code
with a Java application.  In the case of the OpenSceneGraph there is
chance that it might make it possible to have the scene graph in C++
and the higher level viewer code in Java.  The OpenSceneGraph would
have to work under OpenGL ES, but that's on cards for other projects
anyway, so it perhaps it might one day be possible to write
OpenSceneGaph apps for Android devices.

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


Re: [osg-users] OpenSceneGraph-2.8.2 release candidate one tagged

2009-06-29 Thread Robert Osfield
Hi J-S et. al,

On Mon, Jun 22, 2009 at 6:55 PM, Jean-Sébastien
Guayjean-sebastien.g...@cm-labs.com wrote:
 Small problems (but probably there before...)
 * osgshadow --pssm : the complete scene seems to flash between shadowed and
 unshadowed state. I remember it working before, so this flashing seems new.
 Also the default shader does not support transparency in textured polygons
 properly, as you can see running it with the -4 scene, on the trees (might
 always have been that way).

I've been able to reproduce this problem and workaround it by select
--SingleThreaded on the osgshadow command line, so it looks like a
threading issue with ParallelSplitShadowMap.

 * osgshadow --sv : crashes. (I know shadow volume is not complete but still,
 I don't remember it crashing before just giving bad shadows, so that seems
 new)

It shouldn't crash.  I couldn't reproduce the crash. Could you get a
stack trace?   Could you try running osgshadow single threaded like
above to see if the crash goes.

The quality issues mainly revolve around problems with very few shadow
casting models being perfect manifold geometries.  Without a manifold
geometry the silhouette edge detection ends up with errors.  I'm not
sure what to do about these issue.  It's certainly not something that
can be tackled in 2.8.2 though.

--

For both these issues I suspect a quick workaround of setting the
threading model to SingleThreaded of r --pssm and --sv would more use
a step forward.  Properly fixing both these issues would likely
require API changes so may well be inappropriate on these grounds.

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


[osg-users] a problem with computing near far

2009-06-29 Thread Ren Liwei
Hi,
  In my scene there is an earth and some small models on it.  Sometimes i've 
got a screenshot like the attachment when i turn auto-compute near far on. 
  I known that's becuase the auto-computed near plane is too far to let nearer 
primitives in. So i tried giving a very little nearfarratio and then it worked 
somewhat. But when i added an even larger sky sphere into the scene, once again 
i fall into trouble with near far.
  So what should i do with near far when there are both very near(less then 1) 
and far away(far then 1) things to show in the secen.

Thank you!

Cheers,
indif

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



attachment: screen_shot_0_1.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] using CullVisitor

2009-06-29 Thread James Buckthorpe
Hi,

I do need to know whether or not the node has been culled, not just whether it 
is inside the view volume. I am a bit stuck as to how to do this.

As part of the application I am developing I am planning on moving a node 
around the scene and testing whether it is visible from different locations 
(i.e. whether it has been culled) as well as whether it is within the view 
volume of a camera.

Can anyone offer any suggestions? 

Your help is much appreciated.
Cheers,
James

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





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


Re: [osg-users] a problem with computing near far

2009-06-29 Thread María Ten
Hi,

You can disable the auto-compute near far and give a fix value for near and
far.

If this method don't solve your problem you can add a callback to your root
node in the scene using the setClampProjectionMatrixCallback method of the
cullvisitor and override the clampProjectionMatrixImplementation method in
the class ClampProjectionMatrixCallback. In my implementation I compute the
nearest point in the geometry to set the near plane and then adjust the far
plane depending of the near plane and the nearFarRatio.

This little hack work for my with very large terrains culling the far
objects in the scene instead of the nearest objects.

Cheers,

Maria.

On Mon, Jun 29, 2009 at 11:27 AM, Ren Liwei lw...@163.com wrote:

 Hi,
  In my scene there is an earth and some small models on it.  Sometimes i've
 got a screenshot like the attachment when i turn auto-compute near far on.
  I known that's becuase the auto-computed near plane is too far to let
 nearer primitives in. So i tried giving a very little nearfarratio and then
 it worked somewhat. But when i added an even larger sky sphere into the
 scene, once again i fall into trouble with near far.
  So what should i do with near far when there are both very near(less then
 1) and far away(far then 1) things to show in the secen.

 Thank you!

 Cheers,
 indif

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




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




-- 
María Ten Rodríguez
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph-2.8.2 release candidate one tagged

2009-06-29 Thread Jean-Sébastien Guay

Hi Robert,


* osgshadow --pssm : the complete scene seems to flash between shadowed and
unshadowed state. I remember it working before, so this flashing seems new.
Also the default shader does not support transparency in textured polygons
properly, as you can see running it with the -4 scene, on the trees (might
always have been that way).


I've been able to reproduce this problem and workaround it by select
--SingleThreaded on the osgshadow command line, so it looks like a
threading issue with ParallelSplitShadowMap.


Interesting.


* osgshadow --sv : crashes. (I know shadow volume is not complete but still,
I don't remember it crashing before just giving bad shadows, so that seems
new)


It shouldn't crash.  I couldn't reproduce the crash. Could you get a
stack trace?   Could you try running osgshadow single threaded like
above to see if the crash goes.


Your hunch seems right: it runs with --SingleThreaded.


The quality issues mainly revolve around problems with very few shadow
casting models being perfect manifold geometries.  Without a manifold
geometry the silhouette edge detection ends up with errors.  I'm not
sure what to do about these issue.  It's certainly not something that
can be tackled in 2.8.2 though.


But even with the -3 scene, where all models are manifold (only box, 
sphere, cylinder and cone ShapeDrawables in the scene), it has some 
negative shadow issues (where the shadow of two objects overlap there is 
no shadow). So I'm not sure the manifold issue is the only one. But I 
agree, this is not something that can/should be fixed for a point release.


If you end up setting the threading model to SingleThreaded, please only 
do it for these two techniques, and make it clear (perhaps in comments) 
that it's only a temporary workaround. The other techniques work well in 
any threading model, and these two should too (eventually).


Thanks,

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] a problem with computing near far

2009-06-29 Thread Ren Liwei
Thank you Maria, your method should work well in most circumstance. But, my sky 
sphere whick has a very large radius would surely be cliped by the far plane in 
that, and that's not what i want to see. Any ideas to solve it? 

Thank you,
RenLiwei

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





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


[osg-users] setNumMultiSamples

2009-06-29 Thread Claudio Arduino
, 5.0, 0.0));
osg::ref_ptrosg::Node cow = osgDB::readNodeFile(cow.osg);
osg::ref_ptrosg::Node dumptruck =
 osgDB::readNodeFile(dumptruck.osg);
cow-setNodeMask(CastsShadowTraversalMask);
dumptruck-setNodeMask(CastsShadowTraversalMask);

osg::ref_ptrosg::Node ground = osgDB::readNodeFile(lz.osg);
groundMT-setNodeMask(shadowedScene-getReceivesShadowTraversalMask());
groundMT-addChild(ground.get());
cowMT-addChild(cow.get());
dumptruckMT-addChild(dumptruck.get());

shadowedScene-addChild(groundMT.get());
shadowedScene-addChild(cowMT.get());
shadowedScene-addChild(dumptruckMT.get());
shadowedScene-addChild(ls.get());

osgViewer::Viewer viewer;

viewer.setCameraManipulator(new osgGA::TrackballManipulator());
viewer.setSceneData(shadowedScene.get());
viewer.addEventHandler(new osgViewer::WindowSizeHandler() );
viewer.realize();

double x = 0.0;
while(!viewer.done())
{
viewer.frame();
cowMT-setMatrix(osg::Matrix::translate(0.0, x, 0.0));
x+= 0.01;
}
 }
 ==

 When I used ShadowTexture results are osgShadowError1.jpg and
 osgShadowError2.jpg
 And When I used ShadowMap result is osgShadowError3.jpg

 My System : XP SP2, ATI Radeon HD 2300, OSG 2.9.5 last Repository

 What do you think about incorrect shadow mapping on my system? Do you think
 I am doing incorrect things?

 --
 ?mit Uzun
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090629/0b66353b/attachment.htm
 
 -- next part --
 A non-text attachment was scrubbed...
 Name: osgShadowError1.jpg
 Type: image/jpeg
 Size: 39498 bytes
 Desc: not available
 URL: 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090629/0b66353b/attachment.jpg
 
 -- next part --
 A non-text attachment was scrubbed...
 Name: osgShadowError2.jpg
 Type: image/jpeg
 Size: 39615 bytes
 Desc: not available
 URL: 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090629/0b66353b/attachment-0001.jpg
 
 -- next part --
 A non-text attachment was scrubbed...
 Name: osgShadowError3.jpg
 Type: image/jpeg
 Size: 36152 bytes
 Desc: not available
 URL: 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090629/0b66353b/attachment-0002.jpg
 
 -- next part --
 A non-text attachment was scrubbed...
 Name: osgShadowError4.jpg
 Type: image/jpeg
 Size: 15058 bytes
 Desc: not available
 URL: 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090629/0b66353b/attachment-0003.jpg
 
 -- next part --
 A non-text attachment was scrubbed...
 Name: osgShadowError5.jpg
 Type: image/jpeg
 Size: 14004 bytes
 Desc: not available
 URL: 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20090629/0b66353b/attachment-0004.jpg
 

 --

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


 End of osg-users Digest, Vol 24, Issue 84
 *

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


Re: [osg-users] race condition in GraphicsWindowWin32?

2009-06-29 Thread Cory Riddell




I was using the Windows close button in the title bar or alt-f4.

It does not happen with osgwindow because (as far as I can see), it
closes down via a different route. In that example, osgwindow gets a
WM_CLOSE message which is handled by the event handler as a
CLOSE_WINDOW message and everything seems to shut down in an orderly
manner.

For the MFC example, OSG is terminated with a WM_DESTROY message. The
WM_CLOSE message is handled by the parent frame window and OSG never
sees it.

Cory

Robert Osfield wrote:

  Hi Cory,

How did you close the application?  Pressing escape or closing it via
the window close button?

Does the problem happen with other examples, such as osgwindow?

Robert.

On Fri, Jun 26, 2009 at 9:28 PM, Cory Riddellc...@codeware.com wrote:
  
  
In another message thread I've been talking about a threading problem in
my app. I just figured out how to reproduce it with one of the samples,
so I thought I would post that here in hopes that somebody else would
have an idea on how to fix this.

I think it's a shutdown sequence race. To reproduce the problem, start
the osgviewerMFC sample app. Load the cow, turn on stats (hit 's') then
close the app. Sometimes you will get a crash. To make the crash happen
all the time, add a Sleep() call to the start of the WM_DESTROY handler
in MFC_OSG_MDIView.cpp:


  void CMFC_OSG_MDIView::OnDestroy()
{
  Sleep(1200);
  if(mOSG != 0) delete mOSG;

  WaitForSingleObject(mThreadHandle, 1000);

  CView::OnDestroy();
}
  

As far as I can see, when GraphicsWindowWin32 process the WM_DESTROY
message, it sets _valid to false for the context. This prevents
~Viewer() from closing the context. This leaves a thread running and
that generates an access violation because it tires to use elements that
have been deleted. If the Viewer destructor is processed first, then
everything is ok.

This is related to the presence of a slave camera (that's why you have
to turn the stats display on).

Any ideas?

Thanks,
Cory
___
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] OpenSceneGraph-2.8.2 release candidate two tagged

2009-06-29 Thread Jean-Sébastien Guay

Hi Robert,


I’ve have now tagged the OpenScneGraph-2.8.2 release candidate 2, and
as very few problems were reported in testing of 2.8.2-rc1 there is
just a couples of changes required:


My nightly build on the CDash page is the 2.8 branch so you can follow 
how it goes on Windows. I'll test our software on it later today or 
tomorrow, I'll let you know how it goes but I don't expect any problems...


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] using CullVisitor

2009-06-29 Thread Robert Osfield
Hi James,

Do you want to testing culling from within the cull traversal itself,
or do you wish to just test against the view frustum polytope
independently from the cull traversal?  For the later I'd just use an
osgUtil::PolytopeIntersection in conjunction with
osgUtil::IntersectionVisitor.

Robert.

On Mon, Jun 29, 2009 at 11:29 AM, James
Buckthorpejames.bucktho...@tessella.com wrote:
 Hi,

 I do need to know whether or not the node has been culled, not just whether 
 it is inside the view volume. I am a bit stuck as to how to do this.

 As part of the application I am developing I am planning on moving a node 
 around the scene and testing whether it is visible from different locations 
 (i.e. whether it has been culled) as well as whether it is within the view 
 volume of a camera.

 Can anyone offer any suggestions?

 Your help is much appreciated.
 Cheers,
 James

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





 ___
 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] OpenSceneGraph-2.8.2 release candidate one tagged

2009-06-29 Thread Robert Osfield
Hi J-S,

On Mon, Jun 29, 2009 at 2:33 PM, Jean-Sébastien
Guayjean-sebastien.g...@cm-labs.com wrote:
 If you end up setting the threading model to SingleThreaded, please only do
 it for these two techniques, and make it clear (perhaps in comments) that
 it's only a temporary workaround. The other techniques work well in any
 threading model, and these two should too (eventually).

I did just set single threaded for the --sv and --pssm options, and
commented on it as well.  This is part of 2.8.2-rc2.

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


Re: [osg-users] setNumMultiSamples

2009-06-29 Thread Robert Osfield
Hi Claudio,

n Mon, Jun 29, 2009 at 3:02 PM, Claudio Arduinohard1...@gmail.com wrote:
 is  it possible tu call setNumMultiSamples at runtime? i have tried but
 nothing appear to change

You have to re-create the graphics context if you want to change the
number of multi-samples.

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


Re: [osg-users] a problem with computing near far

2009-06-29 Thread rpingry
Something that I have done (please let me know if this is not a good way to
do it or if there is a better way), is to break up my scene into parts.  I
have the large distant things in one part of my scene graph, and then
everything else in another part.  I then render them in separate render
bins, assuming that the large things will be drawn behind the smaller
things.  I also scale down the large objects and draw them closer to the
camera so they still look the same size.  I know this would throw off fog
calculations unless you adjusted for that, but I have found in my space
scenes that I can draw small ships right next to planets without having
near/far clipping problems, Z buffer fighting, or single point precision
errors.

-- Rick

On Mon, Jun 29, 2009 at 7:52 AM, Ren Liwei lw...@163.com wrote:

 Thank you Maria, your method should work well in most circumstance. But, my
 sky sphere whick has a very large radius would surely be cliped by the far
 plane in that, and that's not what i want to see. Any ideas to solve it?

 Thank you,
 RenLiwei

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





 ___
 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] OSG build errors when building with xcodebuild

2009-06-29 Thread Tatsuhiro Nishioka
Hi,

I've been struggling with configuration names on the Xcode project that comes 
with OSG.
The problem I have is that it causes no such cnfiguration errors when I use 
xcodebuild 
from a helper shell script because the configuration names contains white 
spaces (like Deployment 32bit Carbon.)
I've tried -configuration=Development 32bit Carbon and 
-configuration=Development\ 32bit\ Carbon but no clue. 

Could these be without white spaces like Deployment_32bit_Carbon?
Any better idea can also be helpful.

Best,

Tat

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


Re: [osg-users] [osgPlugins] GoogleMode

2009-06-29 Thread Adam Wise
I tried your suggestion, osgconv -o GoogleMode [model 1.flt] [model 2 .dae]. 
Didn't work. All osg did was post up the list of all the available options 
OSG_DATABASE_PAGER_PRIORITY mode etc etc etc. Is it safe to assume that 
GoogleMode is not available?

http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/Collada

Under the collada reader/writer option, GoogleMode is there. How would I be 
able to access it?

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





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


Re: [osg-users] [osgPlugins] GoogleMode

2009-06-29 Thread Thrall, Bryan
Adam Wise wrote on Monday, June 29, 2009 12:14 PM:

 I tried your suggestion, osgconv -o GoogleMode [model 1.flt] [model 2
.dae].
 Didn't work. All osg did was post up the list of all the available
options
 OSG_DATABASE_PAGER_PRIORITY mode etc etc etc. Is it safe to assume
that
 GoogleMode is not available?   
 

http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/Co
llada
 
 Under the collada reader/writer option, GoogleMode is there. How would
I be
 able to access it? 

You want capital o, O, as in: 'osgconv -O GoogleMode' to set the
options string


-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] GoogleMode

2009-06-29 Thread Dorosky, Christopher G

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


Re: [osg-users] [osgPlugins] GoogleMode

2009-06-29 Thread Robert Osfield
On Mon, Jun 29, 2009 at 7:06 PM, Dorosky, Christopher
Gchristopher.g.doro...@lmco.com wrote:

 Please unsubscribe temporarily.

Christopher you can disable the posting of mailing list posts to your
account my logging into the osg-users admin page:

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

When you want to receive posts again you just enable it again using
the same route.

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


Re: [osg-users] using CullVisitor

2009-06-29 Thread James Buckthorpe
Hi,

Yes I am already using the osgUtil::PolytopeIntersector to work out whether the 
object is inside the FOV. However I am finding that the list of intersections 
includes my node of interest regardless of whether it has been culled or not 
due to another object or objects being in the way.

How do I go about check whether the object has been culled?. My attempts to use 
the CullVisitor (as above) failed. 

Cheers,
James

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





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


Re: [osg-users] using CullVisitor

2009-06-29 Thread Thrall, Bryan
James Buckthorpe wrote on Monday, June 29, 2009 1:25 PM:
 Yes I am already using the osgUtil::PolytopeIntersector to work out
whether
 the object is inside the FOV. However I am finding that the list of
 intersections includes my node of interest regardless of whether it
has been
 culled or not due to another object or objects being in the way.   
 
 How do I go about check whether the object has been culled?. My
attempts to
 use the CullVisitor (as above) failed. 

In general with OpenGL (and including OpenSceneGraph) there is no
culling based on whether other objects are in the way (the depth buffer
handles this), unless you use occluders (see for example
osg::OccluderNode and osg::OcclusionQueryNode; perhaps those will help
you).

HTH,
-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] problem with blending when using floating point FBO

2009-06-29 Thread Jonathan Richard
 How did you test that setting both to 4 didn't work?

This is how I tested it:

// Reading back the FBO does not work when it is disabled after render --
set this property of the
// renderStage to false. A workaround is to enable
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, frameBufferObjectID) in the draw
callback
osgViewer::Renderer * renderer =
static_castosgViewer::Renderer*(camera-getRenderer());
renderer-getSceneView(0)-getRenderStage()-setDisableFboAfterRender(false);
renderer-getSceneView(1)-getRenderStage()-setDisableFboAfterRender(false);

...

// Camera and texture setup
osg::ref_ptrosg::TextureRectangle offscreenTexture = new
osg::TextureRectangle;
offscreenTexture-setTextureSize(500, 500);
offscreenTexture-setSourceFormat(GL_RGBA);
offscreenTexture-setSourceType(GL_FLOAT);
offscreenTexture-setInternalFormat(GL_FLOAT_RGBA32_NV);

camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
camera-attach(osg::Camera::COLOR_BUFFER0,
offscreenTexture.get(),0,0,false,4,4);
camera-setFinalDrawCallback(new MyCameraDrawCallback(precision));

...

// the color is set by using a fragment shader and a uniform variable
osg::Vec4 geodeColorf = osg::Vec4(56.13,0,0,1);
osg::ref_ptrosg::Uniform redColor = new osg::Uniform( Color,
geodeColorf);
stateset-addUniform(redColor.get());
stateset-setAttributeAndModes( program.get(), osg::StateAttribute::ON |
osg::StateAttribute::OVERRIDE );
aDrawable-setStateSet(stateset);

// Code in my fragment shader
uniform vec4 Color;
void main (void)
{
gl_FragColor = Color;
}

...

// code in MyCameraDrawCallback
glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
float* tempbuf32Bits = NULL;
tempbuf32Bits = new float[500*500];
glReadPixels(0, 0, WIDTH, HEIGHT, GL_RED, GL_FLOAT, tempbuf32Bits);


All pixels that I read back are set to -431602080 (not the intended value).
If I called camera-attach(osg::Camera::COLOR_BUFFER0,
offscreenTexture.get(),0,0,false,0,0) it is working (without multisampling)

Note that the osg::Texture will not be multisampled because the multisample
RenderBuffers are resolved during the blit to texture.

You mean that this is no way to get multisample when using my
osg::TextureRectangle? It so, what are the alternatives? Using a osg::Image?
Ideally I need to support 32 bits floating point blending and multisampling
in my project. Do you think this is possible?

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


Re: [osg-users] problem with blending when using floating point FBO

2009-06-29 Thread Thrall, Bryan
Jonathan Richard wrote on Monday, June 29, 2009 2:19 PM:

 How did you test that setting both to 4 didn't work?
 
 This is how I tested it:
...
 // code in MyCameraDrawCallback
 glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
 float* tempbuf32Bits = NULL;
 tempbuf32Bits = new float[500*500];
 glReadPixels(0, 0, WIDTH, HEIGHT, GL_RED, GL_FLOAT, tempbuf32Bits);
 
 
 All pixels that I read back are set to -431602080 (not the intended
value).
 If I called camera-attach(osg::Camera::COLOR_BUFFER0,
 offscreenTexture.get(),0,0,false,0,0) it is working (without
multisampling)  

glReadPixels does not work with a multisample FBO (check glGetError
after your glReadPixels to see); you have to use glBlitFramebuffer to
copy the multisample FBO to a FBO without multisampling to resolve the
samples to a texture; this is what osgUtil::RenderStage does when you
attach an osg::Texture and set the samples to  1.

 Note that the osg::Texture will not be multisampled because the
multisample
 RenderBuffers are resolved during the blit to texture.
 
 You mean that this is no way to get multisample when using my
 osg::TextureRectangle? It so, what are the alternatives? Using a
osg::Image?
 Ideally I need to support 32 bits floating point blending and
multisampling
 in my project. Do you think this is possible?   

In OpenGL, AFAIK, there is no way to get a multisample texture (and
OpenGL doesn't do multisampling when it samples a texture either).

If you just want to render to multisample buffers and never need to read
back from those buffers (such as in a shader), you can do it; otherwise,
I think you are out of luck.

Wish it were different, because I'd love to have the ability to read
multisample textures too!
-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] get current accumulated transform

2009-06-29 Thread Rabbi Robinson
Hi,

How do I get current accumulated transform in a nodeupdatecallback? 
Specifically 
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)

What does NodeVisitior-apply(something) mean?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] [osgPlugins] GoogleMode

2009-06-29 Thread Adam Wise
You want capital o, O, as in: 'osgconv -O GoogleMode' to set the 
options string

It worked! But...it didn't work at the same time. Two problems arise with this 
new success.

1. The model itself loses all of it's textures, leaving it a blank white series 
of shapes.
2. Every attempt I make at submitting this new model ends in failure. Google 
gives me a Server Error:

The server encountered an error and could not complete your request.
Please try again soon.

This doesn't change when I change browsers ether. I think it may be a security 
issue, and that I should change the webpage to trusted...or something like 
that. I haven't looked into the idea past that though. I will soon. Has anyone 
encountered this problem before?

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





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


[osg-users] quaternion to euler

2009-06-29 Thread Rabbi Robinson
Hi,

The animation supports euler but not quaternion. Is there any easy way to 
convert quaternion to euler?

Thank you!

Cheers,
Rabbi

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





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


Re: [osg-users] quaternion to euler

2009-06-29 Thread Michael Bosse'
http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles


On Mon, Jun 29, 2009 at 5:47 PM, Rabbi Robinsonlonga...@gmail.com wrote:
 Hi,

 The animation supports euler but not quaternion. Is there any easy way to 
 convert quaternion to euler?

 Thank you!

 Cheers,
 Rabbi

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





 ___
 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] window position and size

2009-06-29 Thread Guy Volckaert
Hi,

I've implemented the osg::GraphicsContext::ResizedCallback to get notified when 
the user resizes the window via the mouse. That work perfectly. 

However, I also need to change the window size programatically (when the user 
presses a button, for example). I tried calling osg::GraphicsContext::resized() 
function, but that does not always work. 
 
Apart from calling ::SetWindowPos(), is there an osg call that allow the 
windows position and size to be adjusted?

Guy

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





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


Re: [osg-users] quaternion to euler

2009-06-29 Thread Gordon Tomlinson
Also I would recommend searching the OSG mailing archives this topics has
come up many times with several different solutions being offered


__
Gordon Tomlinson 

gor...@gordontomlinson.com
IM: gordon3db...@3dscenegraph.com
www.vis-sim.com www.gordontomlinson.com 

__

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Michael
Bosse'
Sent: Monday, June 29, 2009 6:17 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] quaternion to euler

http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles


On Mon, Jun 29, 2009 at 5:47 PM, Rabbi Robinsonlonga...@gmail.com wrote:
 Hi,

 The animation supports euler but not quaternion. Is there any easy way to
convert quaternion to euler?

 Thank you!

 Cheers,
 Rabbi

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





 ___
 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] Macintosh: best build practices

2009-06-29 Thread R Fritz
Since there's no 2.8.1 Mac binaries yet, I need to build from source.   
What do people recommend for build practices in the Mac OS X  
environment?


Randolph Fritz
  design machine group
  architecture department
  university of washington
rfr...@u.washington.edu

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


Re: [osg-users] a problem with computing near far

2009-06-29 Thread Ren Liwei

rpingry wrote:
 Something that I have done (please let me know if this is not a good way to 
 do it or if there is a better way), is to break up my scene into parts.  I 
 have the large distant things in one part of my scene graph, and then 
 everything else in another part.  I then render them in separate render bins, 
 assuming that the large things will be drawn behind the smaller things.  I 
 also scale down the large objects and draw them closer to the camera so they 
 still look the same size.  I know this would throw off fog calculations 
 unless you adjusted for that, but I have found in my space scenes that I can 
 draw small ships right next to planets without having near/far clipping 
 problems, Z buffer fighting, or single point precision errors.
 
 -- Rick
 


I don't quite understand by breaking scene into two parts. If it means tow 
groups in the scenegraph under the same main camera, they will be cliped by the 
same cullsettings(the same near far clip planes), the problem is still here. 
Then can we render them with different cullsettings?

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





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


Re: [osg-users] a problem with computing near far

2009-06-29 Thread rpingry
Yes, two different groups in the scenegraph under the same camera, but I
cheat the large object part by scaling it and moving it closer to the
camera, so there is no risk of clipping due to the cull settings.

On Mon, Jun 29, 2009 at 7:39 PM, Ren Liwei lw...@163.com wrote:


 rpingry wrote:
  Something that I have done (please let me know if this is not a good way
 to do it or if there is a better way), is to break up my scene into parts.
 I have the large distant things in one part of my scene graph, and then
 everything else in another part.  I then render them in separate render
 bins, assuming that the large things will be drawn behind the smaller
 things.  I also scale down the large objects and draw them closer to the
 camera so they still look the same size.  I know this would throw off fog
 calculations unless you adjusted for that, but I have found in my space
 scenes that I can draw small ships right next to planets without having
 near/far clipping problems, Z buffer fighting, or single point precision
 errors.
 
  -- Rick
 


 I don't quite understand by breaking scene into two parts. If it means tow
 groups in the scenegraph under the same main camera, they will be cliped by
 the same cullsettings(the same near far clip planes), the problem is still
 here. Then can we render them with different cullsettings?

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





 ___
 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] a problem with computing near far

2009-06-29 Thread Ren Liwei
i think i've got it. the emphasis is scalling down and moving towards camera, 
right?
but my sky sphere seems not properly to be moved, because i set its center to 
the camera pos per frame, so maybe i should scale it according to somethig like 
far plane depth
thank you

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





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


[osg-users] osgViewer::Viewer Thread Handle

2009-06-29 Thread Paul Pocock
Hi Everyone,

Just a quick one,I want to set up a flag where you can assign cpu
affinity for the cull, draw, update threads.
Is there a way I can get a handle on these threads? is there a
getDrawThread method?


Best Regards
Paul

IMPORTANT: This email remains the property of the Australian Defence 
Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 
1914.  If you have received this email in error, you are requested to contact 
the sender and delete the email.

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