Re: [osg-users] [vpb] Problems using SSI Cluster Example

2009-12-22 Thread Samuel Jarque
Hi,

Yes, I'm using vpbmaster program, but I have just fixed my error. The problem 
was --machine doesn't is showed by --help option, but even so it works fine.

Thanks,
Samuel

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





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


Re: [osg-users] Precipitation Effect, Snow, bad rendering at slow speed

2009-12-22 Thread Robert Osfield
Hi Massimo,

Thanks for the pictures.  Moving slow is a walking pace, not at
360km/h.. that's pretty fast in my book.  The streaks are motion blurr
on the particles as when you are moving fast the particle moves
relative to the eye point between frames will be stretched out.  As
the particle is stretched out the alpha value also gets reduced so it
becomes more transparent particle to make sure the overall coverage of
the background is the same.  So the slow case it looks like things
are working correctly to me.

For the fast case the motion blur support in PrecipitationEffect is
failing as the camera is moving so fast between the particle cells
that their is no previous frame position recorded for it to compute
the motion blur for.  This is a limitation/bug in PreciptationEffect.
I wrote this class originally for a driving sim so it works well for
driving speeds, but at jet aircraft speeds this particle cell issue
rears it's head.  These cells are virtual cells, which are in fact a
single osg::Geometry that is transformed many times in the view in
front of you, these virtual cells are reassigned on the fly to give
you the effect of having an infinite particle system.

I can think of two solutions - to better compute the previous frame
position of a virtual cell that is newly coming into the view, or the
more hacky solution, increase the depth of cells further out from
camera so that the first frame that they become in view are miss out
on the motion blur is far away enough from the camera as to not be
seen.  The former of the two solution really has to be the right way
to go.

Now fixing this bug will lead to motion blur at both your slow and
fast speeds, which I can't say how you'll react to, as you picked out
the slow viz as the one in error, rather than the fast speed.  One
could possible offer the option of removing the motion blur effect or
scaling it down, but this itself might lead to other artifacts such as
strobe like effect as you will find it easier to spot patterns in the
particles as you go from cell to cell.

Robert.

On Mon, Dec 21, 2009 at 8:12 PM, Massimo Tarantini subbi...@yahoo.it wrote:

 From your description it sounds like an issue that occurs when the
 camera moves very fast relative to the particle system, rather than
 very slow.  My only guess is that you've model units that aren't in
 meters so the velocities are out.



 Now i have also posted the 3 images to imageshack:

 http://img189.imageshack.us/img189/5565/static594.jpg
 http://img189.imageshack.us/img189/9955/movingslow526.jpg
 http://img189.imageshack.us/img189/5372/movingfast976.jpg

 Anyway, the problem is in movingslow526.jpg at 360kmh, while 
 movingfast976.jpg at 1800kmh is better, and static594.jpg (stopped) is 
 perfect.
 My terrain is generated with osgdem (non Geogentric), and is in UTM33/WGS84. 
 The  Geographics coordinates are in meters.

 Thanks.[/list]

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





 ___
 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] glActiveTexture is called many times

2009-12-22 Thread Robert Osfield
Hi Lilith,

It sounds like the lazy state updating in osg::State isn't functioning
in this case, either a bug or an oversight.

Have you determined that this issue still occurs in svn/trunk?

Robert.

On Tue, Dec 22, 2009 at 12:54 AM, Lilith Bryant dark...@gmail.com wrote:
 Hi Robert, and the list,

 I have found a performance issue with multitexturing.

 Once a state has had texture attributes applied for units =1
 then excessive calls to glActiveTexture are made forever more.

 In particular,   State::apply() and applyTextureMode() and
 applyTextureAttribute() unconditionally change the active texture unit (with
 setActiveTextureUnit),  even if they cause no actual state change.

 The GL trace ends up littered with glActiveTexture calls:

 glActiveTexture(GL_TEXTURE0)
 glBindTexture(GL_TEXTURE_2D,2)
 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_BORDER)
 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_BORDER)
 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR)
 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR)
 glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAX_ANISOTROPY_EXT,1.00)
 glTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_BORDER_COLOR,0x4a8f8ac)
 glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_COMPARE_MODE,GL_ZERO)
 glActiveTexture(GL_TEXTURE1)
 glActiveTexture(GL_TEXTURE2)
 glActiveTexture(GL_TEXTURE3)
 glCallList(4)

 All those glActiveTexture calls happen on every single call to State::apply()

 Note this is even after all the multitextured things are removed from the
 scene.

 It occur because the textureModeMapList and textureAttributeMapList are
 expanded, but never contracted.    This itself isn't a problem,  but the
 unconditional changing of the active texture unit in State::apply() etc, JUST
 IN CASE, is the problem.

 Back in v1.2 I implemented a fix for this, that I never got around to
 submitting.   Essentially it moves the call to setActiveTextureUnit from
 State::apply etc down into the  State::applyMode/applyAttribute/
 applyGlobalDefault functions.    This allows those functions to decide at the
 very last moment if the active texture unit really does need changing.

 This requires that applyMode/applyAttribute etc take an new optional TexUnit
 parameter (with -1 meaning DONT CARE WHICH, which is the value used for
 normal attributes/modes ) .    The alternative to a parameter is  a member
 variable in State,  requiredStateChangeTexUnit or similar.

 This is clearly going to be quite an invasive patch to otherwise very old
 code, so before I port my patch to the SVN head and submit it, I thought I'd
 run it past you to see if:

 a) You'd be interested in receiving such a submission, and
 b) If you had a preference as to using a parameter vs member variable for the
 required tex unit.

 I have attached my changed v1.2 files for your reference.

 Regards,
 Lilith



 ___
 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] Simple water effects

2009-12-22 Thread Robert Osfield
Hi Dominic,

On Mon, Dec 21, 2009 at 8:43 PM, Dominic Stalder
dominic.stal...@bluewin.ch wrote:
 I know the amazing looking osgOcean, but for our game it uses to much CPU.

Might I suggest you engage with the authors/contributors of osgOcean
and find a way of avoiding this overhead.  This almost certainly will
take less time to realize a final solution and will be of benefit to
all osgOcean users.

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


Re: [osg-users] glActiveTexture is called many times

2009-12-22 Thread Lilith Bryant
Yes, this occurs in all of v1.2, v2.8.2, v2.9.6, and SVN head as of 
yesterday.   

setActiveTextureUnit  does indeed  call glActiveTexture only when the 
requested unit is different to the previous call to setActiveTextureUnit.  
So in this respect, it's state caching is working. 

