Re: [osg-users] Tone mapping algorithms

2008-11-20 Thread Sukender
Hello Josselin,

I know very few about tone mapping, but I'd like to ask you something. Could 
your code allow to simulate the fact that the human eye also have a dynamic 
color range? I mean I'd like (in the future) to render a scene as usual and 
then select a color range (say luminance in [128;255] if the scene is bright) 
and strech colors so that [0;127]=0 and [128;255]=[0;255]. The idea is that 
when the scene goes darker, the darkest colors would seem to slowly appear 
brighter and brighter, as if your iris were opening (and vice-versa).

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Thu, 20 Nov 2008 01:13:39 +0100, [EMAIL PROTECTED] a écrit:

 Hi all,

 Really no one for tone mapping ?

 Ok, maybe I have to give more informations. So here is how I'm doing
 until today  (sorry the length of the mail, but there is a lot of
 informations ;-). Please, if you're interested by the subject and if
 you have any suggestion, give answer !

 - I want to set up the Reinhard's tone mapping algorithm (in
 Photographic Tone Reproduction for Digital Images, 2002). This is
 the simplest tone mapping algorithm, it gives very nice results, and
 is real-time computable.

 0. To do that, I think (tell me if I'm wrong) that the best way is to
 use OSG PPU.

 1. The first thing that we have to do is to load an hdr image, we can
 find some of them in the website of Debevec
 (http://www.debevec.org/Research/HDR/ , take picture(s) in .hdr format).
 To use this kind of image in OSG PPU, just change these lines in osgppu.cpp:
  osg::Node* loadedModel = osgDB::readNodeFiles(arguments);
  if (!loadedModel) loadedModel = createTeapot();
 with these lines (be carreful with the path of the image):
  osg::Image* image = osgDB::readImageFile(Data/Images/memorial.hdr);
  osg::Geode* loadedModel = osg::createGeodeForImage(image);

 With these new lines, we are now working with a HDR image in the HDR
 pipeline defined by Art Tevs in hdrppu.h :-)

 2. Using a glslDebugger like glslDevil, we can see that values in the
 HDR image are not in candela/m² (bug in the hdr loader ?). Anyway,
 it's not really important, we can just put a factor 1000 in the first
 shader used in the hdr pipeline (Data/glsl/luminance_fp.glsl). So
 replace this line :
 gl_FragColor.xyz = vec3( texColor0.r * 0.2125 + texColor0.g * 0.7154 +
 texColor0.b * 0.0721 );
 with this line :
 gl_FragColor.xyz = 1000.0 * vec3( texColor0.r * 0.2125 + texColor0.g *
 0.7154 + texColor0.b * 0.0721 );

 3. So now we are working with an hdr image in candela/m². With the
 first shader, we have computed a black and white image (or intensity
 image), because we have next to compute the mean of this intensity
 image. Here difficulties are beginning for me...
 The HDR Pipeline uses the InitInMipmapOut Unit, the goal is to create
 a Mipmapped Texture with the shader
 (Data/glsl/luminance_mipmap_fp.glsl).
 On the level 0, we have the input texture.
 On the level 1, we have the log of the input texture, with half
 resolution of the input texture.
 On the level 2, we have the mean of the level 1, with half resolution
 of the level 1.
 On the level 3, ...
 On the level 8, we have the mean of the input image.

 Problems I've seen are :
 - data computed in the level 1 (log-values) are lost when we want use
 them for the level 2 (we're using non log-values, we can see that with
 glslDebugger)
 - we can't pass the value of the level 8 to the next unit, so
 fLuminance value is lost.

 I've no answer to these problems, so if someone have... send me a mail ;-)

 4. To ending, we just have to compute the tone mapping algorithm in
 the shader of the hdr Unit: here is my code (sorry, comments are in
 french ;-) to put in (Data/glsl/Reinhard sale/tonemap_hdr_2_fp.glsl):
 --
 // hdr texture containing the scene
 uniform sampler2D hdrInput;

 // Luminance input
 uniform sampler2D lumInput;

 /**
   **/
 void main(void)
 {
  vec3 RGB, XYZ;
   vec4 texel;
   float at, x, y;
   // pour avoir des candela/m²
   float factor = 1000.0;

   mat3 xyz2rgb = mat3(3.240479, -1.537150, -0.498535,
-0.969256,  1.875992,  0.041556,
   0.055648, -0.204043,  1.057311);
   mat3 rgb2xyz = mat3(0.4125, 0.3576, 0.1804,
 0.2127, 0.7152, 0.0722,
 0.0193, 0.1192, 0.9502);

   // coordonnées du pixel
   vec2 inTex = gl_TexCoord[0].st;

   // get adapted, normal and scaled luminance
   // ie luminance d'adaptation
  //float fLuminance = texture2D(lumInput, inTex, 100.0).w;
  float fLuminance = 50.0;

   // texture
   texel = factor * texture2D(hdrInput,inTex);
   //texel = texture2D(hdrInput,inTex);

   // conversion en XYZ - début du tone mapping
   XYZ = rgb2xyz * texel.rgb;

   // calcul de x et y pour sauvegarder la couleur

Re: [osg-users] Texture Management BUMP

2008-11-20 Thread Sukender
Hi Kim,

Well, if you load a model with its textures, the function will simply return 
to you a pointer to an already existing model and/or texture (if cache is 
enabled). Then if all models of your scene share the same texture and/or vertex 
arrays, I guess (I'm not 100% sure though) this will do what you expect: 
texture and/or vertex array are only sent to video memory once.

Also be sure to create COPIES of the vertex arrays, matrix transforms (and 
other things) if you plan to modify them. Else you would modify the cached 
shared ressource (this happened to me! I saw all my models being transformed 
the same way at the same time...).

Anyway, caching is a good thing for performance and RAM usage if your models or 
textures are duplicated in the scene.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Thu, 20 Nov 2008 08:36:31 +0100, Kim C Bale [EMAIL PROTECTED] a écrit:

 I've been pondering this Database pager. It only caches the image files into 
 memory to prevent loading during runtime doesn't it? Those are then used to 
 build textures on the card memory.
 
 Is there anything to deal with loading textures onto the graphics card, 
 dishing out texture IDs rather than reloading the texture onto card memory?
 
 Kim.

 

 From: [EMAIL PROTECTED] on behalf of Sukender
 Sent: Wed 19/11/2008 15:53
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Texture Management



 Hi Kim,

 You may just use the osgDB::Registry cache. That's automatic :)
 For instance, set the cache by writing:
 osgDB::ReaderWriter::Options* rwoptions = new 
 osgDB::ReaderWriter::Options;
 
 rwoptions-setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL);
 osgDB::Registry::instance()-setOptions(rwoptions);

 This will cache everything loaded with readNodeFile() or readImageFile().
 For my use, I preload things in the cache by calling:
 osgDB::Registry::instance()-addEntryToObjectCache(path, 
 osgDB::readNodeFile(path));

 And I set the cache to never unload:
 osgDB::DatabasePager * pPager = viewer.getDatabasePager();
 assert(pPager);
 osgDB::Registry::instance()-setDatabasePager(pPager);
 pPager-setExpiryDelay(DBL_MAX);
 pPager-setExpiryFrames(INT_MAX);

 Also, you could clear the cache by calling:
 osgDB::Registry::instance()-clearObjectCache();

 Hope it will help.

 Sukender
 PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


 Le Wed, 19 Nov 2008 16:28:25 +0100, Kim C Bale [EMAIL PROTECTED] a écrit:

 I have a number of different models in OSG format that all use the same
 texture.



 What I want to avoid is having duplicate textures loaded onto the
 graphics card when I load these separate models. In previous programs I
 have achieved this using a Texture Manager that manages all texture
 loading i.e. loading the texture once when required and then dishing out
 the texture ID on subsequent requests. A fairly standard practice.



 Is there something similar already built into the OSG? The
 TextureAtlasBuilder in osgUtil sounds looks like it might do something
 similar but I'm not 100% sure, there is very little documentation on it.



 Thanks all.


 Kim.

 ___
 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] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Robert Osfield
Hi JS,

 Robert, what driver version are you using? Any chance

OpenGL version string: 2.1.1 NVIDIA 100.14.19
Intel Quad core, Kubuntu 7.10.


On Thu, Nov 20, 2008 at 2:40 AM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 Also, any chance this has a connection with the buffered_value thread? Seems
 Robert mentioned that there was some array that was initialized to be of the
 same size as the number of graphics contexts at startup, and was resized in
 a non-threadsafe manner if graphics contexts were added at runtime, which is
 what's happening here...

The OSG's buffer_arrays that manage the OpenGL contexts might not be
being resized correctly, and this is something to look into.  I think
it's a long shot though, as corrupted buffer_arrays would lead to
OpenGL crashes/problems rather than hangs - unless one context crashes
and the rest hang waiting for that thread to join a barrier.

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


[osg-users] Normals and setScale

2008-11-20 Thread a.lagnier
Hi,

When I call setScale() on an pat. Its normals seem to be affected. I want to 
keep normalization of normals. How can I solve this problem?
I will appreciate any hints.

Thanks you



 Créez votre adresse électronique [EMAIL PROTECTED] 
 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Normals and setScale

2008-11-20 Thread Serge Lages
Hi,

Just make a search on GL_NORMALIZE on this list and you'll get your answer.
:)

On Thu, Nov 20, 2008 at 10:00 AM, a.lagnier [EMAIL PROTECTED] wrote:

 Hi,

 When I call setScale() on an pat. Its normals seem to be affected. I want
 to keep normalization of normals. How can I solve this problem?

 I will appreciate any hints.



 Thanks you



 *Créez votre adresse http://www.laposte.net électronique
 [EMAIL PROTECTED]
 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.*

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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Dual screen support on Linux using TwinView

2008-11-20 Thread Robert Osfield
Hi Michael,

On Thu, Nov 20, 2008 at 12:09 AM, Michael [EMAIL PROTECTED] wrote:
 This fails on the second display because OSG can't connect to screen 0:1,
 because there is only 1 xscreen. Clearly I am doing this wrong, but I'm not
 sure of the correct way.

If you have only only X screen then you'll only be able to open up a
window on that one... so you'll need to use the screenNum set to 0 fro
both contexts, or

 Something like this?
 1. Create a single GraphicsContext on screen 0, with width=2048 (both
 displays)
 2. Create my views, and somehow tell each one to only render on half of the
 context?

If you a grabbing the whole of both displays I would create a single
graphics context that goes across both physical displays.  Otherwise
you'll need to create two graphics contexts on the same X11 screenNum
but with the second window starting at a xpos of 1024.

Now what to do about the views depends upon you actual needs.  Do you
have two separate logical views of doing you have  single view that is
just made up of two cameras (like looking out of two adjacent
real-world windows that share the same view).  If you have only single
view, then do the two halves of it but up against each other or do
they overlap?

Could you have a bash at explain what you are specifically trying to
achieve as the advice to give is different for all the different
cases.

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


Re: [osg-users] Normals and setScale

2008-11-20 Thread Smeenk, R.J.M. (Roland)
If your initial normals are correctly normalized you may also use 
GL_RESCALE_NORMALS. This will rescale the normals instead of the more expensive 
normalization that is done when GL_NORMALIZE is enabled.
 
--
Roland




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Serge 
Lages
Sent: donderdag 20 november 2008 10:03
To: a.lagnier; OpenSceneGraph Users
Subject: Re: [osg-users] Normals and setScale


Hi,

Just make a search on GL_NORMALIZE on this list and you'll get your 
answer. :)


On Thu, Nov 20, 2008 at 10:00 AM, a.lagnier [EMAIL PROTECTED] wrote:


Hi,

When I call setScale() on an pat. Its normals seem to be 
affected. I want to keep normalization of normals. How can I solve this problem?


I will appreciate any hints.


Thanks you



Créez votre adresse http://www.laposte.net  électronique 
[EMAIL PROTECTED]
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.

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

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






-- 
Serge Lages
http://www.tharsis-software.com


This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] setUnRefImageDataAfterApply - is there an alternative?

2008-11-20 Thread Robert Osfield
Hi J-S,

UnRefImageDataAfterApply is off by default.  But the Optimizer by
default with switch it on.  You can just call the Optimizer with the
settings you require rather than patch it afterwards back to what it
was originally...

As for an alternative, well there is one, you can't have your cake and
eat, you either get rid of the Image and lower memory consumption and
loose the ability to apply to later contexts, or you keep the Imagery
around in case you need it.

If you wanted to really dig into this topic I guess you could replace
the osg::Image by a ProxyImage class that allows the imagery to be
reloaded if its needed later.  Such a class doesn't exist right now,
and it wouldn't be entirely straight forward to implement.

Robert.

On Thu, Nov 20, 2008 at 3:53 AM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 Hi all,

 As noted in other threads, I'm currently working on an app that adds views
 at runtime. As expected, this causes the views created after the viewer has
 started running to have no textures on the models, because of the
 osg::Texture::_unrefImageDataAfterApply default setting of true.

 Now, one solution would be to turn this off globally, for example by doing

osgUtil::Optimizer::TextureVisitor tv(
true, false, false, false, false, 1.0, 0);
loadedModel-accept(tv);

 for every loaded model file. However, that will waste memory most of the
 time, since new views will only be added occasionally.

 A more efficient solution might be to reload the textures when a new view is
 ready to be rendered for the first time. However, as I understand it, an
 osg::Texture does not retain any information as to where its image data came
 from, so I don't see how I would do this.

 Has anyone thought of this, or tried to implement it? Is there already a
 mechanism for that in OSG which I'm just not aware of?

 Also, I've noticed the osg::Texture::_clientStorageHint, what does that do?

 Finally, on the subject of the osgUtil::Optimizer::TextureVisitor, it could
 have an option to change the _resizeNonPowerOfTwoHint, now that most recent
 video cards implement quite fast support for NPOT textures and some users
 might want to make use of it on existing models without modifying the models
 directly. I'll try to submit this soon.

 Thanks in advance,

 J-S
 --
 __
 Jean-Sebastien Guay[EMAIL PROTECTED]
   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

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


Re: [osg-users] Normals and setScale

2008-11-20 Thread a.lagnier

 GL_RESCALE_NORMALS is undefined in gl.h ...



 Message du 20/11/08 10:09
 De : Smeenk, R.J.M. (Roland)
 A : OpenSceneGraph Users
 Copie à :
 Objet : Re: [osg-users] Normals and setScale

 If your initial normals are correctly normalized you may  also use 
 GL_RESCALE_NORMALS. This will rescale the normals instead of the more  
 expensive normalization that is done when GL_NORMALIZE is  enabled.   -- 
 Roland
   From:[EMAIL PROTECTED][mailto:[EMAIL PROTECTED] On Behalf 
 Of SergeLages
 Sent: donderdag 20 november 2008 10:03
 To:a.lagnier; OpenSceneGraph Users
 Subject: Re: [osg-users] Normals andsetScale
 
Hi,

 Just make a search on GL_NORMALIZE on this list andyou'll get your 
 answer. :)

On Thu, Nov 20, 2008 at 10:00 AM, a.lagnier [EMAIL PROTECTED]wrote:
 Hi,

 When I call setScale() on an pat. Its normals seem to  be affected. I 
 want to keep normalization of normals. How can I solve this  problem?
 
I will appreciate any hints.

 Thanks  you



 Créez votre adresse  électronique [EMAIL PROTECTED]
 1 Go d'espace de stockage,  anti-spam et anti-virus  intégrés.

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

 


 --
 Serge Lages
 http://www.tharsis-software.com
 This e-mail and its contents are subject to the DISCLAIMER at 
 http://www.tno.nl/disclaimer/email.html 
 [ (pas de nom de fichier) (0.2 Ko) ]

 Créez votre adresse électronique [EMAIL PROTECTED] 
 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texture Management BUMP

2008-11-20 Thread Robert Osfield
Hi Kim,

On Thu, Nov 20, 2008 at 7:36 AM, Kim C Bale [EMAIL PROTECTED] wrote:
 I've been pondering this Database pager. It only caches the image files into 
 memory to prevent loading during runtime doesn't it? Those are then used to 
 build textures on the card memory.

The DatabasePager doesn't cache any imagery or nodes itself.

The Registry has a cache that you can enable but it's off by default.

