Re: [osg-users] Separate sub-graphs of the same scene

2009-03-17 Thread Guy

Hi,
 What I'm trying to accomplish is to draw a given pattern instead of the
projected object, on special condition. That pattern is no longer
3DWorld oriented, but instead, screen pixels oriented, with the
exception of keeping the 3D distance of the 3DWorld object. 

 Suppose I have a model of a 3D house and a model of a truck, and the
condition is The truck is more than 300 feet from the house, then when
the condition is true, instead of drawing the truck, I want the pixel
(30,35) to be drawn blue and pixel (78,90) to be drawn green.

 The important thing is that if the truck ZBuffer value was 'Z' I want
pixels ZBuffer value to be the same 'Z', now since the truck has many
vertices and therefore many 'Z's I only refer to the 'Z' of the middle
of the truck bounding sphere.

 I hope it makes more sense now...

I forgot to mention that in osg1.2 instead of 'Camera' for the
orthographic projection I used 'osg::Projection' which as far as I
understand only changes the projection-view matrices and doesn't harm
the Z buffer, but the pixels were drawn above all other objects.

 I also 4got to mention that in osg2.8 and the Camera, I tried to render
it PRE_ORDER, IN_ORDER and POST_ORDER with no different results.

I never used the stencil buffer for anything but if I understand
correctly it just prevents masked pattern on the viewport from being
drawn, which is not my goal. Anyway, I'm going to read about stencil in
the Red book. It wouldn't hurt. :)

Thanks,
 Guy.  

I'm not sure I entirely understand what you're trying to accomplish,
but 
perhaps you want to look into using a stencil buffer and/or pixel
shader 
to control what gets rendered?

Guy wrote:

 Hello,

  

  I'm trying to merge two sub-graphs to the same image. It doesn't work

 so well, so I'll try to explain what in general I'm trying to achieve,

 then my not working so well solutions, and then the questions J

  

 So, in general I want to replace an object (A) in the scene with 
 another object (B) on some condition. The object (B) is some pixels 
 which are lit up. The important thing is to keep the 3D scene distance

 from the camera for both objects, so if the object is obscured by 
 another, then both (A) and (B) will be obscured, and if some other 
 object (C) is obscured by (A), it will still be obscured by (B). 
 Object (B) might be partially transparent.

  

 Not working so well solution 1:

 Have switch for (A)/(B).

 The position of (A) is multiplied by view-projection matrix, the 
 result is pos'. (B) is a set of points which their vertices are pos' 
 with (x,y) replaced by the pixels I want to lit, and the new positions

 are multiplied by the inverse-projection invers-view matrices.

 This solution had problems with setting the right pixels.

  

 Not working so well solution 2:

 Object (B) is a set of pixel under ABSOLUTE_REF orthographic 
 projection with (x,y) of the pixels I want to lit and z is the 
 negative distance between (A) and the camera.

 This solution has the correct pattern of the lit pixels, but the Z 
 order doesn't seems to be correct.

  

 The implementation of solution 2 is to add camera with ABSOLUTE_RF and

 orthographic projection. View is identity. I set the clear mask to 0 
 since I don't want the Z-Buffer to be cleared. (opposed to huds and 
 that kind of implementations).

  

 I used the osgviewer to put the cow at 0,0,-300 under absolute_rf, and

 a point at 0,0,0 under separate camera with orthographic projection, 
 and the point was hidden by the cow (which is a mistake).

 I thought that I might need to set the zNear/zFar of both camera's to 
 be the same, but in this simple example it shouldn't matter since the 
 point Z is zero...

  

 So first, do I have to set the zNear/zFar of both camera's to be the
same?

  

 Any ideas whats going wrong?

  

 Other solutions for the problem?

  

 Btw, I tried to replace the points by quads under orthographic 
 projection. The results were the same.

  

 Thanks,

  Guy.

  

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


[osg-users] Multithreading crash due to osgDb::Registry::instance()

2009-03-17 Thread I-Nixon, Anthony D
I've encountered a crash when using CompositeViewer in Multithreaded
mode due to concurrent access to osgDb::Registry::instance().

The usage scenario is having two views (that have an empty scene graph -
since no data has been loaded, osgdb::Registry::instance() hasn't yet
been called).

On the first frame, each of the render threads calls
osgDb::Registry::instance(), and one gets back a null pointer (which is
kind of bad for an instance :-)

The fix for me is easy - just call osgDb::Registry::instance() sometime
before starting rendering, but a more general solution would be better,
of course.

This is with OSG 2.8.0 - although there don't appear to have been any
changes in this area in the trunk, either.

I've only confirmed this on Windows XP and Visual C++ 8. 




Anthony Nixon

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


[osg-users] QOSGWidget and additional dialogs

2009-03-17 Thread Roman Grigoriev
Good day!

I use QT dialogs to create my app interface and use QOSGWidget based on osg
example

So when I need to load my objects I call my dialog using dialog-show(); and
after I attach my nodes to root node 

I call dialog-close(); and all works fine but only in the first time so
when I second time use this sequence I got freeze window and even keyboard
events don't work

If I load my objects using keypress event and not using QT dialogs all works
fine.

I think that after I call dialog I need to set focus to main window and I
don't know how can I do this.

Thanx in advance

Bye

 

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


[osg-users] Projection matrix and inline or nested cameras

2009-03-17 Thread John Cummings
First, I'm using OSG 2.8.0

I'm have been porting an old application from a homegrown OpenGL
scene-graph to osg and I've come across an issue that I'm sure there is
a way to handle, but I seem to be unable to locate just the right
combination of Camera, Drawables, etc.

While most of the old nodes are simply geometry nodes, some of them do
their own Projection before issuing geometry-type calls. I may want to
do this for a variety of reasons, including allowing finer grained
control of the depth buffer or simply covering over something that has
already been drawn. In my old OpenGL code, the render method for one of
these problem  nodes may look something like:

void MyNode::Render()
{
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();

// Then either:
glOrtho (...);
// or
gluPerspective(...);
// or
glFrustrum();

glMatrixMode(GL_MODELVIEW);

// begin, end, etc.

glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);

RenderChildren();
}

I've played with the Camera node and NESTED_RENDER seemed from its
name to be what I wanted. That is, I though I could simply attach an
osg::Camera node anywhere in my scene graph and it would act much like
my nodes above. I either didn't set the correct options or this is not a
valid use of the Camera class.

I've also tried attaching a camera to the root node (more properly I am
attaching it to the Scene data for my view). That works great for things
like a HUD, but that doesn't quite seem right in this particular case.
For what it's worth this particular case is where I would like to put
a viewport size quad over the viewport, which would cover effectively
cover up my ancestors but allow my children to be seen (I also thought
an osg::Billboard is what I might want, but that didn't seem to be right
either). However, I've also wanted to do this same thing for sky
effects, etc. but have found clunky workarounds for most of the other cases.

I then got to looking at the Drawable class and thought that overloading
drawImplementation would be the best thing to do. However, that doesn't
seem quite right. Perhaps it is after all.

So, I'm sure that I can do this in osg, I'm just not sure how. I'm still
adjust my mind to the osg paradigm, so I've probably overlooked
something obvious, although I didn't see it when I search the mailing
list. In essence, I want to be able to do the same type of inline
projection I did before. What am I missing?

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


Re: [osg-users] Blueberry3D high detail terrain solution for OpenSceneGraph

2009-03-17 Thread Enke Digiro
Hello everybody,

Was looking on Blueberry 3D WWW, looks very interesting.
I would like to test to see how it could work with my application. Is there a 
demo version?
I could find a demo of Realnat product but nothing for Blueberry 3D.

Cheers,

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





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


Re: [osg-users] Projection matrix and inline or nested cameras

2009-03-17 Thread Guy

Hi,
 Maybe you should post the relevant lines of code where you set the
camera.

What happens when you attach the camera? Only that object under the
camera are seen and the rest disappear?

Maybe you should play a little with the clear mask of the camera, set it
to 0 mean nothing will be cleared so you have the complete scene that
was drawn before.

Another option which people here would like to avoid is to use
osg::Projection which you can set it's projection and model view
matrices.

Last thing that might help, you would probably want to set the
Camera/Projection reference frame to ABSOLUTE_RF.
camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);

Hope it helps,
 Guy.


First, I'm using OSG 2.8.0

I'm have been porting an old application from a homegrown OpenGL
scene-graph to osg and I've come across an issue that I'm sure there is
a way to handle, but I seem to be unable to locate just the right
combination of Camera, Drawables, etc.

While most of the old nodes are simply geometry nodes, some of them do
their own Projection before issuing geometry-type calls. I may want to
do this for a variety of reasons, including allowing finer grained
control of the depth buffer or simply covering over something that has
already been drawn. In my old OpenGL code, the render method for one of
these problem  nodes may look something like:

void MyNode::Render()
{
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();

// Then either:
glOrtho (...);
// or
gluPerspective(...);
// or
glFrustrum();

glMatrixMode(GL_MODELVIEW);

// begin, end, etc.

glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);

RenderChildren();
}

I've played with the Camera node and NESTED_RENDER seemed from its
name to be what I wanted. That is, I though I could simply attach an
osg::Camera node anywhere in my scene graph and it would act much like
my nodes above. I either didn't set the correct options or this is not a
valid use of the Camera class.

I've also tried attaching a camera to the root node (more properly I am
attaching it to the Scene data for my view). That works great for things
like a HUD, but that doesn't quite seem right in this particular case.
For what it's worth this particular case is where I would like to put
a viewport size quad over the viewport, which would cover effectively
cover up my ancestors but allow my children to be seen (I also thought
an osg::Billboard is what I might want, but that didn't seem to be right
either). However, I've also wanted to do this same thing for sky
effects, etc. but have found clunky workarounds for most of the other
cases.

I then got to looking at the Drawable class and thought that overloading
drawImplementation would be the best thing to do. However, that doesn't
seem quite right. Perhaps it is after all.

So, I'm sure that I can do this in osg, I'm just not sure how. I'm still
adjust my mind to the osg paradigm, so I've probably overlooked
something obvious, although I didn't see it when I search the mailing
list. In essence, I want to be able to do the same type of inline
projection I did before. What am I missing?

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


Re: [osg-users] Blueberry3D high detail terrain solution for OpenSceneGraph

2009-03-17 Thread Frederic Marmond
Hi Enke,

Blueberry3d is a core library, so it can't be used 'as it'.
I don't think there are public demos for it, but you can find
screenshots and videos on the bionatics www.
Have a look at LandSim3D, an application that uses Blueberry3D for its
rendering: 
http://www.bionatics.com/Site/product/index.php3?langue=UrlSuite=%2FSite%2Fproduct%2Findexc2.php3%3FCommunity%3D4%26ProductLineId%3D4

I was lucky to test it recently, it's really awesome... far, far
better than traditionnal (i.e. static) landscape visualisation
systems.
If your company is interested by the product, I think you may contact
Bionatics to ask for a demo.


Fred

2009/3/17 Enke Digiro osgfo...@tevs.eu:
 Hello everybody,

 Was looking on Blueberry 3D WWW, looks very interesting.
 I would like to test to see how it could work with my application. Is there a 
 demo version?
 I could find a demo of Realnat product but nothing for Blueberry 3D.

 Cheers,

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





 ___
 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] [osgPlugins] Collada Commands

2009-03-17 Thread Adam Wise
This might be the wrong place to post this...but I have a simple question: how 
would I import an Openflight (.flt) file, and EXPORT it as a Collada (.dae) 
file? I downloaded the COLLADA-dom...and I know my collada viewer is 
working...but where would I go after that?

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





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


Re: [osg-users] switch between two camera

2009-03-17 Thread Robert Osfield
Hi Yin,

For scene graph related render to texture work use a Camera in the scene
graph.  NodeMask and switches can be used.

Robert.

2009/3/16 Lingyun Yu lingyun.yu...@gmail.com

 Hi Robert,

 I also meet the same problem, I have 128 snapshots of particles, and I want
 to use those 128 shapshots to make an real time animation.
 First thing I tried, was using a update callback function and bind it on my
 geode, everytime I just updated all positions of particles. But obviously it
 was quite slow.
 Then I tried to use two view, and each one has it's own camera, and render
 two snapshots in the same time. Well, it works, but still very slow.
 Then I tried to use one view but two cameras, and load three snapshots in
 the same time, two below two caremas, one below my Root. because I do really
 need to update it. And link the right snapshots while I need to render it.

 Somehow it is still slow, and while it switches snapshots and I use
 trackball, it is played not fruently.

 So my question is, basicly I need to render un-structed points dataset, and
 I have a lot snapshots, do you have any idea how can I make an realtime
 animation fruently?
 Looking forward to your reply and thank you very much.

 Yun
 2009/3/16 Robert Osfield robert.osfi...@gmail.com

 Hi Peter, Benoit et,

  On Mon, Mar 16, 2009 at 8:15 PM, Peter Amstutz 
 peter.amst...@tseboston.com wrote:

 The way I handled this in my application was to create multiple instances
 of osgViewer::Viewer with a separate camera for each view but all bound to
 the same output window.  On each render iteration, draw just the active
 camera.


 I'm afraid I really wouldn't recommend this solution, having multiple
 viewers just to alternate between views is complicated implementation and
 conceptual wise and you'd be very lucky for it to work in anything other
 that very limited usage models.  Using multiple viewers will cause problems
 with threading, timing codes, it'd be a right old mess.


 The best solution depends on exactly what you need to display; I decided
 to switch between completely independent scenes because my 2D and 3D views
 looks actually render somewhat different geometry (the 2D ortho view is an
 abstracted version of the real 3D geometry).  Having entirely separate
 scenes is also pretty straightforward although it imposes some overhead due
 to duplication of resources that could otherwise be shared between among
 views.


 In your case you are talking about multiple Views, and this is fine, but
 you don't use multiple Viewers for it, you'd use a single CompositeViewer
 with multiple Views.  You can add and remove Views, or just toggle Camera's
 on/off using NodeMask's.

 For Benoit having a single master Camera track different CameraView nodes
 in the scene might well be the most convinient way to manage things.

 Robert.



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




 --
 Cheers,
 Yun

 ___
 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] Binding Recording

