Re: [osg-users] Multiple view in a Qt4 interface

2008-03-28 Thread #POH CHENG GUAN#
Hi Julien,

I did not encounter any problems running the compositeViewer with Qt4 example, 
did you modify the example?

Regards,
CG

-Original Message-
From: [EMAIL PROTECTED] on behalf of Julien Achard
Sent: Wed 3/26/2008 6:38 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Multiple view in a Qt4 interface
 
Okay thank you for your help,
When i try to run the exemple of composite viewer with Qt4, i get an error
in console, saying :

Using QOSGWidget - QWidget + osgViewer creating the graphics context.
Windows Error #2000: [Screen #0] GraphicsWindowWin32::setWindow() - Unable
to cr
eate OpenGL rendering context. Reason: Le format pixel n'est pas valide.

Appuyez sur une touche pour continuer...

this line seems to be the problem :
traits-inheritedWindowData = new WindowData(winId());

when commenting it, it is run but i do not think it is the correct way to
run this application.


Compilation is Ok, juste some warnings.

2008/3/26, Robert Osfield [EMAIL PROTECTED]:

 Hi Julian,

 The type of usage you want is a case of having two Views onto a single
 Scene.  This mode of operation is supported by the
 osgViewer::CompositeViewer.  You will be able to use CompositeViewer
 with QGLWidget in much the same way, but you'll have two View, each
 with a master Camera to which you attach the QGLWidget.

 Robert.


 On Wed, Mar 26, 2008 at 10:02 AM, Julien Achard [EMAIL PROTECTED]
 wrote:
  Hi,
  I am new on OpenSceneGraph, and i have a project of osg integration with
  Qt4.
  Actually i have a QGLWidget who inherits of osgViewer::Viewer, and i can
  render a scene on my Qt interface.
  Now i have a problem, because i want to have two differents Widgets in
 my Qt
  interface, showing the same scene data, but with differents point of
 views.
  I do not want to split a view in the same Widget, i really want two
  disctinct Widgets.
   Can i keep the scene data somewhere and have my two Widgets using the
 same
  scene data ?
 
  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


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


[osg-users] Extending OSG with layout algorithms

2008-03-28 Thread Felix Bwire
Hi there,
Given a graph in osg, is it possible to extend osg with layout algorithms so
that the graph can be given another structure, such as the tree like
structure or cyclic or hyperbolic or clustering of nodes. I know there are
algorithms that can do that, but can they be used to extend osg? If it is
possible, how can it be done?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgPPU-0.1 developer release

2008-03-28 Thread Maciej Krol
Hi Morne,

I have similar problem when I am behind proxy, the svn protocol is being
blocked. When subversion is available through http I do not have any
problems.

Art, would it be a problem to change the protocol from svn to http(s). It
would solve access problems for corporate users which are usually behind
proxy.

Regards,
 Maciej

2008/3/27, Morné Pistorius [EMAIL PROTECTED]:

 Hi Art,

 Could you provide a downloadable zip file or something?  When I try to
 check out the SVN version, I get this error:

 Error: Can't connect to host 'projects.tevs.eu': No connection could
 be made because the target machine actively refused it.

 Cheers,
 Morne



 On Thu, Mar 27, 2008 at 1:56 PM, Art Tevs [EMAIL PROTECTED] wrote:
  Hi folks,
 
   I finally found some time and now there is a first
   developer release of osgPPU Nodekit (ok not directly
   a node kit, because not derived from a node, but this
   will follow ;-).
   Here is the homepage of the project:
   http://projects.tevs.eu/osgppu/wiki
 
   There are couple of example applications showing it in
   action. I will be very appreciated if somebody of you
   would contribute to this project with new
   ideas/critics/bug-huntings/features/...
 
 
   Best regards,
   Art
 
 
 
 
 
 
Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
   www.yahoo.de/go
   ___
   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] Multiple view in a Qt4 interface

2008-03-28 Thread Julien Achard
Hi,

i have not modify the exemple, i get a pixel format error when i try to do
this :

traits-inheritedWindowData = *new* WindowData(winId());

Are you running this exemple on a windows operating system? i will try to
run the exemple on linux.

I have resolved my problem by using a QGLWidget with a compositeViewer,
instead of a QWiget. The is no graphic context to set up, and the embedded
graphic windows used in is more simple :

*osg*::ref_ptrosgViewer::GraphicsWindowEmbedded _gw;
instead of :
*osg*::ref_ptrosgViewer::GraphicsWindow _gw;

Thanks for your reply.

2008/3/28, #POH CHENG GUAN# [EMAIL PROTECTED]:

 Hi Julien,

 I did not encounter any problems running the compositeViewer with Qt4
 example, did you modify the example?

 Regards,

 CG


 -Original Message-
 From: [EMAIL PROTECTED] on behalf of Julien
 Achard
 Sent: Wed 3/26/2008 6:38 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Multiple view in a Qt4 interface

 Okay thank you for your help,
 When i try to run the exemple of composite viewer with Qt4, i get an error
 in console, saying :

 Using QOSGWidget - QWidget + osgViewer creating the graphics context.
 Windows Error #2000: [Screen #0] GraphicsWindowWin32::setWindow() - Unable
 to cr
 eate OpenGL rendering context. Reason: Le format pixel n'est pas valide.

 Appuyez sur une touche pour continuer...

 this line seems to be the problem :
 traits-inheritedWindowData = new WindowData(winId());

 when commenting it, it is run but i do not think it is the correct way to
 run this application.


 Compilation is Ok, juste some warnings.

 2008/3/26, Robert Osfield [EMAIL PROTECTED]:
 
  Hi Julian,
 
  The type of usage you want is a case of having two Views onto a single
  Scene.  This mode of operation is supported by the
  osgViewer::CompositeViewer.  You will be able to use CompositeViewer
  with QGLWidget in much the same way, but you'll have two View, each
  with a master Camera to which you attach the QGLWidget.
 
  Robert.
 
 
  On Wed, Mar 26, 2008 at 10:02 AM, Julien Achard [EMAIL PROTECTED]
  wrote:
   Hi,
   I am new on OpenSceneGraph, and i have a project of osg integration
 with
   Qt4.
   Actually i have a QGLWidget who inherits of osgViewer::Viewer, and i
 can
   render a scene on my Qt interface.
   Now i have a problem, because i want to have two differents Widgets in
  my Qt
   interface, showing the same scene data, but with differents point of
  views.
   I do not want to split a view in the same Widget, i really want two
   disctinct Widgets.
Can i keep the scene data somewhere and have my two Widgets using the
  same
   scene data ?
  
   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
 


 ___
 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] Extending OSG with layout algorithms

2008-03-28 Thread Robert Osfield
Hi Felix,

The OSG itself is basic a tree data structure.  You can't have any
cycles in it without introducing special traversal counts to break
recursion beyond a particular level - this isn't something the OSG
supports out the box, but you could write a callback to do it.

But.. if you are just talking about spatial layout rather than data
structures then yes you can lay it out any how you want.  If you want
different parts of the scene graph to geometrically relate to each
other then its down to the developer to add this, but this is very
much app developers task rather something core to the scene graph.

Robert.

On Fri, Mar 28, 2008 at 6:24 AM, Felix Bwire [EMAIL PROTECTED] wrote:
 Hi there,
 Given a graph in osg, is it possible to extend osg with layout algorithms so
 that the graph can be given another structure, such as the tree like
 structure or cyclic or hyperbolic or clustering of nodes. I know there are
 algorithms that can do that, but can they be used to extend osg? If it is
 possible, how can it be done?
 ___
  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] Get Parent as Transform in Absolute ?

2008-03-28 Thread Vincent Bourdier
Its ok, I've made some test and I understand how it works now... thanks for
the help.

I've another question, a similar one but I think I can ask it here :

If my node is a PAT i do
   quat = pat-getAttitude();

if my node is a MatrixTransform i do
   quat = mt-getMatrix().getRotate();

But in the second case, it looks doing nothing... Where is the difference ?

Thanks.

Regards,
   Vincent