However,  State::apply runs through a loop calling setActiveTextureUnit for 
each texture unit that it has ever heard about.   This loop nicely cycles 
through,  passing setActiveTextureUnit a fresh unit number on each iteration, 
changing the GL texture unit every single time,  regardless of whether 
applyModeMap/applyAttributeMap actually do anything.

On 12/22/2009 10:32:24 PM, Robert Osfield wrote:
 Hi Lilith,
 
 It sounds like the lazy state updating in osg::State isn't functioning
 in this case, either a bug or an oversight.
 
 Have you determined that this issue still occurs in svn/trunk?
 
 Robert.
 
 On Tue, Dec 22, 2009 at 12:54 AM, Lilith Bryant dark...@gmail.com wrote:
  Hi Robert, and the list,
 
  I have found a performance issue with multitexturing.
 
  Once a state has had texture attributes applied for units =1
  then excessive calls to glActiveTexture are made forever more.
 
  In particular,   State::apply() and applyTextureMode() and
  applyTextureAttribute() unconditionally change the active texture unit
 (with
  setActiveTextureUnit),  even if they cause no actual state change.
 
  The GL trace ends up littered with glActiveTexture calls:
 
  glActiveTexture(GL_TEXTURE0)
  glBindTexture(GL_TEXTURE_2D,2)
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP_TO_BORDER)
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP_TO_BORDER)
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR)
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR)
  glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAX_ANISOTROPY_EXT,1.00)
  glTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_BORDER_COLOR,0x4a8f8ac)
  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_COMPARE_MODE,GL_ZERO)
  glActiveTexture(GL_TEXTURE1)
  glActiveTexture(GL_TEXTURE2)
  glActiveTexture(GL_TEXTURE3)
  glCallList(4)
 
  All those glActiveTexture calls happen on every single call to
 State::apply()
 
  Note this is even after all the multitextured things are removed from the
  scene.
 
  It occur because the textureModeMapList and textureAttributeMapList are
  expanded, but never contracted.    This itself isn't a problem,  but the
  unconditional changing of the active texture unit in State::apply() etc,
 JUST
  IN CASE, is the problem.
 
  Back in v1.2 I implemented a fix for this, that I never got around to
  submitting.   Essentially it moves the call to setActiveTextureUnit from
  State::apply etc down into the  State::applyMode/applyAttribute/
  applyGlobalDefault functions.    This allows those functions to decide at
 the
  very last moment if the active texture unit really does need changing.
 
  This requires that applyMode/applyAttribute etc take an new optional
 TexUnit
  parameter (with -1 meaning DONT CARE WHICH, which is the value used for
  normal attributes/modes ) .    The alternative to a parameter is  a 
 member
  variable in State,  requiredStateChangeTexUnit or similar.
 
  This is clearly going to be quite an invasive patch to otherwise very old
  code, so before I port my patch to the SVN head and submit it, I thought
 I'd
  run it past you to see if:
 
  a) You'd be interested in receiving such a submission, and
  b) If you had a preference as to using a parameter vs member variable for
 the
  required tex unit.
 
  I have attached my changed v1.2 files for your reference.
 
  Regards,
  Lilith
 
 
 
  ___
  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] Simple water effects

2009-12-22 Thread Kim Bale
Hello All,

Did somebody mention water effects?!

I have recognised the CPU usage of osgOcean as a bit of a problem. This is
due to the osgOcean using one huge vertex/normal array for all of the ocean
tiles and then copying the vertices for each tile in on frame/position
changes. It was a rather bad design decision which once I had committed to
proved too time consuming to change.

However, due to the tillable nature of the FFT ocean surface, this isn't
necessary. A little while ago I wrote some test cases which removed this
huge vertex array and replaced it with a single high resolution ocean tile
which is then instanced for each tile in the ocean surface.
The different resolution tiles are then supported simply by modifying the
primitives and positioning the tiles using a vertex shader. Since all of the
high resolution tiles are precomputed, updating the animation of the ocean
surface is simply a matter of changing the pointer to the next frames vertex
array for each of the tile primitives.

This is a far more efficient method of updating the surface, particularly if
you are using a very large surface.

I have the code for all of this as a prototype, but I don't have the time to
tidy it up and update library at the moment. If you are interested in making
these modifications I would be more than happy to give you the code and walk
you through it, otherwise it'll have to wait until I get some time to do it
myself.

Regards,

Kim.


2009/12/22 Robert Osfield robert.osfi...@gmail.com

 Hi Dominic,

 On Mon, Dec 21, 2009 at 8:43 PM, Dominic Stalder
 dominic.stal...@bluewin.ch wrote:
  I know the amazing looking osgOcean, but for our game it uses to much
 CPU.

 Might I suggest you engage with the authors/contributors of osgOcean
 and find a way of avoiding this overhead.  This almost certainly will
 take less time to realize a final solution and will be of benefit to
 all osgOcean users.

 Cheers,
 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] volumetric fog

2009-12-22 Thread Trajce Nikolov
Hi Community,

has anybody done some work with this? Could you share some ideas, hints?

Thanks
Nick

http://www.linkedin.com/in/tnick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Way to Draw Lots of spheres

2009-12-22 Thread Clayton Bluhm
Hi,

I am new to OSG.  I am trying to draw a lot of spheres into a scene.  By lots I 
mean on the order of a 100,000 or so.  This really brings my simple test app to 
its knees.  Here is the current way I am drawing these spheres:


Code:

osg::Sphere *unitSphere = new osg::Sphere(osg::Vec3(0,0,0),5.0);
osg::ShapeDrawable* unitSphereDrawable = new osg::ShapeDrawable(unitSphere);

for(1...100,000)
{
osg::PositionAttitudeTransformation *shpereXForm = new 
osg::PositionAttitudeTransformation();
sphereXForm-setPosition(position);
osg::Geode* unitShpereGeode = new osg::Geode();
sphereXForm-addChild(unitSphereGeode);
unitSphereGeode-addDrawable(draw);
GetScene()-AddDrawable(unitSphereGeode);
}




Our current product uses straight 2D OpenGL calls and uses points instead of 
spheres to draw the dataset.  We are currently porting everything to 3D using 
OSG and found that we might have to do something unique when it comes to 
displaying the dataset we are trying to display.  The dataset we are trying to 
draw doesn't persist over time.  Its there one second and gone the next.  I 
need a quick way to draw lot of spheres very quickly.  I  have started looking 
into overriding the Camera::DrawCallback and add raw OpenGL calls.  Is this the 
right path to look down or is there something easier?