2009-03-17 Thread Robert Osfield
Hi Sunitha,

I'm afraid you'll need to show a little more initiative.  You have all the
source code to the OSG, and the class that does the recording is tiny little
class, just go and have a look at the interface and the implementation.  If
it doesn't out of the box provide a mechanism for doing what you want try
subclassing from it or extending it.  Or just plain write your own system
for tracking camera movements.

Please remember I haven't written all the OSG myself (there are over 350
contributors), I don't know how to do everything, and often to have to pull
up the class interfaces and implement to know how it works.  This is effort
that you really should be doing and not expecting me to walk you through
every little step.

Robert.

2009/3/17 sunitha sunagad sunithassuna...@gmail.com



 -- Hi Robert Osfield
My problem is by enabling the z key the recording starts
 and get saved in animation path file thats fine...
 But i need to enable this recording with the Qt tool kit have GUI built in
 Qt when i click the record symbol in the Qt GUI it should internally do the
 recording function . how ? i get signal from the Qt on clicking the user
 interface and in that signal i have to enable the 'z' key to start
 recording...I hope u got my problem...

















 Regards
 Sunitha.S.Sunagad

 ___
 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] Quaternion problem

2009-03-17 Thread Antonin Linares

Thanks Steven

Yes i have, but i get something very strange (rot * correction) == 
(correction * rot)

Also actually i made:

  //Set up alignment with terrain
  float rotation;
  osg::Vec3f origine;
  pat-getAtitude().getRotate(rotation, origine);

  if((osg::Vec3f(0,0,1)*normal) != 0){
 osg::Quat corect;
 corect.makeRotation(osg::Vec3f(0,0,1), normal);

 osg::Quat rot(rotation, osg::Vec3f(0,0,1));
 pat-setAtitude(rot * corect);   //Yes rot must be applied last
 }

Here the tank is well aligned with terrain, but now the rotation angle 
are increase each frame, so the tank rotate with.


Antonin  Linares


Steven Saunderson a écrit :

Have you tried : pat-setAtitude(rot*corect); ?
I'm wondering if the factor that should be applied last (i.e. rot) should be 
first in the multiply here.


-- Steven Saunderson

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





___
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] Separate sub-graphs of the same scene

2009-03-17 Thread Robert Osfield
Hi Guy,

Have you trying used osg::AutoTransform?

Also osg::Camera allows you to disable clear of the either the depth or
colour buffer.  See osghud example.

Robert.


On Tue, Mar 17, 2009 at 6:14 AM, Guy g...@dvp.co.il wrote:


 Hi,
  What I'm trying to accomplish is to draw a given pattern instead of the
 projected object, on special condition. That pattern is no longer
 3DWorld oriented, but instead, screen pixels oriented, with the
 exception of keeping the 3D distance of the 3DWorld object.

  Suppose I have a model of a 3D house and a model of a truck, and the
 condition is The truck is more than 300 feet from the house, then when
 the condition is true, instead of drawing the truck, I want the pixel
 (30,35) to be drawn blue and pixel (78,90) to be drawn green.

  The important thing is that if the truck ZBuffer value was 'Z' I want
 pixels ZBuffer value to be the same 'Z', now since the truck has many
 vertices and therefore many 'Z's I only refer to the 'Z' of the middle
 of the truck bounding sphere.

  I hope it makes more sense now...

 I forgot to mention that in osg1.2 instead of 'Camera' for the
 orthographic projection I used 'osg::Projection' which as far as I
 understand only changes the projection-view matrices and doesn't harm
 the Z buffer, but the pixels were drawn above all other objects.

  I also 4got to mention that in osg2.8 and the Camera, I tried to render
 it PRE_ORDER, IN_ORDER and POST_ORDER with no different results.

 I never used the stencil buffer for anything but if I understand
 correctly it just prevents masked pattern on the viewport from being
 drawn, which is not my goal. Anyway, I'm going to read about stencil in
 the Red book. It wouldn't hurt. :)

 Thanks,
  Guy.

 I'm not sure I entirely understand what you're trying to accomplish,
 but
 perhaps you want to look into using a stencil buffer and/or pixel
 shader
 to control what gets rendered?

 Guy wrote:
 
  Hello,
 
 
 
   I'm trying to merge two sub-graphs to the same image. It doesn't work

  so well, so I'll try to explain what in general I'm trying to achieve,

  then my not working so well solutions, and then the questions J
 
 
 
  So, in general I want to replace an object (A) in the scene with
  another object (B) on some condition. The object (B) is some pixels
  which are lit up. The important thing is to keep the 3D scene distance

  from the camera for both objects, so if the object is obscured by
  another, then both (A) and (B) will be obscured, and if some other
  object (C) is obscured by (A), it will still be obscured by (B).
  Object (B) might be partially transparent.
 
 
 
  Not working so well solution 1:
 
  Have switch for (A)/(B).
 
  The position of (A) is multiplied by view-projection matrix, the
  result is pos'. (B) is a set of points which their vertices are pos'
  with (x,y) replaced by the pixels I want to lit, and the new positions

  are multiplied by the inverse-projection invers-view matrices.
 
  This solution had problems with setting the right pixels.
 
 
 
  Not working so well solution 2:
 
  Object (B) is a set of pixel under ABSOLUTE_REF orthographic
  projection with (x,y) of the pixels I want to lit and z is the
  negative distance between (A) and the camera.
 
  This solution has the correct pattern of the lit pixels, but the Z
  order doesn't seems to be correct.
 
 
 
  The implementation of solution 2 is to add camera with ABSOLUTE_RF and

  orthographic projection. View is identity. I set the clear mask to 0
  since I don't want the Z-Buffer to be cleared. (opposed to huds and
  that kind of implementations).
 
 
 
  I used the osgviewer to put the cow at 0,0,-300 under absolute_rf, and

  a point at 0,0,0 under separate camera with orthographic projection,
  and the point was hidden by the cow (which is a mistake).
 
  I thought that I might need to set the zNear/zFar of both camera's to
  be the same, but in this simple example it shouldn't matter since the
  point Z is zero...
 
 
 
  So first, do I have to set the zNear/zFar of both camera's to be the
 same?
 
 
 
  Any ideas whats going wrong?
 
 
 
  Other solutions for the problem?
 
 
 
  Btw, I tried to replace the points by quads under orthographic
  projection. The results were the same.
 
 
 
  Thanks,
 
   Guy.
 
 

 ___
 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] Multithreading crash due to osgDb::Registry::instance()

2009-03-17 Thread Robert Osfield
Hi Anthony,

I have avoided adding a mutex into the Registry::instance() method as it
would incur a cost for every call to it, and it's only the very first call
that it's an issue for so it's the only time you need to be careful about
access to it.

Given I don't want to introduce a mutex one then has to make sure the
instance() method is called up front in your app, and most OSG applications
will call it during the single thread init of the app, and in your case
you'll just need to call it explictly.   An alternative might be to have a
proxy class call the instance() method, or perhaps just have the viewer
constructor call instance() just in case.

Robert.

On Tue, Mar 17, 2009 at 6:25 AM, I-Nixon, Anthony D 
anthony.d.ni...@boeing.com wrote:

 I've encountered a crash when using CompositeViewer in Multithreaded
 mode due to concurrent access to osgDb::Registry::instance().

 The usage scenario is having two views (that have an empty scene graph -
 since no data has been loaded, osgdb::Registry::instance() hasn't yet
 been called).

 On the first frame, each of the render threads calls
 osgDb::Registry::instance(), and one gets back a null pointer (which is
 kind of bad for an instance :-)

 The fix for me is easy - just call osgDb::Registry::instance() sometime
 before starting rendering, but a more general solution would be better,
 of course.

 This is with OSG 2.8.0 - although there don't appear to have been any
 changes in this area in the trunk, either.

 I've only confirmed this on Windows XP and Visual C++ 8.




 Anthony Nixon

 ___
 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] Forum users rare uses signatures, which is a pain tracking who's who

2009-03-17 Thread Robert Osfield
Hi Sukender,

I'd prefer not to go in heavy handed, but find a system that right at the
begining sets the right tone for future communication.  I wonder if
providing a better introductory text to forum and mailing about etiquette
and good examples of user names, and have all new subscribers need to be
manually approved - at this approval point one could get back to the
subscriber and ask for human readable user name if one hasn't been given.
For such an approval system we'd need a set of volunteers to be available to
vet and approve new subscribers.  The rate of subscription is around 1 a day
so it typically wouldn't be a great deal of work, the hard part is providing
a quick turn around.

I'll have to defer to Art on how practical this is.

Robert.

On Tue, Mar 17, 2009 at 12:22 AM, Sukender suky0...@free.fr wrote:

 Hi all,

 And what about manually banning (temporarily) from the forum those who
 don't respect basic rules? That could be simple:
 1. Warn the user if the real name isn't explicit enough
 2. Ban until real name is changed (The user could still use the mailing
 list)

 I'm pretty sure people would not to dare keeping an unclear name for a very
 long time...
 That would require a bit programming but that would not be very difficult I
 guess.
 I just hope this isn't too radical!

 And another idea could be to get a reminder each week (or month?) if the
 email address isn't set (or is the default one).

 Thoughts?

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


 Le Mon, 16 Mar 2009 17:53:01 +0100, Art Tevs osgfo...@tevs.eu a écrit:

 
  Thrall, Bryan wrote:
 
  It looks like the forum supports signatures; could you just assign a
  default signature based on the user's given Real Name and email? You
  can't force them to give their actual Real Name, but I imagine most
  people wouldn't lie on that, even if they don't use their Real Name for
  their forum ID.
 
 
 
  Hi Bryan,
 
  actually printing out an automaticly generated signature wouldn't change
 anything, because users' real name values are already used in From header of
 the generated email. Hence if user X does call himself Mister X, then the
 email heaer looks like this:
  From: Mister X 
 
  Even if there will be now a forced signature the signature can still not
 give more information that user has given. The signature could look like
 this:
  -
  Forum user: Mister X (X) 
 
  So the one thing I could add is mister X's used email adress and nothing
 else, because there is just no more information available.
 
  art
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=8548#8548
 
 
 
 
 
  ___
  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] Projection matrix and inline or nested cameras

2009-03-17 Thread Robert Osfield
Hi John,

An in scene graph osg::Camera is certainly the route you'd want to take, the
osghud example is probably a good place to start.  You can assign your own
Viewport to an scene graph osg::Camera, but if you don't it'll just inherit
it's parent Camera's Viewport.  osg::Camera also allows you to control which
of the frame buffer components to clear, if you don't want to clear anything
just use camera-setClearMask(0);

Robert.

On Tue, Mar 17, 2009 at 7:31 AM, John Cummings jcummin...@users.sf.netwrote:

 First, I'm using OSG 2.8.0

 I'm have been porting an old application from a homegrown OpenGL
 scene-graph to osg and I've come across an issue that I'm sure there is
 a way to handle, but I seem to be unable to locate just the right
 combination of Camera, Drawables, etc.

 While most of the old nodes are simply geometry nodes, some of them do
 their own Projection before issuing geometry-type calls. I may want to
 do this for a variety of reasons, including allowing finer grained
 control of the depth buffer or simply covering over something that has
 already been drawn. In my old OpenGL code, the render method for one of
 these problem  nodes may look something like:

 void MyNode::Render()
 {
 glMatrixMode(GL_PROJECTION);
 glPushMatrix();
 glLoadIdentity();

 // Then either:
 glOrtho (...);
 // or
 gluPerspective(...);
 // or
 glFrustrum();

 glMatrixMode(GL_MODELVIEW);

 // begin, end, etc.

 glMatrixMode(GL_PROJECTION);
 glPopMatrix();
 glMatrixMode(GL_MODELVIEW);

 RenderChildren();
 }

 I've played with the Camera node and NESTED_RENDER seemed from its
 name to be what I wanted. That is, I though I could simply attach an
 osg::Camera node anywhere in my scene graph and it would act much like
 my nodes above. I either didn't set the correct options or this is not a
 valid use of the Camera class.

 I've also tried attaching a camera to the root node (more properly I am
 attaching it to the Scene data for my view). That works great for things
 like a HUD, but that doesn't quite seem right in this particular case.
 For what it's worth this particular case is where I would like to put
 a viewport size quad over the viewport, which would cover effectively
 cover up my ancestors but allow my children to be seen (I also thought
 an osg::Billboard is what I might want, but that didn't seem to be right
 either). However, I've also wanted to do this same thing for sky
 effects, etc. but have found clunky workarounds for most of the other
 cases.

 I then got to looking at the Drawable class and thought that overloading
 drawImplementation would be the best thing to do. However, that doesn't
 seem quite right. Perhaps it is after all.

 So, I'm sure that I can do this in osg, I'm just not sure how. I'm still
 adjust my mind to the osg paradigm, so I've probably overlooked
 something obvious, although I didn't see it when I search the mailing
 list. In essence, I want to be able to do the same type of inline
 projection I did before. What am I missing?

 Thank you
 John Cummings
 ___
 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] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread petr
Hi all, 
because a have not a lot of experences with OSG so I have stil some problems 
and now i try my best to desribe two of them.

first q:

I have got in a root group tree nodes
1st - the scene (cca 300 triangulates+7 types of textures )
2nd - the tank t72-tank_des.flt
3rd - the personal car (very simple cca 200 triangulates)
two cameras - one is fulscreen, the second is small rectangle in the midle of 
the screen on the top. 

Could you you explain me why the view is discontinuous (the quality is very(!) 
terrible) ?
I have found that when I'am using the only camera - like fullscreen, the 
discontinous view can be removed by these function viewer-startThreading(); 
- the quality is absolutely briliant!
Could you explain me what does it mean threading, this word is in a 
dictionary - of course, but i would like to know what does the function do in 
osg. - or what does it looking after ...

second q:
---
Why does a nodes take so long to load?  For example - first node the scene 
takes in Vega cca 3-4 seconds and now in OSG it takes cca 15 sec.
(The one our big scene cca 20 000t is loaded by 10sec in Vega, but in Osg it 
takes almost 1 min)

pc config:
cpu: Intel 3.2Ghz
Grapic card: GeForce 7600GT/PCI/SSE2, 256MB ram, silent pipe
Monitor resolution: 1280x1024
rendering test by OpenGL Extension Viewer 3.0:
1.1 109 FPS
2.0 104 FPS
2.1 066 FPS