There is also now (in SVN/2.7.x) an osgDB::FileCache class that wraps
up a file cache.


 Is there anything to deal with loading textures onto the graphics card, 
 dishing out texture IDs rather than reloading the texture onto card memory?

You can't just directly down data to the GPU, you have to load from
disk into main memory then have the OSG download this imagery to the
textures to OpenGL.  This is all done for you, the OSG will handle
texture object ruse and us texture subloading to keep everything
efficient.

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


Re: [osg-users] Normals and setScale

2008-11-20 Thread Smeenk, R.J.M. (Roland)
osg/Transform defines it if not available
#ifndef GL_RESCALE_NORMAL
#define GL_RESCALE_NORMAL 0x803A
#endif
--
Roland




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of a.lagnier
Sent: donderdag 20 november 2008 10:18
To: OpenSceneGraph Users
Subject: Re: [osg-users] Normals and setScale






GL_RESCALE_NORMALS is undefined in gl.h ...





 Message du 20/11/08 10:09
 De : Smeenk, R.J.M. (Roland) 
 A : OpenSceneGraph Users 
 Copie à : 
 Objet : Re: [osg-users] Normals and setScale

 

If your initial normals are correctly normalized you may also 
use GL_RESCALE_NORMALS. This will rescale the normals instead of the more 
expensive normalization that is done when GL_NORMALIZE is enabled.

 

--

Roland


 




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
Behalf Of Serge Lages
 Sent: donderdag 20 november 2008 10:03
 To: a.lagnier; OpenSceneGraph Users
 Subject: Re: [osg-users] Normals and setScale
 
 



Hi,
 
 Just make a search on GL_NORMALIZE on this list and 
you'll get your answer. :)
 
 

On Thu, Nov 20, 2008 at 10:00 AM, a.lagnier [EMAIL 
PROTECTED] wrote:
 

Hi,
 
 When I call setScale() on an pat. Its normals 
seem to be affected. I want to keep normalization of normals. How can I solve 
this problem?
 

I will appreciate any hints.

 
 Thanks you
 
 
 
 Créez votre adresse http://www.laposte.net  
électronique [EMAIL PROTECTED]
 1 Go d'espace de stockage, anti-spam et 
anti-virus intégrés.
 
 
___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 




 

 -- 
 Serge Lages
 http://www.tharsis-software.com
 

This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html 

 [ (pas de nom de fichier) (0.2 Ko) ]



Créez votre adresse http://www.laposte.net  électronique [EMAIL 
PROTECTED]
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.


This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/disclaimer/email.html
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GTK guru's please help!

2008-11-20 Thread Robert Osfield
Hi Jason and Jeremy,

I've tried switching the order of the gtk_disable_setlocale(); and
gtk_init(NULL, NULL); but it just hangs on gtk_init instead of
gtk_disable_setlocale().

All my GTK calls and use of gecko is all done from a single back
ground thread - this hasn't changed since moving the code from
osgbrowser to the plugin.

I will try out calling the gtk_init() from the main osgbrowser.

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


Re: [osg-users] GTK guru's please help!

2008-11-20 Thread Robert Osfield
HI All,

On Thu, Nov 20, 2008 at 9:42 AM, Robert Osfield
[EMAIL PROTECTED] wrote:
 I will try out calling the gtk_init() from the main osgbrowser.

This didn't work either, I still get the background thread hitting a
pthread mutex deep inside gtk on my first call to gtk from the
background thread.

Next I'm going to move all the GTK calls into osgWidget and see if a
conventional library rather than a plugin will be able to work
properly with gtk...

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


Re: [osg-users] Texture Management BUMP

2008-11-20 Thread Kim C Bale
Hi Sekunder,

I've been digging around in the osgDB code and I'm pretty sure that the osgDB 
cache only stores the osg::Image file in memory rather than the osg::Texture. I 
noted that glBindTexture is only called within osg::Texture so that is where 
the texture is loaded onto the card. At the moment all I've set the cache to 
store are images, as model caching isn't needed. But I don't think the osgDB 
parses cached models for duplicate osg::Textures only duplicate osg::Images.

Perhaps Robert could confirm?



Kim.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sukender
Sent: 20 November 2008 08:54
To: OpenSceneGraph Users
Subject: Re: [osg-users] Texture Management BUMP

Hi Kim,

Well, if you load a model with its textures, the function will simply return 
to you a pointer to an already existing model and/or texture (if cache is 
enabled). Then if all models of your scene share the same texture and/or vertex 
arrays, I guess (I'm not 100% sure though) this will do what you expect: 
texture and/or vertex array are only sent to video memory once.

Also be sure to create COPIES of the vertex arrays, matrix transforms (and 
other things) if you plan to modify them. Else you would modify the cached 
shared ressource (this happened to me! I saw all my models being transformed 
the same way at the same time...).

Anyway, caching is a good thing for performance and RAM usage if your models or 
textures are duplicated in the scene.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Thu, 20 Nov 2008 08:36:31 +0100, Kim C Bale [EMAIL PROTECTED] a écrit:

 I've been pondering this Database pager. It only caches the image files into 
 memory to prevent loading during runtime doesn't it? Those are then used to 
 build textures on the card memory.
 
 Is there anything to deal with loading textures onto the graphics card, 
 dishing out texture IDs rather than reloading the texture onto card memory?
 
 Kim.

 

 From: [EMAIL PROTECTED] on behalf of Sukender
 Sent: Wed 19/11/2008 15:53
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Texture Management



 Hi Kim,

 You may just use the osgDB::Registry cache. That's automatic :)
 For instance, set the cache by writing:
 osgDB::ReaderWriter::Options* rwoptions = new 
 osgDB::ReaderWriter::Options;
 
 rwoptions-setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL);
 osgDB::Registry::instance()-setOptions(rwoptions);

 This will cache everything loaded with readNodeFile() or readImageFile().
 For my use, I preload things in the cache by calling:
 osgDB::Registry::instance()-addEntryToObjectCache(path, 
 osgDB::readNodeFile(path));

 And I set the cache to never unload:
 osgDB::DatabasePager * pPager = viewer.getDatabasePager();
 assert(pPager);
 osgDB::Registry::instance()-setDatabasePager(pPager);
 pPager-setExpiryDelay(DBL_MAX);
 pPager-setExpiryFrames(INT_MAX);

 Also, you could clear the cache by calling:
 osgDB::Registry::instance()-clearObjectCache();

 Hope it will help.

 Sukender
 PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


 Le Wed, 19 Nov 2008 16:28:25 +0100, Kim C Bale [EMAIL PROTECTED] a écrit:

 I have a number of different models in OSG format that all use the same
 texture.



 What I want to avoid is having duplicate textures loaded onto the
 graphics card when I load these separate models. In previous programs I
 have achieved this using a Texture Manager that manages all texture
 loading i.e. loading the texture once when required and then dishing out
 the texture ID on subsequent requests. A fairly standard practice.



 Is there something similar already built into the OSG? The
 TextureAtlasBuilder in osgUtil sounds looks like it might do something
 similar but I'm not 100% sure, there is very little documentation on it.



 Thanks all.


 Kim.

 ___
 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*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texture Management BUMP

2008-11-20 Thread Kim C Bale
Cheers for clearing that up. 


Kim.



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: 20 November 2008 09:18
To: OpenSceneGraph Users
Subject: Re: [osg-users] Texture Management BUMP

Hi Kim,

On Thu, Nov 20, 2008 at 7:36 AM, Kim C Bale [EMAIL PROTECTED] wrote:
 I've been pondering this Database pager. It only caches the image
files into memory to prevent loading during runtime doesn't it? Those
are then used to build textures on the card memory.

The DatabasePager doesn't cache any imagery or nodes itself.

The Registry has a cache that you can enable but it's off by default.

There is also now (in SVN/2.7.x) an osgDB::FileCache class that wraps
up a file cache.


 Is there anything to deal with loading textures onto the graphics
card, dishing out texture IDs rather than reloading the texture onto
card memory?

You can't just directly down data to the GPU, you have to load from
disk into main memory then have the OSG download this imagery to the
textures to OpenGL.  This is all done for you, the OSG will handle
texture object ruse and us texture subloading to keep everything
efficient.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g*
To view the terms under which this email is distributed, please go to 
http://www.hull.ac.uk/legal/email_disclaimer.html
*___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] StateSetSwitchNode suggestion.

2008-11-20 Thread Viggo Løvli

Hi Robert,
 
 By default I would expect it to traverse all children. One variation I 
 considered was to have a NodeMask + StateSet per Child, with this 
 combination you'd be able to select different combinations for different 
 traversal masks. 
If I set up the LayerNode to have one child for each StateSet I want to switch 
between, and give each of those children their own node mask. Then I can set up 
the cull-mask of my cameras so that they chose the correct StateSet. This will 
work fine.
The LayerNode will be more flexible than the StateSetSwitchNode, but I think it 
will be a bit slower.
 
Let's examine traverse performance of the LayerNode and the 
StateSetSwitchNode.In this example we assume that we want to switch between 5 
different state-sets.I am now only looking at the usage method that the 
StateSetSwitchNode supports.
 
LayerNode:Cull-traverse will first run the accept function of the 
LayerNode. It will then call traverse and call accept for each of the 5 
children of the LayerNode. One of the 5 children will pass the mask check and 
call its traverse function.
 
LayerNode will be slower the more StateSet's you want to switch between.
 
Any traverse with node mask 0x will traverse each of the 5 children, 
and their children
In my case, they share the same children, which can be a whole world.
StateSetSwitchNode:=Cull-traverse will call the accept 
function of the StateSetSwitchNode. This function is modified and has one extra 
bitvise and operation, and one extra array lookup. It then call the traverse 
function of the node-pointer it read from the array.That sounds like almost 5 
times faster than the LayerNode.
 
StateSetSwitchNode will not run slower if we add more StateSet's to switch 
between.
 
Any traverse with node mask 0x will traverse only one of the nodes in 
the array and that node's children. All nodes in the array share the same 
children, and in this solution they get traversed one time instead of 5.
 
I feel that I need to state that the StateSetSwitchNode comes with a rule-set:  
 - Only one of the state-sets shall be traversed during any traversal.   - They 
shall all point to the same sub-tree (always).These rules are neccessary in 
order to make the cull-traverse as fast as possible.
 
My conclusion after this e-mail is still that I want to implement the 
StateSetSwitchNode as an addition to the SwitchNode and a future version of the 
LayerNode.It would be very beneficial for me to integrate it to OSG and support 
it in the .ive and .osg file formats.I would be happy to contribute a good 
example of usage and the OSG implementation if you give a green light to OSG 
integration.
Viggo
_
Hold kontakten med Windows Live Messenger.
http://clk.atdmt.com/GBL/go/msnnkdre001003gbl/direct/01/___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] StateSetSwitchNode suggestion.

2008-11-20 Thread Robert Osfield
Hi Viggo,

The most general approach is the best, and the performance differences
will almost certainly be negligible between your suggest
SwitchStateSetNode and my suggest Layer node with nodemask.  Feel free
to implement both and test them against each other w.r.t cull
traversal time and overall framerate.

Robert.

On Thu, Nov 20, 2008 at 10:17 AM, Viggo Løvli [EMAIL PROTECTED] wrote:
 Hi Robert,

 By default I would expect it to traverse all children. One variation
 I considered was to have a NodeMask + StateSet per Child, with this
 combination you'd be able to select different combinations for
 different traversal masks.


 If I set up the LayerNode to have one child for each StateSet I want to
 switch between, and give each of those children their own node mask. Then I
 can set up the cull-mask of my cameras so that they chose the correct
 StateSet. This will work fine.
 The LayerNode will be more flexible than the StateSetSwitchNode, but I think
 it will be a bit slower.


 Let's examine traverse performance of the LayerNode and the
 StateSetSwitchNode.
 In this example we assume that we want to switch between 5 different
 state-sets.
 I am now only looking at the usage method that the StateSetSwitchNode
 supports.

 LayerNode:
 
 Cull-traverse will first run the accept function of the LayerNode. It will
 then call traverse and call accept for each of the 5 children of the
 LayerNode. One of the 5 children will pass the mask check and call its
 traverse function.

 LayerNode will be slower the more StateSet's you want to switch between.

 Any traverse with node mask 0x will traverse each of the 5 children,
 and their children
 In my case, they share the same children, which can be a whole world.

 StateSetSwitchNode:
 =
 Cull-traverse will call the accept function of the StateSetSwitchNode. This
 function is modified and has one extra bitvise and operation, and one extra
 array lookup. It then call the traverse function of the node-pointer it read
 from the array.
 That sounds like almost 5 times faster than the LayerNode.

 StateSetSwitchNode will not run slower if we add more StateSet's to switch
 between.

 Any traverse with node mask 0x will traverse only one of the nodes
 in the array and that node's children. All nodes in the array share the same
 children, and in this solution they get traversed one time instead of 5.


 I feel that I need to state that the StateSetSwitchNode comes with a
 rule-set:
- Only one of the state-sets shall be traversed during any traversal.
- They shall all point to the same sub-tree (always).
 These rules are neccessary in order to make the cull-traverse as fast as
 possible.


 My conclusion after this e-mail is still that I want to implement the
 StateSetSwitchNode as an addition to the SwitchNode and a future version of
 the LayerNode.
 It would be very beneficial for me to integrate it to OSG and support it in
 the .ive and .osg file formats.
 I would be happy to contribute a good example of usage and the OSG
 implementation if you give a green light to OSG integration.

 Viggo


 
 Få Hotmail du også. Windows Live Hotmail med 5000 MB gratis lagringsplass.
 ___
 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] GTK guru's please help!

2008-11-20 Thread Robert Osfield
Hi All,

On Thu, Nov 20, 2008 at 9:53 AM, Robert Osfield
[EMAIL PROTECTED] wrote:
 Next I'm going to move all the GTK calls into osgWidget and see if a
 conventional library rather than a plugin will be able to work
 properly with gtk...

This didn't work either.  So I tried a different tack, I moved the
init of the browser manager to the first time that a browser is
requested rather than in the ReaderWriterUBrowser constructor.  This
little change fixed the problems with gtk initializing and the browser
now comes up in the OSG window just fine.  ;-)

I can only imagine that UBrowser/GTK/LibXUL/xul-runner has some
globals that automatically construct themselves and the order of their
automatic construction was such that that my init code in my
constructor introduced an order of initialization that wasn't safe.
Lots of arm waving here... as very little actually changed code wise,
it was just a timing change for the init...

Now things are working with the new gecko plugin I'll check it in, and
others can test it out.

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


Re: [osg-users] GTK guru's please help!

2008-11-20 Thread Robert Osfield
On Thu, Nov 20, 2008 at 11:06 AM, Robert Osfield
[EMAIL PROTECTED] wrote:
 Now things are working with the new gecko plugin I'll check it in, and
 others can test it out.

The new plugin that wraps up the gecko based browser implementation is
now checked into svn.  The osgWidget::Browser API still very
crude/experimental, as is the plugin, but it's a good first step
towards make the embedded browser functionality available to all OSG
apps.

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


[osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread lucas Grijander

Hi everybody!!

in my lab they want to re-use an old system composed by a Cyviz Stereo 3D 
Converter (xpo.2). It basically consists on a splitter which needs a 
frame-sequencial stereo source, and the output is two videos for two projectors 
(so passive stereo using polarized projectors  glasses). I am quite new with 
this 3D stuff... I think I should use OSG_STEREO_MODE with the QUAD_BUFFER  
option. My question is more about the graphics card required for that, do we 
need any special card for that? I have a laptop with a NVIDIA geforce 8700GT, 
do you think it is possible to use it like that?

many thanks in advance!

regards,

Jaime.

_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Robert Osfield
Hi Jaime,

The way I would do passive stereo with two projectors is to attach the
projectors directly to the two outputs from the graphics card, and
then use horizontal split stereo to drive them.  The OSG supports this
set up out of the box.  Using this setup will avoid any need to use
quad buffer stereo and the limits on hardware/drivers that it
imposses, and it also the best way to drive such a system
quality/performance wise.

Robert.

On Thu, Nov 20, 2008 at 12:55 PM, lucas Grijander
[EMAIL PROTECTED] wrote:
 Hi everybody!!

 in my lab they want to re-use an old system composed by a Cyviz Stereo 3D
 Converter (xpo.2). It basically consists on a splitter which needs a
 frame-sequencial stereo source, and the output is two videos for two
 projectors (so passive stereo using polarized projectors  glasses). I am
 quite new with this 3D stuff... I think I should use OSG_STEREO_MODE with
 the QUAD_BUFFER  option. My question is more about the graphics card
 required for that, do we need any special card for that? I have a laptop
 with a NVIDIA geforce 8700GT, do you think it is possible to use it like
 that?

 many thanks in advance!

 regards,

 Jaime.

 
 Discover the new Windows Vista Learn more!
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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


Re: [osg-users] osg_gen

2008-11-20 Thread Adaya Lorenzo
Hi. Could anybody tell me which folder must pointed osg_gen dependence??

2008/11/16 Robert Osfield [EMAIL PROTECTED]

 HI Adaya,

 Do you do an out of source build on the OSG?  Have you installed the
 OSG?  How did you tell VPB about the placement of the OSG?  In theory
 it should pick up on the include directories automatically, but
 perhaps you usage combination has not been handled by the
 VirtualPlanetBuilder/CMakeModules/FindOSG.cmake script.

 Robert.

 On Sun, Nov 16, 2008 at 1:53 PM, Adaya Lorenzo
 [EMAIL PROTECTED] wrote:
  Hello. I have tried to compile Virtual Planet Builder v0.9.9 using OSG
 2.7.4
  and I have a dependence 'osg_gen' but I do not find it in any place.
  Specifically when I use cmake with vpb, it searches osg_gen_include_dir
 but
  I do not find the file.
 
  Thanks for answering
  --
  Adaya Lorenzo
 
  ___
  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




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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread lucas Grijander

Hi Robert,

the problem is that the video card I have has only one DVI output and an 
S-Video output, so I think they cannot work as two different outputs.

Jaime.


 Date: Thu, 20 Nov 2008 13:02:28 +
 From: [EMAIL PROTECTED]
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] question about passive 3D stereo using polarized 
 projectors and openscenegraph
 
 Hi Jaime,
 
 The way I would do passive stereo with two projectors is to attach the
 projectors directly to the two outputs from the graphics card, and
 then use horizontal split stereo to drive them.  The OSG supports this
 set up out of the box.  Using this setup will avoid any need to use
 quad buffer stereo and the limits on hardware/drivers that it
 imposses, and it also the best way to drive such a system
 quality/performance wise.
 
 Robert.
 
 On Thu, Nov 20, 2008 at 12:55 PM, lucas Grijander
 [EMAIL PROTECTED] wrote:
  Hi everybody!!
 
  in my lab they want to re-use an old system composed by a Cyviz Stereo 3D
  Converter (xpo.2). It basically consists on a splitter which needs a
  frame-sequencial stereo source, and the output is two videos for two
  projectors (so passive stereo using polarized projectors  glasses). I am
  quite new with this 3D stuff... I think I should use OSG_STEREO_MODE with
  the QUAD_BUFFER  option. My question is more about the graphics card
  required for that, do we need any special card for that? I have a laptop
  with a NVIDIA geforce 8700GT, do you think it is possible to use it like
  that?
 
  many thanks in advance!
 
  regards,
 
  Jaime.
 
  
  Discover the new Windows Vista Learn more!
  ___
  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

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Jean-Sébastien Guay

Hi all,

Thanks for testing again. I've had a few other reports for Linux and 
Windows, some can repro others can't, so I'm trying to get hardware 
details and driver versions to see if it could be dependent of these 
factors. Thanks for providing them.


Robert suggested off-list that I post these stack traces, so here they 
are. The first one in particular (jeckle) seems to show the same 
problem I have been investigating.


Thanks to Don Leich for testing on a few different machines (hardware, 
driver versions). I hope this info will be useful.


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
jeckle
Linux  2.6.5-7.97-smp  x86_64 GNU/Linux

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro FX 1100/AGP/SSE2
OpenGL version string: 1.5.2 NVIDIA 66.29

Added a view with 'a' and followed it each time with 'm' to change the 
threading model.
The test hangs after 4th addView on the 'm' to change back to SingleThreaded.  

Traces cut-and-pasted from totalview...

1.1 (182952639424) T  in pthread_cond_wait
1.10  (1092614496) T  in pthread_cond_wait
1.11  (1094711648) T  in pthread_cond_wait
1.12  (1096808800) T  in pthread_cond_wait
1.13  (1098905952) T  in pthread_cond_wait
1.14  (1101003104) T  in pthread_cond_wait
1.15  (1103100256) T  in pthread_cond_wait


pthread_cond_wait, FP=7fbfffd5a0
pthread_cond_wait, FP=7fbfffd5b0
OpenThreads::Condition::wait,  FP=7fbfffd610
OpenThreads::BlockCount::block, FP=7fbfffd660
osgViewer::ViewerBase::renderingTraversals, FP=7fbfffd870
osgViewer::ViewerBase::frame,  FP=7fbfffd8a0
osgViewer::ViewerBase::run,FP=7fbfffd8d0
osgViewer::CompositeViewer::run, FP=7fbfffd920
main,  FP=7fbfffdc60
__libc_start_main, FP=7fbfffdd30
_start,FP=7fbfffdd40


pthread_cond_wait,   FP=411ff5b0
pthread_cond_wait,   FP=411ff5c0
OpenThreads::Barrier::block, FP=411ff610
osg::BarrierOperation::operator (), FP=411ff630
osg::OperationThread::run,   FP=411ff6e0
...reads::ThreadPrivateActions::StartThread, FP=411ff7b0
start_thread,FP=411ff870

pthread_cond_wait,   FP=413ff5b0
pthread_cond_wait,   FP=413ff5c0
OpenThreads::Barrier::block, FP=413ff610
osg::BarrierOperation::operator (), FP=413ff630
osg::OperationThread::run,   FP=413ff6e0
...reads::ThreadPrivateActions::StartThread, FP=413ff7b0
start_thread,FP=413ff870


pthread_cond_wait,   FP=415ff5b0
pthread_cond_wait,   FP=415ff5c0
OpenThreads::Barrier::block, FP=415ff610
osg::BarrierOperation::operator (), FP=415ff630
osg::OperationThread::run,   FP=415ff6e0
...reads::ThreadPrivateActions::StartThread, FP=415ff7b0
start_thread,FP=415ff870


pthread_cond_wait,   FP=417ff580
pthread_cond_wait,   FP=417ff590
OpenThreads::Barrier::block, FP=417ff5e0
osg::BarrierOperation::operator (), FP=417ff600
osg::OperationThread::run,   FP=417ff6b0
osg::GraphicsThread::run,FP=417ff6e0
...reads::ThreadPrivateActions::StartThread, FP=417ff7b0
start_thread,FP=417ff870


pthread_cond_wait,   FP=419ff1c0
pthread_cond_wait,   FP=419ff1d0
OpenThreads::Condition::wait,FP=419ff230
OpenThreads::Block::block,   FP=419ff280
...wer::Renderer::TheadSafeQueue::takeFront, FP=419ff2e0
osgViewer::Renderer::draw,   FP=419ff460
osgViewer::Renderer::operator (), FP=419ff480
osg::GraphicsContext::runOperations, FP=419ff5a0
osg::RunOperations::operator (), FP=419ff5c0
osg::GraphicsOperation::operator (), FP=419ff600
osg::OperationThread::run,   FP=419ff6b0
osg::GraphicsThread::run,FP=419ff6e0
...reads::ThreadPrivateActions::StartThread, FP=419ff7b0
start_thread,FP=419ff870


pthread_cond_wait,   FP=41bff1c0
pthread_cond_wait,   FP=41bff1d0
OpenThreads::Condition::wait,FP=41bff230
OpenThreads::Block::block,   FP=41bff280
...wer::Renderer::TheadSafeQueue::takeFront, FP=41bff2e0
osgViewer::Renderer::draw,   FP=41bff460
osgViewer::Renderer::operator (), FP=41bff480
osg::GraphicsContext::runOperations, FP=41bff5a0
osg::RunOperations::operator (), FP=41bff5c0
osg::GraphicsOperation::operator (), FP=41bff600
osg::OperationThread::run,   FP=41bff6b0
osg::GraphicsThread::run,FP=41bff6e0
...reads::ThreadPrivateActions::StartThread, FP=41bff7b0
start_thread,FP=41bff870


cartman
Linux  2.6.9-5.ELsmp i686 i386 GNU/Linux

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro FX 3450/4000 SDI/PCI/SSE2
OpenGL version string: 2.0.0 NVIDIA 76.76


Alternating 'a' and 'm' we hang after maybe a dozen views are added.  

Re: [osg-users] osg_gen

2008-11-20 Thread Robert Osfield
Hi Adaya,

On Thu, Nov 20, 2008 at 1:10 PM, Adaya Lorenzo
[EMAIL PROTECTED] wrote:
 Hi. Could anybody tell me which folder must pointed osg_gen dependence??

There isn't a osg_gen in VIRTUAL_PLANET_BUILDER.  Do you mean
OSG_GEN_INCLUDE_DIR?

This is the path the include/osg/Config file that is automatically
generated.  If you do an out of source build then this generated file
will be in its own include/osg/Config directory, until you install it.

For simplicity just do in source builds, or just install the OSG. i.e.

cd OpenSceneGraph
./configure
make
sudo make install
cd ../

cd VirtualPlanetBuilder
./configure
make
sudo make install

That is all that should be required.

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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Robert Osfield
Hi Lucas,

On Thu, Nov 20, 2008 at 1:55 PM, lucas Grijander
[EMAIL PROTECTED] wrote:
 hehe, it's not an old card!  it's a new laptop Dell XPS M1730 with a nvidia
 Geforce 8700 GT, I think it's normal that there is no two outputs... isn't
 it?

Stereo and laptops aren't something that normally go together...

If you are lucky the drivers will support quad buffer stereo, but
there is good chance that they won't.  Without this I'm out of ideas.

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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread lucas Grijander

only one projector? but how do you create the 3D effect?

Jaime.


Date: Thu, 20 Nov 2008 14:59:37 +0100
From: [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] question about passive 3D stereo using polarized   
projectors and openscenegraph

Can't you use OSG to render stereo pictures on the same output and use only one 
projector ?  Osg_stereo example works like that if I remember well. I don't 
think two projector are needed.

Vincent.


2008/11/20 lucas Grijander [EMAIL PROTECTED]






hehe, it's not an old card!  it's a new laptop Dell XPS M1730 with a nvidia 
Geforce 8700 GT, I think it's normal that there is no two outputs... isn't it?

Jaime.



 Date: Thu, 20 Nov 2008 13:43:42 +

 From: [EMAIL PROTECTED]
 To: osg-users@lists.openscenegraph.org

 Subject: Re: [osg-users] question about passive 3D stereo using polarized 
 projectors and openscenegraph
 
 Hi Lucas,
 
 On Thu, Nov 20, 2008 at 1:17 PM, lucas Grijander

 [EMAIL PROTECTED] wrote:
  the problem is that the video card I have has only one DVI output and an
  S-Video output, so I think they cannot work as two different outputs.

 
 Wow.  What card is it?
 
 You could try the using quad buffer stereo.  Or just rip out the card
 and stick in a standard modern card that will have two DVI output on
 it, it'll only cost a couple hundred dollars to get a decent new card.

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

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

Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy! Try it!


___

osg-users mailing list

osg-users@lists.openscenegraph.org

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




_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Jean-Sébastien Guay

Hi Robert,


OpenGL version string: 2.1.1 NVIDIA 100.14.19
Intel Quad core, Kubuntu 7.10.


Hmmm, seems older than what JP and Csaba reported? Or am I reading the 
numbers wrong?



The OSG's buffer_arrays that manage the OpenGL contexts might not be
being resized correctly, and this is something to look into.  I think
it's a long shot though, as corrupted buffer_arrays would lead to
OpenGL crashes/problems rather than hangs - unless one context crashes
and the rest hang waiting for that thread to join a barrier.


Is this join a barrier done during makeCurrent?

It's really a shame that you can't repro this issue... It would be so 
much simpler, I'm just not that familiar with this stuff...


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Vincent Bourdier
2008/11/20 lucas Grijander [EMAIL PROTECTED]

  only one projector? but how do you create the 3D effect?

 Jaime.


With the filtered glasses.

The passive stereo effect is just that : 2 picture with 2 colored components
(red and blue basically) projeted on a wall/screen with the interval between
the pictures equal to the distance between the eye (~6cm). The filtered
glasses give each eye a different picture, and the brain have the 3D
illusion,

The active stereo need 2 synchronized projectors and synchronized glasses to
have the 3D effect. This needs special equipment.

Vincent




 --
 Date: Thu, 20 Nov 2008 14:59:37 +0100
 From: [EMAIL PROTECTED]

 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] question about passive 3D stereo using polarized
 projectors and openscenegraph

 Can't you use OSG to render stereo pictures on the same output and use only
 one projector ?  Osg_stereo example works like that if I remember well. I
 don't think two projector are needed.

 Vincent.

 2008/11/20 lucas Grijander [EMAIL PROTECTED]

  hehe, it's not an old card!  it's a new laptop Dell XPS M1730 with a
 nvidia Geforce 8700 GT, I think it's normal that there is no two outputs...
 isn't it?

 Jaime.



  Date: Thu, 20 Nov 2008 13:43:42 +
  From: [EMAIL PROTECTED]
  To: osg-users@lists.openscenegraph.org
  Subject: Re: [osg-users] question about passive 3D stereo using polarized
 projectors and openscenegraph
 
  Hi Lucas,
 
  On Thu, Nov 20, 2008 at 1:17 PM, lucas Grijander
  [EMAIL PROTECTED] wrote:
   the problem is that the video card I have has only one DVI output and
 an
   S-Video output, so I think they cannot work as two different outputs.
 
  Wow. What card is it?
 
  You could try the using quad buffer stereo. Or just rip out the card
  and stick in a standard modern card that will have two DVI output on
  it, it'll only cost a couple hundred dollars to get a decent new card.
 
  Robert.
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

 --
 Invite your mail contacts to join your friends list with Windows Live
 Spaces. It's easy! Try 
 it!http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us

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



 --
 Discover the new Windows Vista Learn 
 more!http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

 ___
 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] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread lucas Grijander

you are right, but I have polarized glasses that go together with the polarized 
lenses of the projectors. I think we can have much better quality like that.

Jaime.

Date: Thu, 20 Nov 2008 15:12:13 +0100
From: [EMAIL PROTECTED]
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] question about passive 3D stereo using polarized   
projectors and openscenegraph



2008/11/20 lucas Grijander [EMAIL PROTECTED]






only one projector? but how do you create the 3D effect?

Jaime.

With the filtered glasses.



The passive stereo effect is just that : 2 picture with 2 colored
components (red and blue basically) projeted on a wall/screen with the
interval between the pictures equal to the distance between the eye
(~6cm). The filtered glasses give each eye a different picture, and the
brain have the 3D illusion, 


The active stereo need 2 synchronized projectors and synchronized glasses to 
have the 3D effect. This needs special equipment.



Vincent
 


Date: Thu, 20 Nov 2008 14:59:37 +0100
From: [EMAIL PROTECTED]

To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] question about passive 3D stereo using polarized   
projectors and openscenegraph


Can't you use OSG to render stereo pictures on the same output and use only one 
projector ?  Osg_stereo example works like that if I remember well. I don't 
think two projector are needed.

Vincent.



2008/11/20 lucas Grijander [EMAIL PROTECTED]






hehe, it's not an old card!  it's a new laptop Dell XPS M1730 with a nvidia 
Geforce 8700 GT, I think it's normal that there is no two outputs... isn't it?

Jaime.



 Date: Thu, 20 Nov 2008 13:43:42 +


 From: [EMAIL PROTECTED]
 To: osg-users@lists.openscenegraph.org


 Subject: Re: [osg-users] question about passive 3D stereo using polarized 
 projectors and openscenegraph
 
 Hi Lucas,
 
 On Thu, Nov 20, 2008 at 1:17 PM, lucas Grijander


 [EMAIL PROTECTED] wrote:
  the problem is that the video card I have has only one DVI output and an
  S-Video output, so I think they cannot work as two different outputs.


 
 Wow.  What card is it?
 
 You could try the using quad buffer stereo.  Or just rip out the card
 and stick in a standard modern card that will have two DVI output on
 it, it'll only cost a couple hundred dollars to get a decent new card.


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


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

Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy! Try it!