I apologize in advance if there is a simple answer to this that a newb like me 
should have seen or something I am doing completely wrong.

Thank you!

Cheers.

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





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


[osg-users] Wiki Location for List of Plugins and Descriptions

2009-12-22 Thread Michael Hartman
All,

Does the Wiki site have a list of all the osgXXX plugins that are available for 
use with a short discription of them.  I know about osgOcean, osgCal, 
osgCluster and I'm sure there are alot of others and would like to have a 
central place to see what is availabe with descriptions/screen shots if 
available.

Thanks
Michael

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





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


Re: [osg-users] Wiki Location for List of Plugins and Descriptions

2009-12-22 Thread Kim Bale
Hi Michael,

There is a page on the osg website that covers them:

http://www.openscenegraph.org/projects/osg/wiki/Community

http://www.openscenegraph.org/projects/osg/wiki/CommunityUnder the
software header.

But I agree it would be nice to have a more obvious place to list them and
some attractive screenshots, after all it is all computer graphics :)

I *think* this was raised a while ago but nothing came of it.

Kim.


2009/12/22 Michael Hartman mike.hart...@us.army.mil

 All,

 Does the Wiki site have a list of all the osgXXX plugins that are available
 for use with a short discription of them.  I know about osgOcean, osgCal,
 osgCluster and I'm sure there are alot of others and would like to have a
 central place to see what is availabe with descriptions/screen shots if
 available.

 Thanks
 Michael

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





 ___
 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] osgAnimation/Skinning Header

2009-12-22 Thread nox
Hi here,

I'm currently trying to get OpenSceneGraph and osgswig to work together on Mac 
OS X Snow Leopard through MacPorts (I'm a maintainer there). It seems the 
latest developer release (2.9.6) does not install osgAnimation/Skinning header, 
which is used by osgswig. Is it a bug, or should osgswig not use it?

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


Re: [osg-users] Wiki Location for List of Plugins and Descriptions (UNCLASSIFIED)

2009-12-22 Thread Hartman, Michael W AMRDEC/Torch
Classification:  UNCLASSIFIED 
Caveats: NONE

Kim,

Thank you for the information, after digging down some I saw the nodekit
section that listed some of the projects that are available.

Thanks again,
Mike

 

Michael Hartman
Torch Technologies
Huntsville, AL 35802
Supporting US Army Aviation  Missile RDEC
System Simulation and Development Directorate
256-876-0110
mike.hart...@us.army.mil
mike.hart...@redstone.army.smil.mil
www.torchtechnologies.com



-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Kim
Bale
Sent: Tuesday, December 22, 2009 7:46 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Wiki Location for List of Plugins and
Descriptions

Hi Michael,

There is a page on the osg website that covers them:

http://www.openscenegraph.org/projects/osg/wiki/Community
blockedhttp://www.openscenegraph.org/projects/osg/wiki/Community 

blockedhttp://www.openscenegraph.org/projects/osg/wiki/Community Under
the software header.

But I agree it would be nice to have a more obvious place to list them
and some attractive screenshots, after all it is all computer graphics
:)

I *think* this was raised a while ago but nothing came of it.

Kim.


2009/12/22 Michael Hartman mike.hart...@us.army.mil


All,

Does the Wiki site have a list of all the osgXXX plugins that
are available for use with a short discription of them.  I know about
osgOcean, osgCal, osgCluster and I'm sure there are alot of others and
would like to have a central place to see what is availabe with
descriptions/screen shots if available.

Thanks
Michael

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





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

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



Classification:  UNCLASSIFIED 
Caveats: NONE

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


Re: [osg-users] osgAnimation/Skinning Header

2009-12-22 Thread Cedric Pinson
Hi,
Skinning header is not used anymore, it has been replaced with
RigTransformSoftware.

Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Tue, 2009-12-22 at 14:57 +0100, nox wrote:
 Hi here,
 
 I'm currently trying to get OpenSceneGraph and osgswig to work together on 
 Mac OS X Snow Leopard through MacPorts (I'm a maintainer there). It seems the 
 latest developer release (2.9.6) does not install osgAnimation/Skinning 
 header, which is used by osgswig. Is it a bug, or should osgswig not use it?
 
 Regards.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


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


[osg-users] osg-examples on google code

2009-12-22 Thread Trajce Nikolov
Hi Community,

I came accross the osg examples hosted on google code
http://code.google.com/p/osg-glsl-examples/source/checkout

http://code.google.com/p/osg-glsl-examples/source/checkoutthe svn is down.
Any info about this project?

Thanks,
Nick

http://www.linkedin.com/in/tnick
Sent from Devlet, Ankara, Turkey
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to integrate OSG with java (to make an applet)

2009-12-22 Thread Manuel Garea
Ok, i'll try installing OSGVirtualPlanets

Manuel

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





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


Re: [osg-users] Way to Draw Lots of spheres

2009-12-22 Thread Alberto Luaces
Hi Clayton,

I remember a recent thread about this. In that case, the problem was the
tesselation level of the spheres. Try lowering it:

http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg33587.html

--

Alberto

Clayton Bluhm writes:

 Hi,

 I am new to OSG.  I am trying to draw a lot of spheres into a scene.  By lots 
 I mean on the order of a 100,000 or so.  This really brings my simple test 
 app to its knees.  Here is the current way I am drawing these spheres:


 Code:

 osg::Sphere *unitSphere = new osg::Sphere(osg::Vec3(0,0,0),5.0);
 osg::ShapeDrawable* unitSphereDrawable = new osg::ShapeDrawable(unitSphere);

 for(1...100,000)
 {
 osg::PositionAttitudeTransformation *shpereXForm = new 
 osg::PositionAttitudeTransformation();
 sphereXForm-setPosition(position);
 osg::Geode* unitShpereGeode = new osg::Geode();
 sphereXForm-addChild(unitSphereGeode);
 unitSphereGeode-addDrawable(draw);
 GetScene()-AddDrawable(unitSphereGeode);
 }




 Our current product uses straight 2D OpenGL calls and uses points instead of 
 spheres to draw the dataset.  We are currently porting everything to 3D using 
 OSG and found that we might have to do something unique when it comes to 
 displaying the dataset we are trying to display.  The dataset we are trying 
 to draw doesn't persist over time.  Its there one second and gone the next.  
 I need a quick way to draw lot of spheres very quickly.  I  have started 
 looking into overriding the Camera::DrawCallback and add raw OpenGL calls.  
 Is this the right path to look down or is there something easier?

 I apologize in advance if there is a simple answer to this that a newb like 
 me should have seen or something I am doing completely wrong.

 Thank you!

 Cheers.

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





 ___
 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] Transforming nodes