Thanks a lot for your replies.

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





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


Re: [osg-users] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread petr
add first q
 
settles the question here: http://forum.openscenegraph.org/viewtopic.php?t=1498
viewer-setThreadingModel(osgViewer::Viewer::SingleThreaded);

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





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


Re: [osg-users] Multithreading crash due toosgDb::Registry::instance()

2009-03-17 Thread Schmidt, Richard
http://www.cs.wustl.edu/~schmidt/PDF/DC-Locking.pdf

 

Greetings, 

Richard 



Von: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] Im Auftrag von Robert 
Osfield
Gesendet: Dienstag, 17. März 2009 10:07
An: OpenSceneGraph Users
Betreff: Re: [osg-users] Multithreading crash due toosgDb::Registry::instance()

 

Hi Anthony,

I have avoided adding a mutex into the Registry::instance() method as it would 
incur a cost for every call to it, and it's only the very first call that it's 
an issue for so it's the only time you need to be careful about access to it.

Given I don't want to introduce a mutex one then has to make sure the 
instance() method is called up front in your app, and most OSG applications 
will call it during the single thread init of the app, and in your case you'll 
just need to call it explictly.   An alternative might be to have a proxy class 
call the instance() method, or perhaps just have the viewer constructor call 
instance() just in case.

Robert. 

On Tue, Mar 17, 2009 at 6:25 AM, I-Nixon, Anthony D 
anthony.d.ni...@boeing.com wrote:

I've encountered a crash when using CompositeViewer in Multithreaded
mode due to concurrent access to osgDb::Registry::instance().

The usage scenario is having two views (that have an empty scene graph -
since no data has been loaded, osgdb::Registry::instance() hasn't yet
been called).

On the first frame, each of the render threads calls
osgDb::Registry::instance(), and one gets back a null pointer (which is
kind of bad for an instance :-)

The fix for me is easy - just call osgDb::Registry::instance() sometime
before starting rendering, but a more general solution would be better,
of course.

This is with OSG 2.8.0 - although there don't appear to have been any
changes in this area in the trunk, either.

I've only confirmed this on Windows XP and Visual C++ 8.




Anthony Nixon

___
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] [osgPlugins] Collada Commands

2009-03-17 Thread Robert Osfield
Hi Adam,

On Tue, Mar 17, 2009 at 8:36 AM, Adam Wise osgfo...@tevs.eu wrote:

 This might be the wrong place to post this...but I have a simple question:
 how would I import an Openflight (.flt) file, and EXPORT it as a Collada
 (.dae) file? I downloaded the COLLADA-dom...and I know my collada viewer is
 working...but where would I go after that?


On the command line:

   osgconv original.flt new.dae

Programatically:

 #include osgDB/ReadFile
 #include osgDB/WriteFile

{
 ...

  osg::ref_ptrosg::Node node = osgDB::readNodeFile(original.flt);

  if (node.valid()) osgDB::writeNodeFile(*node, new.dae);

}


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


Re: [osg-users] [build] osgdb_freetype build problem on Mac OS/X 10.5.6

2009-03-17 Thread Robert Osfield
Hi John,

When I've built under OSX before I haven't had problems, but I haven't
personally built and installed freetype so this may be factor.   The
freetype plugin uses:

   INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS} )

Which suggests the entry in the OpenSceneGraph/FindFreeType.cmake

IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
  SET(FREETYPE_INCLUDE_DIRS
${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2})
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)

Isn't successful for some reason.  Check you CMakeCache.txt for the
FREETYPE_INCLUDE_DIRS var.

Which version of CMake are you using?  Perhaps it has its own
FindFreeType.cmake that is taking precidence over ours and is not setting
the FREETYPE_INCLUDE_DIRS.

Robert.

On Tue, Mar 17, 2009 at 1:19 AM, john casu osgfo...@tevs.eu wrote:

 I'm trying to build the latest svn version of OSG 2.8.0 on OS/X, and I'm
 having a problem when building osgdb_freetype, specifically the header file
 ft2build.h cannot be located:
 Scanning dependencies of target osgdb_freetype
 [ 98%] Building CXX object
 src/osgPlugins/freetype/CMakeFiles/osgdb_freetype.dir/FreeTypeFont.cpp.o
 In file included from
 /Users/casuj/OpenSceneGraph/OpenSceneGraph-2.8.0-svn/src/osgPlugins/freetype/FreeTypeFont.cpp:14:
 /Users/casuj/OpenSceneGraph/OpenSceneGraph-2.8.0-svn/src/osgPlugins/freetype/FreeTypeFont.h:19:22:
 error: ft2build.h: No such file or directory
 /Users/casuj/OpenSceneGraph/OpenSceneGraph-2.8.0-svn/src/osgPlugins/freetype/FreeTypeFont.h:20:10:
 error: #include expects FILENAME or FILENAME

 However, CMakeCache.txt shows that this file has been located:
 enterprise:OpenSceneGraph-2.8.0-svn casuj$ fgrep FREETYPE CMakeCache.txt

 CMakeCache.txt:FREETYPE_INCLUDE_DIR_freetype2:PATH=/usr/local/include/freetype2
 CMakeCache.txt:FREETYPE_INCLUDE_DIR_ft2build:PATH=/usr/local/include
 CMakeCache.txt:FREETYPE_LIBRARY:FILEPATH=/usr/local/lib/libfreetype.dylib

 and the file itself does in fact exist:
 enterprise:OpenSceneGraph-2.8.0-svn casuj$ ls -l
 /usr/local/include/ft2build.h
 -rw-r--r--  1 root  admin  3890 Mar  5  2007 /usr/local/include/ft2build.h

 Can anyone shed light on how to workaround this ?

 Thanks,

 -john c.

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





 ___
 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] Absolutely dark scene

2009-03-17 Thread Fernan
Hi,

first of all a greeting to everyone, because I'm new around here.

I am developing an application that need to be done at night and become 
completely dark scene, but I can not.

I do not know how to remove the whole lighting of the scene, it is made at 
night, but there is always some light.

How can I create a totally dark scene?
Thanks a lot.

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





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


Re: [osg-users] Projection matrix and inline or nested cameras

2009-03-17 Thread John Cummings
Thank you both for your feedback. I have looked at the HUD example
before and I use a post-render camera for my own HUD-type display.
Unless I've missed something, that is the only kind of camera in the HUD
example.

As Guy suggested, here is the relative code section (the osgGroup() is a
group for this node):

Constructor()
{
   m_camera = new osg::Camera;
   osgGroup()-addChild(m_camera.get());

   m_camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
   m_camera-setViewMatrix(osg::Matrix::identity());
   m_camera-setClearMask(0);
   m_camera-setRenderOrder(osg::Camera::NESTED_RENDER);

   osg::Geode* geode = new osg::Geode;
   m_camera-addChild(geode);
   geode-setCullingActive(false);

   // Geometry...
   // StateSet...

}

Update()
{
   m_camera-setProjectionMatrixAsOrtho2D(0.0, viewportWidth, 0.0,
viewportHeight);
   // Update geometry...
}


As is typical when finally sending a mail for help, I sure thought I had
tried this exact combination (suggested my Guy in his message).
Nonetheless, I believe this code will work for me. I'll have to check
when I go to work and plug it into the large scene graph, but it seems
to accomplish what I want in my smaller test setup. I knew I couldn't be
that far off from the right answer.

Thank you, I'll let you know how this ends up working.
John Cummings

Robert Osfield wrote:
 Hi John,

 An in scene graph osg::Camera is certainly the route you'd want to
 take, the osghud example is probably a good place to start.  You can
 assign your own Viewport to an scene graph osg::Camera, but if you
 don't it'll just inherit it's parent Camera's Viewport.  osg::Camera
 also allows you to control which of the frame buffer components to
 clear, if you don't want to clear anything just use
 camera-setClearMask(0);

 Robert.

 On Tue, Mar 17, 2009 at 7:31 AM, John Cummings
 jcummin...@users.sf.net mailto:jcummin...@users.sf.net wrote:

 First, I'm using OSG 2.8.0

 I'm have been porting an old application from a homegrown OpenGL
 scene-graph to osg and I've come across an issue that I'm sure
 there is
 a way to handle, but I seem to be unable to locate just the right
 combination of Camera, Drawables, etc.

 While most of the old nodes are simply geometry nodes, some of them do
 their own Projection before issuing geometry-type calls. I may want to
 do this for a variety of reasons, including allowing finer grained
 control of the depth buffer or simply covering over something that has
 already been drawn. In my old OpenGL code, the render method for
 one of
 these problem  nodes may look something like:

 void MyNode::Render()
 {
 glMatrixMode(GL_PROJECTION);
 glPushMatrix();
 glLoadIdentity();

 // Then either:
 glOrtho (...);
 // or
 gluPerspective(...);
 // or
 glFrustrum();

 glMatrixMode(GL_MODELVIEW);

 // begin, end, etc.

 glMatrixMode(GL_PROJECTION);
 glPopMatrix();
 glMatrixMode(GL_MODELVIEW);

 RenderChildren();
 }

 I've played with the Camera node and NESTED_RENDER seemed from its
 name to be what I wanted. That is, I though I could simply attach an
 osg::Camera node anywhere in my scene graph and it would act much like
 my nodes above. I either didn't set the correct options or this is
 not a
 valid use of the Camera class.

 I've also tried attaching a camera to the root node (more properly
 I am
 attaching it to the Scene data for my view). That works great for
 things
 like a HUD, but that doesn't quite seem right in this particular case.
 For what it's worth this particular case is where I would like
 to put
 a viewport size quad over the viewport, which would cover effectively
 cover up my ancestors but allow my children to be seen (I also thought
 an osg::Billboard is what I might want, but that didn't seem to be
 right
 either). However, I've also wanted to do this same thing for sky
 effects, etc. but have found clunky workarounds for most of the
 other cases.

 I then got to looking at the Drawable class and thought that
 overloading
 drawImplementation would be the best thing to do. However, that
 doesn't
 seem quite right. Perhaps it is after all.

 So, I'm sure that I can do this in osg, I'm just not sure how. I'm
 still
 adjust my mind to the osg paradigm, so I've probably overlooked
 something obvious, although I didn't see it when I search the mailing
 list. In essence, I want to be able to do the same type of inline
 projection I did before. What am I missing?

 Thank you
 John Cummings
 ___
 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



___
osg-users 

Re: [osg-users] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread Robert Osfield
Hi Peter,

On Tue, Mar 17, 2009 at 9:30 AM, petr osgfo...@tevs.eu wrote:

 first q:
 
 I have got in a root group tree nodes
 1st - the scene (cca 300 triangulates+7 types of textures )
 2nd - the tank t72-tank_des.flt
 3rd - the personal car (very simple cca 200 triangulates)
 two cameras - one is fulscreen, the second is small rectangle in the midle
 of the screen on the top.

 Could you you explain me why the view is discontinuous (the quality is
 very(!) terrible) ?
 I have found that when I'am using the only camera - like fullscreen, the
 discontinous view can be removed by these function
 viewer-startThreading(); - the quality is absolutely briliant!
 Could you explain me what does it mean threading, this word is in a
 dictionary - of course, but i would like to know what does the function do
 in osg. - or what does it looking after ...


I can't see how we could answer this without at least a screenshot of what
you mean by discontinuous, and what you expect the result to look like.


 second q:
 ---
 Why does a nodes take so long to load?  For example - first node the scene
 takes in Vega cca 3-4 seconds and now in OSG it takes cca 15 sec.
 (The one our big scene cca 20 000t is loaded by 10sec in Vega, but in Osg
 it takes almost 1 min)


Try converting your models to native OSG format.  OpenFlight really sucks
for loading performance as the database requires a lot of pre-processing to
get into a shape that is suitable for rendering.   I would strongly
recommend converting to .ive for any visual simulation app.




 pc config:
 cpu: Intel 3.2Ghz
 Grapic card: GeForce 7600GT/PCI/SSE2, 256MB ram, silent pipe
 Monitor resolution: 1280x1024
 rendering test by OpenGL Extension Viewer 3.0:
 1.1 109 FPS
 2.0 104 FPS
 2.1 066 FPS

 Thanks a lot for your replies.


I have no clue what your above 1.1 109 FPS stats relate to, is it anything
to do with the OSG?

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


Re: [osg-users] Multithreading crash due toosgDb::Registry::instance()

2009-03-17 Thread Robert Osfield
2009/3/17 Schmidt, Richard richard.schm...@eads.com

  
 http://www.cs.wustl.edu/~schmidt/PDF/DC-Locking.pdfhttp://www.cs.wustl.edu/%7Eschmidt/PDF/DC-Locking.pdf


Could you explain what the above document is all about...

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


Re: [osg-users] Absolutely dark scene

2009-03-17 Thread Robert Osfield
Hi Fernan,

On Tue, Mar 17, 2009 at 10:00 AM, Fernan osgfo...@tevs.eu wrote:

 first of all a greeting to everyone, because I'm new around here.

 I am developing an application that need to be done at night and become
 completely dark scene, but I can not.

 I do not know how to remove the whole lighting of the scene, it is made at
 night, but there is always some light.

 How can I create a totally dark scene?


The viewer by default has a headlight and enables the OpenGL light 0.  In
your case you'll likely want to add an osg::LightSource node to your scene
with the light settings that are appropriate for you scene.  This
LightSource will position the light in the 3D world, as well as control the
diffude, ambient etc. light settings.  See the osglightsource example.

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


Re: [osg-users] Multithreading crash due toosgDb::Registry::instance()

2009-03-17 Thread Paul Melis

Robert Osfield wrote:
2009/3/17 Schmidt, Richard richard.schm...@eads.com 
mailto:richard.schm...@eads.com


http://www.cs.wustl.edu/~schmidt/PDF/DC-Locking.pdf
http://www.cs.wustl.edu/%7Eschmidt/PDF/DC-Locking.pdf


Could you explain what the above document is all about...
I just read it an it describes a pattern where you use a mutex to guard 
access to the singleton's _instance value, but in such a way that the 
mutex is only needed when _instance == NULL, i.e.


