Re: [osg-users] Atomic Global Mutex, comments?

2010-12-18 Thread Tim Moore
On Sat, Dec 18, 2010 at 2:27 AM, David Fries da...@fries.net wrote:

 Computers are coming out with more and more cores which will only
 increase the number of threads in use.  Currently OpenSceneGraph has a
 bottleneck in scene graph operations limiting the performance of
 multithreaded programs, even when they are operating on completely
 separate nodes as the Drawable, Node, and StateAttribute addParent and
 removeParent all contend on one global mutex.

 OpenThreads::Mutex* getRefMutex() const { return
 getGlobalReferencedMutex(); }

Thanks for looking  into this. Some of us have recently been looking hard at
thread safety and performance issues in OSG.

The global referenced mutex is unfortunate, not least because its use is
buggy. I would facetiously call it a Writer lock; writers of the _parents
list lock it, but none of the readers do! So obviously this should be some
kind of ReaderWriter lock, but that has its own issues, not least of which
is that the OpenThreads ReaderWriterMutex implementation is suspected of
being buggy, if I recall correctly.

So, I don't know what to say about your Atomic Global Mutex work. My own
feeling  is that something like Linux' RCU list
(http://en.wikipedia.org/wiki/Read-copy-update), which would eliminate most
of not all of the synchronization on the parent list, is a better approach.
This is even more true if the global mutex were being used correctly :)

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


Re: [osg-users] [3rdparty] Rendering into cegui element

2010-12-18 Thread issam boughanmi
well 


i solved my problem to render into cegui elmement but i am facing another one

plesae see the attached image

[Image: http://img811.imageshack.us/img811/7510/screenah.jpg ]

please note the cegui listbox in the left 



here my code to create the textitems dynamically

Code:

 AvionsListBox = m_pHUD-GetWidget(AvionsListBox);
  static_castCEGUI::Listbox*(AvionsListBox)-setMultiselectEnabled(false);
   
  ListboxTextItem * listBoxItem = new ListboxTextItem(Cessna 172-p, 1);
  listBoxItem-setSelectionBrushImage(WindowsLook, MultiListSelectionBrush);
  static_castCEGUI::Listbox*(AvionsListBox)-addItem(listBoxItem);

  listBoxItem = new ListboxTextItem(L39 - Albatros. ,2);
  listBoxItem-setSelectionBrushImage(WindowsLook, MultiListSelectionBrush);
  static_castCEGUI::Listbox*(AvionsListBox)-addItem(listBoxItem);




this is something related to cegui definitivelly but since i got no support on 
their forum i ask here

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





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


Re: [osg-users] Create Cylinder Around Line

2010-12-18 Thread Sanat Talmaki
Hi Ullrich,

I followed the procedure suggested by you and it worked perfectly. However you 
mentioned that the procedure below 
But you should replace this with properly constructed geometry.

I didn't quite follow what you meant by that.

Also, I would like to save each individual geode (geometry) as an osg file to 
use later and not just load in this scene graph. Is there a way I can do that ?

Looking forward to your suggestion.


 For a quick proof of concept and convenience you can use ShapeDrawables for 
 the cylinders.
 But you should replace this with properly constructed geometry.
 
 That's only a rought outline of course. You may want to skip the NodeVisitor 
 bit for
 starters and simply use a hard-coded list of start/end points.
 


Thanks,
Sanat

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





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


[osg-users] osgAnimation deform TangentSpace ( osgUtil::TangentSpaceGenerator ) for BumpMapping

2010-12-18 Thread Peter Wrobrl
Hi,

I have a Normal Map for an animated Character. To my understanding, I need to 
transfrom the Tangent and BiNormal which I got from 
osgUtil::TangentSpaceGenerator with the osgAnimation::RigTransform( 
Implementation ), otherwise Bump Mapping will not look correct. The 
RigTransform computeNormal method should do the job.

Is there a way to access RigTransfrom in RigGeometry and transform the 
additional VertexAttributes per update cycle ?
Any other Ideas how I could properly calculate the TangentSpace ?


Thank you!

Cheers,
ParticlePeter

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





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


Re: [osg-users] VertexBufferObject usage very slow...

2010-12-18 Thread Wojciech Lewandowski
Since you wrote you use gDebugger, please check if glDrawElements index 
buffers are  taken from CPU or GPU memory. If its CPU mem then all should be 
clear...

Wojtek Lewandowski

-Original Message- 
From: Sean Spicer

Sent: Friday, December 17, 2010 7:57 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] VertexBufferObject usage very slow...

Robert,

Some more data...