2009-12-22 Thread Oren Fromberg
Dear Brendan,

That was absolutely the problem!! Thanks so much for your help.

Sincerely,

Oren

p.s. I wish there was some kind of heads-up in the header file for 
DOFTransform!!

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





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


Re: [osg-users] curl Plugun + OSG

2009-12-22 Thread Danny Lesnik
Hi Jean-Sebastien,

Thank you for the reply. I've never used CMAKE on windows so this is kind of 
first try for me. 

I downloaded libcurl-7.15.1-msvc-win32-ssl-0.9.8a-zlib-1.2.3.zip file.

It contains 

src
lib
include directory. 

As far as I understand, I need to add CURL_INCLUDE_DIR refers to libcurl\lib 
directory and CURL_LIBRAY refers to root of libcurl source directory? 

Is it correct? 


Thank you!

Cheers,
Danny

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





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


Re: [osg-users] Transforming nodes

2009-12-22 Thread GordonTomlinson
Hi,


 
 but for some reason the default scale for an osgSim::DOFTransform is (0,0,0)




To me that seems a rather bad default to have for scaling on a DOF, I would 
have assumed the default would be 1,1,1 not 0,0,0

Is there a reason why its 0,0,0, and not 1,1,1 and should we change it

BTW the default for MPI FLT DOF node is 1,1,1

Thank you!

Cheers,
GordonTomlinson

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





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


Re: [osg-users] Way to Draw Lots of spheres

2009-12-22 Thread Ulrich Hertlein
Hi Clayton,

On 22/12/09 2:30 PM, Clayton Bluhm wrote:
 I am new to OSG. I am trying to draw a lot of spheres into a scene. By lots I 
 mean on
 the order of a 100,000 or so. This really brings my simple test app to its 
 knees. Here is
 the current way I am drawing these spheres:
 
 osg::Sphere *unitSphere = new osg::Sphere(osg::Vec3(0,0,0),5.0);
 osg::ShapeDrawable* unitSphereDrawable = new osg::ShapeDrawable(unitSphere);
 
 for(1...100,000)
 {
 osg::PositionAttitudeTransformation *shpereXForm = new 
 osg::PositionAttitudeTransformation();
 sphereXForm-setPosition(position);
 osg::Geode* unitShpereGeode = new osg::Geode();
 sphereXForm-addChild(unitSphereGeode);
 unitSphereGeode-addDrawable(draw);
 GetScene()-AddDrawable(unitSphereGeode);
 }
 
 Our current product uses straight 2D OpenGL calls and uses points instead of 
 spheres
 to draw the dataset. We are currently porting everything to 3D using OSG and 
 found that we
 might have to do something unique when it comes to displaying the dataset we 
 are trying to
 display. The dataset we are trying to draw doesn't persist over time. Its 
 there one second
 and gone the next. I need a quick way to draw lot of spheres very quickly. I 
 have started
 looking into overriding the Camera::DrawCallback and add raw OpenGL calls. Is 
 this the
 right path to look down or is there something easier?

Any particular reason why you're switching from points to spheres?  Drawing 
100,000
spheres (underneath a PAT, too, so a separate matrix for each!) with maybe ~100 
vertices
will certainly perform worse than simply drawing 100,000 points.

Some ideas:
- stay away from ShapeDrawable if performance matters
- sphere tesselation is probably way to high (as mentioned)
- having a flat hierarchy of PAT/Geode is bad for culling
- share the Geode (like you are sharing the ShapeDrawable) by attaching it to 
different
PATs (affects memory footprint)
- have a look at instancing to avoid getting bogged down in the cull traversal
- use point sprites instead?

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


Re: [osg-users] Way to Draw Lots of spheres

2009-12-22 Thread Robert Osfield
HI Clayton?  Bluhm?  Could you sign with your first name so we know
who to address, thanks.

On Tue, Dec 22, 2009 at 1:30 PM, Clayton Bluhm nashi...@gmail.com wrote:
 I am new to OSG.  I am trying to draw a lot of spheres into a scene.  By lots 
 I mean on the order of a 100,000 or so.  This really brings my simple test 
 app to its knees.  Here is the current way I am drawing these spheres:

I regret the day I wrote ShapeDrawable.  It has to be the most abused
class in the OSG's history. It's a quick and dirty convenience class
for visualizing primitive shapes, but has ended getting used to do
lots of tasks it really isn't suited for... drawing hundreds of
thousands of sphere's is just another example.

So my first bit of advice is drop ShapeDrawable and implement what you
need using osg::Geometry that contains points, and use the osg::Point
 osg::PointSprite StateAttribute to control the visualization of the
points.  Have a look at the osgpointsprite example.

If you absolutely have to use real geometry rather than point spites
than using an osg::Geometry and build the geometry at the level of
tessellation you need. see osggeometry for an example of geometry
creation.  Other potential developments would be to use geometry
instancing, or a custom drawable.

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


[osg-users] How to set up the PageLOD?

2009-12-22 Thread Maxim Gammer
Hi everybody,

I've got a problem - FPS falls down from 100 to 2-3 for 1-2 seconds
during first load of more detailed level of PageLODs (when they're
first seen). We suppose it's because of object compilation (there
are messages about textures loading etc. on the console). FPS also
falls down when we look at newly loaded objects.

Is it possible to compile objects prior to their rendering? How to
set up the PageLOD?

Or maybe there are other ways to solve that?


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


Re: [osg-users] volumetric fog

2009-12-22 Thread Terry Welsh
There are probably lots of ways to do volumetric fog.  Here's one way
that can be implemented in a shader with a 1D texture as input:
http://mrl.nyu.edu/~perlin/experiments/gabor/
--
Terry Welsh  /  mogumbo 'at' gmail.com
www.reallyslick.com  /  www.mogumbo.com




 Message: 10
 Date: Tue, 22 Dec 2009 15:29:38 +0200
 From: Trajce Nikolov nikolov.tra...@gmail.com
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Subject: [osg-users] volumetric fog
 Message-ID:
        6861bc940912220529i6cd16fdaib94fe7a1db3a8...@mail.gmail.com
 Content-Type: text/plain; charset=iso-8859-1

 Hi Community,

 has anybody done some work with this? Could you share some ideas, hints?

 Thanks
 Nick

 http://www.linkedin.com/in/tnick
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091222/2cc92ec8/attachment-0001.htm

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