class Singleton
{
public:
   static Singleton *instance (void)
   {
// First check
if (instance_ == 0)
   {
  // Ensure serialization (guard constructor acquires lock_).
 GuardMutex guard (lock_);
 // Double check.
 if (instance_ == 0)
  instance_ = new Singleton;
   }
return instance_;
// guard destructor releases lock_.
   }
private:
   static Mutex lock_;
   static Singleton *instance_;
};

This should give you thread-safe access to Singleton-instance() at all 
times combined with correct initialization.


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


Re: [osg-users] Quaternion problem

2009-03-17 Thread Steven Saunderson
Hi Antonin,

I may be getting way out of my depth here but when I saw your problem this 
morning it looked very similar to a problem I had just recently.

Looking at your original post :


Antonin Linares wrote:
 
 //get height and normal under the tank 
 osg::Vec3f pos = 
 lsi-getFirstIntersection()-getWorldIntersectionPoint(); 
 osg::Vec3f normal = 
 lsi-getFirstIntersection()-getWorldIntersectionNormal(); 
 
 //Set up height 
 pat-setPosition(pos);

All looks fine so far


Antonin Linares wrote:
 //Set up alignment with terrain 
 float rotation; 
 osg::Vec3f origine; 
 pat-getAtitude().getRotate(rotation, origine); 
 
 if((origine*normal) != 0){ 
 osg::Quat corect; 
 corect.makeRotation(origine, normal); 
 
 pat-setAtitude(corect);


I don't understand why you have the getAtitude() here.  It will return a quat 
and the .getRotate will convert the value into an angle and vector.  But what 
quat value is it converting ?

What happens if you always calculate corect as you are doing and then apply 
rot in the setAtitude call (i.e. pat-setAtitude (rot * corect) ) ?

//Set up alignment with terrain 
float rotation; 
osg::Vec3f origine (0,0,1); 
osg::Quat corect; 
corect.makeRotation(origine, normal); 

// I'm not sure where you get rotation from ??

osg::Quat rot(rotation, origine); 
pat-setAtitude(rot*corect);

I hope this helps or entices someone more knowledgeable to assist here.


-- Steven Saunderson

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





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


Re: [osg-users] Multithreading crash duetoosgDb::Registry::instance()

2009-03-17 Thread Schmidt, Richard
The document is about a design pattern called double locking, which is 
especially suitable for singleton objects in multithreaded environments.

The pattern is essentially this:

static Singleton *instance (void)
{
// First check
if (instance_ == 0)
{
// Ensure serialization (guard
// constructor acquires lock_).
GuardMutex guard (lock_);
// Double check.
if (instance_ == 0)
instance_ = new Singleton;
}
return instance_;
// guard destructor releases lock_.
}

The guard mutex is only accessed in the initialization phase of the singleton. 
Once instance_ is set the guard does not need to be queried anymore.

Richard
___
Von: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] Im Auftrag von Robert 
Osfield
Gesendet: Dienstag, 17. März 2009 11:07
An: OpenSceneGraph Users
Betreff: Re: [osg-users] Multithreading crash duetoosgDb::Registry::instance()

2009/3/17 Schmidt, Richard richard.schm...@eads.com
http://www.cs.wustl.edu/~schmidt/PDF/DC-Locking.pdf

Could you explain what the above document is all about...

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


Re: [osg-users] Multithreading crash duetoosgDb::Registry::instance()

2009-03-17 Thread Robert Osfield
HI Richard + Paul,

Thanks for explanation.  Feel free to dive in an code up such a solution.

Robert.

On Tue, Mar 17, 2009 at 10:17 AM, Schmidt, Richard richard.schm...@eads.com
 wrote:

 The document is about a design pattern called double locking, which is
 especially suitable for singleton objects in multithreaded environments.

 The pattern is essentially this:

 static Singleton *instance (void)
 {
 // First check
 if (instance_ == 0)
 {
 // Ensure serialization (guard
 // constructor acquires lock_).
 GuardMutex guard (lock_);
 // Double check.
 if (instance_ == 0)
 instance_ = new Singleton;
 }
 return instance_;
 // guard destructor releases lock_.
 }

 The guard mutex is only accessed in the initialization phase of the
 singleton. Once instance_ is set the guard does not need to be queried
 anymore.

 Richard
 ___
 Von: osg-users-boun...@lists.openscenegraph.org [mailto:
 osg-users-boun...@lists.openscenegraph.org] Im Auftrag von Robert Osfield
 Gesendet: Dienstag, 17. März 2009 11:07
 An: OpenSceneGraph Users
 Betreff: Re: [osg-users] Multithreading crash
 duetoosgDb::Registry::instance()

 2009/3/17 Schmidt, Richard richard.schm...@eads.com
 http://www.cs.wustl.edu/~schmidt/PDF/DC-Locking.pdfhttp://www.cs.wustl.edu/%7Eschmidt/PDF/DC-Locking.pdf

 Could you explain what the above document is all about...

 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


Re: [osg-users] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread petr
q1:
the runtime fullscreen view looks very snatchy, non-continuous, cutting 
 - I don't know how to describe it  - 
FPS in my scene was about 20, after added these function 
viewer-setThreadingModel(osgViewer::Viewer::SingleThreaded) the FS increase 
to 120, and the view is briliant 
A have found example after adding these topic : ) 

q2:
you suggest me convert .flt to native osg format, we are using for modeling 
Presagis creator and the export dialog cointains only these variants  - have a 
look on image. 

[Image: http://www.jkzsim.cz./petr/screen-export.jpg ]

I don't know which format is native for osg, but i know that in OSG zip  is 
folder osg-data and there is - for example cessna.osg (this is native OSG 
format?) but i  don't know how to convert .flt to .osg). And what do you mean 
converting to .ive I haven't heard about .ive

Thans for your time.

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





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


Re: [osg-users] Absolutely dark scene

2009-03-17 Thread Fernan
Hi Robert,

thanks for reply.

I initialize my system as follows:

--

// construct the viewer.
osgViewer::Viewer viewer;
viewer.setLightingMode (osg::View::HEADLIGHT);

// Configura el visor para aparecer en una ventana
viewer.setUpViewInWindow (100, 100, 800, 600, 0);

// Pone el manejador de eventos de ratón (se hace por defecto dentro del 
run() del viewer, pero 
// aquí es necesario crearlo antes para poder ponerle la posición por 
defecto de la cámara
viewer.setCameraManipulator(new osgGA::TrackballManipulator());

// Pone la posición por defecto de la cámara
osgGA::MatrixManipulator* pCameraManip = viewer.getCameraManipulator();
if (pCameraManip != NULL)
{
  pCameraManip-setHomePosition (osg::Vec3 (0.0, -600.0, 8.0), osg::Vec3 
(0.0, 0.0, 8.0), osg::Vec3 (0.0, 0.0, 1.0));
}

// create a model from the images.
osg::Group* pRoot = new osg::Group();

// Create a new light, and set the light number according to our parameter.
osg::Light* pLight = new osg::Light();
pLight-setLightNum (0);
pLight-setAmbient (osg::Vec4d (0.0, 0.0, 0.0, 1.0));
pLight-setDiffuse (osg::Vec4d (0.0, 0.0, 0.0, 1.0)); 
pLight-setSpecular (osg::Vec4d (0.0, 0.0, 0.0, 1.0)); 
osg::LightSource* pLightsource = new osg::LightSource();
pLightsource-setLight (pLight);
pLightsource-setStateSetModes (*pRoot-getOrCreateStateSet(), 
osg::StateAttribute::ON);
pRoot-addChild (pLightsource);




With this, the scene get a little dark, but it is not totally black.
There is always a little light, so objects that I add to the scene can be seen.

These objects are ships and what I want is to see their lights and not ships 
due to it is night.

Would that be possible?

Thanks.

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





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


Re: [osg-users] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread Tomlinson, Gordon
 
Use osgconv to convert yur MultgenCreator files

osgconv  myfile.flt myfile.ive



Gordon
Product Manager 3d
__
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of petr
Sent: Tuesday, March 17, 2009 7:25 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Discontinuous view and loading (readNodeFile)

q1:
the runtime fullscreen view looks very snatchy, non-continuous,
cutting  - I don't know how to describe it  - FPS in my scene was
about 20, after added these function
viewer-setThreadingModel(osgViewer::Viewer::SingleThreaded) the FS
increase to 120, and the view is briliant A have found example after
adding these topic : ) 

q2:
you suggest me convert .flt to native osg format, we are using for
modeling Presagis creator and the export dialog cointains only these
variants  - have a look on image. 

[Image: http://www.jkzsim.cz./petr/screen-export.jpg ]

I don't know which format is native for osg, but i know that in OSG
zip  is folder osg-data and there is - for example cessna.osg (this is
native OSG format?) but i  don't know how to convert .flt to .osg). And
what do you mean converting to .ive I haven't heard about .ive

Thans for your time.

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





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


Re: [osg-users] Quaternion problem

2009-03-17 Thread J.P. Delport

Hi,

I also vaguely remember someone having a question about the getRotate. 
Go check in the source if it returns an angle and vector or if you 
actually pass _in_ a vector/axis.


jp

Steven Saunderson wrote:

Hi Antonin,

I may be getting way out of my depth here but when I saw your problem this 
morning it looked very similar to a problem I had just recently.

Looking at your original post :


Antonin Linares wrote:
//get height and normal under the tank 
osg::Vec3f pos = 
lsi-getFirstIntersection()-getWorldIntersectionPoint(); 
osg::Vec3f normal = 
lsi-getFirstIntersection()-getWorldIntersectionNormal(); 

//Set up height 
pat-setPosition(pos);


All looks fine so far


Antonin Linares wrote:
//Set up alignment with terrain 
float rotation; 
osg::Vec3f origine; 
pat-getAtitude().getRotate(rotation, origine); 

if((origine*normal) != 0){ 
osg::Quat corect; 
corect.makeRotation(origine, normal); 


pat-setAtitude(corect);



I don't understand why you have the getAtitude() here.  It will return a quat 
and the .getRotate will convert the value into an angle and vector.  But what 
quat value is it converting ?

What happens if you always calculate corect as you are doing and then apply 
rot in the setAtitude call (i.e. pat-setAtitude (rot * corect) ) ?

//Set up alignment with terrain 
float rotation; 
osg::Vec3f origine (0,0,1); 
osg::Quat corect; 
corect.makeRotation(origine, normal); 


// I'm not sure where you get rotation from ??

osg::Quat rot(rotation, origine); 
pat-setAtitude(rot*corect);


I hope this helps or entices someone more knowledgeable to assist here.


-- Steven Saunderson

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





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



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


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


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


Re: [osg-users] RecordCameraPathHandler where is the saved_animation.path file?

2009-03-17 Thread Felix Ilbring
It works!
I am deeply greatful for your support.
The Process Monitor worked out for me. There i found out that the .path file 
was stored in my SVN temp directory (.svn\tmp\text-base). I do not know why the 
windows search did not find it nore do i know why it is hidden in there, but 
all animation paths i captured are stored in this directory.

My last question is, how do i replay one of them?

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





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


Re: [osg-users] Absolutely dark scene

2009-03-17 Thread Robert Osfield
Hi Fernan,

You are probably best to go look at OpenGL docs on lighting, as the OSG just
sets up the various OpenGL state relating to lighting and the
drivers/hardware do the rest.  In your case you'll need to look a the
ambient light levels of the Light source and the objects in the scene, also
attach an osg::LightModel state attribute to provide additional controls
over the lighitng model.

For lights on the boats you'll need to use emmisive light values on the
materials associated with the light geometry, or just disable lighting for
them and set their colour directly using per vertex lighting.

Robert.

On Tue, Mar 17, 2009 at 11:27 AM, Fernan osgfo...@tevs.eu wrote:

 Hi Robert,

 thanks for reply.

 I initialize my system as follows:

 --

// construct the viewer.
osgViewer::Viewer viewer;
viewer.setLightingMode (osg::View::HEADLIGHT);

// Configura el visor para aparecer en una ventana
viewer.setUpViewInWindow (100, 100, 800, 600, 0);

// Pone el manejador de eventos de ratón (se hace por defecto dentro del
 run() del viewer, pero
// aquí es necesario crearlo antes para poder ponerle la posición por
 defecto de la cámara
viewer.setCameraManipulator(new osgGA::TrackballManipulator());

// Pone la posición por defecto de la cámara
osgGA::MatrixManipulator* pCameraManip = viewer.getCameraManipulator();
if (pCameraManip != NULL)
{
  pCameraManip-setHomePosition (osg::Vec3 (0.0, -600.0, 8.0), osg::Vec3
 (0.0, 0.0, 8.0), osg::Vec3 (0.0, 0.0, 1.0));
}

// create a model from the images.
osg::Group* pRoot = new osg::Group();

// Create a new light, and set the light number according to our
 parameter.
osg::Light* pLight = new osg::Light();
pLight-setLightNum (0);
pLight-setAmbient (osg::Vec4d (0.0, 0.0, 0.0, 1.0));
pLight-setDiffuse (osg::Vec4d (0.0, 0.0, 0.0, 1.0));
pLight-setSpecular (osg::Vec4d (0.0, 0.0, 0.0, 1.0));
osg::LightSource* pLightsource = new osg::LightSource();
pLightsource-setLight (pLight);
pLightsource-setStateSetModes (*pRoot-getOrCreateStateSet(),
 osg::StateAttribute::ON);
pRoot-addChild (pLightsource);

 


 With this, the scene get a little dark, but it is not totally black.
 There is always a little light, so objects that I add to the scene can be
 seen.

 These objects are ships and what I want is to see their lights and not
 ships due to it is night.

 Would that be possible?

 Thanks.

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





 ___
 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] Fwd: creating widget for Qt

2009-03-17 Thread ami guru
Hello Ivan


i shall try to elaborate the way i implemented that and your feedback is
most welcome on that.


1. Separated the following files from the osgviewerQT example.

AdapterWidget.h
   AdapterWidget.cpp
   ViewerQT.h
And promoted the widget to the ViewerQT.h

Loading the widget in the mainwindow and can load different model.

And i did not recieve any warning so far.

Yo said that you are having that while paint event(),


Where are you exactly having that paint event() ?


Did you mean that in the AdapterWidget that is the subclass of GLWidget?


Regards
Sajjad

-- Forwarded message --
From: ami guru dosto.wa...@gmail.com
Date: Tue, Mar 17, 2009 at 1:04 PM
Subject: Fwd: [osg-users] creating widget for Qt
To: qt-inter...@trolltech.com


Hello Ivan


i shall try to elaborate the way i implemented that and your feedback is
most welcome on that.


1. Separated the following files from the osgviewerQT example.

AdapterWidget.h
   AdapterWidget.cpp
   ViewerQT.h
And promoted the widget to the ViewerQT.h

Loading the widget in the mainwindow and can load different model.

And i did not recieve any warning so far.

Yo said that you are having that while paint event(),


Where are you exactly having that paint event() ?


Did you mean that in the AdapterWidget that is the subclass of GLWidget?


Regards
Sajjad



-- Forwarded message --
From: ami guru dosto.wa...@gmail.com
Date: Tue, Mar 17, 2009 at 12:59 PM
Subject: Fwd: [osg-users] creating widget for Qt
To: qt-inter...@trolltech.com


Hello Ivan


i shall try to elaborate the way i implemented that and your feedback is
most welcome on that.


1. Separated the following files from the osgviewerQT example.

AdapterWidget.h


-- Forwarded message --
From: Iván Cuevas osgfo...@tevs.eu
Date: 2009/3/16
Subject: Re: [osg-users] creating widget for Qt
 To: osg-users@lists.openscenegraph.org


I don't use .pro files, but I have to include the OpenGL module because I
extend from QGLWidget.

Regards,
Iván.

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





___
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] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread petr
thanks a lot, loading scene size of 36MB takes cca 1-2 sec, absolutely great!

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





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