Looks like we're drawing approx 100K tri-strips every frame.  The
glDrawElements call is the culprit...though I'm still baffled by why
it is so much slower with VBOs than in immediate mode.  Perhaps the
drawing isn't sorted by VBO so that all of the triangles drawn from
each VBO are draw in single bind call ?

sean
_
Sean Spicer
Aqumin (www.aqumin.com)
Office+1.713.781.2121
Mobile...+1.713.447.2706
Fax...+1.713.781.2123



On Fri, Dec 17, 2010 at 11:37 AM, Sean Spicer sean.spi...@aqumin.com 
wrote:

Hi Robert,

We are not updating the data frame-to-frame, which is why this is so
baffling.  I'm working through the issue with gDebugger now - if you
don't have any suggestions off the top of your head, then I'll start
digging and report back what I find, since I don't have time try and
duplicate the issue outside our app.

cheers,

sean
_
Sean Spicer
Aqumin (www.aqumin.com)
Office+1.713.781.2121
Mobile...+1.713.447.2706
Fax...+1.713.781.2123



On Fri, Dec 17, 2010 at 2:36 AM, Robert Osfield
robert.osfi...@gmail.com wrote:

reproduces the problem you are seeing?




___
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] Render to texture 3D

2010-12-18 Thread Julien Valentin
Hi,
I'm trying to make efficient fluid simulation with osg
I've just found this page :
http://www.mail-archive.com//msg05568.html

It look pretty great as my 1 camera per slice code is very CPU time consuming.

I develop a geometry shader that change gl_layer value per primitive.
It work so i change my texture my texture attachement to camera's FBO as follow:

Code:

for(int i=0;i_depth;i++){
//one cam per slice
_cameras[i]-attach( osg::Camera::COLOR_BUFFER,tex,0,i,false);
}

to

for(int i=0;i1;i++){
//one overalll camera
_cameras[0]-attach( 
osg::Camera::COLOR_BUFFER,tex,0,osg::Camera::FACE_CONTROLLED_BY_GEOMETRY_SHADER);
}





But this change make a crash:


Code:

RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8da8




Any idea?

Thank you!

Cheers,
Julien[/code]

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





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


Re: [osg-users] Atomic Global Mutex, comments?

2010-12-18 Thread David Fries
On Sat, Dec 18, 2010 at 01:53:36PM +0100, Tim Moore wrote:
 On Sat, Dec 18, 2010 at 2:27 AM, David Fries da...@fries.net wrote:
 
  Computers are coming out with more and more cores which will only
  increase the number of threads in use.  Currently OpenSceneGraph has a
  bottleneck in scene graph operations limiting the performance of
  multithreaded programs, even when they are operating on completely
  separate nodes as the Drawable, Node, and StateAttribute addParent and
  removeParent all contend on one global mutex.
 
  OpenThreads::Mutex* getRefMutex() const { return
  getGlobalReferencedMutex(); }
 
 Thanks for looking  into this. Some of us have recently been looking hard at
 thread safety and performance issues in OSG.
 
 The global referenced mutex is unfortunate, not least because its use is
 buggy. I would facetiously call it a Writer lock; writers of the _parents
 list lock it, but none of the readers do! So obviously this should be some
 kind of ReaderWriter lock, but that has its own issues, not least of which
 is that the OpenThreads ReaderWriterMutex implementation is suspected of
 being buggy, if I recall correctly.
 
 So, I don't know what to say about your Atomic Global Mutex work. My own
 feeling  is that something like Linux' RCU list
 (http://en.wikipedia.org/wiki/Read-copy-update), which would eliminate most
 of not all of the synchronization on the parent list, is a better approach.
 This is even more true if the global mutex were being used correctly :)

The kernel is in a unique position when it comes to RCU, in that it
does the scheduling and it can know that all users of the previous
structure are finished with it.  There's also the question of does it
cause problems to be looking at the old set of parents when another
thread made and change.

-- 
David Fries da...@fries.net
http://fries.net/~david/ (PGP encryption key available)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] MS Kinect - official drivers available

2010-12-18 Thread Torben Dannhauer
Hi Jan,

I agree.

Here is the journal article I talkes about
http://www.heise.de/open/meldung/Offizielle-Open-Source-Treiber-fuer-Kinect-1152510.html

This is the article translated by google:
http://translate.google.com/translate?u=http%3A%2F%2Fwww.heise.de%2Fopen%2Fmeldung%2FOffizielle-Open-Source-Treiber-fuer-Kinect-1152510.htmlsl=detl=enhl=deie=UTF-8

Does the non-openNI Driver work on win, Linux and Mac?

Best regards,
Torben

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





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