2008/3/27, Alberto Luaces [EMAIL PROTECTED]:

 Sorry if I don't understand you again, but my program is giving you the
 absolute position of the node (the fourth column of the matrix,
 (10,20,-5))
 and its world orientation ( the first 3x3 block, equal to identity since
 the
 two transforms were translation ones).

 Try changing m1 and m2 to see the changes in the global position and
 orientation.

 El Jueves 27 Marzo 2008ES 17:31:51 Vincent Bourdier escribió:

  In your example you are using getWorldMatrices.
  I know this function, thanks... I and Robert were talking about it.
  But what I simply need is :
 
  with a node, I need its position (absolute/world coordinates), and its
  orientation (in the world system coordinates).
  How can I do it ?
 
  (Sorry, I'm not very understandable...)
 
  Thanks,
 
  Regard.
 Vincent.
 
  2008/3/27, Alberto Luaces [EMAIL PROTECTED]:
   Sorry, I don't get what you exactly are looking for. Would this
 example
   help?
   It calculates the position of a node in world coordinates:
  
   #include osg/Node
   #include osg/Group
   #include osg/Matrix
   #include osg/MatrixTransform
  
   #include iostream
  
   int main()
   {
   osg::Group *root;
   osg::Node *n;
   osg::MatrixTransform *m1, *m2;
  
   root = new osg::Group;
   n = new osg::Node;
   m1 = new osg::MatrixTransform(
 osg::Matrix::translate(osg::Vec3
   (0.0,10.0,0.0)));
   m2 = new osg::MatrixTransform(
 osg::Matrix::translate(osg::Vec3
   (10.0,10.0,-5.0)));
  
   //  root-m1-m2-n
  
   root-addChild(m1);
   m1-addChild(m2);
   m2-addChild(n);
  
   osg::MatrixList ml = n-getWorldMatrices();
  
   for(int i=0; i4; i++)
   {
   for(int j=0; j4; j++)
   {
   std::cout  ml[0](j,i)  \t;
   }
   std::cout  \n;
   }
  
   return 0;
   }
  
   El Jueves 27 Marzo 2008ES 16:24:47 Vincent Bourdier escribió:
Hi Alberto
   
Thanks for help, I understand the instance problem... If all is good
 in
  
   my
  
situation I would not have many instances of the same node... so I
think
  
   it
  
will be more simple...
   
Because my problem is more recent, I ask a second question : To get
this node's position (absolute ), if I understand well I must use
something
  
   like
  
  
  
 http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/CameraC
  on
  
   trolFindingWorldCoordinates
   
There is no other way ?
   
Thanks,
   
 Regards.
vincent.
   
2008/3/27, Alberto Luaces [EMAIL PROTECTED]:
 El Jueves 27 Marzo 2008ES 15:24:48 Vincent Bourdier escribió:
  but if I want to get the world Matrix, the one which represent
 the

 node's

  position and translation in absolute system, how can I do ?
 Which
  matrix

 I

  have to get ?

 If you have several wold matrices, it means that you have
 instantiated
  
   a
  
 node
 several times. Only you know in what instance you are interested.
  
   Think
  
 about
 the four wheels of a car, there are 4 instances of the same node,
 the
 wheel
 mesh.




 ___
 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] osgPPU-0.1 developer release

2008-03-28 Thread Art Tevs
Hi Maciej,

 Hi Morne,
 
 I have similar problem when I am behind proxy, the
 svn protocol is being
 blocked. When subversion is available through http I
 do not have any
 problems.
 
Ah, I understand. 

 Art, would it be a problem to change the protocol
 from svn to http(s). It
 would solve access problems for corporate users
 which are usually behind
 proxy.
 
It wouldn't be a big problem, I have just to find out
how to setup apache so that it do pass the svn
communication through the http protocol. I'll check
it. 

In the mean time, I have provided a downloadable
version on the homepage.

Cheers,
Art

 Regards,
  Maciej
 
 2008/3/27, Morné Pistorius
 [EMAIL PROTECTED]:
 
  Hi Art,
 
  Could you provide a downloadable zip file or
 something?  When I try to
  check out the SVN version, I get this error:
 
  Error: Can't connect to host 'projects.tevs.eu':
 No connection could
  be made because the target machine actively
 refused it.
 
  Cheers,
  Morne
 
 
 
  On Thu, Mar 27, 2008 at 1:56 PM, Art Tevs
 [EMAIL PROTECTED] wrote:
   Hi folks,
  
I finally found some time and now there is a
 first
developer release of osgPPU Nodekit (ok not
 directly
a node kit, because not derived from a node,
 but this
will follow ;-).
Here is the homepage of the project:
http://projects.tevs.eu/osgppu/wiki
  
There are couple of example applications
 showing it in
action. I will be very appreciated if somebody
 of you
would contribute to this project with new
ideas/critics/bug-huntings/features/...
  
  
Best regards,
Art
  
  
  
  
  
  
 Lesen Sie Ihre E-Mails jetzt einfach von
 unterwegs.
www.yahoo.de/go
___
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
 



  Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgPPU-0.1 developer release

2008-03-28 Thread Art Tevs
Hi jean,

 
 Ah, I understand. Perhaps then you could put it in a
 section only for
 the static link projects, something like 
 
 IF (!DYNAMIC_OSGPPU)
 LINK_EXTERNAL(${TARGET_TARGETNAME} pthread)
 ENDIF(!DYNAMIC_OSGPPU)
 
 instead of removing the line completely... (not sure
 if ! is right in
 CMake syntax, or if it's NOT or whatever, but you
 get the point...)
 

Thanks for the idea. I have corrected it now.

 J-S
 -- 

__
 Jean-Sébastien Guay   
 [EMAIL PROTECTED]
   
 http://www.cm-labs.com/

 http://whitestar02.webhop.org/
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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



  Lesen Sie Ihre E-Mails jetzt einfach von unterwegs.
www.yahoo.de/go
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] RE FLT export submission imminent (Paul Martz)

2008-03-28 Thread Robert Osfield
Hi Neil and Michael,

It may be possible to back port the new changes to the OpenFlight
plugin to 1.2 as most of the core scene graph is similar, but it
requires work to do the initial port then there is the issue about
ongoing maintenance.  I am not about to go volunteer to administer
such a awkward maintenance job as have more than enough work on my
plate, but as it's all be open source does make it possible for you to
maintain a branch.

However, perhaps the best workaround would be to export your models to
1.2 .ive and then use a 2.x version of osgconv to do the conversion
from 1.2 .ive to .flt.   All the 2.x libs and plugins are versioned so
it should be possible to mix.   It's certainly not an idea solution
but it might give you something to trial without the need for branch
the 2.x code base.

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


Re: [osg-users] ANN: FLT export

2008-03-28 Thread Robert Osfield
HI All,

I've have now merged Paul's changes, ported them to Linux and checked
them all in to SVN.

The code base isn't complete yet so be on the look out for issues.  I
presume Paul would be happy for them to be posted in via osg-users.

Many thanks to Paul Martz and his generous sponsor for this work.

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


Re: [osg-users] Extending OSG with layout algorithms

2008-03-28 Thread Felix Bwire
Hi Robert,
Thanks very much for that. Actually all I needed was about the spatial
layout of a graph. My other question is, does one have to code this on their
own or is it possible to extend osg with an algorithm so as to achieve this.
How can osg be extended with an algorithm that gives a graph the desired
spatial layout?

Thanx,
Felix

On Fri, Mar 28, 2008 at 12:38 PM, Robert Osfield [EMAIL PROTECTED]
wrote:

 Hi Felix,

 The OSG itself is basic a tree data structure.  You can't have any
 cycles in it without introducing special traversal counts to break
 recursion beyond a particular level - this isn't something the OSG
 supports out the box, but you could write a callback to do it.

 But.. if you are just talking about spatial layout rather than data
 structures then yes you can lay it out any how you want.  If you want
 different parts of the scene graph to geometrically relate to each
 other then its down to the developer to add this, but this is very
 much app developers task rather something core to the scene graph.

 Robert.

 On Fri, Mar 28, 2008 at 6:24 AM, Felix Bwire [EMAIL PROTECTED] wrote:
  Hi there,
  Given a graph in osg, is it possible to extend osg with layout
 algorithms so
  that the graph can be given another structure, such as the tree like
  structure or cyclic or hyperbolic or clustering of nodes. I know there
 are
  algorithms that can do that, but can they be used to extend osg? If it
 is
  possible, how can it be done?
  ___
   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] RE FLT export submission imminent (Paul Martz)

2008-03-28 Thread Bob Kuehne
hi all,

robert is clearly best focused on moving osg forward at the trunk, and  
does great work there. but paul and i realize others may need support  
for older versions, and provide that through our support plans.

so if you really really want this feature in 1.2, please consider one  
of the support plans paul and i offer.  it's precisely through these  
support plans, training, and custom development work, that paul and i  
are able to do things that contribute back to osg. at any rate, we  
offer support plans which provide maintained branches of osg for 1.2,  
2.2, or whatever you require. please see my site for details:

http://blue-newt.com/products/

bob

bob kuehne
founder and ceo - blue newt software
www.blue-newt.com734/834-2696

On Mar 28, 2008, at 7:05 AM, Robert Osfield wrote:
 Hi Neil and Michael,

 It may be possible to back port the new changes to the OpenFlight
 plugin to 1.2 as most of the core scene graph is similar, but it
 requires work to do the initial port then there is the issue about
 ongoing maintenance.  I am not about to go volunteer to administer
 such a awkward maintenance job as have more than enough work on my
 plate, but as it's all be open source does make it possible for you to
 maintain a branch.

 However, perhaps the best workaround would be to export your models to
 1.2 .ive and then use a 2.x version of osgconv to do the conversion
 from 1.2 .ive to .flt.   All the 2.x libs and plugins are versioned so
 it should be possible to mix.   It's certainly not an idea solution
 but it might give you something to trial without the need for branch
 the 2.x code base.

 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] ANN: FLT export