Re: [osg-users] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread Robert Osfield
Hi Petr,

On Tue, Mar 17, 2009 at 11:25 AM, petr osgfo...@tevs.eu wrote:

 q1:
 the runtime fullscreen view looks very snatchy, non-continuous,
 cutting  - I don't know how to describe it  -
 FPS in my scene was about 20, after added these function
 viewer-setThreadingModel(osgViewer::Viewer::SingleThreaded) the FS
 increase to 120, and the view is briliant
 A have found example after adding these topic : )


I haven't head of problems like this before.  Have you hand integrated the
osgViewer into your application?  Are you doing your own rendering code that
could be clashing with the OSG?

The threading models that the osgViewer should also improve performance,
even in the worst case you'll get roughly the same performance level.  Very
clearly something is up with how you are doing things.

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


Re: [osg-users] switch between two camera

2009-03-17 Thread Robert Osfield
Hi Peter,

On Tue, Mar 17, 2009 at 12:57 PM, Peter Amstutz peter.amst...@tseboston.com
 wrote:

 'll take a look at this.  The (doxygen) documentation is a bit thin here,
 so I wasn't sure what exactly CompositeViewer was for -- I assumed it was
 for rendering multiple subwindows of a single main window.

 I'm still fuzzy on the relationship between Graphics Context, View, Viewer,
 Camera, Scene -- there's at least a couple layers of abstraction there.
  Especially when I see inheritance graphs like this (
 http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a01055.html)
   :-)


I've written plenty on the topic on the osg-users lists over the last two
years.  Go have a look through the archives.  The concepts, language and
class structure tie up neatly, but it is different to that OSG-1.x or libs
like Performer used.

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


[osg-users] OpenSceneGraph-Data on hg source

2009-03-17 Thread paulo

Hi,
I just noticed that version 2.8 (and the hg source) does not include the 
Data files. (gentoo ebuild)

Any reason for this? Am I suppose to download it separately?
Thanks
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] switch between two camera

2009-03-17 Thread Peter Amstutz

Robert Osfield wrote:

Hi Peter, Benoit et,

On Mon, Mar 16, 2009 at 8:15 PM, Peter Amstutz 
peter.amst...@tseboston.com mailto:peter.amst...@tseboston.com wrote:


The way I handled this in my application was to create multiple
instances of osgViewer::Viewer with a separate camera for each
view but all bound to the same output window.  On each render
iteration, draw just the active camera.


I'm afraid I really wouldn't recommend this solution, having multiple 
viewers just to alternate between views is complicated implementation 
and conceptual wise and you'd be very lucky for it to work in anything 
other that very limited usage models.  Using multiple viewers will 
cause problems with threading, timing codes, it'd be a right old mess.
Well, I force it to use single threading since my render thread already 
runs independently of the main logic thread.  This avoids most of the 
problems you mention, but in general I wouldn't recommend this solution 
either.  I just thought I'd throw it out there because it has worked for 
me so far.  I think I am doing it this way because I originally wrote my 
code for OSG 1.2, which didn't have any of the nice osgViewer 
infrastructure.
 


The best solution depends on exactly what you need to display; I
decided to switch between completely independent scenes because my
2D and 3D views looks actually render somewhat different geometry
(the 2D ortho view is an abstracted version of the real 3D
geometry).  Having entirely separate scenes is also pretty
straightforward although it imposes some overhead due to
duplication of resources that could otherwise be shared between
among views.


In your case you are talking about multiple Views, and this is fine, 
but you don't use multiple Viewers for it, you'd use a single 
CompositeViewer with multiple Views.  You can add and remove Views, or 
just toggle Camera's on/off using NodeMask's.
I'll take a look at this.  The (doxygen) documentation is a bit thin 
here, so I wasn't sure what exactly CompositeViewer was for -- I assumed 
it was for rendering multiple subwindows of a single main window.


I'm still fuzzy on the relationship between Graphics Context, View, 
Viewer, Camera, Scene -- there's at least a couple layers of abstraction 
there.  Especially when I see inheritance graphs like this 
(http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a01055.html)   
:-)


- Peter

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


[osg-users] [osgPlugins] Plugin Collada

2009-03-17 Thread Patrick Roiss
Hi,
i have a problem. I would like to see files written in Collada (DAE). I build 
and compile the plugin (collada-dom) and osg with no errors. now if i try to 
open a collada-test file (collada-logo) i get an exception. what have i done 
wrong :-)? I know my information is to low, so what else do you know?

i use windows XP and Visual Studio 2008 Express

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





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


Re: [osg-users] Quaternion problem

2009-03-17 Thread Antonin Linares

Hi Steven,

Maybe, i'm not clear, I want to keep the current yaw angle, and change 
pitch and roll by the terrain normal.
So i use getRotate to find my previous yaw angle, like you Steven, i 
thinks thats not the solution. Maybe i need to store this yaw angle in 
custom data.


Hi JP i use osg 2.8 an getRotate seem to returns angle and vector.

Antonin Linares



Steven Saunderson a écrit :

Hi Antonin,

I may be getting way out of my depth here but when I saw your problem this 
morning it looked very similar to a problem I had just recently.

Looking at your original post :


Antonin Linares wrote:
  
//get height and normal under the tank 
osg::Vec3f pos = 
lsi-getFirstIntersection()-getWorldIntersectionPoint(); 
osg::Vec3f normal = 
lsi-getFirstIntersection()-getWorldIntersectionNormal(); 

//Set up height 
pat-setPosition(pos);



All looks fine so far


Antonin Linares wrote:
  
//Set up alignment with terrain 
float rotation; 
osg::Vec3f origine; 
pat-getAtitude().getRotate(rotation, origine); 

if((origine*normal) != 0){ 
osg::Quat corect; 
corect.makeRotation(origine, normal); 


pat-setAtitude(corect);




I don't understand why you have the getAtitude() here.  It will return a quat 
and the .getRotate will convert the value into an angle and vector.  But what 
quat value is it converting ?

What happens if you always calculate corect as you are doing and then apply 
rot in the setAtitude call (i.e. pat-setAtitude (rot * corect) ) ?

//Set up alignment with terrain 
float rotation; 
osg::Vec3f origine (0,0,1); 
osg::Quat corect; 
corect.makeRotation(origine, normal); 


// I'm not sure where you get rotation from ??

osg::Quat rot(rotation, origine); 
pat-setAtitude(rot*corect);


I hope this helps or entices someone more knowledgeable to assist here.


-- Steven Saunderson

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





___
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] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread Sukender
 thanks a lot, loading scene size of 36MB takes cca 1-2 sec, absolutely great!

Maybe a stupid question (but I'm not afraid by this idea ;) ): What does cca 
mean?

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

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


[osg-users] Keyboard event

2009-03-17 Thread Simon Loic
Hi,

I faced the following problem with the osgGA::GUIEventAdapter::getKey().
When ever I press an arrow key or PageUp or PageDown it returns 0 instead of
the right key id.

I noticed this behaviour on both windows and linux machines.

Don't know if it makes a difference but I tried both  with my local keyboard
layout (french) and the US one.

Has anyone noticed the same thing? Is there a workaround?

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


Re: [osg-users] OpenSceneGraph-Data on hg source

2009-03-17 Thread Sukender
Hi Paulo(?),

Yes, it's used is only for the examples. If you need them, go to 
http://www.openscenegraph.org/projects/osg/wiki/Downloads and grab the sample 
datasets.

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


Le Tue, 17 Mar 2009 23:12:33 +0100, paulo paulo.jn...@gmail.com a écrit:

 Hi,
 I just noticed that version 2.8 (and the hg source) does not include the
 Data files. (gentoo ebuild)
 Any reason for this? Am I suppose to download it separately?
 Thanks
 ___
 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] Quaternion problem

2009-03-17 Thread J.P. Delport

Hi,

yes, try to store your angle manually. We have something similar, an 
object has yaw, pitch  roll, but we modify it depending on where on the 
globe it is:


lori = quat made from object r,p,y

// Make offset quat from position on globe
qoff = mScenario-getOrientationOffsetFromLLH(i_dLat, i_dLong, i_dAltitude);

lori = lori * qoff;

mModelTransform-setAttitude(lori);

cheers
jp

Antonin Linares wrote:

Hi Steven,

Maybe, i'm not clear, I want to keep the current yaw angle, and change 
pitch and roll by the terrain normal.
So i use getRotate to find my previous yaw angle, like you Steven, i 
thinks thats not the solution. Maybe i need to store this yaw angle in 
custom data.


Hi JP i use osg 2.8 an getRotate seem to returns angle and vector.

Antonin Linares



Steven Saunderson a écrit :

Hi Antonin,

I may be getting way out of my depth here but when I saw your problem 
this morning it looked very similar to a problem I had just recently.


Looking at your original post :


Antonin Linares wrote:
 
//get height and normal under the tank osg::Vec3f pos = 
lsi-getFirstIntersection()-getWorldIntersectionPoint(); osg::Vec3f 
normal = lsi-getFirstIntersection()-getWorldIntersectionNormal();

//Set up height pat-setPosition(pos);



All looks fine so far


Antonin Linares wrote:
 
//Set up alignment with terrain float rotation; osg::Vec3f origine; 
pat-getAtitude().getRotate(rotation, origine);
if((origine*normal) != 0){ osg::Quat corect; 
corect.makeRotation(origine, normal);

pat-setAtitude(corect);




I don't understand why you have the getAtitude() here.  It will return 
a quat and the .getRotate will convert the value into an angle and 
vector.  But what quat value is it converting ?


What happens if you always calculate corect as you are doing and 
then apply rot in the setAtitude call (i.e. pat-setAtitude (rot * 
corect) ) ?


//Set up alignment with terrain float rotation; osg::Vec3f origine 
(0,0,1); osg::Quat corect; corect.makeRotation(origine, normal);

// I'm not sure where you get rotation from ??

osg::Quat rot(rotation, origine); pat-setAtitude(rot*corect);

I hope this helps or entices someone more knowledgeable to assist here.


-- Steven Saunderson

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





___
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


--
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] Forum users rare uses signatures, which is a pain tracking who's who

2009-03-17 Thread Art Tevs
Hi Robert, all.

I think adding another approval system to let users approve that they have to 
follow some kind of etiquette  wouldn't have big success. Users would just 
click on  Yes, I agree as soon as they see that button. Hence, I am not sure 
if this is needed at all.

However checking the users manually is doable at the current registration rates 
(1-2 per day). Moderators (Roland) or admins (currently only me) could disable 
users with not clear real names and first activate them after the name was 
changed to something clearly. I could already start doing so with the current 
users. Of course it would be cool if we could get maybe a volunteer  else for 
that, so that there is always somebody who is able to do so. Technically this 
would be little bit different, because I have to implement some kind of 
synchronization between admins/moderators, so that they know which user is 
currently being deactivated for the name issue and which not.

All this kind of forcing correct real name wouldn't however change the way how 
users are posting. I think there is even a difference in the way of posting 
between forum and mailing list users from the psychological point of view. 
eMail feels like they are slower and not editable and hence communication is 
get more informative. Forums are faster in use and postings could be edited and 
hence the discussion there becames often a chat like and therefor users forget 
to add signatures or even to say Hello.  

So, the problem of etiquette is hard to solve, because it depends only on the 
users. As for the using real names, I think I could write some kind of a system 
for the admins/moderators to manage users with non-informative real names. 

The problem with the email addresses used as sender's email (default 
osgfo...@tevs.eu) is hard to solve without making some changes also to the 
mailing list itself, which is not doable for me. What I could try is to change 
email header in the way, so that it looks like it was sent from the mail of the 
user, however using default's forum email in the header. However, I am not sure 
how mailman (osg's mailing list software) would react on this, because this is 
actually a way how spammers handle.

Art

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





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


Re: [osg-users] Forum users rare uses signatures, which is a pain tracking who's who

2009-03-17 Thread Art Tevs
Hi folks,

ok, I took a look into email header standards and it seems there exists a 
solution for our purpose. I could specify in the from header users realname and 
users real email adress. Although the email will still  be sent from 
osgfo...@tevs.eu, using the Sender:   tag in the header. However, I am not 
sure if mailman (mailing list server) will then let the email through. 
osgfo...@tevs.eu is registered on the mailing list, however users email adress 
in the From:  header tag could be not. 

Robert, is there any possibility for you to setup the mailman to allow this? So 
that it filters not only based on the From:   header tag, but also on the 
Sender:  header tag. If one of them matches, then email should get through. 

I will implement and test it tonight in the later hours, when forum isn't 
visited as much as during the day. If mailman passes the test mails then 
nothing has to be configured.

cheers,
art

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





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


Re: [osg-users] Keyboard event

2009-03-17 Thread Robert Osfield
HI Loic,

What happens when you run the osgkeyboard example?

I've just tried it and it detects the page up and page down without
problems.  I'm working with Kubuntu 8.10.

Robert.

2009/3/17 Simon Loic simon1l...@gmail.com

 Hi,

 I faced the following problem with the osgGA::GUIEventAdapter::getKey().
 When ever I press an arrow key or PageUp or PageDown it returns 0 instead
 of the right key id.

 I noticed this behaviour on both windows and linux machines.

 Don't know if it makes a difference but I tried both  with my local
 keyboard layout (french) and the US one.

 Has anyone noticed the same thing? Is there a workaround?

 --
 Loïc Simon

 ___
 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] Forum users rare uses signatures, which is a pain tracking who's who