Re: [osg-users] How to set up the PageLOD?

2009-12-22 Thread Vincent Bourdier

Hi Maxim

First try :

   
view-getDatabasePager()-setSchedulePriority(OpenThreads::Thread::THREAD_PRIORITY_LOW);


Set the priority you prefer.

Maybe this can help.

Regard,
  Vincent.

Maxim Gammer a écrit :

Hi everybody,

I've got a problem - FPS falls down from 100 to 2-3 for 1-2 seconds
during first load of more detailed level of PageLODs (when they're
first seen). We suppose it's because of object compilation (there
are messages about textures loading etc. on the console). FPS also
falls down when we look at newly loaded objects.

Is it possible to compile objects prior to their rendering? How to
set up the PageLOD?

Or maybe there are other ways to solve that?


--
Maxim Gammer



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



__ Information from ESET NOD32 Antivirus, version of virus signature 
database 4709 (20091222) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


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


Re: [osg-users] volumetric fog

2009-12-22 Thread Trajce Nikolov
thanks Terry!
Nick

http://www.linkedin.com/in/tnick
Sent from Ünalan, İstanbul, Turkey

On Tue, Dec 22, 2009 at 6:38 PM, Terry Welsh mogu...@gmail.com wrote:

 There are probably lots of ways to do volumetric fog.  Here's one way
 that can be implemented in a shader with a 1D texture as input:
 http://mrl.nyu.edu/~perlin/experiments/gabor/
 --
 Terry Welsh  /  mogumbo 'at' gmail.com
 www.reallyslick.com  /  www.mogumbo.com



 
  Message: 10
  Date: Tue, 22 Dec 2009 15:29:38 +0200
  From: Trajce Nikolov nikolov.tra...@gmail.com
  To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
  Subject: [osg-users] volumetric fog
  Message-ID:
 6861bc940912220529i6cd16fdaib94fe7a1db3a8...@mail.gmail.com
  Content-Type: text/plain; charset=iso-8859-1
 
  Hi Community,
 
  has anybody done some work with this? Could you share some ideas, hints?
 
  Thanks
  Nick
 
  http://www.linkedin.com/in/tnick
  -- next part --
  An HTML attachment was scrubbed...
  URL: 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091222/2cc92ec8/attachment-0001.htm
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] How to set up the PageLOD?

2009-12-22 Thread Robert Osfield
Hi Maxim,

It sounds like the compilation of OpenGL objects is causing the frame
drop.  The new default for the DatabasePager is for the incremental
pre compilation to be turned off, and for databases that are well
balanced this doesn't cause problems with frame drops as the number of
new objects per frame is kept modest so one doesn't get close to
breaking frame when the new objects come in.

For databases where there are lots of OpenGL objects that are
introduced at once you can switch back on the incremental pre compile,
the tells the DatabasePager to record all the OpenGL objects that need
compiling and then on each frame compile as many as it can within
specified time and number limits.  The incremental compile reduces the
overhead per frame so reduces the chances of breaking frame, however,
it also increases the amount of time it takes to prepare a scene graph
before it can be merged with the main databases - so there is higher
latency between requesting a tile and when it's served up.

To switch on the pre compile use:

   viewer.getDatabasePager()-setDoPreCompile(true);

There is a whole suite of methods relating to the fine control of pre
compile in the DatabasePager so have a look over the headers.

The other thing you could do is improve the suitability of your
databases so that it's better balanced - for instance switching
between LOD levels shouldn't introduce so much geometry/textures at
one time.  Try to create a quad tree paged database where each tile is
divided in four, and each child contains roughly the same amount of
geometry and textures as it's parent.   Such a well balanced database
won't suddenly introduce lots of geometry and textures in one go.

Robert.

On Tue, Dec 22, 2009 at 4:20 PM, Maxim Gammer maxgam...@gmail.com wrote:
 Hi everybody,

 I've got a problem - FPS falls down from 100 to 2-3 for 1-2 seconds
 during first load of more detailed level of PageLODs (when they're
 first seen). We suppose it's because of object compilation (there
 are messages about textures loading etc. on the console). FPS also
 falls down when we look at newly loaded objects.

 Is it possible to compile objects prior to their rendering? How to
 set up the PageLOD?

 Or maybe there are other ways to solve that?


 --
 Maxim Gammer


 ___
 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] volumetric fog

2009-12-22 Thread Trajce Nikolov
hi Paul,

can you share this piece of code?

Nick

http://www.linkedin.com/in/tnick
Sent from Ünalan, İstanbul, Turkey

On Tue, Dec 22, 2009 at 7:25 PM, Paul Martz pma...@skew-matrix.com wrote:

 You should be able to subtract the front of the volume from the back
 (subtract the depth values, that is) and do an exp on the result to
 determine the alpha of the fog color to combine. I had some test code doing
 this several years ago, pre depth mapping in hardware, which produced
 promising results. One day I hope to port it to use modern hardware.

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



 Trajce Nikolov wrote:

 Hi Community,

 has anybody done some work with this? Could you share some ideas, hints?

 Thanks
 Nick

 http://www.linkedin.com/in/tnick



 


 ___
 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] Simple water effects

2009-12-22 Thread Jean-Sébastien Guay

Hi Dominic,


I can't find the real worldz examples on the net, do you have the source?


If that was part of the GLSL (orange) book, then check here:

http://mew.cx/glsl/

Mike Weiblen (which is a member of this list) archived the 3DLabs GLSL 
stuff when it wasn't available from the 3DLabs site anymore... In 
particular I think you want this file:


http://mew.cx/glsl/GLSL_Book_2nd_Ed_Examples.zip

The source you're looking for will probably be in there somewhere.

Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Simple water effects

2009-12-22 Thread Jean-Sébastien Guay

Hi Kim,

I have the code for all of this as a prototype, but I don't have the 
time to tidy it up and update library at the moment. If you are 
interested in making these modifications I would be more than happy to 
give you the code and walk you through it, otherwise it'll have to wait 
until I get some time to do it myself.


If no one gets to it anytime soon, I would be glad to do this work for 
you. Another option might be to create a branch in osgOcean's SVN 
(clearly marked as work in progress) and commit the code you have there, 
and from there I can checkout that branch and work on it to improve it. 
We can then merge that branch back into the trunk once we're happy with it.


A few options for you. Honestly I prefer the branch as it gives us lots 
of freedom, but it's up to you.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] curl Plugun + OSG

2009-12-22 Thread Jean-Sébastien Guay

Hi Danny,


src
lib
include directory. 