2008-03-28 Thread Jean-Sébastien Guay
Hello Paul,

 Hi All -- I recently posted a change to osg-submissions that adds FLT 
 export capability to OSG. Assuming it doesn't break the build, I expect 
 Robert will have this available on current SVN soon.

Great work, it's an excellent feature to add (in addition to the added 
features in the OpenFlight reader too).

As a quick test, I tried converting one of our models (which I can't 
send unfortunately) from FLT to OSG, then back. The OSG file was good 
(and I had done that before to debug model that wouldn't load 
correctly), but on the reverse trip osgconv crashed.

Setting OSG_NOTIFY_LEVEL=DEBUG gives the following (sorry if it's long, 
but I don't want to leave out something that might be useful).

  osgconv KVM32.osg KVM32-new.flt
GraphicsContext::setWindowingSystemInterface() 015A8508 1018B218
itr='C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin'
FindFileInPath() : trying 
C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgPlugin
s-2.3.6\osgdb_osg.dll ...
FindFileInPath() : USING 
C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgPlugins
-2.3.6\osgdb_osg.dll
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
Opened DynamicLibrary osgPlugins-2.3.6/osgdb_osg.dll
FindFileInPath(KVM32.osg): returning KVM32.osg
itr='C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin'
FindFileInPath() : trying 
C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgPlugin
s-2.3.6\osgdb_rgb.dll ...
FindFileInPath() : USING 
C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgPlugins
-2.3.6\osgdb_rgb.dll
Opened DynamicLibrary osgPlugins-2.3.6/osgdb_rgb.dll
FindFileInPath(./pump_chassis_LAYOUT.rgb): returning 
./pump_chassis_LAYOUT.rgb
raw-sizeX = 1024
raw-sizeY = 1024
raw-sizeZ = 4
raw-bpc = 1
image read ok 1024  1024
FindFileInPath(./mirror.rgb): returning ./mirror.rgb
raw-sizeX = 256
raw-sizeY = 512
raw-sizeZ = 4
raw-bpc = 1
image read ok 256  512
FindFileInPath(./bar.rgb): returning ./bar.rgb
raw-sizeX = 128
raw-sizeY = 256
raw-sizeZ = 4
raw-bpc = 1
image read ok 128  256
FindFileInPath(./mirror front.rgb): returning ./mirror front.rgb
raw-sizeX = 256
raw-sizeY = 512
raw-sizeZ = 4
raw-bpc = 1
image read ok 256  512
FindFileInPath(./front bottom.rgb): returning ./front bottom.rgb
raw-sizeX = 512
raw-sizeY = 128
raw-sizeZ = 3
raw-bpc = 1
image read ok 512  128
FindFileInPath(./pump_boom_LAYOUT.rgb): returning ./pump_boom_LAYOUT.rgb
raw-sizeX = 1024
raw-sizeY = 1024
raw-sizeZ = 3
raw-bpc = 1
image read ok 1024  1024
itr='C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin'
FindFileInPath() : trying 
C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgSim.dl
l ...
itr='C:\Windows\system32'
FindFileInPath() : trying C:\Windows\System32\osgSim.dll ...
itr='C:\Windows\System'
FindFileInPath() : trying C:\Windows\system\osgSim.dll ...
itr='C:\Windows'
FindFileInPath() : trying C:\Windows\osgSim.dll ...
itr='.'
FindFileInPath() : trying 
C:\Dev\Work\cranesim\vortex\cranesim\resource\vehicle\
schwing32XL\osgSim.dll ...
itr='C:\PROGRA~1\COMMON~1\GTK\2.0\bin'
FindFileInPath() : trying C:\Program Files\Common 
Files\GTK\2.0\bin\osgSim.dll .
..
itr='C:\Tools\Perl\site\bin'
FindFileInPath() : trying C:\Tools\Perl\site\bin\osgSim.dll ...
itr='C:\Tools\Perl\bin'
FindFileInPath() : trying C:\Tools\Perl\bin\osgSim.dll ...
itr='C:\Tools\MiKTeX\miktex\bin'
FindFileInPath() : trying C:\Tools\MiKTeX\miktex\bin\osgSim.dll ...
itr='C:\Tools\dxsdk\Utilities\Bin\x86'
FindFileInPath() : trying 
C:\Dev\Work\cranesim\vortex\cranesim\resource\vehicle\
schwing32XL\C:\Tools\dxsdk\Utilities\Bin\x86\osgSim.dll ...
itr='C:\Program Files\CMake 2.4\bin'
FindFileInPath() : trying C:\Program Files\CMake 2.4\bin\osgSim.dll ...
itr='C:\Windows\system32'
FindFileInPath() : trying C:\Windows\System32\osgSim.dll ...
itr='C:\Windows'
FindFileInPath() : trying C:\Windows\osgSim.dll ...
itr='C:\Windows\System32\Wbem'
FindFileInPath() : trying C:\Windows\System32\wbem\osgSim.dll ...
itr='C:\Program Files\Intel\DMIX'
FindFileInPath() : trying C:\Program Files\Intel\DMIX\osgSim.dll ...
itr='C:\Program Files\Common Files\Roxio Shared\DLLShared\'
FindFileInPath() : trying C:\Program Files\Common Files\Roxio 
Shared\DLLShared\o
sgSim.dll ...
itr='C:\Program Files\Common Files\Roxio Shared\DLLShared\'
FindFileInPath() : trying C:\Program Files\Common Files\Roxio 
Shared\DLLShared\o
sgSim.dll ...
itr='C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\'
FindFileInPath() : trying C:\Program Files\Common Files\Roxio 
Shared\9.0\DLLShar
ed\osgSim.dll ...
itr='c:\Program Files\Microsoft SQL Server\90\Tools\binn\'
FindFileInPath() : trying C:\Program Files\Microsoft SQL 
Server\90\Tools\binn\os
gSim.dll ...
itr='C:\Program Files\doxygen\bin'
FindFileInPath() : trying C:\Program Files\doxygen\bin\osgSim.dll ...
itr='C:\Program Files\Graphviz2.16\Bin'
FindFileInPath() : trying 
C:\Dev\Work\cranesim\vortex\cranesim\resource\vehicle\
schwing32XL\C:\Program Files\Graphviz2.16\Bin\osgSim.dll ...
itr='C:\Program Files\jEdit'
FindFileInPath() : trying C:\Program 

[osg-users] Issues with minimizing osgviewer

2008-03-28 Thread Gordon Tomlinson
Hi All
 
Were getting issues when minimizing our OSG applications, including just
plain old osgviewer.exe
 
 
Error: Error: [Screen #1] GraphicsWindowWin32::swapBuffersImplementation() -
Unable to swap display buffers[Screen #0]
GraphicsWindowWin32::swapBuffersImplementation() - Unable to swap display
buffers
Error: [Screen #0] GraphicsWindowWin32::swapBuffersImplementation() - Unable
to swap display buffers
 
 
The console is flooded with these messages, not something we have seen in
1.2, anyone know why this is happening, how to fix or seeing a similar thing
?
 
we are a couple of week behind the current head
 
 
 
 
 

Best Regards 

Gordon

__
Gordon Tomlinson
Email  : gordon.tomlinson @ overwatch.com
YIM/AIM: Gordon3dBrit
MSN IM : Gordon3dBrit @ 3dSceneGraph.com

__
Telephone (Cell): (+1) 571-265-2612
Telephone (Work): (+1) 703-437-7651

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

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


[osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Gordon Tomlinson
Hi Folks
 
Running some tests with osgviewer I noticed it always comes up full screen,
any way on the command line to make it come up windowed ?
did not see an option with --help
 
Also when we come out of full screen with osgViewer we get multiple windows,

 
we all work with multi-headed PC's, any way to make it single windowed as
the multi-windowed version annoying for us ;), its not critical as I only
use the viewer for some comparison tests
 

Best Regards 

Gordon

__
Gordon Tomlinson
Email  : gordon.tomlinson @ overwatch.com
YIM/AIM: Gordon3dBrit
MSN IM : Gordon3dBrit @ 3dSceneGraph.com

__
Telephone (Cell): (+1) 571-265-2612
Telephone (Work): (+1) 703-437-7651

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

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


Re: [osg-users] Extending OSG with layout algorithms

2008-03-28 Thread Robert Osfield
Hi Felix,

There isn't any support for managing spatial layouts in the OSG.  This
is rather an open ended and application specific topic that would be
very difficult for the OSG to support in any general way, so it
doesn't try.

Robert.

On Fri, Mar 28, 2008 at 12:56 PM, Felix Bwire [EMAIL PROTECTED] wrote:
 Hi Robert,
 Thanks very much for that. Actually all I needed was about the spatial
 layout of a graph. My other question is, does one have to code this on their
 own or is it possible to extend osg with an algorithm so as to achieve this.
 How can osg be extended with an algorithm that gives a graph the desired
 spatial layout?

 Thanx,
 Felix



 On Fri, Mar 28, 2008 at 12:38 PM, Robert Osfield [EMAIL PROTECTED]
 wrote:

  Hi Felix,
 
  The OSG itself is basic a tree data structure.  You can't have any
  cycles in it without introducing special traversal counts to break
  recursion beyond a particular level - this isn't something the OSG
  supports out the box, but you could write a callback to do it.
 
  But.. if you are just talking about spatial layout rather than data
  structures then yes you can lay it out any how you want.  If you want
  different parts of the scene graph to geometrically relate to each
  other then its down to the developer to add this, but this is very
  much app developers task rather something core to the scene graph.
 
  Robert.
 
 
 
 
  On Fri, Mar 28, 2008 at 6:24 AM, Felix Bwire [EMAIL PROTECTED] wrote:
   Hi there,
   Given a graph in osg, is it possible to extend osg with layout
 algorithms so
   that the graph can be given another structure, such as the tree like
   structure or cyclic or hyperbolic or clustering of nodes. I know there
 are
   algorithms that can do that, but can they be used to extend osg? If it
 is
   possible, how can it be done?
   ___
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


[osg-users] Performance drop higher RAM usage after switching from OSG 1.2 to latest SVN

2008-03-28 Thread Marco Jez
Hi everybody, long time no see!

I'm in the process of upgrading my development environment to new tools and 
libraries. All my OSG-based applications still use OSG 1.2, so I'm now 
switching them to the latest version of OSG in SVN. Some of them use my own 
viewer library (which in turn uses SceneView) instead of Producer, so I've 
decided to start porting them first, as to avoid the Producer - osgViewer 
transition.

Initially I had some troubles building OSG because of errors in CMake files, 
but they were easily fixed. More on this on a separate post.

The good news: little changes were needed to make my apps compile with OSG 2.3. 
The bad news: the same apps now consume much more RAM, and they also run 
slower. In brief, here are the results for one of my largest applications (with 
lots of compressed DDS textures):

Compiler: Visual C++ 7.1
OSG+OpenThreads: 1.2
Total RAM usage: 380 MB
Frame rate (reference view): 30 FPS

Compiler: Visual C++ 9.0
OSG+OpenThreads: 1.2
Total RAM usage: 380 MB
Frame rate (reference view): 27 FPS

Compiler: Visual C++ 9.0
OSG+OpenThreads: latest SVN (2.3.6)
Total RAM usage: 760 MB
Frame rate (reference view): 23 FPS

The OS is Windows XP Professional SP2.
In all tests, VSync was ON, and the refresh rate was 75 Hz. The test scene 
doesn't contain any paged LODs. 

This is only a quick report, more details to come. Before I try to understand 
what's going on, is there anything that I might have overlooked, as for example 
any optimizations whose default values have changed since OSG 1.2?

Cheers,
Marco

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


Re: [osg-users] ANN: FLT export

2008-03-28 Thread Paul Martz
Thanks J-S -- If no one posted any bugs, I wouldn't think it was being used.

Not enough info to figure out what's going on. Last thing that happens is
you processed some texture palette entries, and as far as the output goes,
that looks like it was successful.

Can you provide a stack trace?

Thanks,
   -Paul



 
 Hello Paul,
 
  Hi All -- I recently posted a change to osg-submissions 
 that adds FLT 
  export capability to OSG. Assuming it doesn't break the build, I 
  expect Robert will have this available on current SVN soon.
 
 Great work, it's an excellent feature to add (in addition to 
 the added features in the OpenFlight reader too).
 
 As a quick test, I tried converting one of our models (which 
 I can't send unfortunately) from FLT to OSG, then back. The 
 OSG file was good (and I had done that before to debug model 
 that wouldn't load correctly), but on the reverse trip 
 osgconv crashed.
 
 Setting OSG_NOTIFY_LEVEL=DEBUG gives the following (sorry if 
 it's long, but I don't want to leave out something that might 
 be useful).
 
   osgconv KVM32.osg KVM32-new.flt
 GraphicsContext::setWindowingSystemInterface() 015A8508 
 1018B218 itr='C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin'
 FindFileInPath() : trying
 C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgPlugin
 s-2.3.6\osgdb_osg.dll ...
 FindFileInPath() : USING
 C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgPlugins
 -2.3.6\osgdb_osg.dll
 CullSettings::readEnvironmentalVariables()
 CullSettings::readEnvironmentalVariables()
 Opened DynamicLibrary osgPlugins-2.3.6/osgdb_osg.dll
 FindFileInPath(KVM32.osg): returning KVM32.osg 
 itr='C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin'
 FindFileInPath() : trying
 C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgPlugin
 s-2.3.6\osgdb_rgb.dll ...
 FindFileInPath() : USING
 C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgPlugins
 -2.3.6\osgdb_rgb.dll
 Opened DynamicLibrary osgPlugins-2.3.6/osgdb_rgb.dll
 FindFileInPath(./pump_chassis_LAYOUT.rgb): returning 
 ./pump_chassis_LAYOUT.rgb
 raw-sizeX = 1024
 raw-sizeY = 1024
 raw-sizeZ = 4
 raw-bpc = 1
 image read ok 1024  1024
 FindFileInPath(./mirror.rgb): returning ./mirror.rgb
 raw-sizeX = 256
 raw-sizeY = 512
 raw-sizeZ = 4
 raw-bpc = 1
 image read ok 256  512
 FindFileInPath(./bar.rgb): returning ./bar.rgb
 raw-sizeX = 128
 raw-sizeY = 256
 raw-sizeZ = 4
 raw-bpc = 1
 image read ok 128  256
 FindFileInPath(./mirror front.rgb): returning ./mirror front.rgb
 raw-sizeX = 256
 raw-sizeY = 512
 raw-sizeZ = 4
 raw-bpc = 1
 image read ok 256  512
 FindFileInPath(./front bottom.rgb): returning ./front bottom.rgb
 raw-sizeX = 512
 raw-sizeY = 128
 raw-sizeZ = 3
 raw-bpc = 1
 image read ok 512  128
 FindFileInPath(./pump_boom_LAYOUT.rgb): returning 
 ./pump_boom_LAYOUT.rgb
 raw-sizeX = 1024
 raw-sizeY = 1024
 raw-sizeZ = 3
 raw-bpc = 1
 image read ok 1024  1024
 itr='C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin'
 FindFileInPath() : trying
 C:\Dev\OpenSceneGraph-SVN\OpenSceneGraph\bin\osgSim.dl
 l ...
 itr='C:\Windows\system32'
 FindFileInPath() : trying C:\Windows\System32\osgSim.dll ...
 itr='C:\Windows\System'
 FindFileInPath() : trying C:\Windows\system\osgSim.dll ...
 itr='C:\Windows'
 FindFileInPath() : trying C:\Windows\osgSim.dll ...
 itr='.'
 FindFileInPath() : trying
 C:\Dev\Work\cranesim\vortex\cranesim\resource\vehicle\
 schwing32XL\osgSim.dll ...
 itr='C:\PROGRA~1\COMMON~1\GTK\2.0\bin'
 FindFileInPath() : trying C:\Program Files\Common 
 Files\GTK\2.0\bin\osgSim.dll .
 ..
 itr='C:\Tools\Perl\site\bin'
 FindFileInPath() : trying C:\Tools\Perl\site\bin\osgSim.dll ...
 itr='C:\Tools\Perl\bin'
 FindFileInPath() : trying C:\Tools\Perl\bin\osgSim.dll ...
 itr='C:\Tools\MiKTeX\miktex\bin'
 FindFileInPath() : trying C:\Tools\MiKTeX\miktex\bin\osgSim.dll ...
 itr='C:\Tools\dxsdk\Utilities\Bin\x86'
 FindFileInPath() : trying
 C:\Dev\Work\cranesim\vortex\cranesim\resource\vehicle\
 schwing32XL\C:\Tools\dxsdk\Utilities\Bin\x86\osgSim.dll ...
 itr='C:\Program Files\CMake 2.4\bin'
 FindFileInPath() : trying C:\Program Files\CMake 
 2.4\bin\osgSim.dll ...
 itr='C:\Windows\system32'
 FindFileInPath() : trying C:\Windows\System32\osgSim.dll ...
 itr='C:\Windows'
 FindFileInPath() : trying C:\Windows\osgSim.dll ...
 itr='C:\Windows\System32\Wbem'
 FindFileInPath() : trying C:\Windows\System32\wbem\osgSim.dll ...
 itr='C:\Program Files\Intel\DMIX'
 FindFileInPath() : trying C:\Program Files\Intel\DMIX\osgSim.dll ...
 itr='C:\Program Files\Common Files\Roxio Shared\DLLShared\'
 FindFileInPath() : trying C:\Program Files\Common Files\Roxio 
 Shared\DLLShared\o sgSim.dll ...
 itr='C:\Program Files\Common Files\Roxio Shared\DLLShared\'
 FindFileInPath() : trying C:\Program Files\Common Files\Roxio 
 Shared\DLLShared\o sgSim.dll ...
 itr='C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\'
 FindFileInPath() : trying C:\Program Files\Common Files\Roxio 
 Shared\9.0\DLLShar ed\osgSim.dll ...
 itr='c:\Program Files\Microsoft SQL Server\90\Tools\binn\'
 

[osg-users] Uniforms and state sorting

2008-03-28 Thread Monteleone, Nathan
My first try didn't seem to go through so I'm sending it again.  My
apologies if this turns out to be a double post.


I'm having a problem where I want to pass a particular Uniform to a
fragment shader for all the point lights in my model.  Basically I read
the model using the .flt loader, find all the LightPointNodes using a
visitor, and then:

(for each light point node lpn)
lpn-setPointSprite();  // Because GL_POINT_SMOOTH w/shaders freaks out
on ATI
// Do some stuff to set up the point sprite texture

osg::StateSet* NewSS = new osg::StateSet;
NewSS-setName(LightPoint state set);
NewSS-getOrCreateUniform(Texture2DEnabled, 
NewSS-osg::Uniform::BOOL)-set(true);
lpn-setStateSet(NewSS);


I'm not running any optimizers after doing this.  I know I eventually
should to get rid of all the redundant state sets but I'm trying to
debug it right now...

But the uniform value that shows up in my shader is inconsistent.
Sometimes it'll be applied as true, sometimes as false, and it's
dependent on what other things are in the scene.  Looks like a lazy
state error basically.

Anything jump out that I might be doing wrong?  Do uniforms have some
override feature similar to other state attributes that I'm not
accounting for?

I am using an old version -- OSG 1.2.  We're planning to upgrade soon
but it's a big app so we have to be cautious about that sort of thing :(


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


[osg-users] How to correctly use osgFX::BumpMapping ?

2008-03-28 Thread Jerome Hummel
Hello,

 

I am trying to use osgFX::BumpMapping.

For some reason, my diffuse map looks dark. I can only see the normal map.

If I simply apply the diffuse map on my node without bumpmapping, it looks
fine. Here is my code:

osg::Group *root = new osg::Group;

osg::Image* normalMapImage =
osgDB::readImageFile(bricknormal.tga);

osg::Image* diffuseMapImage =
osgDB::readImageFile(brick.tga);

 

osg::Texture2D* normalMap = new
osg::Texture2D(normalMapImage);

osg::Texture2D* diffuseMap = new
osg::Texture2D(diffuseMapImage);



// create the BumpMapping group

osgFX::BumpMapping *pBump = new osgFX::BumpMapping;

pBump-setLightNumber(0);

// add our node as a child

pBump-addChild(loadedModel.get());

pBump-setEnabled(true);

pBump-setOverrideNormalMapTexture(normalMap);

pBump-setOverrideDiffuseTexture(diffuseMap);

pBump-prepareChildren();

root-addChild(pBump);



osg::Light* myLight2 = new osg::Light;

myLight2-setLightNum(0);

myLight2-setAmbient(osg::Vec4(1.0f,0.0f,0.0f,0.0f));

myLight2-setDiffuse(osg::Vec4(1.0f,0.0f,0.0f,1.0f));

myLight2-setPosition(osg::Vec4(1, 0, 1, 0));

osg::LightSource* lightS2 = new osg::LightSource;

 lightS2-setLight(myLight2);

 lightS2-setLocalStateSetModes(osg::StateAttribute::ON); 

root-addChild(lightS2);

viewerWindow-setSceneData(root);

 

If no light is present this is the same problem, can anybody help please?

Thanks in advance,

Regards,

 

 

 

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


Re: [osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Rafa Gaitan
Hi Gordon,

If you do a osgviewer --help-env

you will get a complete list of environmental variables. Next both env vars
could be
what you are searching:

  OSG_THREADING value Set the threading model
using by Viewer, value
can
be SingleThreaded,

CullDrawThreadPerContext,
DrawThreadPerContext or

CullThreadPerCameraDrawThre-
adPerContext.

  OSG_WINDOW x y width height   Set the default window
dimensions that windows
should open up on.

Rafa.




On Fri, Mar 28, 2008 at 2:54 PM, Gordon Tomlinson 
[EMAIL PROTECTED] wrote:

  Hi Folks

 Running some tests with osgviewer I noticed it always comes up full
 screen, any way on the command line to make it come up windowed ?
 did not see an option with --help

 Also when we come out of full screen with osgViewer we get multiple
 windows,

 we all work with multi-headed PC's, any way to make it single windowed as
 the multi-windowed version annoying for us ;), its not critical as I only
 use the viewer for some comparison tests


 *Best Regards *

 **

 *Gordon*

 __
 *Gordon Tomlinson
 **Email * : gordon.tomlinson @ overwatch.com*
 YIM/AIM*: Gordon3dBrit
 *MSN IM *: Gordon3dBrit @ 3dSceneGraph.com

 __
 *Telephone (Cell): (+1) 571-265-2612
 Telephone (Work)**: (+1) 703-437-7651*

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


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




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


Re: [osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Bob Huebert
On Fri, 28 Mar 2008, Gordon Tomlinson wrote:

 Hi Folks

 Running some tests with osgviewer I noticed it always comes up full screen,
 any way on the command line to make it come up windowed ?
 did not see an option with --help

setenv OSG_WINDOW '0 0 1280 1024' (or equivalant)


 Also when we come out of full screen with osgViewer we get multiple windows,

hmmm. Not sure about this. Are you on Linux/Win/OSX? I use linux with 
xinerama on a fx4500x2 with all four display lit up. Haven't seen your 
symptom.

-bob



 we all work with multi-headed PC's, any way to make it single windowed as
 the multi-windowed version annoying for us ;), its not critical as I only
 use the viewer for some comparison tests


 Best Regards

 Gordon

 __
 Gordon Tomlinson
 Email  : gordon.tomlinson @ overwatch.com
 YIM/AIM: Gordon3dBrit
 MSN IM : Gordon3dBrit @ 3dSceneGraph.com

 __
 Telephone (Cell): (+1) 571-265-2612
 Telephone (Work): (+1) 703-437-7651

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



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


Re: [osg-users] RE FLT export submission imminent

2008-03-28 Thread neil.hughes
Hi Paul, Bob  Robert,

Once again many thanks for the work you guys are doing.

Robert, thanks for the advice. I'd thought of this route myself, and have 
consequently been trying to get the latest SVN, but for some reason it keeps 
hanging. Probably my company network causing grief ;-(

Bob  Paul, I take your point, and I would love to be in a position to take you 
up on a support contract, however, if I can prove the conversion route, I'll 
invest some time and get a colleague to migrate our work from 1.2 to the latest 
stable release with patches. Looking to include the shadow work that's been 
done as well, so this is likely to be the most productive route for ourselves.

Once again, thanks for your help.

Kind regards

Neil.

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


[osg-users] Colors and Lighting

2008-03-28 Thread Renan Mendes
Hi,

I'm new at OSG and computer graphics in general, so I'd like to ask a
few very simple questions:
1) When I use an osg::Vec4 for setting the clear color, I have, of
course, 4 parameters. The first three are the proportion of red, green and
blue. But what does the last one do?
2) This question is linked to the last one, I think: how do I change the
intensity of the light in my scene?

Thank you,

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


[osg-users] FLT export regression testing

2008-03-28 Thread Paul Martz
FYI -- I've now made our exporter regression test suite available by FTP.
See the KnowledgeBase wiki page for information on obtaining it:
 
http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/OpenFl
ight
(Scroll down to the bottom.)
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com http://www.skew-matrix.com/ 
+1 303 859 9466
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ANN: FLT export

2008-03-28 Thread Paul Martz
 The code base isn't complete yet so be on the look out for 
 issues.  I presume Paul would be happy for them to be posted 
 in via osg-users.

Yes, please.

If you encounter any issues, be sure to set OSG_NOTIFY_LEVEL=INFO and fgrep
the output for fltexp to look for messages from the exporter. It might be
helpful in tracking down any problems.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466


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


[osg-users] Uniforms and state sorting

2008-03-28 Thread Monteleone, Nathan
I'm having a problem where I want to pass a particular Uniform to a
fragment shader for all the point lights in my model.  Basically I read
the model using the .flt loader, find all the LightPointNodes using a
visitor, and then:

(for each light point node lpn)
lpn-setPointSprite();  // Because GL_POINT_SMOOTH w/shaders freaks out
on ATI
// Do some stuff to set up the point sprite texture

osg::StateSet* NewSS = new osg::StateSet;
NewSS-setName(LightPoint state set);
NewSS-getOrCreateUniform(Texture2DEnabled,
osg::Uniform::BOOL)-set(true);
lpn-setStateSet(NewSS);


I'm not running any optimizers after doing this.  I know I eventually
should to get rid of all the redundant state sets but I'm trying to
debug it right now...

But the uniform value that shows up in my shader is inconsistent.
Sometimes it'll be applied as true, sometimes as false, and it's
dependent on what other things are in the scene.  Looks like a lazy
state error basically.

Anything jump out that I might be doing wrong?  Do uniforms have some
override feature similar to other state attributes that I'm not
accounting for?

I am using an old version -- OSG 1.2.  We're planning to upgrade soon
but it's a big app so we have to be cautious about that sort of thing :(
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Robert Osfield
Hi Gordon,

Using env vars:

set OSG_SCREEN=1
osgviewer cow.osg

Will open it up on screen 1.

Using command line:

osgviewer cow.osg --screen 1

In windowed mode:

set OSG_WINDOW=100 100 500 500
osgviewer cow.osg

osgviewer cow.osg --window 100 100 500 500

Or just use a osgViewer .view config file

osgviewer cow.osg -c OpenSceneGaph-Data/Configuration/SmallWindow.view

Or using a Producer .cfg (with 2.4.x)

osgviewer cow.osg -c myconfig.cfg

Or using env var:

export OSG_CONFIG_FILE=OpenSceneGaph-Data/Configuration/SmallWindow.view

osgviewer cow.osg

So...got enough options :-)

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


[osg-users] Rewrite of DatabasePager::removeExpiredSubgraphs(double)

2008-03-28 Thread Robert Osfield
Hi All,

Testing that I've been carrying out on some new big terrain databases
has shown some real weaknesses in the DatabasePager ability to load
balance - with memory footprint growing significantly when the camera
moves fast over wide areas of high res data.  Memory usage was growing
to over 4GB and blowing our test computers, hardly something that is
desired for a database paging system that is supposed to maintain a
modest memory footprint.

After much investigation the cause of the rather unconstrained memory
usage has been traced to the slow speed that the DatabasePager was
expiring (removing) no longer visible subgraphs - subgraphs were
correctly ear marked for removal but idsyncrosies in the threading and
original DatabasePager::removeExpiredSubgraphs(..) method meant that
it would take many frames to finally let go expired subgraphs.  It in
fact was taking long enough that new data was coming in at a far
faster rate than it was been removed at hence the dramatic growth in
memory footprint.

The solution has been to rewrite
theDatabasePager::removeExpiredSubgraphs(..) method that is
responsible for expiring subgraph and setting them aside for deletion.
 I've now got this new implementation working and sees a memory
footprint halved which not affecting the visual quality on screen.
Performance is now much more stable and crashes due to excessive
memory consumption are gone on my test machine.  With this rewrite a
couple member variables and their associated set/getters are no longer
required, and rather leave them around for potential confusion I've
removed them completely so an svn update if you get an compile error
just remove the below methods and recompile.

-/** Set the maximum number of PagedLOD child to remove per frame */
-void setMaximumNumOfRemovedChildPagedLODs(unsigned int
number) { _maximumNumOfRemovedChildPagedLODs = number; }
-
-/** Get the maximum number of PagedLOD child to remove per frame */
-unsigned int getMaximumNumOfRemovedChildPagedLODs() const {
return _maximumNumOfRemovedChildPagedLODs; }
-
-/** Set the minimum number of inactive PagedLOD child to keep */
-void setMinimumNumOfInactivePagedLODs(unsigned int number) {
_minimumNumOfInactivePagedLODs = number; }
-
-/** Get the minimum number of inactive PagedLOD child to keep */
-unsigned int getMinimumNumOfInactivePagedLODs() const {
return _minimumNumOfInactivePagedLODs; }

I would like to improve this method further still as I've already come
up with a better load balancing algorithm to implement in this method,
however, it'll take a while longer to implement, so rather than wait
for this polished implementation I'm checking in what is working
effectively, albeit not perfect it is far better than what was there
before.

There are other aspects of the DatabasePager that need attention too,
such as the high cost of DatabasePager::requestNodeFile() method
during cull traversal when many file requested are queued up.  This is
something that has been raised on the list before by others, so it's a
bit of common theme when we really start to push the size of paged
databases we are dealing with.   I will be spending more time on this
code over the coming month, so feel free to chip in with your own
experiences.

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


[osg-users] test

2008-03-28 Thread Paul Martz
Posting time: Fri Mar 28 15:56:42 UTC 2008 
Dreamhost seems sluggish today. First noticed this ~15 hours ago.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com http://www.skew-matrix.com/ 
+1 303 859 9466
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Paul Martz
You can set OSG_WINDOW=x y w h in your environment.
 
Programmatically, osgViewer::Viewer support various convenience routines for
forcing display only on a single screen, or in a window.
setUpViewOnSingleScreen( 0 ) or something o that effect.
   -Paul
 


  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gordon
Tomlinson
Sent: Friday, March 28, 2008 7:55 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Single Windowed OsgViewer on multiheaded


Hi Folks
 
Running some tests with osgviewer I noticed it always comes up full screen,
any way on the command line to make it come up windowed ?
did not see an option with --help
 
Also when we come out of full screen with osgViewer we get multiple windows,

 
we all work with multi-headed PC's, any way to make it single windowed as
the multi-windowed version annoying for us ;), its not critical as I only
use the viewer for some comparison tests
 

Best Regards 



Gordon

__
Gordon Tomlinson
Email  : gordon.tomlinson @ overwatch.com
YIM/AIM: Gordon3dBrit
MSN IM : Gordon3dBrit @ 3dSceneGraph.com

__
Telephone (Cell): (+1) 571-265-2612
Telephone (Work): (+1) 703-437-7651

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

 

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


[osg-users] MatrixTransform and PAT rotation difference.

2008-03-28 Thread Vincent Bourdier
Hi,

I make a new topic I think it is more clear
I'm looking on getting absolute rotation from a osg::Transform

If my node is a PAT i do
   quat = pat-getAttitude();

if my node is a MatrixTransform i do
   quat = mt-getMatrix().getRotate();

But in the second case, it looks doing nothing... Where is the difference ?

Thanks.

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


Re: [osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Marco Jez
Hi,

 setenv OSG_WINDOW '0 0 1280 1024' (or equivalant)

or:

osgviewer --window 0 0 1280 1024 cow.osg

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


Re: [osg-users] ANN: FLT export

2008-03-28 Thread Jason Daly

Paul Martz wrote:
Hi All -- I recently posted a change to osg-submissions that adds FLT 
export capability to OSG. Assuming it doesn't break the build, I 
expect Robert will have this available on current SVN soon.


Hi, Paul,

Great work!

I tested with a fairly complex .ive.  Originally this was an OpenFlight 
database.  During export, I got a lot of these errors:


 fltexp: GL_POINTS not supported in FLT export.

I'm not worried about actually exporting the points, as they weren't 
important anyway.  I'm just mentioning them in case it's relevant for 
the real problem.  This happened when I went to view the exported .flt 
file in osgviewer.  During load, I got several groups of these two warnings:


Warning: data error detected in VertexCNT::readRecord uv=nan nan
Warning: data error detected in LocalVertexPool::readRecord uv=nan nan

The file does eventually finish loading, and it looks fine for the most 
part.  However, there are several objects in the scene that are missing 
large groups of faces.  In each case, the bulk of the object is there, 
but there are large holes in it.  Many of these objects used to be 
external references that were duplicated multiple times, and each copy 
looks the same.


I really wish I could send you the file, but alas, I cannot.  I'm sure 
this isn't enough information for you to go on.  Let me know what else I 
can do to help.


--

--J

I'm a castaway stranded in a desolate land,
I can see the footprints in the virtual sand.
--Neil Peart

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


Re: [osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Jakob Ruhe
osgviewer --help-env
gives you that the environment variable
OSG_WINDOW x y width height
will make osgviewer start in a window

Best regards

Jakob Ruhe

2008/3/28, Gordon Tomlinson [EMAIL PROTECTED]:


 Hi Folks

 Running some tests with osgviewer I noticed it always comes up full screen,
 any way on the command line to make it come up windowed ?
 did not see an option with --help

 Also when we come out of full screen with osgViewer we get multiple windows,


 we all work with multi-headed PC's, any way to make it single windowed as
 the multi-windowed version annoying for us ;), its not critical as I only
 use the viewer for some comparison tests




 Best Regards



 Gordon

 __
 Gordon Tomlinson
 Email  : gordon.tomlinson @ overwatch.com
 YIM/AIM: Gordon3dBrit
 MSN IM : Gordon3dBrit @ 3dSceneGraph.com

 __
 Telephone (Cell): (+1) 571-265-2612
 Telephone (Work): (+1) 703-437-7651

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

 ___
  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] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Gordon Tomlinson
Thanks Robert 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: Friday, March 28, 2008 3:15 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Single Windowed OsgViewer on multiheaded

Hi Gordon,

Using env vars:

set OSG_SCREEN=1
osgviewer cow.osg

Will open it up on screen 1.

Using command line:

osgviewer cow.osg --screen 1

In windowed mode:

set OSG_WINDOW=100 100 500 500
osgviewer cow.osg

osgviewer cow.osg --window 100 100 500 500

Or just use a osgViewer .view config file

osgviewer cow.osg -c OpenSceneGaph-Data/Configuration/SmallWindow.view

Or using a Producer .cfg (with 2.4.x)

osgviewer cow.osg -c myconfig.cfg

Or using env var:

export OSG_CONFIG_FILE=OpenSceneGaph-Data/Configuration/SmallWindow.view

osgviewer cow.osg

So...got enough options :-)

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] Performance drop higher RAM usage after switching from OSG 1.2 to latest SVN