2009-03-17 Thread Paul Melis

Art Tevs wrote:

Hi Robert, all.

I think adding another approval system to let users approve that they have to follow some 
kind of etiquette  wouldn't have big success. Users would just click on  Yes, I 
agree as soon as they see that button. Hence, I am not sure if this is needed at 
all.

[...]
  
All this kind of forcing correct real name wouldn't however change the way how users are posting. I think there is even a difference in the way of posting between forum and mailing list users from the psychological point of view. eMail feels like they are slower and not editable and hence communication is get more informative. Forums are faster in use and postings could be edited and hence the discussion there becames often a chat like and therefor users forget to add signatures or even to say Hello.  
  

I definitely agree with this observation. Forums are more chat-like.
So, the problem of etiquette is hard to solve, because it depends only on the users. As for the using real names, I think I could write some kind of a system for the admins/moderators to manage users with non-informative real names. 
  
As you say, the problem of etiquette is hard to solve and I don't think 
much will change. I personally have more problems with folks that post 
to the list (either directly or through the forum) and seem to demand an 
immediate answer from somebody than with posts that don't have a 
signature. The latter is more annoying when there's also no e-mail 
address for that poster due to him/her posting through the forum.


Perhaps we should see the forum-list gateway as an experiment and 
shouldn't be afraid to sever the link when it turns out that the two 
forms of community are not compatible enough...

The problem with the email addresses used as sender's email (default 
osgfo...@tevs.eu) is hard to solve without making some changes also to the 
mailing list itself, which is not doable for me. What I could try is to change 
email header in the way, so that it looks like it was sent from the mail of the 
user, however using default's forum email in the header. However, I am not sure 
how mailman (osg's mailing list software) would react on this, because this is 
actually a way how spammers handle.
  
Robert didn't mention this problem in his original mail and as such 
might not have high priority. It was merely something I noticed and 
occassionaly run into, but we've got to remember that this is not 
something the forum users are responsible for. It's merely a technical 
thingy due to the way the forum gateway works.


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


Re: [osg-users] Forum users rare uses signatures, which is a pain tracking who's who

2009-03-17 Thread Robert Osfield
Hi Art,

On Tue, Mar 17, 2009 at 3:04 PM, Art Tevs osgfo...@tevs.eu wrote:

 I think adding another approval system to let users approve that they have
 to follow some kind of etiquette  wouldn't have big success. Users would
 just click on  Yes, I agree as soon as they see that button. Hence, I am
 not sure if this is needed at all.


I wasn't thinking of this, rather I just meant for a group of maintainers,
like yourself and I and others regular contributors to act as the approval
system.  We'd recieve a post saying that someone has asked to be subscribed
and when approve/disapprove/or make approval conditional on providing a more
human readable user name,


 However checking the users manually is doable at the current registration
 rates (1-2 per day). Moderators (Roland) or admins (currently only me) could
 disable users with not clear real names and first activate them after the
 name was changed to something clearly. I could already start doing so with
 the current users. Of course it would be cool if we could get maybe a
 volunteer  else for that, so that there is always somebody who is able to do
 so. Technically this would be little bit different, because I have to
 implement some kind of synchronization between admins/moderators, so that
 they know which user is currently being deactivated for the name issue and
 which not.


Could you have a admin webpage that lists those awaiting approval?


 All this kind of forcing correct real name wouldn't however change the way
 how users are posting. I think there is even a difference in the way of
 posting between forum and mailing list users from the psychological point of
 view. eMail feels like they are slower and not editable and hence
 communication is get more informative. Forums are faster in use and postings
 could be edited and hence the discussion there becames often a chat like and
 therefor users forget to add signatures or even to say Hello.


I think this probably depends upon an individuals preferences, I personally
find mailing lists quicker and more immediate, and that forums rather
awkward to contribute to.


 So, the problem of etiquette is hard to solve, because it depends only on
 the users. As for the using real names, I think I could write some kind of a
 system for the admins/moderators to manage users with non-informative real
 names.


Perhaps making the duality of the forum/lists and the documenting the
expected etiquette/code of conduct is required, along with existing members
providing good examples of how to communicate the community, and if people
are rude/awkward about following good etiquette we provide initially a
gentle nudge about how one should write, then scale it up to removing
subscription if they are destructive.  I've only had to remove 2 subscribers
from the mailing list is not far off a decade so I don't it'll be a big
issue.  Most people are quite good about making more of effort to fit in if
asked in a appropriate way.

Having better user names will certainly help, as a number of recent forum
subscribers just have two letter user names which mean absolutely nothing in
any language.  A decent user name gives us the chance of keeping track of
who's who and who's said what, and who to reply to on different topics.


 The problem with the email addresses used as sender's email (default
 osgfo...@tevs.eu) is hard to solve without making some changes also to the
 mailing list itself, which is not doable for me. What I could try is to
 change email header in the way, so that it looks like it was sent from the
 mail of the user, however using default's forum email in the header.
 However, I am not sure how mailman (osg's mailing list software) would react
 on this, because this is actually a way how spammers handle.


I'm less concerned about the email address as the send email.  Knowing that
a post comes from the forum with the decent user name is sufficient for
me.   Perhaps if one could provide a link to the forum users online details
would be sufficient for those who want to contact somebody directly.

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


Re: [osg-users] Absolutely dark scene

2009-03-17 Thread Fernan
Hi Robert,

Thank you for your help.
I've achieved my purpose.

Following your instructions I realized that my problems were two:

1) On the one hand, the scene by default sets the AmbientIntensity as follows:

osg::LightModel* lightmodel = new osg::LightModel;
lightmodel-setAmbientIntensity(osg::Vec4(0.1f,0.1f,0.1f,1.0f));
_globalStateSet-setAttributeAndModes(lightmodel, 
osg::StateAttribute::ON);

And due this the scene was always a little light.
Then I set this value to zero in my application after create the scene:

osg::LightModel* lightmodel = new osg::LightModel;
lightmodel-setAmbientIntensity(osg::Vec4(0.0f,0.0f,0.0f,1.0f));
_globalStateSet-setAttributeAndModes(lightmodel, 
osg::StateAttribute::ON);

And I got all the elements of the scene appear dark unless sea.

2) On the other, I realized that I was applying to the sea surface an 
OSG::Material with Emission value set to nonzero. Once I set the zero value to 
this parameter, all to be completely dark in my scene.

--

I leave here my solution in order to it can help someone with same problem.

Thanks a lot again for your help.

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





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


Re: [osg-users] openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz decompression is error!

2009-03-17 Thread Mattias Helsing
Hi Robert, xh and others

I have uploaded a newly packed
openscenegraph-all-win32-msvc90sp1-Debug.tar.gz to the ftp area. I
tested it on windows and linux so hopefully it works better. It won't
be available until Robert moves it to the download site though.

cheers
Mattias

On 3/16/09, Mattias Helsing helsin...@gmail.com wrote:
 Hi all,

 I'm not at my msvc90 machine right now so can't test until tomorrow.
 gunzip on linux reports failures to.

 I've been using 7-zip for all the packages for msvc90 so I have tested
 some other packages in that folder. Among others
 openscenegraph-all-...Release.tar.gz which seems to work with linux
 gunzip and tar.

 So - I'll repack, test and submit tomorrow.

 Mattias

 On Mon, Mar 16, 2009 at 4:09 PM, Ralph Kern usene...@rk-se.de wrote:
 yes, I also downloaded a fresh copy and checked it.

 But you can tell use 7zip on windows to first decompress it and then you
 can unpack the uncompressed .tar if you ignore the error message on
 decompression.

 regards Ralph

 Paul Melis schrieb:
 xh wrote:
 Address:http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8/binaries/Windows/VisualStudio9/;


 The file indeed seems to be corrupt:

 16:01|p...@tabu:~ gzip -t
 openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz

 gzip: openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz:
 unexpected end of file



 openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz
 decompression is error!
 Are you this?
 Thx.

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





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





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


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


[osg-users] Intergration with OSG

2009-03-17 Thread Lingyun Yu
Hi all,

Does anybody know if I can render one part of window in OSG, and use another
framework to render the rest?

Thanks.

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


Re: [osg-users] openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz decompression is error!

2009-03-17 Thread Robert Osfield
Thanks Mattias, file now moved down standard download page of
OpenSceneGraph-2.8 visual studio 9 binaries, replacing the previous broken
one.

Might there be other problem files in this directory?

Robert.

On Tue, Mar 17, 2009 at 4:09 PM, Mattias Helsing helsin...@gmail.comwrote:

 Hi Robert, xh and others

 I have uploaded a newly packed
 openscenegraph-all-win32-msvc90sp1-Debug.tar.gz to the ftp area. I
 tested it on windows and linux so hopefully it works better. It won't
 be available until Robert moves it to the download site though.

 cheers
 Mattias

 On 3/16/09, Mattias Helsing helsin...@gmail.com wrote:
  Hi all,
 
  I'm not at my msvc90 machine right now so can't test until tomorrow.
  gunzip on linux reports failures to.
 
  I've been using 7-zip for all the packages for msvc90 so I have tested
  some other packages in that folder. Among others
  openscenegraph-all-...Release.tar.gz which seems to work with linux
  gunzip and tar.
 
  So - I'll repack, test and submit tomorrow.
 
  Mattias
 
  On Mon, Mar 16, 2009 at 4:09 PM, Ralph Kern usene...@rk-se.de wrote:
  yes, I also downloaded a fresh copy and checked it.
 
  But you can tell use 7zip on windows to first decompress it and then you
  can unpack the uncompressed .tar if you ignore the error message on
  decompression.
 
  regards Ralph
 
  Paul Melis schrieb:
  xh wrote:
  Address:
 http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8/binaries/Windows/VisualStudio9/
 
 
 
  The file indeed seems to be corrupt:
 
  16:01|p...@tabu:~ gzip -t
  openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz
 
  gzip: openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz:
  unexpected end of file
 
 
 
  openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz
  decompression is error!
  Are you this?
  Thx.
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=8494#8494
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] VMAP Data

2009-03-17 Thread Martin Spott
Jason Beverage wrote:

 osgGIS is probably what you want to use.  It reads feature data via OGR and
 creates nice OSG models for your feature data.  I believe it could read VMAP
 data by changing to the URL used for the filename.  I don't recall right off
 hand how you do that for VMAP data, but I do know that its possible:)  You
 should be able to google OGR + VMAP + URL and find some examples.

For the use with FlightGear we're maintaining a collection of VMap0
derived layers, of which you'll find a short description here:

  http://wiki.osgeo.org/wiki/LandcoverDB_VMap0_Detail

If the subset meets your requirements, feel free to download individual
shapefiles per layer from here:

  http://mapserver.flightgear.org/download.psp

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] Collada Commands

2009-03-17 Thread Adam Wise

Robert Osfield wrote:
 Hi Adam,
 
 On Tue, Mar 17, 2009 at 8:36 AM, Adam Wise  wrote:
 
   This might be the wrong place to post this...but I have a simple question: 
  how would I import an Openflight (.flt) file, and EXPORT it as a Collada 
  (.dae) file? I downloaded the COLLADA-dom...and I know my collada viewer is 
  working...but where would I go after that?
  
 
 
 On the command line:
 
    osgconv original.flt new.dae
 
 Programatically:
 
  #include osgDB/ReadFile
  #include osgDB/WriteFile
  
 {
  ...
 
   osg::ref_ptrosg::Node node = osgDB::readNodeFile(original.flt);  
 
   if (node.valid()) osgDB::writeNodeFile(*node, new.dae);
 
 }
 
 
 Robert.
 
  --
 Post generated by Mail2Forum



Question: exactly what does this mean? Warning: Could not find plugin to write 
nodes to file new.dae

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





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


Re: [osg-users] OpenSceneGraph-2.8.0-rc6 tagged, please test

2009-03-17 Thread Martin Spott
Philip,

Philip Lowman wrote:
 On Tue, Feb 24, 2009 at 10:04 AM, Martin Spott martin.sp...@mgras.netwrote:

 Similarly to other Unix systems, there are well-known sources for AIX
 freeware packages which typically install into /opt/freeware/ (analogously
 to /usr/freeware/ on IRIX).
 
 
 If you could roll a list of these well-known freeware packages which install
 into /opt/freeware into a bug report on the CMake bug tracker I (or someone
 else) would probably be happy to look through the CMake Find modules and add
 the paths where they're needed.  It's possible that libcurl may not be the
 only Find module with this problem.

I hear you, I just got a little bit 'distracted' recently and will get
back to you,

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Keyboard event

2009-03-17 Thread Simon Loic
My bad, I didn't see that a thread was already launched and treated this
problem : cf [osg-users] osg+QT MODKEY How to
It was due to the conversion of QT events into osg ones.
I've been through the thread and find work around but I'm not convinced it
is good for long term.

2009/3/17 Robert Osfield robert.osfi...@gmail.com

 HI Loic,

 What happens when you run the osgkeyboard example?

 I've just tried it and it detects the page up and page down without
 problems.  I'm working with Kubuntu 8.10.

 Robert.

 2009/3/17 Simon Loic simon1l...@gmail.com

 Hi,

 I faced the following problem with the osgGA::GUIEventAdapter::getKey().
 When ever I press an arrow key or PageUp or PageDown it returns 0 instead
 of the right key id.

 I noticed this behaviour on both windows and linux machines.

 Don't know if it makes a difference but I tried both  with my local
 keyboard layout (french) and the US one.

 Has anyone noticed the same thing? Is there a workaround?

 --
 Loïc Simon

 ___
 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




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