As far as I understand, I need to add CURL_INCLUDE_DIR refers to libcurl\lib directory and CURL_LIBRAY refers to root of libcurl source directory? 


Seems to me CURL_INCLUDE_DIR should point to libcurl\include, and 
CURL_LIBRAY should be the filename of the curl library, something like 
libcurl\lib\curllib.lib (CURL_INCLUDE_DIR needs a directory, but 
CURL_LIBRAY needs a file).


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Transforming nodes

2009-12-22 Thread Jean-Sébastien Guay

Hi Gordon,


To me that seems a rather bad default to have for scaling on a DOF, I would 
have assumed the default would be 1,1,1 not 0,0,0


That's bitten me a few times too. Specifically when I create DOFs 
programmatically instead of reading an FLT file.



Is there a reason why its 0,0,0, and not 1,1,1 and should we change it


I think we could change it. Just need to beat the inertia of making such 
a simple change and sending the whole modified file...


U...

Ok! Did it!

Uh, there are lots more uninitialized variables there... What should 
_minScale, _maxScale, _minHPR, _maxHPR, _minTranslate, _maxTranslate be 
set to? Fine, _currentTranslate and _currentHPR can be left at (0,0,0), 
but are there better defaults for the min and max? Does the OpenFlight 
spec give some appropriate defaults? And now that _currentScale is set 
to (1,1,1), does it bother that it's not between _minScale and _maxScale 
- which are both still at the default-constructed value of (0,0,0)?


I knew I shouldn't have opened the file to do the modification... :-)

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
 *
 * This library is open source and may be redistributed and/or modified under
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * OpenSceneGraph Public License for more details.
*/
#include osgSim/DOFTransform

using namespace osgSim;
using namespace osg;

static const unsigned int TRANSLATION_X_LIMIT_BIT  = 0x8000u  0;
static const unsigned int TRANSLATION_Y_LIMIT_BIT  = 0x8000u  1;
static const unsigned int TRANSLATION_Z_LIMIT_BIT  = 0x8000u  2;
static const unsigned int ROTATION_PITCH_LIMIT_BIT = 0x8000u  3;
static const unsigned int ROTATION_ROLL_LIMIT_BIT  = 0x8000u  4;
static const unsigned int ROTATION_YAW_LIMIT_BIT   = 0x8000u  5;
static const unsigned int SCALE_X_LIMIT_BIT= 0x8000u  6;
static const unsigned int SCALE_Y_LIMIT_BIT= 0x8000u  7;
static const unsigned int SCALE_Z_LIMIT_BIT= 0x8000u  8;


DOFTransform::DOFTransform():
_previousTraversalNumber(-1),
_previousTime(0.0),
_limitationFlags(0),
_animationOn(false),
_increasingFlags(0x),
_multOrder(PRH),
_currentScale(1.0f,1.0f,1.0f)
{
}

DOFTransform::DOFTransform(const DOFTransform dof, const osg::CopyOp copyop):
osg::Transform(dof, copyop),
_previousTraversalNumber(dof._previousTraversalNumber),
_previousTime(dof._previousTime),
_minHPR(dof._minHPR),
_maxHPR(dof._maxHPR),
_currentHPR(dof._currentHPR),
_incrementHPR(dof._incrementHPR),
_minTranslate(dof._minTranslate),
_maxTranslate(dof._maxTranslate),
_currentTranslate(dof._currentTranslate),
_incrementTranslate(dof._incrementTranslate),
_minScale(dof._minScale),
_maxScale(dof._maxScale),
_currentScale(dof._currentScale),
_incrementScale(dof._incrementScale),
_Put(dof._Put),
_inversePut(dof._inversePut),
_limitationFlags(dof._limitationFlags),
_animationOn(dof._animationOn),
_increasingFlags(dof._increasingFlags),
_multOrder(dof._multOrder)
{
if (_animationOn) 
setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()+1);
}

void DOFTransform::traverse(osg::NodeVisitor nv)
{
if (nv.getVisitorType()==osg::NodeVisitor::UPDATE_VISITOR)
{
// ensure that we do not operate on this node more than
// once during this traversal.  This is an issue since node
// can be shared between multiple parents.
if ((nv.getTraversalNumber()!=_previousTraversalNumber)  
nv.getFrameStamp())
{
double newTime = nv.getFrameStamp()-getSimulationTime();

animate((float)(newTime-_previousTime));

_previousTraversalNumber = nv.getTraversalNumber();
_previousTime = newTime;
}
}

Transform::traverse(nv);
}