2008-03-28 Thread Robert Osfield
Hi Marco,

On Fri, Mar 28, 2008 at 5:52 PM, Marco Jez [EMAIL PROTECTED] wrote:
 Hi everybody, long time no see!

Welcome back ;-)

 The good news: little changes were needed to make my apps compile with OSG
 2.3. The bad news: the same apps now consume much more RAM, and they also
 run slower. In brief, here are the results for one of my largest
 applications (with lots of compressed DDS textures):

 Compiler: Visual C++ 7.1
 OSG+OpenThreads: 1.2
 Total RAM usage: 380 MB
 Frame rate (reference view): 30 FPS

 Compiler: Visual C++ 9.0
 OSG+OpenThreads: 1.2

 Total RAM usage: 380 MB
 Frame rate (reference view): 27 FPS


 Compiler: Visual C++ 9.0
 OSG+OpenThreads: latest SVN (2.3.6)

 Total RAM usage: 760 MB
 Frame rate (reference view): 23 FPS

 The OS is Windows XP Professional SP2.
 In all tests, VSync was ON, and the refresh rate was 75 Hz. The test scene
 doesn't contain any paged LODs.

 This is only a quick report, more details to come. Before I try to
 understand what's going on, is there anything that I might have overlooked,
 as for example any optimizations whose default values have changed since OSG
 1.2?