___

osg-users mailing list

osg-users@lists.openscenegraph.org

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




Discover the new Windows Vista Learn more!


___

osg-users mailing list

osg-users@lists.openscenegraph.org

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




_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Paul Melis

lucas Grijander wrote:
you are right, but I have polarized glasses that go together with the 
polarized lenses of the projectors. I think we can have much better 
quality like that.
You might be surprised. Depending on the polarization type and filter 
quality there can be a lot of ghosting in the images. You also need a 
good alignment on your projectors.
But polarized glasses are a lot more convenient to wear than those 
bloody shutter glasses.


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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Paul Melis

lucas Grijander wrote:

Hi everybody!!

in my lab they want to re-use an old system composed by a Cyviz Stereo 
3D Converter (xpo.2). 
I just checked the manufacturer's page: those things are still sold at a 
whopping 10,000 pounds. Better put them to use ;)


Paul
It basically consists on a splitter which needs a frame-sequencial 
stereo source, and the output is two videos for two projectors (so 
passive stereo using polarized projectors  glasses). I am quite new 
with this 3D stuff... I think I should use OSG_STEREO_MODE with the 
QUAD_BUFFER  option. My question is more about the graphics card 
required for that, do we need any special card for that? I have a 
laptop with a NVIDIA geforce 8700GT, do you think it is possible to 
use it like that?


many thanks in advance!

regards,

Jaime.


Discover the new Windows Vista Learn more! 
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE



___
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] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Vincent Bourdier
2008/11/20 Paul Melis [EMAIL PROTECTED]

 lucas Grijander wrote:

 you are right, but I have polarized glasses that go together with the
 polarized lenses of the projectors. I think we can have much better quality
 like that.

 You might be surprised. Depending on the polarization type and filter
 quality there can be a lot of ghosting in the images. You also need a good
 alignment on your projectors.


Of course, the calibration and the settings of the material will be a little
complicated at the beginning. But With this material, active stereo is
possible, and this will render very well.
Without 2 graphic output on your graphic card, I would be very difficult to
set an active stereo I think... maybe with special synchronisation to allow
the projectors to get the output each one after the other ? I don't know...

By the way, this seems to be good material, have fun :-)

But polarized glasses are a lot more convenient to wear than those bloody
 shutter glasses.


:D

Vincent.




 Paul

 ___
 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] setUnRefImageDataAfterApply - is there an alternative?

2008-11-20 Thread Jean-Sébastien Guay

Hi Robert,


UnRefImageDataAfterApply is off by default.  But the Optimizer by
default with switch it on.  You can just call the Optimizer with the
settings you require rather than patch it afterwards back to what it
was originally...


Hmm, interesting, I can't spot any place in our framework where we call 
the Optimizer on a loaded model, yet the unref setting is clearly on. 
I'll dig around more.



If you wanted to really dig into this topic I guess you could replace
the osg::Image by a ProxyImage class that allows the imagery to be
reloaded if its needed later.  Such a class doesn't exist right now,
and it wouldn't be entirely straight forward to implement.


Yep, that's what I had in mind. I'll put that on my to-do list... Do 
those things ever get shorter? :-)


Thanks for the insight.

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread lucas Grijander

hehe, it's not an old card!  it's a new laptop Dell XPS M1730 with a nvidia 
Geforce 8700 GT, I think it's normal that there is no two outputs... isn't it?

Jaime.



 Date: Thu, 20 Nov 2008 13:43:42 +
 From: [EMAIL PROTECTED]
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] question about passive 3D stereo using polarized 
 projectors and openscenegraph
 
 Hi Lucas,
 
 On Thu, Nov 20, 2008 at 1:17 PM, lucas Grijander
 [EMAIL PROTECTED] wrote:
  the problem is that the video card I have has only one DVI output and an
  S-Video output, so I think they cannot work as two different outputs.
 
 Wow.  What card is it?
 
 You could try the using quad buffer stereo.  Or just rip out the card
 and stick in a standard modern card that will have two DVI output on
 it, it'll only cost a couple hundred dollars to get a decent new card.
 
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Paul Melis

Vincent Bourdier wrote:



2008/11/20 Paul Melis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

lucas Grijander wrote:

you are right, but I have polarized glasses that go together
with the polarized lenses of the projectors. I think we can
have much better quality like that.

You might be surprised. Depending on the polarization type and
filter quality there can be a lot of ghosting in the images. You
also need a good alignment on your projectors.


Of course, the calibration and the settings of the material will be a 
little complicated at the beginning. But With this material, active 
stereo is possible, and this will render very well.
Without 2 graphic output on your graphic card, I would be very 
difficult to set an active stereo I think... maybe with special 
synchronisation to allow the projectors to get the output each one 
after the other ? I don't know...


By the way, this seems to be good material, have fun :-)
As the OP already seems to have projectors and polarization filters and 
such it would be easiest to just find a PC with 2 outputs and drive the 
projectors directly, as Robert suggested.
In case he does: remember to use a projection surface that doesn't 
destroy the polarization ;-)


But polarized glasses are a lot more convenient to wear than those
bloody shutter glasses.


:D
Yesterday I showed a group of students anaglyphic pictures after giving 
them the red-blue glasses. Quite funny to see a classroom full of those 
things :)

And even those are still more fashionable than crystaleyes...

P

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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Vincent Bourdier
2008/11/20 Paul Melis [EMAIL PROTECTED]

 Vincent Bourdier wrote:



 2008/11/20 Paul Melis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

lucas Grijander wrote:

you are right, but I have polarized glasses that go together
with the polarized lenses of the projectors. I think we can
have much better quality like that.

You might be surprised. Depending on the polarization type and
filter quality there can be a lot of ghosting in the images. You
also need a good alignment on your projectors.


 Of course, the calibration and the settings of the material will be a
 little complicated at the beginning. But With this material, active stereo
 is possible, and this will render very well.
 Without 2 graphic output on your graphic card, I would be very difficult
 to set an active stereo I think... maybe with special synchronisation to
 allow the projectors to get the output each one after the other ? I don't
 know...

 By the way, this seems to be good material, have fun :-)

 As the OP already seems to have projectors and polarization filters and
 such it would be easiest to just find a PC with 2 outputs and drive the
 projectors directly, as Robert suggested.
 In case he does: remember to use a projection surface that doesn't destroy
 the polarization ;-)


But polarized glasses are a lot more convenient to wear than those
bloody shutter glasses.


 :D

 Yesterday I showed a group of students anaglyphic pictures after giving
 them the red-blue glasses. Quite funny to see a classroom full of those
 things :)
 And even those are still more fashionable than crystaleyes...


Off topic question but : Where did you find theses glasses ? very difficult
to find it in France, as free of course...



 P

 ___
 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] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread lucas Grijander

I'm trying to find if my geforce 8700M GT in my laptops accepts quad-buffer... 
how do you find that?

I also agree with you, maybe it's better to find a computer with double output. 

We already have the non-polarized surface... as you say, we have a very good 
stuff here, so we must use it!!

Jaime.

 Date: Thu, 20 Nov 2008 15:31:34 +0100
 From: [EMAIL PROTECTED]
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] question about passive 3D stereo using polarized 
 projectors and openscenegraph
 
 Vincent Bourdier wrote:
 
 
  2008/11/20 Paul Melis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 
  lucas Grijander wrote:
 
  you are right, but I have polarized glasses that go together
  with the polarized lenses of the projectors. I think we can
  have much better quality like that.
 
  You might be surprised. Depending on the polarization type and
  filter quality there can be a lot of ghosting in the images. You
  also need a good alignment on your projectors.
 
 
  Of course, the calibration and the settings of the material will be a 
  little complicated at the beginning. But With this material, active 
  stereo is possible, and this will render very well.
  Without 2 graphic output on your graphic card, I would be very 
  difficult to set an active stereo I think... maybe with special 
  synchronisation to allow the projectors to get the output each one 
  after the other ? I don't know...
 
  By the way, this seems to be good material, have fun :-)
 As the OP already seems to have projectors and polarization filters and 
 such it would be easiest to just find a PC with 2 outputs and drive the 
 projectors directly, as Robert suggested.
 In case he does: remember to use a projection surface that doesn't 
 destroy the polarization ;-)
 
  But polarized glasses are a lot more convenient to wear than those
  bloody shutter glasses.
 
 
  :D
 Yesterday I showed a group of students anaglyphic pictures after giving 
 them the red-blue glasses. Quite funny to see a classroom full of those 
 things :)
 And even those are still more fashionable than crystaleyes...
 
 P
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Csaba Halász
On Thu, Nov 20, 2008 at 2:34 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:

 sparky
 Linux  2.4.21-102-smp  x86_64 GNU/Linux

My crash seems to be of this type, although no problem with threading
model switching.
I wonder if I can try to use software rendering to see if it makes a difference.

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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Paul Melis

lucas Grijander wrote:
I'm trying to find if my geforce 8700M GT in my laptops accepts 
quad-buffer... how do you find that?
Only Quadro's support quad-buffered stereo officially. There used to be 
softmods around to turn a Geforce into a Quadro but I don't think these 
work anymore these days


Paul


I also agree with you, maybe it's better to find a computer with 
double output.


We already have the non-polarized surface... as you say, we have a 
very good stuff here, so we must use it!!


Jaime.

 Date: Thu, 20 Nov 2008 15:31:34 +0100
 From: [EMAIL PROTECTED]
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] question about passive 3D stereo using 
polarized projectors and openscenegraph


 Vincent Bourdier wrote:
 
 
  2008/11/20 Paul Melis [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

 
  lucas Grijander wrote:
 
  you are right, but I have polarized glasses that go together
  with the polarized lenses of the projectors. I think we can
  have much better quality like that.
 
  You might be surprised. Depending on the polarization type and
  filter quality there can be a lot of ghosting in the images. You
  also need a good alignment on your projectors.
 
 
  Of course, the calibration and the settings of the material will be a
  little complicated at the beginning. But With this material, active
  stereo is possible, and this will render very well.
  Without 2 graphic output on your graphic card, I would be very
  difficult to set an active stereo I think... maybe with special
  synchronisation to allow the projectors to get the output each one
  after the other ? I don't know...
 
  By the way, this seems to be good material, have fun :-)
 As the OP already seems to have projectors and polarization filters and
 such it would be easiest to just find a PC with 2 outputs and drive the
 projectors directly, as Robert suggested.
 In case he does: remember to use a projection surface that doesn't
 destroy the polarization ;-)
 
  But polarized glasses are a lot more convenient to wear than those
  bloody shutter glasses.
 
 
  :D
 Yesterday I showed a group of students anaglyphic pictures after giving
 them the red-blue glasses. Quite funny to see a classroom full of those
 things :)
 And even those are still more fashionable than crystaleyes...

 P

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



Explore the seven wonders of the world Learn more! 
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE 




___
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] How to pass a fixed possition to a vertex shader?

2008-11-20 Thread Alejandro Aguilar Sierra
Hi Umit,

 You have used same texture unit for 2 texture so your last initilazed
 texture on unit 1 active. I mean, EarthCloudGloss active on unit 1. so you
 should texture EarthCloudGloss to the unit 2.

That's what I thought but it was not working. There was a silly
mistake in my osg code, I was reusing texture2 instead of texture3 in
the last image assignment (as you can see in my first message). That's
fixed now.

My problem is tha I have a fixed possition in world coordinates
(LightPosition) as a Uniform parameter. At the time of passing it to
the vertex shader, apparently it is seen as fixed in screen
coordinates. If I move the view, the scene moves but not the effect of
the shader. How should I convert the vertex coordinate?

I know this is maybe a faq but as I told, it's my first shader
experiment, and I can't make it work.

I will highly appreciate any help.

Best regards,

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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Tomlinson, Gordon
My understanding is only the Quadro range of cards from NVidia support
quad buffer 
 

Gordon

__
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com
__
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival 
- Master Tambo Tetsura

 
 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of lucas
Grijander
Sent: Thursday, November 20, 2008 9:49 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] question about passive 3D stereo using
polarized projectors and openscenegraph


I'm trying to find if my geforce 8700M GT in my laptops accepts
quad-buffer... how do you find that?

I also agree with you, maybe it's better to find a computer with double
output. 

We already have the non-polarized surface... as you say, we have a very
good stuff here, so we must use it!!

Jaime.

 Date: Thu, 20 Nov 2008 15:31:34 +0100
 From: [EMAIL PROTECTED]
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] question about passive 3D stereo using
polarized projectors and openscenegraph
 
 Vincent Bourdier wrote:
 
 
  2008/11/20 Paul Melis [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 
  lucas Grijander wrote:
 
  you are right, but I have polarized glasses that go together
  with the polarized lenses of the projectors. I think we can
  have much better quality like that.
 
  You might be surprised. Depending on the polarization type and
  filter quality there can be a lot of ghosting in the images. You
  also need a good alignment on your projectors.
 
 
  Of course, the calibration and the settings of the material will be
a 
  little complicated at the beginning. But With this material, active 
  stereo is possible, and this will render very well.
  Without 2 graphic output on your graphic card, I would be very 
  difficult to set an active stereo I think... maybe with special 
  synchronisation to allow the projectors to get the output each one 
  after the other ? I don't know...
 
  By the way, this seems to be good material, have fun :-)
 As the OP already seems to have projectors and polarization filters
and 
 such it would be easiest to just find a PC with 2 outputs and drive
the 
 projectors directly, as Robert suggested.
 In case he does: remember to use a projection surface that doesn't 
 destroy the polarization ;-)
 
  But polarized glasses are a lot more convenient to wear than those
  bloody shutter glasses.
 
 
  :D
 Yesterday I showed a group of students anaglyphic pictures after
giving 
 them the red-blue glasses. Quite funny to see a classroom full of
those 
 things :)
 And even those are still more fashionable than crystaleyes...
 
 P
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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




Explore the seven wonders of the world Learn more!
http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBR
E  
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread J.P. Delport

Hi,

Jean-Sébastien Guay wrote:

Hi Robert,


OpenGL version string: 2.1.1 NVIDIA 100.14.19
Intel Quad core, Kubuntu 7.10.


Hmmm, seems older than what JP and Csaba reported? Or am I reading the 
numbers wrong?


Yes, it's older. Website says 100.14.19 = Sept 2007. Think I'll have to 
downgrade kernel to a version that would be happy with older NVidia driver.


Robert what kernel version are you using? How do you install NVidia driver?

jp

--
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] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Jean-Christophe Lombardo

Bonjour Vincent,

Vincent Bourdier wrote:
Off topic question but : Where did you find theses glasses ? very 
difficult to find it in France, as free of course...
We've recently bought a lot of anaglyphic glasses from 
http://www.buy3dglasses.fr/hapack.php

and they are just fine.

jcl
--
Jean-Christophe Lombardo   Espace Immersif   DREAM / INRIA
2004 route des Lucioles - BP93 - 06902 Sophia Antipolis Cedex - France
http://www.inria.fr/sophiaC013 Tel.: +33 4 92 38 50 26
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Vincent Bourdier
Thanks a lot :-)
I'm just curious and interested.

Regards,
Vincent.

2008/11/20 Jean-Christophe Lombardo 
[EMAIL PROTECTED]

 Bonjour Vincent,

 Vincent Bourdier wrote:

 Off topic question but : Where did you find theses glasses ? very
 difficult to find it in France, as free of course...

 We've recently bought a lot of anaglyphic glasses from
 http://www.buy3dglasses.fr/hapack.php
 and they are just fine.

 jcl
 --
 Jean-Christophe Lombardo   Espace Immersif   DREAM / INRIA
 2004 route des Lucioles - BP93 - 06902 Sophia Antipolis Cedex - France
 http://www.inria.fr/sophiaC013 Tel.: +33 4 92 38 50 26

 ___
 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] setUnRefImageDataAfterApply - is there an alternative?

2008-11-20 Thread Robert Osfield
Hi JS,

On Thu, Nov 20, 2008 at 2:13 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 Hmm, interesting, I can't spot any place in our framework where we call the
 Optimizer on a loaded model, yet the unref setting is clearly on. I'll dig
 around more.

Could it be that the models have already been optimized then saved to
.ive or .osg and then you load these optimized files with unref
enabled?

 Yep, that's what I had in mind. I'll put that on my to-do list... Do those
 things ever get shorter? :-)