bool DOFTransform::computeLocalToWorldMatrix(osg::Matrix 
matrix,osg::NodeVisitor*) const
{
//put the PUT matrix first:
osg::Matrix l2w(getPutMatrix());

//now the current matrix:
osg::Matrix current;
current.makeTranslate(getCurrentTranslate());

//now create the local rotation:
if(_multOrder == PRH)
{
current.preMult(osg::Matrix::rotate(getCurrentHPR()[1], 1.0, 0.0, 
0.0));//pitch
current.preMult(osg::Matrix::rotate(getCurrentHPR()[2], 0.0, 1.0, 

Re: [osg-users] How to integrate OSG with java (to make an applet)

2009-12-22 Thread Luigi Calori

If you are interested in just Firefox windows plugin,
I' m  currently reworking the plugin used in VirtualRome project 
(www.virtualrome.it).


An example of current development can be found at www.tinyurl.com/muvi3d

If you want to test, suggest to use a separate empty profile, by running 
your Firefox with --profile your empty dir


The problem with the old style plugin, was that it had instability and 
problem running on low end machines.


I' m currently experimenting with an architecture that keep OSG related 
stuff in a separate process, like Google Earth plugin does.
It seems more stable and able to work on smaller machines, still lacks 
javascript access.
The code is currently not in good shape, but I was planning to releasing 
under LGPL

Anyway, if someone is interested,  I can share the repo (Bazaar based).





Manuel Garea wrote:

Ok, i'll try installing OSGVirtualPlanets

Manuel

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





___
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] Transforming nodes

2009-12-22 Thread Gordon Tomlinson
HI J-S

In Creator/OpenFlight, the defaults for all the DOF min's and max's are all
0's and the step values are all 0's
and of course the scale current is set to 1,1,1

Creator has a DOF Viewer and when min, max are zero its ignores them it only
animates if you have a (Min or Max) and Step set to something other than
zero


__
Gordon Tomlinson 

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

__

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Jean-Sébastien Guay
Sent: Tuesday, December 22, 2009 6:09 PM
To: osg-users@lists.openscenegraph.org
Cc: OpenSceneGraph Submissions
Subject: Re: [osg-users] Transforming nodes

Hi Gordon,

 To me that seems a rather bad default to have for scaling on a DOF, I 
 would have assumed the default would be 1,1,1 not 0,0,0

That's bitten me a few times too. Specifically when I create DOFs
programmatically instead of reading an FLT file.

 Is there a reason why its 0,0,0, and not 1,1,1 and should we change it

I think we could change it. Just need to beat the inertia of making such a
simple change and sending the whole modified file...

U...

Ok! Did it!

Uh, there are lots more uninitialized variables there... What should
_minScale, _maxScale, _minHPR, _maxHPR, _minTranslate, _maxTranslate be set
to? Fine, _currentTranslate and _currentHPR can be left at (0,0,0), but are
there better defaults for the min and max? Does the OpenFlight spec give
some appropriate defaults? And now that _currentScale is set to (1,1,1),
does it bother that it's not between _minScale and _maxScale
- which are both still at the default-constructed value of (0,0,0)?

I knew I shouldn't have opened the file to do the modification... :-)

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
 http://whitestar02.webhop.org/

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


Re: [osg-users] Precipitation Effect, Snow, bad rendering at slow speed

2009-12-22 Thread Massimo Tarantini

robertosfield wrote:
 Hi Massimo,
 
 Thanks for the pictures.  Moving slow is a walking pace, not at
 360km/h.. that's pretty fast in my book.  The streaks are motion blurr
 on the particles as when you are moving fast the particle moves
 relative to the eye point between frames will be stretched out.  [...]
 


Thanks for the long answer,
and sorry for my lack of precision about slow speed.

...

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





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


Re: [osg-users] Transforming nodes

2009-12-22 Thread Jean-Sébastien Guay

Hi Gordon,


In Creator/OpenFlight, the defaults for all the DOF min's and max's are all
0's and the step values are all 0's
and of course the scale current is set to 1,1,1


OK then the values that are now set should be correct (since the default 
ctor for Vec3 sets it to (0,0,0) ).


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to set up the PageLOD?

2009-12-22 Thread Maxim Gammer
Thanks!

2009/12/22 Robert Osfield robert.osfi...@gmail.com

 Hi Maxim,

 It sounds like the compilation of OpenGL objects is causing the frame
 drop.  The new default for the DatabasePager is for the incremental
 pre compilation to be turned off, and for databases that are well
 balanced this doesn't cause problems with frame drops as the number of
 new objects per frame is kept modest so one doesn't get close to
 breaking frame when the new objects come in.

 For databases where there are lots of OpenGL objects that are
 introduced at once you can switch back on the incremental pre compile,
 the tells the DatabasePager to record all the OpenGL objects that need
 compiling and then on each frame compile as many as it can within
 specified time and number limits.  The incremental compile reduces the
 overhead per frame so reduces the chances of breaking frame, however,
 it also increases the amount of time it takes to prepare a scene graph
 before it can be merged with the main databases - so there is higher
 latency between requesting a tile and when it's served up.

 To switch on the pre compile use:

   viewer.getDatabasePager()-setDoPreCompile(true);

 There is a whole suite of methods relating to the fine control of pre
 compile in the DatabasePager so have a look over the headers.

 The other thing you could do is improve the suitability of your
 databases so that it's better balanced - for instance switching
 between LOD levels shouldn't introduce so much geometry/textures at
 one time.  Try to create a quad tree paged database where each tile is
 divided in four, and each child contains roughly the same amount of
 geometry and textures as it's parent.   Such a well balanced database
 won't suddenly introduce lots of geometry and textures in one go.

 Robert.

 On Tue, Dec 22, 2009 at 4:20 PM, Maxim Gammer maxgam...@gmail.com wrote:
  Hi everybody,
 
  I've got a problem - FPS falls down from 100 to 2-3 for 1-2 seconds
  during first load of more detailed level of PageLODs (when they're
  first seen). We suppose it's because of object compilation (there
  are messages about textures loading etc. on the console). FPS also
  falls down when we look at newly loaded objects.
 
  Is it possible to compile objects prior to their rendering? How to
  set up the PageLOD?
 
  Or maybe there are other ways to solve that?
 
 
  --
  Maxim Gammer
 
 
  ___
  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




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


[osg-users] OSG Build error on Mac OS X

2009-12-22 Thread Vijay Kalivarapu
Hi,

I am trying to build OSG on Mac OS X Snow leopard using Xcode. I ran into the 
following build errors and I have no idea where to start solving them. Can 
anyone help:


Code:

Ld 
build/OpenSceneGraph.build/Development/osgdb_bsp.build/Objects-normal/i386/osgdb_bsp.so
 normal i386
cd /Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph
setenv MACOSX_DEPLOYMENT_TARGET 10.4
/Developer/usr/bin/g++-4.2 -arch i386 -bundle -isysroot 
/Developer/SDKs/MacOSX10.5.sdk 
-L/Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph/build/Development
 
-F/Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph/build/Development
 -F/Users/vijay/Library/Frameworks 
-F/Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks -filelist 
/Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph/build/OpenSceneGraph.build/Development/osgdb_bsp.build/Objects-normal/i386/osgdb_bsp.LinkFileList
 -mmacosx-version-min=10.4 -framework OpenThreads -framework osg -framework 
osgDB -o 
/Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph/build/OpenSceneGraph.build/Development/osgdb_bsp.build/Objects-normal/i386/osgdb_bsp.so

Undefined symbols:
  osgUtil::TriStripVisitor::stripify(), referenced from:
  bsp::VBSPGeometry::createGeometry()  in osgdb_bsp.so-i386-master.o
  vtable for osgUtil::TriStripVisitor, referenced from:
  __ZTVN7osgUtil15TriStripVisitorE$non_lazy_ptr in 
osgdb_bsp.so-i386-master.o
  VTT for osgUtil::TriStripVisitor, referenced from:
  __ZTTN7osgUtil15TriStripVisitorE$non_lazy_ptr in 
osgdb_bsp.so-i386-master.o
ld: symbol(s) not found
collect2: ld returned 1 exit status








Thank you!

Cheers,
Vijay
[/code]

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





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


[osg-users] HUD-Problem

2009-12-22 Thread Carl Johnson
Hi,

I need to use osg for a project, so i tried to modify the example HudsAndText 
from osg tutorial

to my original project, but this didn't work out. i saw the graphics (a 
triangle), but no HUD.

so i went back to the roots
I tried this basic example osghud.cpp from osg hp examples

but i don't work out at all. and i just copied everything to the project.
no compiler errors, just a black screen.
i included all necessary libraries and ressources (as far as i know). 

can someone please help me? how do i get it to work?
... 

Thank you!

Cheers,
Carl

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





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


Re: [osg-users] Way to Draw Lots of spheres

2009-12-22 Thread Clayton Bluhm
Thanks for your input.  I tried sprites and they appear to do the job I need.  
Thanks again!

Cheers,
Clayton

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





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


[osg-users] Picking individual triangles from within a loaded model

2009-12-22 Thread Jody Cole
Hi,

I have loaded the cow.osg model into the OSG viewer with osgDB::readNodeFile( 
cow.osg ) and displayed it in wireframe mode.

I want to delete or pick individual triangles from within the mesh of the wire 
framed cow.

Does anyone have any examples that can do this? 


Thank you for any help.

Cheers,
JC

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





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


Re: [osg-users] Simple water effects

2009-12-22 Thread Dominic Stalder

Hi Kim

thanks for your feedback. First of all my time is rare at the moment, we 
are doing our thesis and on the other hand I think you need a pro for 
the integration of the changes into osgOcean ;-)