Check the CMake build options for release vs debug.

The other possibility is the default enabling of theadsafe ref/unref
for the majority of scene graph objects.  I certainly don't see big
differences under Linux with enabled - just a couple of percent in
cull traversal for big scenes, but you never know the Windows
OpenThreads::Mutex might be dog slow compared to Pthreads.  You can
enable threadsafe ref/unref in 1.2 and find out, its more awkward to
disable under 2.x though as a number of objects explicitly set the
thread safe ref/unref.

The wider use of thread safe ref/unref is what you have to pay for
greater stability when multi-threading, and with 2.x threading is much
more prevalent once you start using osgViewer.  The new threading
models should mean you should get better performance once you start
utilising them.

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


[osg-users] Testing of OSG and VPB SVN in prep for nex dev releases and 2.4 stable release

2008-03-28 Thread Robert Osfield
Hi All,

There has been a number of changes and new introduction this week so
I'd very much appreciate another round of build and run tests across
various platforms.  if all goes well I'll make a OSG-2.3.7 and
VPB-0.9.8 dev releases on Monday.  Feature wise OSG is now ready for
2.4, so its just build and run testing now.

If things looks really good OSG wise then perhaps we could even think
about tagging 2.4 in the second half of next week.  If not next week
then we'll need to wait till mid April as I have on-site training
booked in for the 2nd week of April.  It'd be kinda nice to have 2.4
done and dusted before I go, but not great sweat if it doesn't happen.