Re: [osg-users] [osgPlugins] Collada Commands

2009-03-17 Thread Robert Osfield
On Tue, Mar 17, 2009 at 4:35 PM, Adam Wise osgfo...@tevs.eu wrote:

 Question: exactly what does this mean? Warning: Could not find plugin to
 write nodes to file new.dae


What is means is that it's warning your that it couldn't find the plugin to
write the nodes to the file new.dae.

But then... that's exactly what it says.  I don't know what more to add.

Perhaps you should try asking a different questions... such as WHY it's not
able to find a plugin to write the nodes to the file new.dae

If you are asking this question then ask the question have you compiled and
installed the dae plugin?

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


Re: [osg-users] [osgPlugins] Collada Commands

2009-03-17 Thread Adam Wise

Robert Osfield wrote:
 On Tue, Mar 17, 2009 at 4:35 PM, Adam Wise  wrote:
 
   Question: exactly what does this mean? Warning: Could not find plugin to 
  write nodes to file new.dae
  
 
 
 What is means is that it's warning your that it couldn't find the plugin to 
 write the nodes to the file new.dae.
 
 But then... that's exactly what it says.  I don't know what more to add.
 
 Perhaps you should try asking a different questions... such as WHY it's not 
 able to find a plugin to write the nodes to the file new.dae
 
 If you are asking this question then ask the question have you compiled and 
 installed the dae plugin?
 
 Robert.
 
  --
 Post generated by Mail2Forum



That's what I meant...why is it not able to find the plugin? As far as I know, 
I BUILT the collada package, and viewer in windows. I followed the instructions 
in the read me. As far as installing it, there were no explicit instructions as 
to how to do that. Should I create a path to something?

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





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


Re: [osg-users] [osgPlugins] Collada Commands

2009-03-17 Thread Robert Osfield
On Tue, Mar 17, 2009 at 5:18 PM, Adam Wise osgfo...@tevs.eu wrote:

 That's what I meant...why is it not able to find the plugin?


I can't answer that, you have the machine in front of you, you know what
steps you've done to build and install everything.


 As far as I know, I BUILT the collada package, and viewer in windows. I
 followed the instructions in the read me. As far as installing it, there
 were no explicit instructions as to how to do that. Should I create a path
 to something?


The dae plugin should sit alongside the rest of the plugins.  If you are
able to load the flight plugin and the dae plugin sits alongside it is
should load.

To see what it is happening when the OSG tries to load the plugin/files up
the notification level to DEBUG, then watch the console as it looks for the
plugin and tries to load it.  This might give you a hint to what might be
wrong. To up the notify level set the env var OSG_NOTIFY_LEVEL to DEBUG,
then run osgconv in the console.

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


Re: [osg-users] openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz decompression is error!

2009-03-17 Thread Mattias Helsing
Hi Robert,

On 3/17/09, Robert Osfield robert.osfi...@gmail.com wrote:
 Thanks Mattias, file now moved down standard download page of
 OpenSceneGraph-2.8 visual studio 9 binaries, replacing the previous broken
 one.

thanks


 Might there be other problem files in this directory?

I have tested quite a few but not all I think. No other files that I
tried were defect. I tried to extract them using linux tar/gunzip
which should be a good test. Will make sure they all work as soon as
possible.

Mattias


 Robert.

 On Tue, Mar 17, 2009 at 4:09 PM, Mattias Helsing helsin...@gmail.comwrote:

 Hi Robert, xh and others

 I have uploaded a newly packed
 openscenegraph-all-win32-msvc90sp1-Debug.tar.gz to the ftp area. I
 tested it on windows and linux so hopefully it works better. It won't
 be available until Robert moves it to the download site though.

 cheers
 Mattias

 On 3/16/09, Mattias Helsing helsin...@gmail.com wrote:
  Hi all,
 
  I'm not at my msvc90 machine right now so can't test until tomorrow.
  gunzip on linux reports failures to.
 
  I've been using 7-zip for all the packages for msvc90 so I have tested
  some other packages in that folder. Among others
  openscenegraph-all-...Release.tar.gz which seems to work with linux
  gunzip and tar.
 
  So - I'll repack, test and submit tomorrow.
 
  Mattias
 
  On Mon, Mar 16, 2009 at 4:09 PM, Ralph Kern usene...@rk-se.de wrote:
  yes, I also downloaded a fresh copy and checked it.
 
  But you can tell use 7zip on windows to first decompress it and then
  you
  can unpack the uncompressed .tar if you ignore the error message on
  decompression.
 
  regards Ralph
 
  Paul Melis schrieb:
  xh wrote:
  Address:
 http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8/binaries/Windows/VisualStudio9/
 
 
 
  The file indeed seems to be corrupt:
 
  16:01|p...@tabu:~ gzip -t
  openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz
 
  gzip: openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz:
  unexpected end of file
 
 
 
  openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz
  decompression is error!
  Are you this?
  Thx.
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=8494#8494
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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


Re: [osg-users] [build] osgdb_freetype build problem on Mac OS/X 10.5.6

2009-03-17 Thread Robert Osfield
Hi John,

Could you check cmakes' Modules directory to see what it's providing for
FreeType, it could be that it doesn't provide the FREETYPE_INCLUDE_DIRS.

Robert.

On Tue, Mar 17, 2009 at 5:41 PM, john casu osgfo...@tevs.eu wrote:

 Robert,

 as you can see, from my original post, there's no FREETYPE_INCLUDE_DIRS
 defined in CMakeCache.txt, just the envvars for the two sub-paths, and the
 FREETYPE_LIBRARY envvar for the library.

 I'm using cmake 2.6.3, which is the most recent version.

 btw, I should point out that all I'm doing to build OSG is a vanilla
 ./configure ; make command, which is why I raised the issue. The freetype
 lib itself comes from OS/X 10.5.6 SDK/Xcode 3.1.2, which I'm guessing one
 needs to have installed to do the build to begin with.

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





 ___
 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] [osgPlugins] Plugin Collada

2009-03-17 Thread Roland Smeenk
Patrick,

If I test the current plugin with the Collada logo file that is available from 
the Collada model bank https://collada.org/owl/
I experience no problems.

-What test file are you using? 
-Could you send the .dae file? (unless it's already publically available)
-Did you test with more than one file?
-Describe the exception.

--
Roland

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





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


Re: [osg-users] [build] osgdb_freetype build problem on Mac OS/X 10.5.6

2009-03-17 Thread john casu
The system cmake file for FreeType on OS/X is /Applications/CMake\ 
2.6-3.app/Contents/share/cmake-2.6/Modules/FindFreetype.cmake 


and it does set the variables:

# set the user variables
IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
  SET(FREETYPE_INCLUDE_DIRS 
${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2})
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
SET(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})

# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if 
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype  DEFAULT_MSG  FREETYPE_LIBRARY  
FREETYPE_INCLUDE_DIRS)

MARK_AS_ADVANCED(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 
FREETYPE_INCLUDE_DIR_ft2build)

That last MARK_AS_ADVANCED line looks hinky to me, btw.

I put in a quick disabling of freetype (setting FOUND_FREETYPE to NO) in the 
OSG version of this cmake file.  If it fails to build, then I'd venture a guess 
that cmake is grabbing it's own cmake file instead of the OSG version.

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





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


Re: [osg-users] [build] osgdb_freetype build problem on Mac OS/X 10.5.6

2009-03-17 Thread john casu
btw,  I just noticed, the spelling of the two files is different, where you 
guys capitalize the middle T.

The system file:  FindFreetype.cmake
OSG: FindFreeType.cmake

would that be a problem ??

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





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


Re: [osg-users] [build] osgdb_freetype build problem on Mac OS/X 10.5.6

2009-03-17 Thread john casu
the workaround of setting FREETYPE_FOUND to NO works, so CMake is definitely 
picking the local version of FindFreeType.cmake

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





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


Re: [osg-users] openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz decompression is error!

2009-03-17 Thread Mattias Helsing
Hi again,

Have now downloaded and extracted them all and verified all archives
with linux tar

Mattias

On Tue, Mar 17, 2009 at 6:43 PM, Mattias Helsing helsin...@gmail.com wrote:
 Hi Robert,

 On 3/17/09, Robert Osfield robert.osfi...@gmail.com wrote:
 Thanks Mattias, file now moved down standard download page of
 OpenSceneGraph-2.8 visual studio 9 binaries, replacing the previous broken
 one.

 thanks


 Might there be other problem files in this directory?

 I have tested quite a few but not all I think. No other files that I
 tried were defect. I tried to extract them using linux tar/gunzip
 which should be a good test. Will make sure they all work as soon as
 possible.

 Mattias


 Robert.

 On Tue, Mar 17, 2009 at 4:09 PM, Mattias Helsing helsin...@gmail.comwrote:

 Hi Robert, xh and others

 I have uploaded a newly packed
 openscenegraph-all-win32-msvc90sp1-Debug.tar.gz to the ftp area. I
 tested it on windows and linux so hopefully it works better. It won't
 be available until Robert moves it to the download site though.

 cheers
 Mattias

 On 3/16/09, Mattias Helsing helsin...@gmail.com wrote:
  Hi all,
 
  I'm not at my msvc90 machine right now so can't test until tomorrow.
  gunzip on linux reports failures to.
 
  I've been using 7-zip for all the packages for msvc90 so I have tested
  some other packages in that folder. Among others
  openscenegraph-all-...Release.tar.gz which seems to work with linux
  gunzip and tar.
 
  So - I'll repack, test and submit tomorrow.
 
  Mattias
 
  On Mon, Mar 16, 2009 at 4:09 PM, Ralph Kern usene...@rk-se.de wrote:
  yes, I also downloaded a fresh copy and checked it.
 
  But you can tell use 7zip on windows to first decompress it and then
  you
  can unpack the uncompressed .tar if you ignore the error message on
  decompression.
 
  regards Ralph
 
  Paul Melis schrieb:
  xh wrote:
  Address:
 http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8/binaries/Windows/VisualStudio9/
 
 
 
  The file indeed seems to be corrupt:
 
  16:01|p...@tabu:~ gzip -t
  openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz
 
  gzip: openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz:
  unexpected end of file
 
 
 
  openscenegraph-all-2.8.0-win32-x86-vc90sp1-Debug.tar.gz
  decompression is error!
  Are you this?
  Thx.
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=8494#8494
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 
 
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



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


Re: [osg-users] [osgPlugins] Plugin Collada

2009-03-17 Thread Roger James




Patrick Roiss wrote:

  Hi,
i have a problem. I would like to see files written in Collada (DAE). I build and compile the plugin (collada-dom) and osg with no errors. now if i try to open a collada-test file (collada-logo) i get an exception. what have i done wrong :-)? I know my information is to low, so what else do you know?

i use windows XP and Visual Studio 2008 Express

  

Patrick,

A common problem is using a collada dom compiled against the Release C
runtime with and OSG compiled against a Debug C runtime and vice versa.

Roger


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


Re: [osg-users] [osgPlugins] Collada Commands

2009-03-17 Thread Roger James




Adam Wise wrote:

  Robert Osfield wrote:
  
  
On Tue, Mar 17, 2009 at 4:35 PM, Adam Wise  wrote:



   Question: exactly what does this mean? Warning: Could not find plugin to write nodes to file "new.dae"

  


What is means is that it's warning your that it couldn't find the plugin to write the nodes to the file "new.dae".

But then... that's exactly what it says.  I don't know what more to add.

Perhaps you should try asking a different questions... such as WHY it's not able to find a plugin to write the nodes to the file "new.dae"

If you are asking this question then ask the question have you compiled and installed the dae plugin?

Robert.

 --
Post generated by Mail2Forum

  
  


That's what I meant...why is it not able to find the plugin? As far as I know, I BUILT the collada package, and viewer in windows. I followed the instructions in the read me. As far as installing it, there were no explicit instructions as to how to do that. Should I create a path to something?

  

A fairly fundamental check is to see if you have a file
osgdb_dae.[dll|so] in the directory where all your other OSG plugins
are located. On a recent windows install this will probably be
"c:\Program Files\OpenSceneGraph\bin\osgPlugins-2.8.0. If you have not,
then you have not built the OSG Collada plugin. The OSG Collada plugin
is built as part of the OSG build, it is not part of the Collada DOM
library build.

Roger




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


Re: [osg-users] Forum users rare uses signatures, which is a pain tracking who's who

2009-03-17 Thread Art Tevs
Hi Robert, all


 
 I wasn't thinking of this, rather I just meant for a group of maintainers, 
 like yourself and I and others regular contributors to act as the approval 
 system.  We'd recieve a post saying that someone has asked to be subscribed 
 and when approve/disapprove/or make approval conditional on providing a more 
 human readable user name,
  
 Could you have a admin webpage that lists those awaiting approval?
 
 

Ok, this is doable. I am currently working on this. However in order to do so, 
you, Robert, has also to be registered on the forum. I will then give you 
according permissions, so that you are able to see those users and also able to 
approve them.
  

 
 Perhaps making the duality of the forum/lists and the documenting the 
 expected etiquette/code of conduct is required, along with existing members 
 providing good examples of how to communicate the community, and if people 
 are rude/awkward about following good etiquette we provide initially a gentle 
 nudge about how one should write, then scale it up to removing subscription 
 if they are destructive.  I've only had to remove 2 subscribers from the 
 mailing list is not far off a decade so I don't it'll be a big issue.  Most 
 people are quite good about making more of effort to fit in if asked in a 
 appropriate way.
 

Ok, this is also doable, however one would need to continuosly moderate the 
forum/read all messages. Currently there is only me and Roland who are 
moderating the forum. If we could get some more volunteers  for checking the 
etiquette it would be great! This makes sure that there is always somebody who 
is able to moderate.


 
 Having better user names will certainly help, as a number of recent forum 
 subscribers just have two letter user names which mean absolutely nothing in 
 any language.  A decent user name gives us the chance of keeping track of 
 who's who and who's said what, and who to reply to on different topics. 
 