In nearly a decade of hacking on the OSG my todo list has only ever
got longer, or stabilised for a brief while...

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


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Robert Osfield
Hi J.P. et al.,

On Thu, Nov 20, 2008 at 3:01 PM, J.P. Delport [EMAIL PROTECTED] wrote:
 Yes, it's older. Website says 100.14.19 = Sept 2007. Think I'll have to
 downgrade kernel to a version that would be happy with older NVidia driver.

 Robert what kernel version are you using?

2.6.22-15-generic

 How do you install NVidia driver?

I've let Kubuntu just install what it maintains in the repository for 7.10.

Next week I'll be building a new machine, based on Core i7 + X58, I'll
probably install Kubuntu 8.10 on it and see how I get on with KDE
4.1.x as a main dev machine.  I might revert back to 8.04 though if
KDE 4.1.x can't yet cope with multiple graphics cards/multi-headed.
Either way I'll another multi-threaded system to test this issue
against.

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


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Csaba Halász
On Thu, Nov 20, 2008 at 3:51 PM, Csaba Halász [EMAIL PROTECTED] wrote:

 I wonder if I can try to use software rendering to see if it makes a 
 difference.

I have run it with mesa in a nested x server, no hangs. After each
added view, however, I got a single Warning: detected OpenGL error
'invalid operation' after RenderBin::draw(,) message (ie. *not* every
frame). Don't know if that is relevant.

Also, the software rendering might be too slow to produce the problem.
Anybody got some further suggestions?

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


Re: [osg-users] setUnRefImageDataAfterApply - is there an alternative?

2008-11-20 Thread Jean-Sébastien Guay

Hi Robert,


Could it be that the models have already been optimized then saved to
.ive or .osg and then you load these optimized files with unref
enabled?


Yep, that was it. Darn.

Anyways, I'll probably add settings in our framework to control this on 
a per-model and global scope, so that we won't be dependent on how the 
model was constructed - in some apps we need the image data to stay, but 
in most we can gladly let it be unreffed without problems.



In nearly a decade of hacking on the OSG my todo list has only ever
got longer, or stabilised for a brief while...


It was a rhetorical question, but I know how you feel :-)

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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


[osg-users] FW: [osg-submissions] segfault in buffered_value andviewerbaserevisited

2008-11-20 Thread Centers, Kyle
Re-posted from osg-submissions as requested



On Wed, Nov 19, 2008 at 10:56 PM, Centers, Kyle
[EMAIL PROTECTED] wrote:
 Robert,

 I did say I might be doing something wrong :) But if the goal is to have the
 buffers initialize to the correct size before threading, why have the
 resize() call there at all? Also, what about the case where someone creates
 a new context after threading has begun? I don't see anything that prevents
 it, and in fact, it looks like CompositeViewer specifically is designed to
 support it.

 While I'm on the subject, why do ViewerBase::setUpThreading(), and
 ViewerBase::setThreadingModel() both call ViewerBase::startThreading()?
 Seems to me, if you're not currently threading, just because you set the
 ThreadingModel, that doesn't necessarily mean you want to start threading
 right away (although if you were already threading, you certianly want to
 stop threading before setting the Threading Model, and should probably
 restart threading after you have done so - that or refuse to set the
 Threading Model all together until threading stops). Seems like a more
 orthognonal approach would be more sensible, even if less convenient.

 Kyle

 
 From: [EMAIL PROTECTED] on behalf of Robert
 Osfield
 Sent: Wed 11/19/2008 2:27 PM
 To: OpenSceneGraph Submissions
 Subject: Re: [osg-submissions] segfault in buffered_value and
 viewerbaserevisited

 Hi Kyle,

 There deliberately isn't a mutex as it would be a performance killer.
 Reviewing your change the resize code isn't thread safe anyway - as
 you have to protect all access to the internal vector as accessing it
 at the same time as resizing will cause problems.

 The design of osgViewer/OSG's OpenGL object
 management/osg::buffered_value is that the viewer initializes the
 buffers to the maximum number of contexts require prior to
 multi-threading.  osgViewer normally manages this automatically for
 you so you must have some corner case usage model that the buffer
 isn't initialized to the correct size.

 As for the catch on the dodgy earlier submission, I should have
 spotted this, and you are right in that the naming fooled both of us.
 Frustratingly when I wrote the original and correct code I would have
 been aware exactly which valid referenced to what object, only on
 review of your submission did I miss this. I'll have a think about
 naming of the context valid method.  Changing its name would break
 compatibility though...

 Robert.

 On Wed, Nov 19, 2008 at 5:27 PM, Centers, Kyle
 [EMAIL PROTECTED] wrote:


 A few weeks ago, I submitted a change proposal to
 include/osgViewer/ViewerBase, wherein I recommended removing a redundant
 call to _currentContext.valid(), in releaseContext(). That was wrong. The
 line in question (line 254) reads:

 if (_currentContext.valid()  _currentContext-valid())

 note that the two calls to valid() are prefixed with the . operator
 first,
 and then the - operator... turns out, _currentContext is actually an
 observer_ptrosg::GraphicsContext, and not a osg::GraphicsContext...
 oops.
 In my defense, that is phenomenally unclear code. Perhaps renaming one of
 those valid() calls would make it more clear? I don't know, but that line,
 at the very least, needs a comment explaining that it is, in fact,
 correct.

 Next, I ran across a couple of segfaults while running with three separate
 GC's and three cameras (one master, two slaves), all rendering from the
 same
 scene. I traced the problem to include/osg/buffered_value, in both
 buffered_valueT::operator[], and in buffered_objectT::operator[]. Both
 dynamically resize _array any time pos exceeds _array.size(). In a
 threaded
 environment, if one thread tries to access _array while another thread is
 resizing it, the result is a segfault.

 I don't know if I'm doing something wrong or not, but I added an
 OpenThreads::Mutex to both classes and that seems to solve the problem for
 me (updated buffered_value file attached).

 Kyle


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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Robert Osfield
Hi Jaime,

On Thu, Nov 20, 2008 at 2:48 PM, lucas Grijander
[EMAIL PROTECTED] wrote:
 I also agree with you, maybe it's better to find a computer with double
 output.

Another possible solution you could explore is to buy a Matrox
DualHead2Go box that takes a single input and generates two separate
outputs.  I've tested a TripleHead2Go under Linux a few years back and
it worked just fine albeit with a bit soft image quality vs normal
monitor output but it still worked.

On the OSG side you'd just create a single window across a wide
desktop and use the horizontal split stereo to direct the correct eye
output to each projector.

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


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Robert Osfield
Hi Csaba et. al,

On Thu, Nov 20, 2008 at 3:50 PM, Csaba Halász [EMAIL PROTECTED] wrote:
 I have run it with mesa in a nested x server, no hangs. After each
 added view, however, I got a single Warning: detected OpenGL error
 'invalid operation' after RenderBin::draw(,) message (ie. *not* every
 frame). Don't know if that is relevant.

 Also, the software rendering might be too slow to produce the problem.
 Anybody got some further suggestions?

One thought I have about the a possible failure mode is that perhaps
one graphics context thread is hanging or crashing, and the rest of
the threads succeed rendering their frame and get all the way to the
barrier at the end of the frame.  This would result is stack traces
where all but one would be hanging on a barrier.

if this is correct then the issue is about finding out why one of the
graphics threads fails.  It could be an OpenGL object management
issue, and the invalid operations might be an early warning of this.
The fact that problems exists across many machines with quite
different OS/hardware/drivers strongly suggests an OSG bug, and that
the rest of the variables are just co-incidence.

I think the best lead would be that perhaps the texture object/display
lists buffer_value containers aren't being resized to fit the new
number of contexts which the app is running single threaded.  In
theory addView should be stopping all threads, and then issuing the
Node::resizeGLObejcts() on the scene graph so handling this situation,
but perhaps this isn't happening.

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


Re: [osg-users] Question about views, contexts and threading

2008-11-20 Thread Ferdi Smit
Thank you, that at least explains some of the drawing times I've been 
seeing.


I ran more tests on our dual-gpu system, summarized below. Not striclty 
OSG related, but they may be interesting nonetheless...


- Scene of 25x 1 million polygon model, all visible. Culling etc neglibile.
- Stand-alone refers to one rendering context only; normal, non-parallel 
rendering

- frame rates in FPS

CPU Affinity on different cores
OSG_THREADING=SingleThreaded
(1 core shows heavy use, 2nd core show moderate use, 2 cores idle)

   Quadro 56008800GTX
Single-GPU / Stand-alone1615

Single-GPU / Multi-Threaded7.57.5
Single-GPU / Multi-Processing7.57.5

Multi-GPU / Multi-Threaded6.56.5
Multi-GPU / Multi-Processing1615

   Quadro 56008800GTX

OSG_THREADING=ThreadPerContext
(CPU Affinity is set but appears to be ignored: 1 core shows heavy use, 
others idle)


Single-GPU / Stand-alone1615

Single-GPU / Multi-Threaded7.57.5
Single-GPU / Multi-Processing7.57.5

Multi-GPU / Multi-Threaded3.511
Multi-GPU / Multi-Processing1114


   Quadro 56008800GTX
Baseline:
Multi-GPU / Multi-Threaded6.56.5

Speeding up one card by rendering empty scene*, effect on other card:
Multi-GPU / Multi-Threaded6000*15
Multi-GPU / Multi-Threaded714*


All results are reasonable, except:

Single-GPU / Multi-Processing7.57.5
Multi-GPU / Multi-Threaded6.56.5
Multi-GPU / Multi-Processing1615

Which is very strange; using two distinct GPUs simultaneously in a 
threaded way in the same address space is slower than sharing a single 
GPU. I can only conclude that OpenGL drivers can not handle 
multi-threading with different contexts on different devices. It also 
seems that the Quadro is the culprit, locking the driver or something. 
If you let the quadro render fast, the 8800 also renders fast. However, 
if you allow the 8800 to render fast, both will remain slow.


Robert Osfield wrote:

Hi Ferdi,

The understand what is happening with draw in the two instances you
need to understand how OpenGL operates.  For each graphics context
OpenGL maintains a FIFO that is filled by the applications graphics
thread for that context, and is drained by the driver that batches the
commands/data in the fifo up into a form that can be pushed to the
graphics card.

Now if this FIFO has plenty of room then the application can keep
filling the FIFO without OpenGL ever blocking the applications graphis
thread - in this case the draw dispatch times (the OSG side) are
relatively low.  If however you fill the FIFO then OpenGL will block
the applications graphics thread till enough room has been made by the
GPU consuming command/data at the other end.   When you get to this
point often you'll find draw dispatch times that suddenly jump up, and
it's not because it's suddenly doing more work - in fact the app
graphics thread is just sitting their idle waiting for the graphics
drive/GPU to do it's stuff.

Now drivers may have different sized FIFO's, and different GPU's will
work at different speeds and possibly have other features that affect
the FIFO filling/emptying. One would expect slower GPU's to empty the
fifo slower so are more likely to block, but the driver can also have
affect.  The architecture of overall hardware, what other threads are
running, how contended the various parts of the hardware etc all can
have an effect.   The fact that one GPU's draw dispatch is far longer
than another might simply bit that it's pushed just hard enough to
fill the FIFO, but it might still hit frame just fine, but the draw
times will be drastically higher because of the blocking due to the
filled FIFO, a slightly lower load will lead could lead to FIFO not
blocking an huge drop in draw dispatch times.  It's very no linear,
small differences can result in large observed differences, but often
the long draw time might not be anything to worry about - it's just an
early warning sign, you might still hit your target frame rate just
fine.

Robert.

Robert.

On Tue, Nov 18, 2008 at 3:31 PM, Ferdi Smit [EMAIL PROTECTED] wrote:
  

Hi Robert,

I ran some more tests with a realistic scene of ~25M polygons (25 times the
same 1M model). Stand-alone this is rendered at ~15 FPS on one GPU (8800GTX
or Quadro FX5600 + Intel Quad Core). Multi-_processing_ with two contexts at
two gpus, both rendering this scene, the 8800 stays at 15 but the Quadro
drops to 12. Multi-_threading_ with two contexts at two gpus, the 8800 drops
to 9.5 and the quadro to 4.5 FPS. This is weird. Also, the 8800 reports (in
the osg performance hud) that GPU=65 and Draw=10. Draw is always much lower
than GPU. But the Quadro in multi-threading goes to GPU=210 and Draw=210;
GPU and Draw are suddenly equal now. What does 

Re: [osg-users] Question about views, contexts and threading

2008-11-20 Thread Robert Osfield
HI Ferdi,

Could try the same tests but with the following env var  set:

  set OSG_SERIALIZE_DRAW_DISPATCH=OFF

This will disable the mutex that serializes the draw dispatch.  Have a
search through the archives on this topic as I've written lots about
this topic and the fact serialize draw curious improves performance on
systems that I've tested on.  I still haven't had feedback from the
community on this topic as it's likely to be something effected by
hardware/drivers and OS.

Robert.

On Thu, Nov 20, 2008 at 4:05 PM, Ferdi Smit [EMAIL PROTECTED] wrote:
 Thank you, that at least explains some of the drawing times I've been
 seeing.

 I ran more tests on our dual-gpu system, summarized below. Not striclty OSG
 related, but they may be interesting nonetheless...

 - Scene of 25x 1 million polygon model, all visible. Culling etc neglibile.
 - Stand-alone refers to one rendering context only; normal, non-parallel
 rendering
 - frame rates in FPS

 CPU Affinity on different cores
 OSG_THREADING=SingleThreaded
 (1 core shows heavy use, 2nd core show moderate use, 2 cores idle)

   Quadro 56008800GTX
 Single-GPU / Stand-alone1615

 Single-GPU / Multi-Threaded7.57.5
 Single-GPU / Multi-Processing7.57.5

 Multi-GPU / Multi-Threaded6.56.5
 Multi-GPU / Multi-Processing1615

   Quadro 56008800GTX

 OSG_THREADING=ThreadPerContext
 (CPU Affinity is set but appears to be ignored: 1 core shows heavy use,
 others idle)

 Single-GPU / Stand-alone1615

 Single-GPU / Multi-Threaded7.57.5
 Single-GPU / Multi-Processing7.57.5

 Multi-GPU / Multi-Threaded3.511
 Multi-GPU / Multi-Processing1114


   Quadro 56008800GTX
 Baseline:
 Multi-GPU / Multi-Threaded6.56.5

 Speeding up one card by rendering empty scene*, effect on other card:
 Multi-GPU / Multi-Threaded6000*15
 Multi-GPU / Multi-Threaded714*


 All results are reasonable, except:

 Single-GPU / Multi-Processing7.57.5
 Multi-GPU / Multi-Threaded6.56.5
 Multi-GPU / Multi-Processing1615

 Which is very strange; using two distinct GPUs simultaneously in a threaded
 way in the same address space is slower than sharing a single GPU. I can
 only conclude that OpenGL drivers can not handle multi-threading with
 different contexts on different devices. It also seems that the Quadro is
 the culprit, locking the driver or something. If you let the quadro render
 fast, the 8800 also renders fast. However, if you allow the 8800 to render
 fast, both will remain slow.

 Robert Osfield wrote:

 Hi Ferdi,

 The understand what is happening with draw in the two instances you
 need to understand how OpenGL operates.  For each graphics context
 OpenGL maintains a FIFO that is filled by the applications graphics
 thread for that context, and is drained by the driver that batches the
 commands/data in the fifo up into a form that can be pushed to the
 graphics card.

 Now if this FIFO has plenty of room then the application can keep
 filling the FIFO without OpenGL ever blocking the applications graphis
 thread - in this case the draw dispatch times (the OSG side) are
 relatively low.  If however you fill the FIFO then OpenGL will block
 the applications graphics thread till enough room has been made by the
 GPU consuming command/data at the other end.   When you get to this
 point often you'll find draw dispatch times that suddenly jump up, and
 it's not because it's suddenly doing more work - in fact the app
 graphics thread is just sitting their idle waiting for the graphics
 drive/GPU to do it's stuff.

 Now drivers may have different sized FIFO's, and different GPU's will
 work at different speeds and possibly have other features that affect
 the FIFO filling/emptying. One would expect slower GPU's to empty the
 fifo slower so are more likely to block, but the driver can also have
 affect.  The architecture of overall hardware, what other threads are
 running, how contended the various parts of the hardware etc all can
 have an effect.   The fact that one GPU's draw dispatch is far longer
 than another might simply bit that it's pushed just hard enough to
 fill the FIFO, but it might still hit frame just fine, but the draw
 times will be drastically higher because of the blocking due to the
 filled FIFO, a slightly lower load will lead could lead to FIFO not
 blocking an huge drop in draw dispatch times.  It's very no linear,
 small differences can result in large observed differences, but often
 the long draw time might not be anything to worry about - it's just an
 early warning sign, you might still hit your target frame rate just
 fine.

 Robert.

 Robert.

 On Tue, Nov 18, 2008 at 3:31 PM, Ferdi Smit [EMAIL PROTECTED] wrote:


 Hi Robert,

 I ran some more tests with a 