VPB-1.0 won't be till the end of April though as I still have a couple
more items to complete first, OSG-2.4 also needs to be out first as
VPB-1.0 won't compile with OSG-2.2.

Thanks in advance for you efforts,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Reset 2D Orthographic - Perspective

2008-03-28 Thread Don Leich
The problems recently mentioned with funky clipping in an
orthographic projection may be related to something I
found.  I've been working on and off porting a legacy
application to use OSG.  In this application we are
able to toggle between perspective and orthographic
projections.  The distance from the eye to the viewing
origin in an orthographic projection, but in OSG it
does.

I have an off-list exchange about this recently with
Paul Martz where he proposes a fix.  Hopefully, this will
be of some help.

  Hey Paul,
 
  I've hacked your example to display a wireframe of an
  orthographic projection when isPerspective is set to false.
  I didn't get around to hooking the boolean to the keyboard.
  I'm not sure if this would work as is switching on the fly.
 
  This will actually exhibit some of the problems I've seen
  with orthographic views.  A Mouse-3 action will go for a
  while and after a few secs. there's a major flake out -
  jittering and blinking graphics, etc.  Possibly the matrix math
  becomes unstable.
 
  -Don

P:
In the TrackballManipulator, the right mouse button ...moves
the camera forward or backward without changing the field of view.
I'd expect right mouse to have no effect in an
orthographic view -- eye distance is irrelevant in orthographic
projections; parallel lines always render parallel.