How about Ed ? No, this is not true. There are names with just 2 letters, 
maybe not in our european languages, but in other there are (chinese?) ;) And 
we could not force users to write there first and last name, because maybe they 
want to have some kind of anonymity, which has to be respected. However, I 
agree that names like Xh or maybe are not acceptable.


Art

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





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


[osg-users] osgShadowMap Problems

2009-03-17 Thread tuandoviet
 

I'm trying to use osgShadow, I read examples on osg website and try to run
this code

But the shadow appears strangely like this picture:

http://i475.photobucket.com/albums/rr113/tek3D/shadow.jpg

Here is the code I tested:

int main()

{

   osgViewer::Viewer viewer;

 

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

   // create light source.

   osg::LightSource* lightsource = new osg::LightSource;

   osg::Light* light = new osg::Light;

   lightsource-setLight(light);

   light-setDirection(osg::Vec3(0,10,0));

   light-setPosition(osg::Vec4(0,0,90,1.0f));

   light-setAmbient(osg::Vec4(0.00f,0.00f,0.08f,1.0f));

   light-setDiffuse(osg::Vec4(1.0f,1.0f,1.0f,1.0f));

   root-addChild(lightsource);

 

   //shadow

   const int ReceivesShadowTraversalMask = 0x1;

 

   const int CastsShadowTraversalMask = 0x2;

 

osg::ref_ptrosgShadow::ShadowedScene shadowedScene = new
osgShadow::ShadowedScene;

 

 
shadowedScene-setReceivesShadowTraversalMask(ReceivesShadowTraversalMask);

shadowedScene-setCastsShadowTraversalMask(CastsShadowTraversalMask);

 

osg::ref_ptrosgShadow::ShadowMap sm = new osgShadow::ShadowMap;

shadowedScene-setShadowTechnique(sm.get());

 

int mapres = 1024;

sm-setTextureSize(osg::Vec2s(mapres,mapres));

   sm-setLight(light);

 

osg::Node* cessna1 = osgDB::readNodeFile(car68/car68.3DS);

cessna1-setNodeMask(CastsShadowTraversalMask);

 

osg::Node* cessna2 = osgDB::readNodeFile(lai.flt);

cessna2-setNodeMask(ReceivesShadowTraversalMask);

 

osg::MatrixTransform* positioned = new osg::MatrixTransform;

   osg::Matrix mat = osg::Matrix::rotate(2.7, osg::Vec3(0,0,1));

 
positioned-setMatrix(mat*positioned-getMatrix()*osg::Matrix::translate(10,
40,2));

positioned-addChild(cessna1);

   

   shadowedScene-addChild(positioned);

   shadowedScene-addChild(cessna2);

 

   root-addChild(shadowedScene);

 

   viewer.setSceneData(root);

   return viewer.run();

}

 

Could anyone help me with this problem? Thanks in advance!

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


Re: [osg-users] [OS X] Request for testing the new Cocoa backend + imageio-plugin

2009-03-17 Thread Eric Sokolowsky
I just ran a preliminary test, and the imageio plugin seemed to load and
work correctly. I will post more as I test further.

Thanks Stephan for integrating this!

-Eric

On Wed, Mar 4, 2009 at 11:09 AM, Stephan Maximilian Huber 
ratzf...@digitalmind.de wrote:

 Hi all,

 I've finished the coding of the new Cocoa backend for osgViewer and I
 integrated the imageio-plugin from E.Wing into CMake / the XCode-project.

 I did some tests but as of my limited ressources I can't test every
 combination of hardware etc. So please if you have some spare-time and
 an OS X machine can you please test the new code? Thanks!

 *Here's how to get the new code:*

 svn checkout
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/osg-cocoa-dev

 or if you already have svn trunk on your computer

 svn switch
 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/osg-cocoa-dev

 start CMake and change the following two options:

 OSG_WINDOWING_SYSTEM = Cocoa (X11, Carbon, and Cocoa available)
 OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX = imageio (imageio + quicktime available)

 If you want to compile for 64bit, be sure to change
 CMAKE_OSX_ARCHITECTURES to ppc;i386;ppc64;x86_64, (the carbon backend
 and quicktime are not compatible with 64bit, and get not compiled even
 when enabled!)

 create your project files, compile and test against your application /
 environment.

 If you want to use the depecated os x project then be sure to define the
 follwing flags for the project:

 USE_DARWIN_COCOA_IMPLEMENTATION (for cocoa backend)
 USE_DARWIN_CARBON_IMPLEMENTATION (for carbon backend)

 for osgDB:
 DARWIN_IMAGEIO (imagio as default image-plugin)
 DARWIN_QUICKTIME (quicktime as default image-plugin)


 *What's missing, not tested:*

 + I don't know if all tablet-events are handled well, because my tablet
 does not support all available events (rotation + tilt)

 + if you resize a window you'll get some artifacts while resizing, I
 don't know how to fix this, I tried some approaches but nothing good came
 up

 + switching from fullscreen to windowed mode and vice versa works only
 for the main-screen reliably (this affects also the carbon backend). See
 my other post regarding this issue.

 #scroll-wheel-events are not tested that well.

 SO, I hope no major problems arise, and we can merge the staff with
 trunk the next days.

 cheers,
 Stephan
 ___
 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] Discontinuous view and loading (readNodeFile)

2009-03-17 Thread petr
Sukender: cca  sorry it's my mystake, this is word in my native language and 
in english it means something like about

Robert Osfield: I hope that I understand your replies correctly, I have started 
to edit osganimate solution project (which is suggest in how to start) and 
in this project I try to write some implementation from osg example folder. I 
didn't start in my own project as you write here Are you doing your own 
rendering ...  

Tomorow in the morning I can send here my modified osganimate.cpp where i have 
put some implementation, maybe it would be helpfull ...

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





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


[osg-users] [forum] Please ignore this message...

2009-03-17 Thread Art Tevs
Sorry guys, I am just testing some functionality. Hence please ignore this 
message.

Cheers,
art

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





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


Re: [osg-users] [forum] Please ignore this message...

2009-03-17 Thread Art Tevs
test continues...

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





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


Re: [osg-users] [osgPlugins] Collada Commands

2009-03-17 Thread Adam Wise

rogerjames99 wrote:
 Adam Wise wrote: 
   
   Robert Osfield wrote:
   
On Tue, Mar 17, 2009 at 4:35 PM, Adam Wise  wrote:


  Question: exactly what does this mean? Warning: Could not find 
 plugin to write nodes to file new.dae
 
 
 
What is means is that it's warning your that it couldn't find the 
plugin to write the nodes to the file new.dae.

But then... that's exactly what it says.  I don't know what more to add.

Perhaps you should try asking a different questions... such as WHY it's 
not able to find a plugin to write the nodes to the file new.dae

If you are asking this question then ask the question have you compiled 
and installed the dae plugin?

Robert.

--
Post generated by Mail2Forum


   
   
   That's what I meant...why is it not able to find the plugin? As far as I 
   know, I BUILT the collada package, and viewer in windows. I followed the 
   instructions in the read me. As far as installing it, there were no 
   explicit instructions as to how to do that. Should I create a path to 
   something?
   
   
   
  A fairly fundamental check is to see if you have a file osgdb_dae.[dll|so] 
 in the directory where all your other OSG plugins are located. On a recent 
 windows install this will probably be c:Program 
 FilesOpenSceneGraphbinosgPlugins-2.8.0. If you have not, then you have not 
 built the OSG Collada plugin. The OSG Collada plugin is built as part of the 
 OSG build, it is not part of the Collada DOM library build.
 
 Roger
 
  --
 Post generated by Mail2Forum



DynamicLibrary::failed loading osgPlugins-2.8.0/osgdb_daed.dll
Warning: Could not find plugin to write nodes to file new.dae.

So it's likely that I didn't build the OSG collada plugin. The closest thing I 
could find to that plugin was osgdb_daed.dll.embed.manifest. Which was located 
in C:\OpenSceneGraph-2.8.0\build\src\osgPlugins\dae\osgdb_dae.dir\Debug. It was 
well hidden for the most part. So, just to clarify, using visual studio 2008, 
how would I  build the collada dom library?

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





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


[osg-users] [forum] New feature: removed default email adress

2009-03-17 Thread Art Tevs
Hi folks,

I have changed now the forum's scripts slightly to remove the default email 
adress osgfo...@tevs.eu from the mails sent by the forum users. Now all posts 
which are forwarded to the mailing lists will use user's email adress in the 
From:  header tag. This is a default behavior and can be disabled in your 
profile settings. 

However please note that you still have not to be registered on the mailing 
list, because mails are sent now with the Sender: osgfo...@tevs.eu header tag 
allowing your posts still be delivered to the mailing list.

If this message comes through to the mailing list, then everything works fine ;)

Best regards,
Art
 
P.S. For usual users: you do not have to do anything. Everything should work 
without any profile changes or any other special kind of behavior.

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





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


Re: [osg-users] What about User-Meeting in Europe - osgInEurope?

2009-03-17 Thread Art Tevs
Hi folks,

this is a reminder of the running poll about next osgUserMeeting. Current 
results are:

Paris, France   [ 7 ]
Marseile, France[ 0 ]
Strassbourg, France [ 1 ]
Prague, Czech Republic  [ 1 ]
Genova, Italy   [ 1 ]
Brussel, Belgium[ 2 ]
Zuerich, Switzerland[ 1 ]
Luxembourg, Luxembourg  [ 1 ]
Munich, Germany [ 0 ]
Frankfurt Am Main, Germanyy [ 1 ]
Stuttgart, Germany [ 2 ]
I want to join, I do not care about the city: [ 2 ]

Best regards,
Art

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





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


Re: [osg-users] Forum users rare uses signatures, which is a pain tracking who's who

2009-03-17 Thread Art Tevs
Hi folks,

I've setted up a Rule-page http://forum.openscenegraph.org/rules.php 
describing the etiquette of forum/mailing list use. I have also setted up 
anything which is needed to disable users with non-valid realnames. Users could 
now be deactivated, so that they can not post anything, but are still able to 
login and change there profile settings.

I do not really like the idea of activating the registration by administrators, 
because this makes the forum dependent on administrator online times and could 
also bring the registration rates down. 

However, I propose just have couple of volunteer moderators/admins which will 
disable a user as soon as him break one of the rules described on the page. 
User will then still be able to access their profile and change it according to 
the rules. Users are then also able to write a PM (private message) to any of 
the moderators/administrators, so that they could reactivate the account. 

I will let now all users know that there are new rules which has to be 
investigated by them. During the week I would check the profiles and deactivate 
those, which still use cryptic real names.

Cheers,
Art

P.S. Please let me know if you would like to add some rules or to change the 
existing ones.

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





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


[osg-users] Draw a triangle with front and back faces

2009-03-17 Thread Ruqin Zhang
Hi,

I am trying to draw a triangle with filled front and back faces. In this
way,
even the normal of it has a wrong direction, I can still have it rendered
correctly.
I know how to do this in OpenGL, while didn't figure it out in OSG. Has
anyone
done this before? Please help me out with some sample code. 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] Multithreading crashduetoosgDb::Registry::instance()

2009-03-17 Thread I-Nixon, Anthony D
I'll have a crack at it, unless someone else is already doing it.  I've got an 
environment here that exercises the issue consistently.
 
Anthony




From: Robert Osfield [mailto:robert.osfi...@gmail.com] 
Sent: Tuesday, 17 March 2009 8:22 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Multithreading 
crashduetoosgDb::Registry::instance()


HI Richard + Paul,

Thanks for explanation.  Feel free to dive in an code up such a 
solution.

Robert.


On Tue, Mar 17, 2009 at 10:17 AM, Schmidt, Richard 
richard.schm...@eads.com wrote:


The document is about a design pattern called double locking, 
which is especially suitable for singleton objects in multithreaded 
environments.

The pattern is essentially this:


static Singleton *instance (void)
{
// First check
if (instance_ == 0)
{
// Ensure serialization (guard
// constructor acquires lock_).
GuardMutex guard (lock_);
// Double check.
if (instance_ == 0)
instance_ = new Singleton;
}
return instance_;
// guard destructor releases lock_.
}


The guard mutex is only accessed in the initialization phase of 
the singleton. Once instance_ is set the guard does not need to be queried 
anymore.


Richard
___
Von: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] Im Auftrag von Robert 
Osfield

Gesendet: Dienstag, 17. März 2009 11:07

An: OpenSceneGraph Users
Betreff: Re: [osg-users] Multithreading crash 
duetoosgDb::Registry::instance()


2009/3/17 Schmidt, Richard richard.schm...@eads.com
http://www.cs.wustl.edu/~schmidt/PDF/DC-Locking.pdf 
http://www.cs.wustl.edu/%7Eschmidt/PDF/DC-Locking.pdf 

Could you explain what the above document is all about...

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] a limit of osg::ReaderWriter interface

2009-03-17 Thread lwren
Hi all,
I notice that osg::ReaderWriter includes a series of interface like 
readNode(std::istream ,const Options*) which read data from stream buffer and 
has no file name passed in.  There is a problem here when reading the file with 
a name like aa.ive.gz.curl.
The curl plugin read file data into a stream buffer, and then call plugin gz 
across the interface shown above which not realized in gz to read it further, 
so it failed!
The interface CAN'T be realized in gz for lack of a file name which is needed 
in gz to determini which  pluin to use in the followed step.

regards,
ren___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG QT events

2009-03-17 Thread Roman Grigoriev
Hi guys!

I try to modify QOSGWidget to work with QT dialogs so I have one problem

If I show my dialog like this in keyboard section 

  void keyPressEvent( QKeyEvent* event )

{

  if(event-key()==Qt::Key_F11 )

main_dialog-show();

}

Dialog is shown above osg window and when closed osg window works fine.

But I want to show this dialog based on my app statenot based on keyboard
event. Let's say I need to show this dialog when 

Variable flag_start=true; so I set in my updatecallback flag_start=true and
in paintevent I made

Like this

virtual void paintEvent( QPaintEvent * event ) 

{ 

  

  if (flag_start)

  {

main-show();

Flag_start=false;

  }

  frame(); 

} 

But when I've done this way I see dialog and it works fine but my osg window
halt.

So my question how to work with osg events with QT?

Thanx in advance

Bye

 

 

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