Re: [osg-users] MAC

2008-11-20 Thread Eric Sokolowsky

Wasileski, Bryan J. wrote:

Hi,

 

I’ve not monitored the group mail for a while and was wondering if 
anyone could give me some user/developer experiences of OSG with the Mac.


I was the most recent to push things along with OSG on the Mac. I was 
working a bit with the X11 path and 64-bit compiles, and think it works 
with cmake generating xcode projects. However, things like QT and 
quicktime are not available this way (which means that common image file 
formats are also broken). Eric Wing developed an ImageIO plugin for 
images that I have partially integrated but not yet finished. To get 
animations working on 64-bit a new plugin that uses QTKit needs to be 
developed. For 32-bit compiles all the old stuff should still work. The 
stuff that doesn't work is automatically excluded when a 64-bit platform 
is included in the Xcode generation. Currently the Xcode projects (the 
ones generated by CMake) just make shared libraries. I also intend on 
getting it to generate Frameworks, but that work is not very far along. 
The hand-generated Xcode projects make Frameworks, but I'm not sure if 
they are up-to-date.


There are a lot of permutations on how to build on the Mac. I am 
interested in suggestions on what is broken so it can be improved. The 
way forward is through CMake. The old Xcode projects may or may not 
function, and will probably not be maintained into the future.


As for getting CMake to run on the mac, I downloaded a binary package of 
cmake 2.6.x from CMake's web site, and it just worked for me, with a GUI 
and everything. I didn't try to compile CMake myself, nor use MacPorts 
or any other package repository. I haven't tried to run cmake on the 
command line. I believe that the binary CMake bundle has the 
command-line executables contained within. I usually generate Xcode 
projects from cmake and then compile. This is the easiest way to produce 
a universal binary.


As I was making changes this summer I tried to maintain compatibility 
with 10.4, and even cross-compiling for 10.4 on 10.5. I'm not sure how 
well I succeeded.


Suggestions and questions are welcome.

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


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Robert Osfield
Hi All,

On Thu, Nov 20, 2008 at 4:01 PM, Robert Osfield
[EMAIL PROTECTED] wrote:
 I think the best lead would be that perhaps the texture object/display
 lists buffer_value containers aren't being resized to fit the new
 number of contexts which the app is running single threaded.  In
 theory addView should be stopping all threads, and then issuing the
 Node::resizeGLObejcts() on the scene graph so handling this situation,
 but perhaps this isn't happening.

I've looked into the
CompositeViewer:::addView()/View::setSceneData()/Viewer::setSceneData()
methods and only the Viewer::setSceneData() has a call to resize the
GL objects.  The actual code looks like:

void Viewer::setSceneData(osg::Node* node)
{
setReferenceTime(0.0);

View::setSceneData(node);

if (_threadingModel!=SingleThreaded  getSceneData())
{
// make sure that existing scene graph objects are allocated
with thread safe ref/unref
getSceneData()-setThreadSafeRefUnref(true);

// update the scene graph so that it has enough GL object
buffer memory for the graphics contexts that will be using it.

getSceneData()-resizeGLObjectBuffers(osg::DisplaySettings::instance()-getMaxNumberOfGraphicsContexts());
}

}

My guess is that we need to move the resize/setThreadSafeRefUnref() up
into the View::setSceneData() method.  The Viewer::setSceneData()
method is a viewer so has access to members of ViewerBase that View
doesn't have.  Another issue is that if we are setting the View up
prior to any call to stopThreading as the resize isn't thread safe.

As we don't know whether this is the cause of the problem yet, I've
modified J-S's osgviewer.cpp to do the resize.  Could users who've
seen problems try this version out, if this works then we have
workaround that end users can apply to existing apps, and we can
figure out a solution to fix it permanently in svn/trunk.

Robert.

Robert.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 *
 * This application is open source and may be redistributed and/or modified   
 * freely and without restriction, both in commericial and non commericial applications,
 * as long as this copyright notice is maintained.
 * 
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#include osgDB/ReadFile
#include osgUtil/Optimizer
#include osg/CoordinateSystemNode

#include osg/Switch
#include osgText/Text

#include osgViewer/CompositeViewer
#include osgViewer/ViewerEventHandlers

#include osgGA/TrackballManipulator
#include osgGA/FlightManipulator
#include osgGA/DriveManipulator
#include osgGA/KeySwitchMatrixManipulator
#include osgGA/StateSetManipulator
#include osgGA/AnimationPathManipulator
#include osgGA/TerrainManipulator

#include iostream


void addEventHandlers(osgViewer::View* view)
{
// set up the camera manipulators.
view-setCameraManipulator( new osgGA::TrackballManipulator() );

// add the state manipulator
view-addEventHandler( new osgGA::StateSetManipulator(view-getCamera()-getOrCreateStateSet()) );

// add the thread model handler
view-addEventHandler(new osgViewer::ThreadingHandler);

// add the window size toggle handler
view-addEventHandler(new osgViewer::WindowSizeHandler);

// add the stats handler
view-addEventHandler(new osgViewer::StatsHandler);

// add the record camera path handler
view-addEventHandler(new osgViewer::RecordCameraPathHandler);

// add the LOD Scale handler
view-addEventHandler(new osgViewer::LODScaleHandler);

// add the screen capture handler
view-addEventHandler(new osgViewer::ScreenCaptureHandler);
}


class AddViewHandler : public osgGA::GUIEventHandler
{
public:
AddViewHandler(osgViewer::CompositeViewer* viewer, osg::Node* sceneRoot) 
: _viewer(viewer), _sceneRoot(sceneRoot) {}

bool handle(const osgGA::GUIEventAdapter ea, osgGA::GUIActionAdapter aa)
{
if (ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN  ea.getKey()== 'a')
{
osgViewer::View* view = new osgViewer::View;

view-setUpViewInWindow(50, 50, 800, 600);
view-getCamera()-getGraphicsContext()-realize();

view-setSceneData(_sceneRoot.get());
addEventHandlers(view);

_viewer-stopThreading();

_viewer-addView(view);

osg::notify(osg::NOTICE)osg::DisplaySettings::instance()-getMaxNumberOfGraphicsContexts()=  osg::DisplaySettings::instance()-getMaxNumberOfGraphicsContexts()std::endl;

view-getSceneData()-setThreadSafeRefUnref(true);
view-getSceneData()-resizeGLObjectBuffers(osg::DisplaySettings::instance()-getMaxNumberOfGraphicsContexts());

_viewer-startThreading();

return true;
}

return false;
}

protected:

[osg-users] If I have a Vec3f, and I want to rotate it, do I use osg::Matrixf::rotate?

2008-11-20 Thread Ed

probably a dumb question...but...

If I have a Vec3f, and I want to rotate it, do I use 
osg::Matrixf::rotate? 


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


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Don Leich

Hi J-S, J.P., and non-initialed persons of interest (or P.O.I.s),

J-S beat me and posted the traces I mailed to him off-line yesterday.  I was 
doing another round of tests to see if I could really duplicate his exact 
problem.  I can't. I don't get the hang unless I change the threading model.  On 
all tested systems I could create 40 or more addView windows when staying with 
SingleThreaded.


A few notes on an anomoly or two in my results.  System cartman shows many 
more threads than expected.  Perhaps there's a bug in gdb that shows the same 
thread multiple time.  Where I mentioned missing cows, I would get a background 
colored window and no other graphics.  System curly has a package for a driver 
fire-glfglrx_4_3_0-8.10.19-1.i386.rpm, but since it's very obviously draw 
limited it probably really is rendering with Mesa.  Another system that is known 
to be Mesa didn't have any problems with the addView test.  System sparky may 
have an entirely different problem.


We're cross platform CAE developers here and upgrade our drivers very 
infrequently.  I suspect that is why we may be finding so many problems with OSG 
and threading.


-Don


 Hi all,

 Thanks for testing again. I've had a few other reports for Linux and
 Windows, some can repro others can't, so I'm trying to get hardware
 details and driver versions to see if it could be dependent of these
 factors. Thanks for providing them.


 Robert suggested off-list that I post these stack traces, so here they
 are. The first one in particular (jeckle) seems to show the same
 problem I have been investigating.

 Thanks to Don Leich for testing on a few different machines (hardware,
 driver versions). I hope this info will be useful.

 J-S


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


Re: [osg-users] If I have a Vec3f, and I want to rotate it, do I use osg::Matrixf::rotate?

2008-11-20 Thread Paul Martz
 probably a dumb question...but...
 
 If I have a Vec3f, and I want to rotate it, do I use 
 osg::Matrixf::rotate? 

That will just create a rotation matrix. You'll still need to do the
multiplication to transform the vector.

Here's what you want, except I use a Quat instead of a Matrix:

osg::Vec3 v( x, y, z );
osg::Quat q( angle, osg::Vec3( axisX, axisY, axisZ ) );
v = q * v;

   -Paul

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


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Don Leich

Interesting.  My system sparky has

OpenGL version string: 2.1.1 NVIDIA 100.14.19
AMD-64, SuSe 9.2 (I think) rather old kernel 2.4.21-102-smp

-Don




Robert, what driver version are you using? Any chance



OpenGL version string: 2.1.1 NVIDIA 100.14.19
Intel Quad core, Kubuntu 7.10.




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


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Jean-Sébastien Guay

Hi Robert,


As we don't know whether this is the cause of the problem yet, I've
modified J-S's osgviewer.cpp to do the resize.  Could users who've
seen problems try this version out, if this works then we have
workaround that end users can apply to existing apps, and we can
figure out a solution to fix it permanently in svn/trunk.


I'm in the process of building OSG and the modified osgviewer.cpp 
following an svn update which I shouldn't have done (would have been 
quicker). I'll let you know my results.


I've seen another threading-related problem. When creating a new 
context, I'm getting crashes caused by the fact that 
GraphicsWindowWin32::realize() calls makeCurrent(), which looks like this:


bool GraphicsContext::makeCurrent()
{
bool result = makeCurrentImplementation();

if (result)
{
_threadOfLastMakeCurrent = OpenThreads::Thread::CurrentThread();

// initialize extension process, not only initializes on first
// call, will be a non-op on subsequent calls.
getState()-initializeExtensionProcs();
}

return result;
}

The call to getState()-initializeExtensionProcs() calls glGetString( 
GL_VERSION ) to check some things. Now, it can happen that between the 
makeCurrentImplementation() and the glGetString() in 
initializeExtensionProcs(), some other graphics thread that wanted to 
draw called makeCurrent() as well, and thus when glGetVersion() is 
called it no longer has the context current.


Obviously we have to be pretty unlucky to run into this, but as the 
number of contexts becomes larger, it has more chances of happening (or 
even the opposite, a graphics thread doing some drawing and then we 
construct a new GraphicsWindowWin32 which calls makeCurrent() and the 
graphics thread's context is no longer current).


Whichever thread we create contexts on, I think there's no way to be 
sure that no graphics thread is currently drawing (since the draw for 
thread n-1 might overlap the event,update,cull of frame n in certain 
threading modes) am I right? Should there be some mutex to prevent 
makeCurrent() while another thread is drawing, or makeCurrent() while a 
context is being created?


I'm trying to get my head around these threading problems. Keeping track 
of on which thread a given method will be called is a bit hard sometimes.


Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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


[osg-users] 2Dimensional array

2008-11-20 Thread Ed

I need to create a 2Dimensional array of Vec3f.  I could do this the ol'

osg::Vec3f **myArray

way, but wasn't sure if that is the way it should be done, as opposed 
to osg::ref_ptr, etc.   The I thought, maybe there is already a class 
for 2Dimensional arrays...but I didn't find one.  Is there such a class?


Ed

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


Re: [osg-users] 2Dimensional array

2008-11-20 Thread christophe loustaunau
Hi Ed,

Maybe you could use  std::vectorosg::Vec3Array myArray .

Regards.

On Thu, Nov 20, 2008 at 7:46 PM, Ed [EMAIL PROTECTED] wrote:

 I need to create a 2Dimensional array of Vec3f.  I could do this the ol'

 osg::Vec3f **myArray

 way, but wasn't sure if that is the way it should be done, as opposed to
 osg::ref_ptr, etc.   The I thought, maybe there is already a class for
 2Dimensional arrays...but I didn't find one.  Is there such a class?

 Ed

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




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


Re: [osg-users] 2Dimensional array

2008-11-20 Thread Ed

So I could do something like this (in pseudocode)?

   std::vector osg::ref_ptrosg::Vec3Array  myData;   


   osg::Vec3f currentDataPoint;
   Outerloop...{
   osg::ref_ptrosg::Vec3Array currentDataArray;
   Innerloop {
   currentDataPoint.set(...);
   currentDataArray-push_back(currentDataPoint);
   }
   myData.push_back(currentDataArray);
   }

Ed

christophe loustaunau wrote:

Hi Ed,

Maybe you could use  std::vectorosg::Vec3Array myArray .

Regards.

On Thu, Nov 20, 2008 at 7:46 PM, Ed [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


I need to create a 2Dimensional array of Vec3f.  I could do this
the ol'

osg::Vec3f **myArray

way, but wasn't sure if that is the way it should be done, as
opposed to osg::ref_ptr, etc.   The I thought, maybe there is
already a class for 2Dimensional arrays...but I didn't find one.
 Is there such a class?

Ed

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




--
Christophe Loustaunau.


___
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] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Jean-Sébastien Guay

Hi Robert,


As we don't know whether this is the cause of the problem yet, I've
modified J-S's osgviewer.cpp to do the resize.  Could users who've
seen problems try this version out, if this works then we have
workaround that end users can apply to existing apps, and we can
figure out a solution to fix it permanently in svn/trunk.


Well, seems like that didn't change anything. But following your hint I 
checked where the renderingTraversals was stuck:


// wait till the dynamic draw is complete.
if (_endDynamicDrawBlock.valid())
{
// osg::Timer_t startTick = osg::Timer::instance()-tick();
_endDynamicDrawBlock-block();
// osg::notify(osg::NOTICE)Time waiting 
osg::Timer::instance()-delta_m(startTick, 
osg::Timer::instance()-tick())std::endl;;

}

It's hung on the _endDynamicDrawBlock-block(); line.

When it hung, I had just created a 4th view (=4th context). 
Uncoincidentally, there are 4 threads on GraphicsThread::run(), which 
calls GraphicsContext::makeCurrent(), which calls 
GraphicsWindowWin32::makeCurrentImplementation, which is stuck on the 
wglMakeCurrent() call. One of those 4 is stuck in the middle of the 
graphics driver DLL, but I'm not sure that's relevant.


I'm not sure how I can see if one of the graphics threads is crashed, as 
you indicated... They all seem to be running, just blocked.


Other than those 5 threads (main thread with renderingTraversals() + 4 
draw threads, one per context) there are 7 other threads in the process. 
I can't see specifically what they're doing since they're all in 
graphics driver code (more or less deeply).


(this all coincides with the stack traces I sent before, but I just 
thought explaining it in words would help me understand eventually, and 
perhaps others too)


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   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] DataVariance

2008-11-20 Thread paul1492
When I change to SingleThreaded, I do not see the problem. The standard OSG 
examples work fine. Other cases of my problem also work fine. 

Clearly, it's something in this app that is causing problems.  In the problem 
case, I'm rendering to two different image buffers and then reading the images 
out on the CPU. My scene is a normal scene except I have two cameras with 
each rendering to these different textures (i.e. a top and bottom view of the 
scene). I also have another camera rendering an orthogonal projection on top of 
the scene.