...

Hm. I tried your code, and ran it while displaying the cow. I used
the right mouse to move my eye forward and let it run. What I
noticed was the sphere mapping on the cow collapses as the eye
distance shrinks. Eventually, the view volume starts to move forward,
as if it is trying to stay ahead of where it thinks the eye
is located. The cow is eventually in front of the near plane and the
window renders blue.

D:
  If I push with Right-Mouse everything is stable for a little
  while (a second or so).  The wireframe frustum then starts
  to jitter around.  This becomes increasingly more violent
  and the Right-Mouse translation increases.  While this is going
  on the orthographic view of the cow is appearently randomly clipped
  as the near/far planes jump around.
 

P:
I'm not sure what you're trying to accomplish by changing the eye
distance in an orthographic view.

D:
  Well, our app calculates 4x4 transforms and doesn't touch
  TrackballManipulator.  We support toggling between perspective
  and orthographic views and want the consistant look-at-from
  eye and point-of-interest coordinates in both projections.
 
  The point is that I'm surprized that eye distance has any effect
  in the orthographic projection.  I have an effective work around
  so it's no longer a problem.  I suspect ortho doesn't get
  much exercise.
 
...
 
  I found this to be a decent work around for our app, where
  _near is the bounding box min Z of our world...
 
 // For orthographic, translate so nothing goes behind the eye.
 osg::Matrix eye;
 eye.makeTranslate( 0., 0., _isPerspective ? 0. : -_near );
 this-getCamera()-setViewMatrix( eye );
 

P:
Ah! Well, the ModelView matrix transforms object space to eye
space, where the eye is at the origin. If the ModelView matrix
contains a translation, which it must do to support eye distance in
a perspective projection, then this distance must go in the ModelView 
matrix.

However, the MatrixManipulators are ignorant of the current projection,
and therefore don't know to leave this translation out of the matrix
they compute. Perhaps the right thing to do in OSG is to add
a setOrtho(bool) method to the MatrixManipulator, and when true, the 
manipulator would know to remove eye distance from its view matrix
computation.

As you suspect, I imagine this hasn't been done because ortho receives
little usage. Things only get done in OSG if users have a need for it.
-Paul


Don

=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=

Donald Leich  Mailto:[EMAIL PROTECTED]
Senior Software Developer Voice: 201-460-4700 ext: 215
Intelligent Light FAX:   201-460-0221
301 Route 17 North, 7th Floor
Rutherford, NJ  07070-2575