Regards
Dominic

Kim Bale schrieb:

Hello All,

Did somebody mention water effects?!

I have recognised the CPU usage of osgOcean as a bit of a problem. 
This is due to the osgOcean using one huge vertex/normal array for all 
of the ocean tiles and then copying the vertices for each tile in on 
frame/position changes. It was a rather bad design decision which once 
I had committed to proved too time consuming to change.


However, due to the tillable nature of the FFT ocean surface, this 
isn't necessary. A little while ago I wrote some test cases which 
removed this huge vertex array and replaced it with a single high 
resolution ocean tile which is then instanced for each tile in the 
ocean surface. The different resolution tiles are then supported 
simply by modifying the primitives and positioning the tiles using a 
vertex shader. Since all of the high resolution tiles are precomputed, 
updating the animation of the ocean surface is simply a matter of 
changing the pointer to the next frames vertex array for each of the 
tile primitives.


This is a far more efficient method of updating the surface, 
particularly if you are using a very large surface. 

I have the code for all of this as a prototype, but I don't have the 
time to tidy it up and update library at the moment. If you are 
interested in making these modifications I would be more than happy to 
give you the code and walk you through it, otherwise it'll have to 
wait until I get some time to do it myself.


Regards,

Kim.


2009/12/22 Robert Osfield robert.osfi...@gmail.com 
mailto:robert.osfi...@gmail.com


Hi Dominic,

On Mon, Dec 21, 2009 at 8:43 PM, Dominic Stalder
dominic.stal...@bluewin.ch mailto:dominic.stal...@bluewin.ch
wrote:
 I know the amazing looking osgOcean, but for our game it uses to
much CPU.

Might I suggest you engage with the authors/contributors of osgOcean
and find a way of avoiding this overhead.  This almost certainly will
take less time to realize a final solution and will be of benefit to
all osgOcean users.

Cheers,
Robert.
___
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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  


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


Re: [osg-users] How to get average frame rate after some amount of running time?

2009-12-22 Thread Nguyen Tien Dat
Dear Robert,
Thank for your answer. One more question. Right now I have my code like this:

numOfFrame = 0;
startTime = time(NULL);
while (!viewer.done())
{
   viewer.frame();
   numOfFrame ++;
}
endTime = time(NULL);
frameRate = (double)numOfFrame/(endTime - startTime);

But it always gives me about 60fps. Did I make a mistake somehow?
(startTime and endTime are in seconds already)
Thanks,
Dat

On Mon, Dec 21, 2009 at 3:17 AM, Robert Osfield
robert.osfi...@gmail.com wrote:
 Hi Dat,

 On Sun, Dec 20, 2009 at 8:26 PM, Nguyen Tien Dat tienda...@gmail.com wrote:
 Dear all,
 Could you tell me a way to get the average frame rate after, for
 example, 1 minute of running?

 The OSG itself doesn't give you this but it gives you all the tools to
 do it.  You have an osg::Timer for the time, and your have control
 over the frame loop so you can count the frames - so you can just do
 it yourselves for all th timings.  There is even an FrameStam
 viewer.getFrameStamp() that gives you the ReferenceTime and
 FrameNumber, see include/osg/FrameStamp for further details, if you
 just want to use the OSG built in timing/frame counting.

 All is left is a programming question... how do you computer averages
 over a specified period.  This is something I would expect most
 computer graphics programmers to be able to do.


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




-- 
Dat Tien Nguyen
PhD student, Computer Science Department
The University of Iowa, IA 52242
http://cs.uiowa.edu/~tinguyen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] HUD-Problem

2009-12-22 Thread Simon Hammett
2009/12/22 Carl Johnson uto...@gmx.net

 Hi,

 I need to use osg for a project, so i tried to modify the example
 HudsAndText from osg tutorial

 to my original project, but this didn't work out. i saw the graphics (a
 triangle), but no HUD.

 so i went back to the roots
 I tried this basic example osghud.cpp from osg hp examples

 but i don't work out at all. and i just copied everything to the project.
 no compiler errors, just a black screen.
 i included all necessary libraries and ressources (as far as i know).


I've only seen a black screen when the initial window size is setup
incorrectly.
Check what sizes you are passing in to the window traits.

If that doesn't work, you'll need to post your code;
it's a bit hard to guess with so little information.

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


Re: [osg-users] HUD-Problem

2009-12-22 Thread Trajce Nikolov
I have seen the black screen on windows7 so I had to reactivate the window
with CTRL-TAB
Nick

http://www.linkedin.com/in/tnick


On Wed, Dec 23, 2009 at 2:00 AM, Simon Hammett
s.d.hamm...@googlemail.comwrote:

 2009/12/22 Carl Johnson uto...@gmx.net

 Hi,

 I need to use osg for a project, so i tried to modify the example
 HudsAndText from osg tutorial

 to my original project, but this didn't work out. i saw the graphics (a
 triangle), but no HUD.

 so i went back to the roots
 I tried this basic example osghud.cpp from osg hp examples

 but i don't work out at all. and i just copied everything to the project.
 no compiler errors, just a black screen.
 i included all necessary libraries and ressources (as far as i know).


 I've only seen a black screen when the initial window size is setup
 incorrectly.
 Check what sizes you are passing in to the window traits.

 If that doesn't work, you'll need to post your code;
 it's a bit hard to guess with so little information.

 --
 http://www.ssTk.co.uk

 ___
 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