Paul P.

 
- Original Message 
From: Robert Osfield [EMAIL PROTECTED]
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Wednesday, September 17, 2008 11:03:33 AM
Subject: Re: [osg-users] DataVariance

Hi Paul,

I can't say why your app might be hanging.  Do the standard OSG
example hang on your machine?

Try running the view single threaded as something that might at least
flesh out whether threading is an issue at all.

Robert.

On Wed, Sep 17, 2008 at 3:52 PM,  [EMAIL PROTECTED] wrote:
 Thanks for the quick response...

 Then, any idea why my application is hanging when I attempt to render my 
 first frame?? Below is the call stack of the two OSG threads.

 The problem seems to exist when I include two different parts of my scene 
 graph.  My scene graph consists of two Camera's at the root. Each renders to 
 a different image array (using camera-attach(..., image);).

 Each camera then has shared subgraphs attached which also contain a Camera 
 node (for Ortho view for part of the scene) but with no attachments.

 The osgViewer's camera is unchanged (and I really don't need to render 
 anything).

 Am I doing something wrong with these camera's?

 While I'm at it, one more questions:
 Is there  a way to turn on the OSG statistics overlay without using the 
 keyboard. I've added the StatsHandler event handler. With osgProducer, I used 
 to be able to do viewerEventHandler-setFrameStatsMode(mode).

 Paul P.

 THREAD #1
 #0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
    from /lib/tls/libpthread.so.0
 #1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
 #2  0x40b1e364 in OpenThreads::Condition::wait (this=0x8281f88,
    mutex=0x8281f80)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
 #3  0x40ad9241 in OpenThreads::BlockCount::block (this=0x8281f80) at Block:133
 #4  0x40ad7506 in osgViewer::ViewerBase::renderingTraversals (this=0x827ab58)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:733
 #5  0x40ad6a88 in osgViewer::ViewerBase::frame (this=0x827ab58,
    simulationTime=0)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:592
 #6  0x080858a7 in MyViewer::frame (this=0x827aad8, simTime=0)
    at MyViewer.hpp:131

 THREAD #2
 #0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
    from /lib/tls/libpthread.so.0
 #1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
 #2  0x40b1e364 in OpenThreads::Condition::wait (this=0x82786dc,
    mutex=0x82786d4)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
 #3  0x400aedf5 in OpenThreads::Block::block (this=0x82786d4) at Block:42
 #4  0x40a8cdc7 in osgViewer::Renderer::TheadSafeQueue::takeFront (
    this=0x82786cc)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:136
 #5  0x40a8ee38 in osgViewer::Renderer::draw (this=0x8278640)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:340
 #6  0x40a9085e in osgViewer::Renderer::operator() (this=0x8278640,
    context=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:640
 #7  0x4086352d in osg::GraphicsContext::runOperations (this=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsContext.cpp:688
 #8  0x4086c3ee in osg::RunOperations::operator() (this=0x829ea70,
 -    context=0x8272258)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:134
 #9  0x4086bc7d in osg::GraphicsOperation::operator() (this=0x829ea70, 
 object=Internal: global symbol `Object' found in RissAnimationPath.cpp 
 psymtab but not in symtab.
 Object may be an inlined function, or may be a template function
 (if a template, try specifying an instantiation: Objecttype).
 )
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:50
 #10 0x408af928 in osg::OperationThread::run (this=0x829e810)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/OperationThread.cpp:413
 #11 0x4086bbf9 in osg::GraphicsThread::run (this=0x829e810)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:38
 #12 0x40b1d672 in OpenThreads::ThreadPrivateActions::StartThread (
    data=0x829e820)
    at 
/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThread.c++:170

[osg-users] VR juggler OSG interaction

2008-11-20 Thread Steve Mccloud
hello all,

I am looking into interfacing OSG into VR juggler for immersive environment 
applications. I have read posts of mapping the vr juggler events to OSG and 
would like to duplicate that with additional functionality all which would be 
based in OSG. I am  struggling to fill in the missing pieces. Does anyone have 
experience in doing this? I would like to work towards using OSG primarly with 
as little effort in VR juggler as possible.

To be specific, how can I map the vrjuggler wand data and key events to the osg 
eventhandler overides correctly?

Thanks in advance,

Steve


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


[osg-users] Texture coordinates question

2008-11-20 Thread Argentieri, John-P63223
Gentlemen,
 
Is there a way to force vertex B to have a different texture coordinate
in each of triangle ABC and triangle BCD?
 
Texture coordinate indices? I don't understand how those are applied. If
the binding is per_primitive, will each of my triangles be textured by a
single pixel?
 

John Argentieri 
Software Engineer 
GENERAL DYNAMICS 
C4 Systems 
[EMAIL PROTECTED] 

This email message is for the sole use of the intended recipient(s) and
may contain GDC4S confidential or privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited. If
you are not an intended recipient, please contact the sender by reply
email and destroy all copies of the original message.

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


Re: [osg-users] 2Dimensional array

2008-11-20 Thread christophe loustaunau
there is little mistake with this :
osg::ref_ptrosg::Vec3Array currentDataArray;

it should be :
osg::ref_ptrosg::Vec3Array currentDataArray = new osg::Vec3Array;

With this it should work.

Regards.

On Thu, Nov 20, 2008 at 8:05 PM, Ed [EMAIL PROTECTED] wrote:

 So I could do something like this (in pseudocode)?

   std::vector osg::ref_ptrosg::Vec3Array  myData;
   osg::Vec3f currentDataPoint;
   Outerloop...{
   osg::ref_ptrosg::Vec3Array currentDataArray;
   Innerloop {
   currentDataPoint.set(...);
   currentDataArray-push_back(currentDataPoint);
   }
   myData.push_back(currentDataArray);
   }

 Ed

 christophe loustaunau wrote:

 Hi Ed,

 Maybe you could use  std::vectorosg::Vec3Array myArray .

 Regards.

 On Thu, Nov 20, 2008 at 7:46 PM, Ed [EMAIL PROTECTED] mailto:
 [EMAIL PROTECTED] wrote:

I need to create a 2Dimensional array of Vec3f.  I could do this
the ol'

osg::Vec3f **myArray

way, but wasn't sure if that is the way it should be done, as
opposed to osg::ref_ptr, etc.   The I thought, maybe there is
already a class for 2Dimensional arrays...but I didn't find one.
 Is there such a class?

Ed

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

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




 --
 Christophe Loustaunau.
 

 ___
 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




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


Re: [osg-users] Texture coordinates question

2008-11-20 Thread Jason Daly

Argentieri, John-P63223 wrote:

Gentlemen,
 
Is there a way to force vertex B to have a different texture 
coordinate in each of triangle ABC and triangle BCD?
 
Texture coordinate indices? I don't understand how those are applied. 
If the binding is per_primitive, will each of my triangles be textured 
by a single pixel?


PER_PRIMITIVE texture coordinates aren't allowed (only PER_VERTEX, or 
none at all).  Also, you don't want to use texture coordinate indices 
because they'll knock you into immediate mode (slow) rendering.


The easy way to get what you're looking for is to have arrays like this:

vertex array:  vA, vB, vC, vB, vC, vD
texcoord array:  tA, tB1, tC, tB2, tC, tD

where tB1 != tB2

and use a DrawArrays primitive set (ie: don't use DrawElements).  In 
other words, just duplicate the vertex positions explicitly in your 
vertex array, and make the corresponding texture coordinates whatever 
you need them to be.


--J

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


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Jan Ciger
 Hi Jaime,

 The way I would do passive stereo with two projectors is to attach the
 projectors directly to the two outputs from the graphics card, and
 then use horizontal split stereo to drive them.  The OSG supports this
 set up out of the box.  Using this setup will avoid any need to use
 quad buffer stereo and the limits on hardware/drivers that it
 imposses, and it also the best way to drive such a system
 quality/performance wise.


Actually, we have the same Cywiz/Xpo setup. The system works as a normal 
field-sequential system, the xpo boxes act as signal converters/demultiplexers 
converting the sequential video to two signals for the left and right 
projectors.

So yes, you run this with a QUAD_BUFFER mode.

The two outputs of a graphic card do not help, these walls have usually 4+ 
projectors with hardware blending.

Jan


signature.asc
Description: This is a digitally signed message part.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] question about passive 3D stereo using polarized projectors and openscenegraph

2008-11-20 Thread Jan Ciger
Hi Jaime,

 Hi everybody!!

 in my lab they want to re-use an old system composed by a Cyviz Stereo 3D
 Converter (xpo.2). It basically consists on a splitter which needs a
 frame-sequencial stereo source, and the output is two videos for two
 projectors (so passive stereo using polarized projectors  glasses). I am
 quite new with this 3D stuff... I think I should use OSG_STEREO_MODE with
 the QUAD_BUFFER  option. 

Yes, that is the correct setup for the this system (we have the Vizwall 
ourselves).

 My question is more about the graphics card
 required for that, do we need any special card for that? I have a laptop
 with a NVIDIA geforce 8700GT, do you think it is possible to use it like
 that?

Nope. You need an Nvidia Quadro or ATI FireGL card that has the QUAD_BUFFER 
support and has also the special mini DIN 3-pin synchronization connector. The 
cable from that goes into the xpo boxes, without the sync you will not get 
stable stereo.

The consumer cards (GeForce/Radeon) do not support neither the QUAD_BUFFER 
mode nor have the required hardware for the synchronization.

Regards,

Jan



signature.asc
Description: This is a digitally signed message part.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to set the size of a point in osg?

2008-11-20 Thread Ruqin Zhang
Hi,

I couldn't find any function to set the point size, can anyone help? Here is
the code:

osg::ref_ptrosg::Geometry averageGeom = new osg::Geometry();
averageGeom-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet:POINTS,
0, averageArray-size()));

In this way, it will draw the points based on default size. While, is there
any function
that I can change the size to what I want? Thanks a lot!

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


Re: [osg-users] How to set the size of a point in osg?

2008-11-20 Thread Glenn Waldron
Try something like this:

averageGeom-getOrCreateStateSet()-setAttribute( new osg::Point( 3.0f ),
osg::StateAttribute::ON );


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


On Thu, Nov 20, 2008 at 5:02 PM, Ruqin Zhang [EMAIL PROTECTED] wrote:

 Hi,

 I couldn't find any function to set the point size, can anyone help? Here
 is the code:

 osg::ref_ptrosg::Geometry averageGeom = new osg::Geometry();
 averageGeom-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet:POINTS,
 0, averageArray-size()));

 In this way, it will draw the points based on default size. While, is there
 any function
 that I can change the size to what I want? Thanks a lot!

 Ruqin

 ___
 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] AutoTransform scaling precision.

2008-11-20 Thread Marjamaa, Jonathon E
Hello,

 I am seeing some odd behavior with AutoTransform.  The following .osg
 file creates an AutoTransform with a grid of lines attached.  The
 lines are each separated by one unit of space.  When I look at the
 file in osgviewer, I see that this spacing is not kept.  It looks like
 the auto-scale is not exact.  The imprecision seems to vary with
 projection, viewport size, and on my windows dual-screen setup it
 varies with monitor!  If I make the window very wide and short, the
 shape is scaled so much as to actually shrink significantly in screen
 space.
 
 Am I using the AutoTransform incorrectly?  Am I expecting this to do
 more than was intended?
 
 Thanks,
 Jonathon Marjamaa
 
 AutoTransform {
   UniqueID AutoTransform_0
   nodeMask 0x
   cullingActive TRUE
   referenceFrame RELATIVE
   position 0 0 0
   rotation 0 0 0 1
   scale 1 1 1
   pivotPoint 0 0 0
   autoUpdateEyeMovementTolerance 0
   autoRotateMode ROTATE_TO_SCREEN
   autoScaleToScreen TRUE
   num_children 2
   Geode {
 UniqueID Geode_1
 nodeMask 0x
 cullingActive TRUE
 num_drawables 2
 Geometry {
   useDisplayList TRUE
   useVertexBufferObjects FALSE
   VertexArray UniqueID Vec3Array_3 Vec3Array 200
   {
 0 0 0
 0 150 0
 0 0 0
 150 0 0
 2 0 0
 2 150 0
 0 2 0
 150 2 0
 4 0 0
 4 150 0
 0 4 0
 150 4 0
 6 0 0
 6 150 0
 0 6 0
 150 6 0
 8 0 0
 8 150 0
 0 8 0
 150 8 0
 10 0 0
 10 150 0
 0 10 0
 150 10 0
 12 0 0
 12 150 0
 0 12 0
 150 12 0
 14 0 0
 14 150 0
 0 14 0
 150 14 0
 16 0 0
 16 150 0
 0 16 0
 150 16 0
 18 0 0
 18 150 0
 0 18 0
 150 18 0
 20 0 0
 20 150 0
 0 20 0
 150 20 0
 22 0 0
 22 150 0
 0 22 0
 150 22 0
 24 0 0
 24 150 0
 0 24 0
 150 24 0
 26 0 0
 26 150 0
 0 26 0
 150 26 0
 28 0 0
 28 150 0
 0 28 0
 150 28 0
 30 0 0
 30 150 0
 0 30 0
 150 30 0
 32 0 0
 32 150 0
 0 32 0
 150 32 0
 34 0 0
 34 150 0
 0 34 0
 150 34 0
 36 0 0
 36 150 0
 0 36 0
 150 36 0
 38 0 0
 38 150 0
 0 38 0
 150 38 0
 40 0 0
 40 150 0
 0 40 0
 150 40 0
 42 0 0
 42 150 0
 0 42 0
 150 42 0
 44 0 0
 44 150 0
 0 44 0
 150 44 0
 46 0 0
 46 150 0
 0 46 0
 150 46 0
 48 0 0
 48 150 0
 0 48 0
 150 48 0
 50 0 0
 50 150 0
 0 50 0
 150 50 0
 52 0 0
 52 150 0
 0 52 0
 150 52 0
 54 0 0
 54 150 0
 0 54 0
 150 54 0
 56 0 0
 56 150 0
 0 56 0
 150 56 0
 58 0 0
 58 150 0
 0 58 0
 150 58 0
 60 0 0
 60 150 0
 0 60 0
 150 60 0
 62 0 0
 62 150 0
 0 62 0
 150 62 0
 64 0 0
 64 150 0
 0 64 0
 150 64 0
 66 0 0
 66 150 0
 0 66 0
 150 66 0
 68 0 0
 68 150 0
 0 68 0
 150 68 0
 70 0 0
 70 150 0
 0 70 0
 150 70 0
 72 0 0
 72 150 0
 0 72 0
 150 72 0
 74 0 0
 74 150 0
 0 74 0
 150 74 0
 76 0 0
 76 150 0
 0 76 0
 150 76 0
 78 0 0
 78 150 0
 0 78 0
 150 78 0
 80 0 0
 80 150 0
 0 80 0
 150 80 0
 82 0 0
 82 150 0
 0 82 0
 150 82 0
 84 0 0
 84 150 0
 0 84 0
 150 84 0
 86 0 0
 86 150 0
 0 86 0
 150 86 0
 88 0 0
 88 150 0
 0 88 0
 150 88 0
 90 0 0
 90 150 0
 0 90 0
 150 90 0
 92 0 0
 92 150 0
 0 92 0
 150 92 0
 94 0 0
 94 150 0
 0 94 0
 150 94 0
 96 0 0
 96 150 0
 0 96 0
 150 96 0
 98 0 0
 98 150 0
 0 98 0
 150 98 0
 100 0 0
 100 150 0
 0 100 0
 150 100 0
   }
   VertexIndices UniqueID UShortArray_4 UShortArray 200
   {
 0 1 2 3 4 5 6 7 8 9
 10 11 12 13 14 15 16 17 18 19
 20 21 22 23 24 25 26 27 28 29
 30 31 32 33 34 35 36 37 38 39
 40 41 42 43 44 45 46 47 48 49
 50 51 52 53 54 55 56 57 58 

Re: [osg-users] How to set the size of a point in osg?

2008-11-20 Thread Ferdi Smit
Just to be complete, you can also set it in the vertex shader by writing 
to gl_Pointsize; however, in that case, you have to enable 
GL_VERTEX_PROGRAM_POINT_SIZE by setMode(GL_VERTEX_PROGRAM_POINT_SIZE, 
osg:: StateAttribute::ON); on a stateset.


Ruqin Zhang wrote:

Hi,

I couldn't find any function to set the point size, can anyone help? 
Here is the code:


osg::ref_ptrosg::Geometry averageGeom = new osg::Geometry();
averageGeom-addPrimitiveSet(new 
osg::DrawArrays(osg::PrimitiveSet:POINTS, 0, averageArray-size()));


In this way, it will draw the points based on default size. While, is 
there any function

that I can change the size to what I want? Thanks a lot!

Ruqin


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



--
Regards,

Ferdi Smit
INS3 Visualization and 3D Interfaces
CWI Amsterdam, The Netherlands

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


Re: [osg-users] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Csaba Halász
On Thu, Nov 20, 2008 at 8:12 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:

 When it hung, I had just created a 4th view (=4th context).
 Uncoincidentally, there are 4 threads on GraphicsThread::run(), which calls
 GraphicsContext::makeCurrent(), which calls
 GraphicsWindowWin32::makeCurrentImplementation, which is stuck on the
 wglMakeCurrent() call. One of those 4 is stuck in the middle of the graphics
 driver DLL, but I'm not sure that's relevant.

Yes, exactly the same for me. And I am on linux.
I wondered if simply calling cancel() on the threads is a good idea.
I'd feel a lot better if the threads would check for an exit flag at a
well-defined place. Could it be possible that one of the threads is
inside the gl lib doing something and then it gets abruptly cancelled
without releasing some critical resource? Of course the gl lib should
make sure cancellation is disabled while inside such code, but who
knows. Assuming a resource is left locked could explain why the
makeCurrent is blocked - it might be (busy-)waiting on that very
resource.

Also, I have added a join() call after the cancel in
GraphicsContext.cpp and Camera.cpp, that have the strange effect of
completely locking up X and not just the test app.
Robert's changed version doesn't seem to make a difference here.

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


[osg-users] Cameras a NON-Moving Terrain

2008-11-20 Thread Allen
Hi.  Could someone tell me or point me in the direction of finding an 
example that illustrates how to move the camera in a scene but NOT make 
it appear that the terrain is moving?  I want a perspective terrain w/in 
my scene and I want to move the camera through the scene but I DO  NOT  
WANT it to appear that the Earth is moving when the user moves the 
mouse.  I just can not figure this feat out.  Can anyone help me?

--Allen

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


Re: [osg-users] How to set the size of a point in osg?

2008-11-20 Thread Ruqin Zhang
Thanks guys. Then how about Line? Seems there is no osg::Line. Thanks!

On Thu, Nov 20, 2008 at 4:33 PM, Ferdi Smit [EMAIL PROTECTED] wrote:

 Just to be complete, you can also set it in the vertex shader by writing to
 gl_Pointsize; however, in that case, you have to enable
 GL_VERTEX_PROGRAM_POINT_SIZE by setMode(GL_VERTEX_PROGRAM_POINT_SIZE, osg::
 StateAttribute::ON); on a stateset.

 Ruqin Zhang wrote:

 Hi,

 I couldn't find any function to set the point size, can anyone help? Here
 is the code:

 osg::ref_ptrosg::Geometry averageGeom = new osg::Geometry();
 averageGeom-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet:POINTS,
 0, averageArray-size()));

 In this way, it will draw the points based on default size. While, is
 there any function
 that I can change the size to what I want? Thanks a lot!

 Ruqin
 

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




 --
 Regards,

 Ferdi Smit
 INS3 Visualization and 3D Interfaces
 CWI Amsterdam, The Netherlands


 ___
 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] Cameras a NON-Moving Terrain

2008-11-20 Thread Sukender
Hi Allen,

Do you mean you want a subgraph to appear as if it was at an infinite distance, 
such as for skyboxes?
If so, you can try to create your own transform that removes the translation. 
That costs 4 lines of code (See 
http://pvle.sourceforge.net/Doc/Html/MoveWithEyePointTransform_8h-source.html 
for an example).
You may also create a transform that removes rotation if needed.

Sincerely,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

Le Thu, 20 Nov 2008 23:45:27 +0100, Allen [EMAIL PROTECTED] a écrit:

 Hi.  Could someone tell me or point me in the direction of finding an
 example that illustrates how to move the camera in a scene but NOT make
 it appear that the terrain is moving?  I want a perspective terrain w/in
 my scene and I want to move the camera through the scene but I DO  NOT
 WANT it to appear that the Earth is moving when the user moves the
 mouse.  I just can not figure this feat out.  Can anyone help me?
 --Allen

 ___
 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 set the size of a point in osg?

2008-11-20 Thread Glenn Waldron
Look at osg::LineWidth


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


On Thu, Nov 20, 2008 at 5:40 PM, Ruqin Zhang [EMAIL PROTECTED] wrote:

 Thanks guys. Then how about Line? Seems there is no osg::Line. Thanks!


 On Thu, Nov 20, 2008 at 4:33 PM, Ferdi Smit [EMAIL PROTECTED] wrote:

 Just to be complete, you can also set it in the vertex shader by writing
 to gl_Pointsize; however, in that case, you have to enable
 GL_VERTEX_PROGRAM_POINT_SIZE by setMode(GL_VERTEX_PROGRAM_POINT_SIZE, osg::
 StateAttribute::ON); on a stateset.

 Ruqin Zhang wrote:

 Hi,

 I couldn't find any function to set the point size, can anyone help? Here
 is the code:

 osg::ref_ptrosg::Geometry averageGeom = new osg::Geometry();
 averageGeom-addPrimitiveSet(new
 osg::DrawArrays(osg::PrimitiveSet:POINTS, 0, averageArray-size()));

 In this way, it will draw the points based on default size. While, is
 there any function
 that I can change the size to what I want? Thanks a lot!

 Ruqin
 

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




 --
 Regards,

 Ferdi Smit
 INS3 Visualization and 3D Interfaces
 CWI Amsterdam, The Netherlands


 ___
 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] CompositeViewer addView threading issue on Windows?

2008-11-20 Thread Csaba Halász
On Thu, Nov 20, 2008 at 4:50 PM, Csaba Halász [EMAIL PROTECTED] wrote:
 On Thu, Nov 20, 2008 at 3:51 PM, Csaba Halász [EMAIL PROTECTED] wrote:

 I wonder if I can try to use software rendering to see if it makes a 
 difference.

 I have run it with mesa in a nested x server, no hangs. After each
 added view, however, I got a single Warning: detected OpenGL error
 'invalid operation' after RenderBin::draw(,) message (ie. *not* every
 frame). Don't know if that is relevant.

 Also, the software rendering might be too slow to produce the problem.
 Anybody got some further suggestions?

I think the intel driver is entirely open-source, can somebody try
with that? That should at least point to where the rogue thread is
spinning. Assuming it exhibits the same behaviour.

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


[osg-users] Cameras Non-Moving Terrain

2008-11-20 Thread Allen

Hi Sukender, :-)

Well, what I want is the ability to have the terrain to appear to 
remain still while I move the camera around on it.  The glider example 
and the animate example are what I'm basing my research/work on and in 
both cases, when the camera moves it appears that the object I'm 
looking at is actually moving and not the camera.


So, I must be able to move through the terrain like the 
TrackballManipulator allows but move the camera and leave the terrain 
still. 

Is this any clearer?  I've looked W the link you provided but I've NO 
clue as to how to use what you are suggesting.  I'm too much a newbie to 
3d Visualization - about 1.5 yrs worth - to understand what you're 
referring to.  If you know of any example(s) that I could look @ and 
copy, that would be awesome!!!  Do you know of or have any?


Message: 5
Date: Thu, 20 Nov 2008 23:51:03 +0100
From: Sukender [EMAIL PROTECTED]
Subject: Re: [osg-users] Cameras  a NON-Moving Terrain
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-15

Hi Allen,

Do you mean you want a subgraph to appear as if it was at an infinite distance, 
such as for skyboxes?
If so, you can try to create your own transform that removes the translation. 
That costs 4 lines of code (See 
http://pvle.sourceforge.net/Doc/Html/MoveWithEyePointTransform_8h-source.html 
for an example).
You may also create a transform that removes rotation if needed.

Sincerely,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

Le Thu, 20 Nov 2008 23:45:27 +0100, Allen [EMAIL PROTECTED] a ?crit:



 Hi.  Could someone tell me or point me in the direction of finding an
 example that illustrates how to move the camera in a scene but NOT make
 it appear that the terrain is moving?  I want a perspective terrain w/in
 my scene and I want to move the camera through the scene but I DO  NOT
 WANT it to appear that the Earth is moving when the user moves the
 mouse.  I just can not figure this feat out.  Can anyone help me?
 --Allen

 ___
 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] Dual screen support on Linux using TwinView

2008-11-20 Thread Michael
Hey Robert

We have 2 separate logical views (I guess). Essentially we have 2 projectors
that can each be placed at any location and orientation in the room and they
project onto objects in the room. This is not a tiled display, and we are
not worried about overlap. We are also doing some render to texture
operations which is why we have different views. Each monitor output is
driving a single projector. So, we have 2 projectors and a couple of RTT
cameras.

The projectors have their own projection and view matrices, but share the
same scene graph data for drawing. One of the projectors does shadow removal
for the other one, so we need to control the render order. So, we need each
monitor output to drive one of our views for the projector, using the 1
graphics context.

I appreciate the help (and patience!)

Cheers
Michael


On Thu, Nov 20, 2008 at 7:38 PM, Robert Osfield [EMAIL PROTECTED]wrote:

 Hi Michael,

 On Thu, Nov 20, 2008 at 12:09 AM, Michael [EMAIL PROTECTED]
 wrote:
  This fails on the second display because OSG can't connect to screen 0:1,
  because there is only 1 xscreen. Clearly I am doing this wrong, but I'm
 not
  sure of the correct way.

 If you have only only X screen then you'll only be able to open up a
 window on that one... so you'll need to use the screenNum set to 0 fro
 both contexts, or

  Something like this?
  1. Create a single GraphicsContext on screen 0, with width=2048 (both
  displays)
  2. Create my views, and somehow tell each one to only render on half of
 the
  context?

 If you a grabbing the whole of both displays I would create a single
 graphics context that goes across both physical displays.  Otherwise
 you'll need to create two graphics contexts on the same X11 screenNum
 but with the second window starting at a xpos of 1024.

 Now what to do about the views depends upon you actual needs.  Do you
 have two separate logical views of doing you have  single view that is
 just made up of two cameras (like looking out of two adjacent
 real-world windows that share the same view).  If you have only single
 view, then do the two halves of it but up against each other or do
 they overlap?

 Could you have a bash at explain what you are specifically trying to
 achieve as the advice to give is different for all the different
 cases.

 Robert.
 ___
 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] Two VirtualPlanetBuilder problems

2008-11-20 Thread Kramer, Robert W
I have a very large imagery set (~1 million files).  When running
VirtualPlanetBuilder 0.9.9, I am limited to about 482 -t imagery files
for a given vpbmaster command before I get ERROR 4: Failed to open file
/mp2/osg/file482.tif for each -t file listed after the 482nd file
listed in the script and the *.ive files are not created.

The command I am using is: vpbmaster --PagedLOD --geocentric --terrain
-e 30.00 20.00 1.00 1.00 -o 30_20.ive
Running with the -t option pointing to the directory results in the same
error.  What do I need to open up to allow more files to be processed
per vpbmaster run?

Secondly, a test of a small VPB database of 1.34GB of CADRG imagery
produced 14.941GB of *.ive files using VPB 0.9.7 in 23 minutes time.
The same test with VPB Version 0.9.9 produced 14.826GB of *.ive files in
32 minutes.  I was not expecting the newer VPB to only produce a tiny
(1%) amount of compression, while taking about 40% more time.
Furthermore, I'm perplexed that my resulting output files are 11 times
the input imagery (1m black and white Controlled Imagery Base).  Using
the --compressed option made no difference to the resulting *.ive sizes.
I require all levels of detail, so expect some increase in database
size, but can anybody help me reduce this to a smaller multiple as I'm
running out of disk space!  What do I need to do to turn on Heightfield
compression, for example.

Robert Kramer

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


Re: [osg-users] Cameras Non-Moving Terrain

2008-11-20 Thread Gordon Tomlinson
the norm is to move the camera/view point and not the terrain ( the track
ball is designed to look at a model rather then move around )

See motion models such as drive and fly  ( in DriveManipulator.cpp and
FlightManipulator ) 

Also see the tutorials' section
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials


See Paul's quick start guide http://www.osgbooks.com/books/osg_qs.html

__
Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com www.gordontomlinson.com 
__

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Allen
Sent: Thursday, November 20, 2008 6:45 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Cameras  Non-Moving Terrain

Hi Sukender, :-)

Well, what I want is the ability to have the terrain to appear to 
remain still while I move the camera around on it.  The glider example 
and the animate example are what I'm basing my research/work on and in 
both cases, when the camera moves it appears that the object I'm 
looking at is actually moving and not the camera.

So, I must be able to move through the terrain like the 
TrackballManipulator allows but move the camera and leave the terrain 
still. 

Is this any clearer?  I've looked W the link you provided but I've NO 
clue as to how to use what you are suggesting.  I'm too much a newbie to 
3d Visualization - about 1.5 yrs worth - to understand what you're 
referring to.  If you know of any example(s) that I could look @ and 
copy, that would be awesome!!!  Do you know of or have any?

Message: 5
Date: Thu, 20 Nov 2008 23:51:03 +0100
From: Sukender [EMAIL PROTECTED]
Subject: Re: [osg-users] Cameras  a NON-Moving Terrain
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=iso-8859-15

Hi Allen,

Do you mean you want a subgraph to appear as if it was at an infinite
distance, such as for skyboxes?
If so, you can try to create your own transform that removes the
translation. That costs 4 lines of code (See
http://pvle.sourceforge.net/Doc/Html/MoveWithEyePointTransform_8h-source.htm
l for an example).
You may also create a transform that removes rotation if needed.

Sincerely,

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

Le Thu, 20 Nov 2008 23:45:27 +0100, Allen [EMAIL PROTECTED] a
?crit:


  Hi.  Could someone tell me or point me in the direction of finding an
  example that illustrates how to move the camera in a scene but NOT make
  it appear that the terrain is moving?  I want a perspective terrain w/in
  my scene and I want to move the camera through the scene but I DO  NOT
  WANT it to appear that the Earth is moving when the user moves the
  mouse.  I just can not figure this feat out.  Can anyone help me?
  --Allen
 
  ___
  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] Two VirtualPlanetBuilder problems

2008-11-20 Thread J.P. Delport

Hi,

what operating system are you running on?

Kramer, Robert W wrote:

I have a very large imagery set (~1 million files).  When running
VirtualPlanetBuilder 0.9.9, I am limited to about 482 -t imagery files
for a given vpbmaster command before I get ERROR 4: Failed to open file
/mp2/osg/file482.tif for each -t file listed after the 482nd file
listed in the script and the *.ive files are not created.

The command I am using is: vpbmaster --PagedLOD --geocentric --terrain
-e 30.00 20.00 1.00 1.00 -o 30_20.ive
Running with the -t option pointing to the directory results in the same
error.  

The -t directory is what I also use normally.

I've just checked the dirs for a previous build and I have -t pointing 
to a dir with 1900 files and it worked under Linux.



What do I need to open up to allow more files to be processed
per vpbmaster run?


Not sure there is a special option that will make it work. Maybe you can 
try splitting the files into multiple dirs you pass to -t?




Secondly, a test of a small VPB database of 1.34GB of CADRG imagery
produced 14.941GB of *.ive files using VPB 0.9.7 in 23 minutes time.
The same test with VPB Version 0.9.9 produced 14.826GB of *.ive files in
32 minutes.  I was not expecting the newer VPB to only produce a tiny
(1%) amount of compression, while taking about 40% more time.
Furthermore, I'm perplexed that my resulting output files are 11 times
the input imagery (1m black and white Controlled Imagery Base).  Using
the --compressed option made no difference to the resulting *.ive sizes.
I require all levels of detail, so expect some increase in database
size, but can anybody help me reduce this to a smaller multiple as I'm
running out of disk space!  What do I need to do to turn on Heightfield
compression, for example.


Robert O talked about some new gz compression in a recent thread, so if 
he could post the command line he used, that might help reduce the size.


jp



Robert Kramer

___
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