Visit our web site at http://www.ilight.com 
=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=0=


 Subject:
 [osg-users] Reset 2D Orthographic - Perspective
 From:
 Jeremy Moles [EMAIL PROTECTED]
 Date:
 Tue, 25 Mar 2008 15:13:57 -0400
 To:
 OpenSceneGraph Users osg-users@lists.openscenegraph.org
 
 Hello folks!
 
 Last night I started working on adding a few debugging tools to
 osgWidget (both for myself, and for people to use in the future) and
 what I'm currently trying to do is provide a hotkey that will allow a
 user to switch their HUD view from the standard 2D view and zoom out
 to a fully perspective 3D view. The main reason I want to do this is so
 that people can actively view how all of their Windows/Widgets are
 layered in three dimensions, which will really help me as I finish up
 this stratum stuff. :) (Don't you love the word stratum?)
 
 

[osg-users] (VPB) osgdem not providing terrain heights with --tile-terrain-size --tile-image-size options

2008-03-28 Thread Hulet, Scott S
Robert,
 
So then, is there a way to control the terrain tile size?  For
instance, how would I set the coarsest terrain tile to be a single tile
per geocell (20 meters on a side), an then have it sub-divide from
there?  With the default settings and the dataset that I am using,
osgdem creates 11 levels and creates ~40m triangles at the finest
resolution.  I am building a DB for an application that does not require
this type of resolution/fidelity.  I'd like to generate an OSG DB that
targets a 400m traingle at the finest resolution.
 
 HI Scott,

 The max tile sizes is in number of pixels/height field cells, neither
 are in meters.

 Robert.


 
Scott S. Hulet * mailto:[EMAIL PROTECTED] 
Simulation Training and Support
 
They never forget who they're dying for...
We can never forget who we're working for...
 
Lockheed Martin Corp - STS Akron
1210 Massillon Road
Mailpoint C2E, AB-33
Akron, OH 44315-0001
 
* Phone Numbers: 330.796.6616 (Desk)
  330.796.1059 (Lab)
  330.242.2385 (Cell)

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


Re: [osg-users] Reset 2D Orthographic - Perspective

2008-03-28 Thread Don Leich

Of course, I meant to say...

The distance from the eye to the viewing
origin in an orthographic projection
shouldn't affect anything, but in OSG it
does.

Here's the modified osgthirdpersonview example.

-Don
/* OpenSceneGraph example, osgthirdpersonview.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the Software), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/
// This code is originally Copyright (c) 2008 Skew Matrix  Software LLC,
// but you may use the code under the terms of the OSGPL as described above.

// This example demonstrates how CompositeViewer can be used to
// provide a third person view of another view, including eyepoint and
// view frustum.
//
// The code creates a CompositeViewer with two Views. Each of the two
// Views has its own window. One View is the typical scene view,
// showing the loaded model(s).
//
// The second View is a third person view showing not just the loaded
// model(s), but also a wireframe representation of the first View's
// frustum. Interactions with the first View are reflect5ed in the
// second View's displayed frustum.
//
// Command line arguments are taken to be models for display. If you
// specify no command line arguments, the code attempts to load cow.osg.


#include osg/Geometry
#include osg/DisplaySettings
#include osg/MatrixTransform
#include osg/LineWidth
#include osgDB/ReadFile
#include osgViewer/CompositeViewer
#include osgGA/TrackballManipulator


const double _fov = 30.;
const double _aspectRatio = 640. / 480.;
const double _oHeight = 1./_aspectRatio;

const double _near = 1.;
const double _far = 10.;

const double _scl = 4.;


// Given a Camera, create a wireframe representation of its
// view frustum. Create a default representation if camera==NULL.
osg::Node*
makeFrustumFromCamera( osg::Camera* camera, bool isPerspective )
{
// Projection and ModelView matrices
osg::Matrixd proj;
osg::Matrixd mv;
if (camera)
{
proj = camera-getProjectionMatrix();
mv = camera-getViewMatrix();
}
else
{
// Create some kind of reasonable default Projection matrix.
if (isPerspective)
proj.makePerspective( _fov, _aspectRatio, _near, _far );
else
proj.makeOrtho( _scl*-1., _scl*1., _scl*-_oHeight, _scl*_oHeight, 
_near, _far );
// leave mv as identity
}

// Get near and far from the Projection matrix.
double near = proj(3,2) / (proj(2,2)-1.0);
double far = proj(3,2) / (1.0+proj(2,2));

// Get the sides of the near plane.
double nLeft = near * (proj(2,0)-1.0) / proj(0,0);
double nRight = near * (1.0+proj(2,0)) / proj(0,0);
double nTop = near * (1.0+proj(2,1)) / proj(1,1);
double nBottom = near * (proj(2,1)-1.0) / proj(1,1);

// Get the sides of the far plane.
double fLeft = far * (proj(2,0)-1.0) / proj(0,0);
double fRight = far * (1.0+proj(2,0)) / proj(0,0);
double fTop = far * (1.0+proj(2,1)) / proj(1,1);
double fBottom = far * (proj(2,1)-1.0) / proj(1,1);

// Clobber if orthographic
if (! isPerspective)
{
proj.getOrtho(nLeft, nRight, nBottom, nTop, near, far);
proj.getOrtho(fLeft, fRight, fBottom, fTop, near, far);
}

// Our vertex array needs only 9 vertices: The origin, and the
// eight corners of the near and far planes.
osg::Vec3Array* v = new osg::Vec3Array;
v-resize( 9 );
(*v)[0].set( 0., 0., 0. );
(*v)[1].set( nLeft, nBottom, -near );
(*v)[2].set( nRight, nBottom, -near );
(*v)[3].set( nRight, nTop, -near );
(*v)[4].set( nLeft, nTop, -near );
(*v)[5].set( fLeft, fBottom, -far );
(*v)[6].set( fRight, fBottom, -far );
(*v)[7].set( fRight, fTop, -far );
(*v)[8].set( fLeft, fTop, -far );

osg::Geometry* geom = new osg::Geometry;
geom-setUseDisplayList( false );
geom-setVertexArray( v );

osg::Vec4Array* c = new osg::Vec4Array;
c-push_back( osg::Vec4( 1., 1., 1., 1. ) );
geom-setColorArray( c );
geom-setColorBinding( osg::Geometry::BIND_OVERALL );

GLushort idxLines[8] = {
0, 5, 0, 6, 0, 7, 0, 8 };
GLushort idxLinesOrtho[8] = {
1, 5, 2, 6, 3, 7, 4, 8 };

[osg-users] [VPB] Overriding source reprojection requirement in vpbmaster

2008-03-28 Thread Glenn Waldron
Robert,

I've noticed that vpbmaster refuses to continue if it detects that all
sources are not in the same coordinate system. I can certainly understand
why. That said, is there a way to override this decision and tell vpbmaster
to trust me that all sources are in a common projection?

Case in point: GDAL's ECW (ER Mapper compressed wavelet raster) plugin is
sometimes not able to correctly parse the coordinate system information in
the file. (This is a known issue -- http://www.gdal.org/frmt_ecw.html). So
vpbmaster won't run since it thinks the ECW is in a different projection
than other input layers.

I tried using the --cs option to manually specify the CS; also
--ReprojectSources False; no luck in either case. I'm running on Win32
with the latest SVN head of OSG and VPB.

Glenn

-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Jean-Sebastien Guay
Hi Gordon,

 Running some tests with osgviewer I noticed it always comes up full
 screen, any way on the command line to make it come up windowed ?
 did not see an option with --help

Others have suggested OSG_WINDOW, but you can also pass --window x y w h
on the command line. Most of the time when testing I will add 

-- window 50 50 1024 768

so I get a nice window instead of fullscreen.

 Also when we come out of full screen with osgViewer we get multiple
 windows, we all work with multi-headed PC's, any way to make it single
 windowed as the multi-windowed version annoying for us ;), its not
 critical as I only use the viewer for some comparison tests

You can use OSG_SCREEN x for a single fullscreen viewer on screen x, or
if you're using osgViewer::Viewer you can call
setUpViewOnSingleScreen(x) to get the same effect, as Paul said.

Note that currently, on Vista, when using that method (or OSG_SCREEN),
you will get the fullscreen view on screen x, and your other screen(s)
will be black. This is a bug resulting from the new Vista driver model,
which should be fixed. I'm just waiting to get a bit of time from our
tight deadlines to help fix it. On XP it works properly (there is a
fullscreen viewer on screen x and nothing on the other screen(s), i.e.
you see your other windows and the screen(s) don't turn black).


So to summarize:

osgviewer with no command line arguments and no env variables is the
same as osgViewer::View::setUpViewAcrossAllScreens().

osgviewer with either OSG_WINDOW x y w h in the environment or --window
x y w h on the command line is the same as
osgViewer::View::setUpViewInWindow(screen, x, y, w, h) where screen will
be 0 by default or OSG_SCREEN if set.

osgviewer with OSG_SCREEN x in the environment (there should probably be
a command line argument for this too) is the same as
osgViewer::View::setUpViewOnSingleScreen(x).


So if you ever want to do custom window setups for your app, looking at
the source of the above methods is a great help. Also note that if
you're using osgViewer::CompositeViewer, when you create a new
osgViewer::View to add to it you can still call these methods as quick
shortcuts to get some standard window setup. It's a good design!


A little plug for Paul's book: while typing this up, I was looking up
the env vars in the OSG Reference Manual v2.2 :-)

Hope this helps,

J-S
-- 
__
Jean-Sébastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] ANN: FLT export

2008-03-28 Thread Jean-Sebastien Guay
Hi Paul,

 Thanks J-S -- If no one posted any bugs, I wouldn't think it was being
 used.

Not using it actively yet, but I was curious. You know me, I'm the OSG
early adopter! :-)

 Not enough info to figure out what's going on. Last thing that happens is
 you processed some texture palette entries, and as far as the output goes,
 that looks like it was successful.
 
 Can you provide a stack trace?

I'll do that when I get back to work on Monday. I was actually running
it from the command line just to try it out, so I'll run in from VS and
see where it's getting hung up.

I'll get back to you on Monday.

J-S
-- 
__
Jean-Sébastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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


Re: [osg-users] Single Windowed OsgViewer on multiheaded

2008-03-28 Thread Jean-Sebastien Guay
Just correcting something I said without really checking:

 osgviewer with OSG_SCREEN x in the environment (there should probably be
 a command line argument for this too) is the same as
 osgViewer::View::setUpViewOnSingleScreen(x).

There is a command line argument, as Robert pointed out: --screen (duh)

J-S
-- 
__
Jean-Sébastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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