Re: [osg-users] writeNodefile Culling nodemask

2010-02-04 Thread Robert Osfield
Hi Martin,

On Wed, Feb 3, 2010 at 9:01 PM, Martin Beckett m...@mgbeckett.com wrote:
 Is there a better approach?

Construct you scene graph into parts that need to be saved, and parts
that are just decoration?

 -Basically I just want to flag certain nodes (and their children) as not part 
 of the model.
 At the moment I do this with a bit in the nodeMask, so they can't be picked, 
 don't contribute to the bounding box etc.

 Shouldn't be difficult to add a test to the writer - but if we are switching 
 to Wang's new system should I take a look at that?

You are the first us in a decade of development to ask for this
feature so I would be very careful about any additional cost in memory
or execution speed with such a change.  For such niche features it
really shouldn't be for the core OSG to support it directly, but just
open the door for you doing it yourself.  With the new IO support
development by Wang Rui it might be possible to intercept traversal of
nodes and disable it, go have a look.

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


Re: [osg-users] [vpb] Are we too optimistic about large database generation ?

2010-02-04 Thread Robert Osfield
HI Massimo,

To avoid all the osgdem tasks from having to parse all the source
files VPB supports generating a cache of all the geospatial details of
the source files.  The vpbcache tool can be used to read the original
source file and then generate a cache file from this.  You then
provide this cache file during subsequent runs of vpbmaster.

Robert.

On Wed, Feb 3, 2010 at 10:08 PM, Massimo Tarantini subbi...@yahoo.it wrote:
 Hi all,
 i work with OSG for fun, and i have created a DataBase for whole Italy at 
 HiRes 1m/pixel in about 3 weeks.

 The final DB is about 600G. The Source Images are about 13000 GeoTiff files 
 (700G), and about 10 DEM files (40 meters res, 2.5G)
 I have used and old notebook dual core 1.6Ghz, and two USB Disk 1Tera each 
 (please, don't LOL |-) ), and i have run ONLY 1 osgdem thread for each script.

 I have used vpbmaster to generate the scripts, BUT i have executed the 
 scripts manually, for two reasons:
  . first, vpbmaster executed 2 osgdem threads, and my HD was running to 
 death! (i have tried to use --machines, but did not work)
 . second, all the scripts use the same build_master.source files, which is 
 not optimized, and contains the 13000 GeoTiff files list.

 The build_master.source was a big problem, because every script wasted about 
 1hour to examine all the 13000 files, to find the few ones to be processed. I 
 have written a little C program to create many distinct build_master.source 
 files for all the scripts, and of course i have updated the scripts to use 
 the correct .source files.
 Every build_master.source is optimized with a list of no more than 10 GTiff 
 files.

 I Think that a big DB can be created with poor hadware (and poor OS), but:
  1. no more than 1 thread for each USB HD
  2. build_master.source files optimized, if many source files are used
  3. avoid ECW/JPEG200: they are slower that geotiff.
  4. Read from USB HD, but Write to Internal HD (to avoid many and many write 
 failures!)
  5. Three weeks is not much time, to create a 600G Db with a 300$ notebook 
 1.6Ghz! IT'S GREAT!

 ...

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





 ___
 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] Example of geographical position

2010-02-04 Thread Robert Osfield
Hi Tony,

Have a look at the osgsimuluation example as this uses the
CoordinateSystemNode/EllipsoidModel to provide conversion between
lat/long/height to XYZ.

Robert.

On Thu, Feb 4, 2010 at 12:12 AM, Tony Vasile ming...@gmail.com wrote:
 Hi,
    I'm a newbie and trying to find as many examples as I can. What I am
 looking for is an example of using a vehicle in latitude, longitude and
 altitude and placing it in the scene graph. Unfortunately most of the
 applications I have found programs such as Flightgear and Simgear and they
 just have far too much code to understand the general ideas quickly.
 Any help would be most appreciated.


 Another problem I have is with VPB. I have some level 1 DTED data that I
 wish to use in my scene graph for collision and occlusion events. Do I need
 to have an image overlayed on the DTED data before I can see anything with
 osgviewer?

 Tony Vasile

 CSC Australia

 ___
 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] Regression: 2.9.6, slow paths geometry w/ BIND_PER_PRIMITIVE normals breaks state set handling.

2010-02-04 Thread Simon Hammett
As per the subject.

I've attached a modified version of osgViewer.cpp which shows the issue.
The codes works fine in 2.8.2  2.7.1

I had a quick look at the code, but there's been way too many changes from
2.8.2 to 2.9.6
for me to find out what broke.

Also state set loading when opening .osg files seems to be broken as well.
If I save the graph out in 2.8.2 and then load it with osgViewer I get a
blue
cube instead of a grey one.

Ty.

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


osgviewer.cpp
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Regression: 2.9.6, slow paths geometry w/ BIND_PER_PRIMITIVE normals breaks state set handling.

2010-02-04 Thread Robert Osfield
Hi Simon,

On Thu, Feb 4, 2010 at 9:58 AM, Simon Hammett
s.d.hamm...@googlemail.com wrote:
 I've attached a modified version of osgViewer.cpp which shows the issue.
 The codes works fine in 2.8.2  2.7.1

 I had a quick look at the code, but there's been way too many changes from
 2.8.2 to 2.9.6 for me to find out what broke.

I rewrote the osg::Geometry::drawImplementation() to enable support of
OpenGL ES and OpenGL 3.x where there is no glBegin/glEnd support.  I
did do a lot of testing of the various slow paths though, but in for
you model I must have missed something.  The new code is alot cleaner
so it should be easier to track down the issue.

I'm currently completed focused on DatabasePager issues right now so
can't dive in to look at this regression right away.

 Also state set loading when opening .osg files seems to be broken as well.
 If I save the graph out in 2.8.2 and then load it with osgViewer I get a
 blue
 cube instead of a grey one.

The .osg reading/writing really didn't change much so there it may
well be that the reading/writing wasn't perfect in 2.8.2 either.
Check to see if the files written by 2.9.6 work OK with OSG-2.8.2. My
guess is that it's just the rendering differences that are the issue.

As a general note, the slow paths such as per normal bindings are
incredibly inefficient in the OSG and OpenGL and should be avoided.

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


Re: [osg-users] Navigating terrain elevation files using OSG

2010-02-04 Thread Phanindra Talabathula
Hi,

I have used VirtualPlanetBuilder (osgdem) to generate the DB and then used 
osgviewer to navigate the dted files. It worked fine. Happy !!! 

Thanks a lot for the inputs..

Regards,
Phanindra

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





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


[osg-users] [osgPlugins] vrml plugin

2010-02-04 Thread Luis Agero
Hi,

I am new with OpenSceneGraph and I have one problem that I can´t solve.

I try to compile osg with vrml plugin and I have this error:

Build started: Project: Plugins vrml, Configuration: Debug Win32 --
linking...
LINK : fatal error LNK1104: cannot open file 
'C:\osg\openvrml\home-built\lib.obj'

How can I solve it?

Also I have link error in Plugins jpeg and Plugins ive:
LINK : fatal error LNK1104: cannot open file 'c:\osg\3rdParty\lib.obj'

Thank you!

Luis

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





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


[osg-users] Nightly builds on OS X

2010-02-04 Thread Paul Martz
Hi all -- Has anyone tried to run a Nightly build on OS X? I have an 
8-core Mac Pro, but the build seems to use no more than 2 cores 
regardless of how I specify (or don't specify) the -j and -l make 
options. I wonder if this might be some limitation of CDash.


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


Re: [osg-users] Regression: 2.9.6, slow paths geometry w/ BIND_PER_PRIMITIVE normals breaks state set handling.

2010-02-04 Thread Simon Hammett
On 4 February 2010 10:19, Robert Osfield robert.osfi...@gmail.com wrote:

 Hi Simon,

 On Thu, Feb 4, 2010 at 9:58 AM, Simon Hammett
 s.d.hamm...@googlemail.com wrote:
  I've attached a modified version of osgViewer.cpp which shows the issue.
  The codes works fine in 2.8.2  2.7.1
 
  I had a quick look at the code, but there's been way too many changes
 from
  2.8.2 to 2.9.6 for me to find out what broke.

 I rewrote the osg::Geometry::drawImplementation() to enable support of
 OpenGL ES and OpenGL 3.x where there is no glBegin/glEnd support.  I
 did do a lot of testing of the various slow paths though, but in for
 you model I must have missed something.  The new code is alot cleaner
 so it should be easier to track down the issue.


 I'm currently completed focused on DatabasePager issues right now so
 can't dive in to look at this regression right away.


KK, no worries; I found a work around for our print outs, so no rush.


  Also state set loading when opening .osg files seems to be broken as
 well.
  If I save the graph out in 2.8.2 and then load it with osgViewer I get a
  blue
  cube instead of a grey one.

 The .osg reading/writing really didn't change much so there it may
 well be that the reading/writing wasn't perfect in 2.8.2 either.
 Check to see if the files written by 2.9.6 work OK with OSG-2.8.2. My
 guess is that it's just the rendering differences that are the issue.


The files are written out ok in all versions.
Each version gives the same file and the contents look sensible;

I'm pretty sure it's something to do with the OVERRIDE  PROTECT
flags; as it's only code/files using this flags which seem to be borked.


 As a general note, the slow paths such as per normal bindings are
 incredibly inefficient in the OSG and OpenGL and should be avoided.

 Robert.


I know, but our models only have a few thousand elements so even the
slow way is more than fast enough and it makes the code simpler.

I'll rewrite it at some point when we getting some breathing space...
Thanks.
-- 
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] [osgOcean] osgOcean Geometry

2010-02-04 Thread Paul Palumbo
I'm running osgOcean and I'm only interested into ocean surface effects (the 
geometry in particular). I also have a hard time limit on each frame time. 
However, with osgOcean, I'm seeing some large spikes in processing time that 
are causing me problems.

In particular, I'm seeing the FFTOceanSurface::computeVertices routine (called 
every 50ms) taking around 17-25ms per call and 
FFTOceanSurface::computePrimitives routine (called when tile LOD changes) 
taking 10-15ms and I'm looking for a way to make this more real-time. These 
timing numbers are with osgOcean parameters using in the oceanExample code.

Could the ocean surface geometry be defined at initialization at the scene 
graph level for each tile/frame rather than being redefined every 50ms as it 
doing now. In computePrimitives, couldn't the geometry only need to be 
regenerated for the times that changed LOD?

Any advice would be appreciated.

Thanks,
Paul P.

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





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


Re: [osg-users] Using PolytopeIntersector from the root of the scene graph instead of camera

2010-02-04 Thread Peter Hrenka

Hi Julien-Charles,

Julien-Charles Lévesque schrieb:

[...]

Here is my code... stripped down to a minimum. I assume that you have a 
4x4 matrix containing orientation of your selector (lOrientation) and a 
vec3 containing it's position (lPosition). I built the polytope to point 
in the direction of positive y-axis. Sorry for the french variable names 
and comments here and there... I don't think they hurt readability much 
at this level :P


However, I wasn't able to extract a reliable 3x3 rotation matrix from 
mouse coordinates. I can only say that this code works well with the raw 
3x3 orientation and position provided by my tracker. Do you have any 
idea for a desktop variation ? I can implement it. I could also 
integrate all this in the examplekeyboardmouse, once I've figured out 
how to do it with a mouse :P


You seem to use the same base-point for all but one
plane:

 lPlane.set(lNorm, lPosition);

This will give you a degenerated polytope of
volume 0.
Try using
 lPlane.set(lNorm, lPosition-radius*lNorm);
with some radius  0


Cheers,

Peter
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier, 
Dr. Arno Steitz, Dr. Ingrid Zech

Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196 


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


Re: [osg-users] [osgOcean] osgOcean Geometry

2010-02-04 Thread Kim Bale
Hi Paul,

Yes you're right this is due to the rather inefficient method of updating
the surface primitives and vertices that osgOcean uses at the moment.
Explained here:

http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-December/036735.html

Like I say in that post I have written a test case which significantly
improves the performance of this area but haven't actually added it into the
library code yet. This isn't helped by the fact that I keep forgetting to
put the test code on the svn so other people can't see the approach.
However, I WILL remember to do that tonight so if you want to see a solution
for it you can have a go.

I've done the hard bit, I just haven't had time to add it into the core
library code. If you check the sandbox directory on the svn later this
evening you can have a look.

Regards,

Kim.


On 4 February 2010 13:13, Paul Palumbo paul1...@yahoo.com wrote:

 I'm running osgOcean and I'm only interested into ocean surface effects
 (the geometry in particular). I also have a hard time limit on each frame
 time. However, with osgOcean, I'm seeing some large spikes in processing
 time that are causing me problems.

 In particular, I'm seeing the FFTOceanSurface::computeVertices routine
 (called every 50ms) taking around 17-25ms per call and
 FFTOceanSurface::computePrimitives routine (called when tile LOD changes)
 taking 10-15ms and I'm looking for a way to make this more real-time.
 These timing numbers are with osgOcean parameters using in the oceanExample
 code.

 Could the ocean surface geometry be defined at initialization at the scene
 graph level for each tile/frame rather than being redefined every 50ms as it
 doing now. In computePrimitives, couldn't the geometry only need to be
 regenerated for the times that changed LOD?

 Any advice would be appreciated.

 Thanks,
 Paul P.

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





 ___
 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] [osgOcean] Problem building osgOcean in visual studio 9.0.

2010-02-04 Thread Kim Bale
Hi Chris,

I've built osgOcean again 2.8.2 with vs2008 on xp,vista and win7 without
issue. So i'm rather at a loss on this one.

Can you be more specific about the CMake settings your using? Maybe I'll be
able to spot something.

Regards,

Kim.


On 3 February 2010 21:54, Chris Innanen f...@nonsanity.com wrote:

 Hi, J-S...

 My settup isn't much different than what has been reported previously in
 this thread, by both people for whom this worked, and that had the errors.

 OSG 2.8.2 (last Stable release)
 osgOcean 1.0.1 (latest release)
 Visual Studio 2008

 And the errors for the first cpp with problems:


 Code:

 1Compiling...
 1SiltEffect.cpp
 1C:\[]\OpenSceneGraph-2.8.2\include\osg/State(1729) : error C3767:
 '': candidate function(s) not accessible
 1could be the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(152)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(153)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(154)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(152)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(153)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(154)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(152)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(153)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(154)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(152)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(153)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(154)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(152)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(153)' : ''  [may be
 found via argument-dependent lookup]
 1or the friend function at
 'C:\[]\OpenSceneGraph-2.8.2\include\osg/MixinVector(154)' : ''  [may be
 found via argument-dependent lookup]
 1C:\[]\OpenSceneGraph-2.8.2\include\osg/State(1729) : error C2784:
 'bool std::operator (const std::_Tree_Traits ,const std::_Tree_Traits
 )' : could not deduce template argument for 'const std::_Tree_Traits '
 from 'const std::string'
 1c:\Program Files\Microsoft Visual Studio
 9.0\VC\include\xtree(1466) : see declaration of 'std::operator '
 1C:\[]\OpenSceneGraph-2.8.2\include\osg/State(1729) : error C2784:
 'bool std::operator (const std::_Tree_Traits ,const std::_Tree_Traits
 )' : could not deduce template argument for 'const std::_Tree_Traits '
 from 'const std::string'
 1c:\Program Files\Microsoft Visual Studio
 9.0\VC\include\xtree(1466) : see declaration of 'std::operator '
 1C:\[]\OpenSceneGraph-2.8.2\include\osg/State(1729) : error C2784:
 'bool std::operator (const std::_Tree_Traits ,const std::_Tree_Traits
 )' : could not deduce template argument for 'const std::_Tree_Traits '
 from 'const std::string'
 1c:\Program Files\Microsoft Visual Studio
 9.0\VC\include\xtree(1466) : see declaration of 'std::operator '
 1C:\[]\OpenSceneGraph-2.8.2\include\osg/State(1729) : error C2784:
 'bool std::operator (const std::_Tree_Traits ,const std::_Tree_Traits
 )' : could not deduce template argument for 'const std::_Tree_Traits '
 from 'const std::string'
 1c:\Program Files\Microsoft Visual Studio
 9.0\VC\include\xtree(1466) : see declaration of 'std::operator '
 1C:\[]\OpenSceneGraph-2.8.2\include\osg/State(1729) : error C2784:
 'bool std::operator (const std::vector_Ty,_Alloc ,const
 std::vector_Ty,_Alloc )' : could not deduce template argument for 'const
 std::vector_Ty,_Alloc ' from 'const std::string'
 1c:\Program Files\Microsoft Visual Studio
 9.0\VC\include\vector(1327) : see declaration of 'std::operator '
 1C:\[]\OpenSceneGraph-2.8.2\include\osg/State(1729) : error C2784:
 'bool std::operator (const std::vector_Ty,_Alloc ,const
 std::vector_Ty,_Alloc )' 

[osg-users] setThreadSafeRefUnref

2010-02-04 Thread Trajce Nikolov
Hi Robert,

can we make this call to change the settings only if it different from the
current one?
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


Re: [osg-users] PagedLod dataBasePager memory managment

2010-02-04 Thread Vincent Bourdier

Hi Robert,

I implemented my own ReadFileCallback and this sound to be a good 
solution, but with some limits...


This is the code :

/if((_MaxAvailableMemoryInMBytes - 
Common::MemoryAnalyzer::getProcWorkingSetSize() - (sizeInMBytes*2.1))  0 )
   return 
osgDB::Registry::instance()-readNodeImplementation(filename,options);

   else
   {   
   return 
osgDB::ReaderWriter::ReadResult::FILE_LOADED/*ERROR_IN_READING_FILE*/;

   }/

So when the file size in memory estimation exceed the free memory 
estimated, the load is not done.
But this is the point : if I return /ERROR_IN_READING_FILE, /won't the 
file be added to a black list ?

What about /FILE_LOADED /?

I don't what error code return to make the file being loaded later, when 
some memory will been freed.



Next, is there a way to force pagedLod to unload some nodes ? to 
implement a force unload to free a bit a memory.

I'm using OSG 2.8.1 and I cannot use the last release...
As the ReadFileCallback can be implemented, are there other possible 
personalization concerning the way to load/unload cached datas ?


Thanks for your help.

Regard,
  Vincent.

Vincent Bourdier a écrit :

Hi Robert,

I am trying to implement a new ReadFileCallback.
This callback will check the available memory, knowing the maximum 
allowed du to JVM usage (c++ engine in Java application), and if there 
is not enough memory the callback will not load the file.
I just ran some test to estimate the required memory space for each 
ive size.
For big ive files, the memory used seems to be around 2*ive file 
size.  For little files (5Mo) this is very fluctuating ... there is 
not regularity (ratio from 1.8 to 5 ).


Do you have any idea of how to estimate better the required memory 
space ? (only ive files as input datas)


Thanks.

Regards,
  Vincent.

Robert Osfield a écrit :

Hi Vincent,

On Thu, Jan 14, 2010 at 5:50 PM, Vincent Bourdier
vincent.bourd...@gmail.com wrote:
 

I don't understand how this is working.
If a pagedLod is required it will be loaded... but we can cap the 
number of

lod...
This sounds contradictory for me.



The max number of PagedLOD is a target that it aims for, but if there
are more PagedLOD required for rendering the current frame then the
max will exceed this trarget, and only once the view changes to
require less PagedLOD will the total number come down again.

 

If you wanted the LOD control then you just implement this yourself
using osgDB::Registry::ReadFileCallback that loads the tiles and then
modifies PagedLOD that it loads that are higher than a certain
resolution.

  
Do you mean that using my own readFileCallback is not sufficient and 
I'll

need to  modify PagedLod sources too ?



There is no need to modify any OSG sources to adjust the LOD ranges.
The ReadFileCallback can do the actual loading of the subgraph and
then catch the and modify the LOD ranges.

Personally I'd go go using the Camera LODScale though, it's a much 
simpler tool.


Robert.
  



__ Information from ESET NOD32 Antivirus, version of virus 
signature database 4805 (20100125) __


The message was checked by ESET NOD32 Antivirus.

http://www.eset.com





__ Information from ESET NOD32 Antivirus, version of virus signature 
database 4835 (20100204) __

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] setThreadSafeRefUnref

2010-02-04 Thread Robert Osfield
Hi Nick,

On Thu, Feb 4, 2010 at 1:53 PM, Trajce Nikolov nikolov.tra...@gmail.com wrote:
 can we make this call to change the settings only if it different from the
 current one?

It only has an effect when you don't have atomic reference counting
built-in, in which case it toggles whether it'll use a mutex to make
sure ref/unref and thread safe.  If you have atomic ref counting built
in then then you can't change it, it's always thread safe as the cost
of adding an if statement would be more expensive than just doing the
atmoic increment/decrement.

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


Re: [osg-users] setThreadSafeRefUnref

2010-02-04 Thread Trajce Nikolov
the thing that causes me troubles is the user data. I ran into a case of
making the scene graph cyclic. I store in user data some nodes, so it ended
up into infinite loop when adding a new view (startThreading sets this to a
value). So my point is to have something like

if (node-getThreadSafeUnref() != newVal)
node-setThreadSafeUnref(newVal))

I know I can override this in my own class and implement it. Since this is
called once in a while, I dont think it will be big overhead.

Nick

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


On Thu, Feb 4, 2010 at 5:22 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Thu, Feb 4, 2010 at 1:53 PM, Trajce Nikolov nikolov.tra...@gmail.com
 wrote:
  can we make this call to change the settings only if it different from
 the
  current one?

 It only has an effect when you don't have atomic reference counting
 built-in, in which case it toggles whether it'll use a mutex to make
 sure ref/unref and thread safe.  If you have atomic ref counting built
 in then then you can't change it, it's always thread safe as the cost
 of adding an if statement would be more expensive than just doing the
 atmoic increment/decrement.

 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] multiple osgShadow::ShadowMap

2010-02-04 Thread PCJohn

Hi,
Is it possible to have multiple shadow maps?
I mean, f.ex., two light sources and two osgShadow::ShadowMap casting 
two shadows in a single pass?


Studying osgShadow::ShadowMap shows that it is not directly supported.
Anyway, I created two ShadowMaps, made one parent of the other and a 
scene as a child. I made ShadowMaps use different uniforms, created my 
own shader processing both shadow textures (and base texture).
However, it still does not work. One shadow texture works well, but if I 
use two, only one is displayed correctly.


Any ideas?
Thx,
John
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] setThreadSafeRefUnref

2010-02-04 Thread Robert Osfield
Hi Nick,

Thread safe ref/unref makes no differences to circular references that
you create in your application/scene graph.  It's simply not safe to
create circular references, you have to break them to be able to avoid
memory leaks and the best way to do this is to use an osg::Observer,
observer_ptr or a straight C pointer.  The later you have to be
careful about dangling pointers though.

Robert.

On Thu, Feb 4, 2010 at 3:27 PM, Trajce Nikolov nikolov.tra...@gmail.com wrote:
 the thing that causes me troubles is the user data. I ran into a case of
 making the scene graph cyclic. I store in user data some nodes, so it ended
 up into infinite loop when adding a new view (startThreading sets this to a
 value). So my point is to have something like
 if (node-getThreadSafeUnref() != newVal)
 node-setThreadSafeUnref(newVal))
 I know I can override this in my own class and implement it. Since this is
 called once in a while, I dont think it will be big overhead.
 Nick

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


 On Thu, Feb 4, 2010 at 5:22 PM, Robert Osfield robert.osfi...@gmail.com
 wrote:

 Hi Nick,

 On Thu, Feb 4, 2010 at 1:53 PM, Trajce Nikolov nikolov.tra...@gmail.com
 wrote:
  can we make this call to change the settings only if it different from
  the
  current one?

 It only has an effect when you don't have atomic reference counting
 built-in, in which case it toggles whether it'll use a mutex to make
 sure ref/unref and thread safe.  If you have atomic ref counting built
 in then then you can't change it, it's always thread safe as the cost
 of adding an if statement would be more expensive than just doing the
 atmoic increment/decrement.

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


Re: [osg-users] writeNodefile Culling nodemask

2010-02-04 Thread Martin Beckett

robertosfield wrote:
 Construct you scene graph into parts that need to be saved, and parts that 
 are just decoration?

That was my first approach - at the root I had 'scene' and 'display' groups and 
only save the 'scene' tree.

But it would be nice to be able to attach decorations (grid/bounding box) to 
any node and this naturally fell out of the design of the scenegraph.
There is a similar problem attaching markers (ShapeDrawable) to points, these 
don't need to be saved because they can be regenerated on loading - but 
increase the size of the file.


 You are the first us in a decade of development to ask for this
 feature so I would be very careful about any additional cost in memory
 or execution speed with such a change. 

Fair enough - I thought it would naturally appear as part of the traversal 
mechanism.

A more general requirement is to export only nodes of type X wherever they are 
in the tree (eg export roads but not boundaries). I suppose the scenegraph-ish 
way would be to build a temporary tree containing links to just those nodes and 
export that ?

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





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


[osg-users] [osgPPU] osgPPU cube map sample

2010-02-04 Thread Sebastien Nerig
Hi,

I would like to know what is the aim of the cube map sample.
When I launch this sample, I've got some satellite objects that are moving 
arround a bigger sphere, this sphere seems to be mapped with an envmap made of 
6 colors (red, green etc...). But the envmap is not dynamic (ie the sattelite 
objects do not reflect in the bigger sphere). Is it normal behavior ?


Thank you!

Cheers,
Sebastien

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





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


Re: [osg-users] PagedLod dataBasePager memory managment

2010-02-04 Thread Robert Osfield
Hi Vincent,

On Thu, Feb 4, 2010 at 2:16 PM, Vincent Bourdier
vincent.bourd...@gmail.com wrote:
 So when the file size in memory estimation exceed the free memory estimated,
 the load is not done.
 But this is the point : if I return /ERROR_IN_READING_FILE, /won't the file
 be added to a black list ?
 What about /FILE_LOADED /?

The OSG doesn't provide any blacklisting capability so it's something
you'll have to implement yourself in your read callback.

 Next, is there a way to force pagedLod to unload some nodes ? to implement a
 force unload to free a bit a memory.
 I'm using OSG 2.8.1 and I cannot use the last release...
 As the ReadFileCallback can be implemented, are there other possible
 personalization concerning the way to load/unload cached datas ?

The DatabasePager now defaults to using a MaxPagedLOD scheme where it
expires currently unused PageLOD children on demand, so that as lots
of new PagedLOD come in to view ones that aren't in the view are
deleted keeping a roughly constant load.  You can adjust the target
MaxPagedLOD in your app via the OSG_MAX_PAGED_LOD env var or the
DatabasePager::setTargetMaximumNumberOfPageLOD(value).

Please note this is a target that will be exceeded is more PagedLOD's
are required for a single frame, so the view will not ever be
constrained by the MaxPagedLOD target, once the high loaded view is
moved away from the PagedLOD numbers will drop back down to the
target.

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


Re: [osg-users] [osgPPU] osgPPU cube map sample

2010-02-04 Thread Sebastien Nerig
Hi,

Well I had a look in the code shader, you set gl_fragColor with a color 
depending on the face index osgppu_CubeMapFace. The corresponding update code 
is in void UnitInOut::init() method. That's why the bigger sphere holds colors.
But the samplerCube input is unused in this sample, why ? Is this texture holds 
the reflection of the satellite objects ?

Sebastien

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





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


Re: [osg-users] setThreadSafeRefUnref

2010-02-04 Thread Trajce Nikolov
Hi Robert,

havent used observer ptrs so far. But sounds like a good hint .,, Thanks !

Nick

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


On Thu, Feb 4, 2010 at 5:51 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 Thread safe ref/unref makes no differences to circular references that
 you create in your application/scene graph.  It's simply not safe to
 create circular references, you have to break them to be able to avoid
 memory leaks and the best way to do this is to use an osg::Observer,
 observer_ptr or a straight C pointer.  The later you have to be
 careful about dangling pointers though.

 Robert.

 On Thu, Feb 4, 2010 at 3:27 PM, Trajce Nikolov nikolov.tra...@gmail.com
 wrote:
  the thing that causes me troubles is the user data. I ran into a case of
  making the scene graph cyclic. I store in user data some nodes, so it
 ended
  up into infinite loop when adding a new view (startThreading sets this to
 a
  value). So my point is to have something like
  if (node-getThreadSafeUnref() != newVal)
  node-setThreadSafeUnref(newVal))
  I know I can override this in my own class and implement it. Since this
 is
  called once in a while, I dont think it will be big overhead.
  Nick
 
  http://www.linkedin.com/in/tnick
 
 
  On Thu, Feb 4, 2010 at 5:22 PM, Robert Osfield robert.osfi...@gmail.com
 
  wrote:
 
  Hi Nick,
 
  On Thu, Feb 4, 2010 at 1:53 PM, Trajce Nikolov 
 nikolov.tra...@gmail.com
  wrote:
   can we make this call to change the settings only if it different from
   the
   current one?
 
  It only has an effect when you don't have atomic reference counting
  built-in, in which case it toggles whether it'll use a mutex to make
  sure ref/unref and thread safe.  If you have atomic ref counting built
  in then then you can't change it, it's always thread safe as the cost
  of adding an if statement would be more expensive than just doing the
  atmoic increment/decrement.
 
  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 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] Using PolytopeIntersector from the root of the scene graph instead of camera

2010-02-04 Thread Julien-Charles Lévesque
Hi Peter,

What do you mean by a degenerated polytope of volume 0 ? That polytope
definitely doesn't have a null volume since I've been using it to select
objects in my application and it works.

The four planes all have the same starting point because I want the polytope
to be a pyramid coming out from a user's hand, so the planes -should- all
intersect at the summit, no ?

Julien-Charles

On Thu, Feb 4, 2010 at 8:35 AM, Peter Hrenka
p.hre...@science-computing.dewrote:

 Hi Julien-Charles,

 Julien-Charles Lévesque schrieb:

 [...]


 Here is my code... stripped down to a minimum. I assume that you have a
 4x4 matrix containing orientation of your selector (lOrientation) and a vec3
 containing it's position (lPosition). I built the polytope to point in the
 direction of positive y-axis. Sorry for the french variable names and
 comments here and there... I don't think they hurt readability much at this
 level :P

 However, I wasn't able to extract a reliable 3x3 rotation matrix from
 mouse coordinates. I can only say that this code works well with the raw 3x3
 orientation and position provided by my tracker. Do you have any idea for a
 desktop variation ? I can implement it. I could also integrate all this in
 the examplekeyboardmouse, once I've figured out how to do it with a mouse :P


 You seem to use the same base-point for all but one
 plane:

  lPlane.set(lNorm, lPosition);

 This will give you a degenerated polytope of
 volume 0.
 Try using
  lPlane.set(lNorm, lPosition-radius*lNorm);
 with some radius  0



 Cheers,

 Peter
 --
 Vorstand/Board of Management:
 Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
 Vorsitzender des Aufsichtsrats/
 Chairman of the Supervisory Board:
 Michel Lepert
 Sitz/Registered Office: Tuebingen
 Registergericht/Registration Court: Stuttgart
 Registernummer/Commercial Register No.: HRB 382196
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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


Re: [osg-users] PagedLod dataBasePager memory managment

2010-02-04 Thread Vincent Bourdier

Hi Robert

Robert Osfield a écrit :

So when the file size in memory estimation exceed the free memory estimated,
the load is not done.
But this is the point : if I return /ERROR_IN_READING_FILE, /won't the file
be added to a black list ?
What about /FILE_LOADED /?



The OSG doesn't provide any blacklisting capability so it's something
you'll have to implement yourself in your read callback.

  
Sorry I was not enough precise in my explanations : I don't want any 
blacklist, I was asking if OSG gets one. So it is perfect for me that no 
file will be blacklisted. I was asking what error code should I return 
to make DatabasePager consider the file in not available, but if a new 
request is done later (when some memory has been released) its will try 
again. What difference will it makes if I return FILE_LOADED or 
ERROR_IN_READING_FILE ?



Next, is there a way to force pagedLod to unload some nodes ? to implement a
force unload to free a bit a memory.
I'm using OSG 2.8.1 and I cannot use the last release...
As the ReadFileCallback can be implemented, are there other possible
personalization concerning the way to load/unload cached datas ?



The DatabasePager now defaults to using a MaxPagedLOD scheme where it
expires currently unused PageLOD children on demand, so that as lots
of new PagedLOD come in to view ones that aren't in the view are
deleted keeping a roughly constant load.  You can adjust the target
MaxPagedLOD in your app via the OSG_MAX_PAGED_LOD env var or the
DatabasePager::setTargetMaximumNumberOfPageLOD(value).

Please note this is a target that will be exceeded is more PagedLOD's
are required for a single frame, so the view will not ever be
constrained by the MaxPagedLOD target, once the high loaded view is
moved away from the PagedLOD numbers will drop back down to the
target.

Robert.
  

So If I decrease this value, some PagedLod will be released ?
What difference with cameraLODScale ? I just made a test 
increasing/decreasing this value and I saw the effect on PagedLod and 
memory.


Thanks for your answers.

Regards,
  Vincent.


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 4835 (20100204) __

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] PagedLod dataBasePager memory managment

2010-02-04 Thread Robert Osfield
On Thu, Feb 4, 2010 at 4:23 PM, Vincent Bourdier
vincent.bourd...@gmail.com wrote:
 What difference will it makes if I return FILE_LOADED or 
 ERROR_IN_READING_FILE ?

If you didn't load the file you shouldn't return a FILE_LOADED, so
since with don't have an INSUFFICIENT_MEMORY_TO_LOAD (or similar) enum
then the closest would be ERROR_IN_READING_FILE.

 So If I decrease this value, some PagedLod will be released ?

It won't release any right away, but as the frames progress it'll work
to get the max down to your specified target when it's possible.

 What difference with cameraLODScale ?

The osg::Camera::setLODScale() just changes which children are
selected in the view, it doesn't change the max number of PagedLOD
target, but it will directly affect how many PagedLOD that will be
active in any view.

 I just made a test
 increasing/decreasing this value and I saw the effect on PagedLod and
 memory.

Yes, this is exactly how one would expect it to work.

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


Re: [osg-users] setThreadSafeRefUnref

2010-02-04 Thread Trajce Nikolov
hi Robert,

just for the sake of clarification  I dont have circular scenegraph. But
what I do have, I put in userdata nodes from the scene graph. In
Node::setThreadSaferefUnref() you are setting that for the userdata as well.
And from here I get into circle, because the user data contains nodes, that
further in the scene can point to the node that is setting the
ThreadSafeRefUnref (complex scene, mirrors etc, so istenad of creating
custom nodes I use UserData).

Nick

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


On Thu, Feb 4, 2010 at 5:51 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 Thread safe ref/unref makes no differences to circular references that
 you create in your application/scene graph.  It's simply not safe to
 create circular references, you have to break them to be able to avoid
 memory leaks and the best way to do this is to use an osg::Observer,
 observer_ptr or a straight C pointer.  The later you have to be
 careful about dangling pointers though.

 Robert.

 On Thu, Feb 4, 2010 at 3:27 PM, Trajce Nikolov nikolov.tra...@gmail.com
 wrote:
  the thing that causes me troubles is the user data. I ran into a case of
  making the scene graph cyclic. I store in user data some nodes, so it
 ended
  up into infinite loop when adding a new view (startThreading sets this to
 a
  value). So my point is to have something like
  if (node-getThreadSafeUnref() != newVal)
  node-setThreadSafeUnref(newVal))
  I know I can override this in my own class and implement it. Since this
 is
  called once in a while, I dont think it will be big overhead.
  Nick
 
  http://www.linkedin.com/in/tnick
 
 
  On Thu, Feb 4, 2010 at 5:22 PM, Robert Osfield robert.osfi...@gmail.com
 
  wrote:
 
  Hi Nick,
 
  On Thu, Feb 4, 2010 at 1:53 PM, Trajce Nikolov 
 nikolov.tra...@gmail.com
  wrote:
   can we make this call to change the settings only if it different from
   the
   current one?
 
  It only has an effect when you don't have atomic reference counting
  built-in, in which case it toggles whether it'll use a mutex to make
  sure ref/unref and thread safe.  If you have atomic ref counting built
  in then then you can't change it, it's always thread safe as the cost
  of adding an if statement would be more expensive than just doing the
  atmoic increment/decrement.
 
  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 mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] OSG and GL studio...

2010-02-04 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Brett and Paul,

Thanks for your responses. My initial inquiry was to ping the OSG group to
see if anyone had any experience regarding OSG and GL studio. Specific
questions will be forthcoming as we embark on this.

In answer to Paul's question, we are essentially using a Drawable callback
that calls into the GL Studio DLL live component. One of the problems we're
having is getting the buttons to work properly when we have our GL studio
instrument embedded in the OSG viewer. The GL studio button graphic doesn't
reflect the OSG mouse action we're expecting when we depress and release the
mouse button. The behavior is suggestive of some sort of mismatch in
handling the events.

Again, thanks for the replies...

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brett
Wiesner
Sent: Thursday, February 04, 2010 6:45 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] OSG and GL studio...

Shayne,

We've integrated GL Studio with our OSG application (VR-Vantage). It works
really well! I'm not sure I can help you with your issues but I'll try.
What's the problem?

Thanks,
Brett Wiesner
Product Manager, VR-Vantage
VR-Vantage: OSG Based Battlefield Information Station, Desktop Image
Generator and SDK!!!

Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote:

 All,

 Does anyone have any experience using OSG with GL studio? We are 
 having some issues that we would like some input on. I wanted to place 
 a general inquiry before getting specific on the problem at hand.

 Thanks,

 -Shayne

 --
 --

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







smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPPU] osgPPU cube map sample

2010-02-04 Thread Art Tevs
Hi Sebastian,

the purpose of the cube map demo was not to show the reflection, but to show 
that with osgPPU one can also use CubeMaps to render the results to. So using 
this example one can build its own reflection effect by processing relfected 
data through osgPPU for example.


Cheers,
Art

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





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


Re: [osg-users] setThreadSafeRefUnref

2010-02-04 Thread Robert Osfield
Hi Nick,

On Thu, Feb 4, 2010 at 4:33 PM, Trajce Nikolov nikolov.tra...@gmail.com wrote:
 hi Robert,
 just for the sake of clarification  I dont have circular scenegraph.

Errr what you describe below is a circular scene graph, UserData
is still part of the scene graph, it's reference counted and still
needs to be treated like part of the scene graph.  Same applies to any
data structure in your application.

  But
 what I do have, I put in userdata nodes from the scene graph. In
 Node::setThreadSaferefUnref() you are setting that for the userdata as well.
 And from here I get into circle, because the user data contains nodes, that
 further in the scene can point to the node that is setting the
 ThreadSafeRefUnref (complex scene, mirrors etc, so istenad of creating
 custom nodes I use UserData).

You need to remove the circular reference, the setTheadSafeRefUnref()
is also something you should be able to remove.  With thread safe
ref/unref is something you should decide on construction of your
objects, and is typically done by passing a flag into the
Referenced(bool) constructor.  Please note that scene graph objects
*should* almost always leave the thread safe ref/unref one, it's only
in very specific single threaded data structures that you can consider
the possibility of switching off thread safe ref/unref.

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


Re: [osg-users] setThreadSafeRefUnref

2010-02-04 Thread nikolov.trajce
:)  ok ok ... I got your point. For me the user data was not part of the
scene graph. Visitors are not traversing it. But from now on I will consider
them as a part of the scenegraph :)

Thanks again

Nick

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


On Thu, Feb 4, 2010 at 6:50 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Thu, Feb 4, 2010 at 4:33 PM, Trajce Nikolov nikolov.tra...@gmail.com
 wrote:
  hi Robert,
  just for the sake of clarification  I dont have circular scenegraph.

 Errr what you describe below is a circular scene graph, UserData
 is still part of the scene graph, it's reference counted and still
 needs to be treated like part of the scene graph.  Same applies to any
 data structure in your application.

   But
  what I do have, I put in userdata nodes from the scene graph. In
  Node::setThreadSaferefUnref() you are setting that for the userdata as
 well.
  And from here I get into circle, because the user data contains nodes,
 that
  further in the scene can point to the node that is setting the
  ThreadSafeRefUnref (complex scene, mirrors etc, so istenad of creating
  custom nodes I use UserData).

 You need to remove the circular reference, the setTheadSafeRefUnref()
 is also something you should be able to remove.  With thread safe
 ref/unref is something you should decide on construction of your
 objects, and is typically done by passing a flag into the
 Referenced(bool) constructor.  Please note that scene graph objects
 *should* almost always leave the thread safe ref/unref one, it's only
 in very specific single threaded data structures that you can consider
 the possibility of switching off thread safe ref/unref.

 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] [osgPlugins] vrml plugin

2010-02-04 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2010-02-04 12:41, Luis Agero wrote:
 Hi,
 
 I am new with OpenSceneGraph and I have one problem that I can´t solve.
 
 I try to compile osg with vrml plugin and I have this error:
 
 Build started: Project: Plugins vrml, Configuration: Debug Win32 --
 linking...
 LINK : fatal error LNK1104: cannot open file 
 'C:\osg\openvrml\home-built\lib.obj'
 
 How can I solve it?
 
 Also I have link error in Plugins jpeg and Plugins ive:
 LINK : fatal error LNK1104: cannot open file 'c:\osg\3rdParty\lib.obj'
 

I do not use Visual Studio, but that looks like your project is set up
incorrectly and is trying to link to files which do not exist. The
filename lib.obj looks pretty nonsensical to me.

You can find instructions on how to use the VRML plugin on the OSG Wiki.
Or as Luis Agero mentioned in another thread:

 Hi,
 
 Look at this:
 
 openscenegraph org  projects  osg  wiki Support PlatformSpecifics 
 VisualStudio VisualStudioPlugins
 

Regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLawUon11XseNj94gRArR3AJ4pvzwN2kOOgkp5ufoNzcHd6MuUVQCg0fUK
AnVsZp6nkc/ZWviIeJOJcjA=
=LtSM
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] vrml plugin

2010-02-04 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2010-02-04 18:34, Jan Ciger wrote:
 On 2010-02-04 12:41, Luis Agero wrote:
...
 You can find instructions on how to use the VRML plugin on the OSG Wiki.
 Or as Luis Agero mentioned in another thread:
 
 Hi,
 
 Look at this:
 
 openscenegraph org  projects  osg  wiki Support PlatformSpecifics 
 VisualStudio VisualStudioPlugins
 
 
 Regards,
 
 Jan

D'oh, I am an idiot :) Sorry Luis :)
Note to self - do not start answering e-mails after a whole day of
travelling.

Regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLawW4n11XseNj94gRAgL6AJ4pacIvn4x5GTs1X/1FPjplv5Sg5gCgoPDA
y81R5ZTk9jYHOEwZkVRYqw8=
=f/e/
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Example of geographical position

2010-02-04 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Tony,

Along with Robert's suggestion, you can use the following code snippet to
place a vehicle on a spheroid that has VPB terrain, into the scenegraph.
You'll need osgSim and osg::EllipsoidModel to do this.

Entity-lat = 36.4;
Entity-lon = -115.015;
Entity-alt = GetHeightOnTerrain(Entity-lat, Entity-lon);
entityGrp-addChild(Entity-transform);

double GetHeightOnTerrain(double lat, double lon)
{
double X,Y,Z;
double maxElevation = 13000 / 3.281;
earth-convertLatLongHeightToXYZ(osg::DegreesToRadians(lat),
osg::DegreesToRadians(lon),maxElevation, X,Y,Z);
double hat =
osgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain.get(),
osg::Vec3(X,Y,Z), -1);
return (maxElevation - hat);
}

The earth is an osg::EllipsoidModel object and the terrain is a node
loaded in from the ive file build by VPB. The entity group node is simply
added to your scenegraph and you're ready to go.

Hopefully this will get you started...:)

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tony Vasile
Sent: Wednesday, February 03, 2010 5:13 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Example of geographical position

Hi,
   I'm a newbie and trying to find as many examples as I can. What I am
looking for is an example of using a vehicle in latitude, longitude and
altitude and placing it in the scene graph. Unfortunately most of the
applications I have found programs such as Flightgear and Simgear and they
just have far too much code to understand the general ideas quickly.
Any help would be most appreciated.


Another problem I have is with VPB. I have some level 1 DTED data that I
wish to use in my scene graph for collision and occlusion events. Do I need
to have an image overlayed on the DTED data before I can see anything with
osgviewer?

Tony Vasile

CSC Australia



smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Scientific Visualization classes?

2010-02-04 Thread Charles Cossé
Andrew, the ROOT toolkit makes nice plots, but not sure about OSG
integration ..

http://root.cern.ch/drupal/

-Charles

On Wed, Feb 3, 2010 at 5:57 PM, Andrew Cunningham o...@a-cunningham.comwrote:

 Hi
  I already have the osgVTK kit as listed on
 http://www.openscenegraph.org/projects/osg/wiki/Community/NodeKits

 As far as what specific visualizations I am after...
 - Real contour plots
 - Isosurfaces
 + possibly many of the other types of sci-visualizations (streamlines etc)
  in the future.
 Seems like the VTK bridge is probably the way to go I suppose as it is
 unlikely anyone will develop all those algorithms all over again for OSG.

 Andrew

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





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




-- 
AsymptopiaSoftware|softw...@thelimit
 http://www.asymptopia.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trying out the directshow plugin - how to build the release version of BaseClasses?

2010-02-04 Thread Raymond de Vries

Hi guys,

I would like to say a big 'thank you' for this nice plugin. After quite 
some time installing SDKs and building I got the plugin working :-)
For the record: I did this on Windows Vista 32 bit, Visual Studio 2008, 
Microsoft DirectX SDK (August 2009) and Windows SDK v6.0.


Cheers
Raymond



Serge Lages wrote:

I think it's one of the latest :
Microsoft DirectX SDK (August 2009)

On Wed, Feb 3, 2010 at 7:03 PM, Raymond de Vries ree...@xs4all.nl 
mailto:ree...@xs4all.nl wrote:


Hi,

Ok, nice to hear. Which version of directx are you using? My
directshow build on Vista, using directx August 2007, resulted in
a missing symbol...

Cheers
Raymond


Serge Lages wrote:

I am working on Windows 7 and it works like a charm with the
Win7 SDK.

On Wed, Feb 3, 2010 at 6:49 PM, Raymond de Vries
ree...@xs4all.nl mailto:ree...@xs4all.nl
mailto:ree...@xs4all.nl mailto:ree...@xs4all.nl wrote:

   Hi guys,

   First of all, thanks a lot for your quick reply! As it
turned out,
   I also had a more recent platform sdk on my system (win vista).
   Out of habit I just installed the older one on each system I
   develop on... And I had build the baseclasses once (long
time ago)
   using the makefile...

   Thanks for your advice. I just built the BaseClasses and now
   building osg svn, including directshow :-) Finders crossed...

   I will try out the windows 7 sdk on my windows 7 machine
soon too.

   Jason, ok, I understand it. Indeed I found your message from a
   while ago. I only saw Cedric's name in the cmake module, so
that's
   why I thought you joined efforts. So thanks Cedric!

   One more thing for now: do I have (easy) access to the 'current
   image' via the plugin?

   I will let you know how it goes...

   Cheers
   Raymond




   Jason Beverage wrote:

   Hi Raymond,

   Just wanted to give credit to Cedric for the osg DirectShow
   plugin, I
   had sent out an email quite awhile about about public
interest
   in an
   open sourced Direct Show plugin but never got around to
   releasing one.
Kudos to Cedric for beating me to the punch :)

   Thanks,

   Jason

   On Wed, Feb 3, 2010 at 11:58 AM, Trajce Nikolov
   nikolov.tra...@gmail.com
mailto:nikolov.tra...@gmail.com
mailto:nikolov.tra...@gmail.com
mailto:nikolov.tra...@gmail.com

   wrote:
   
   the latest windows sdk has the project files for

all the
   configuration.
   build against it
   Nick

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


   On Wed, Feb 3, 2010 at 6:44 PM, Raymond de Vries
   ree...@xs4all.nl mailto:ree...@xs4all.nl
mailto:ree...@xs4all.nl mailto:ree...@xs4all.nl wrote:
 
   Hi, most likely Cedric and/or Jason (Beverage),


   I would like to try out your directshow plugin
in svn,
   and now I am in the
   process of building the BaseClasses of the windows
   platform sdk. Although
   I've searched the net and the platform sdk docs, I
   cannot see how I can
   produce a release version of the BaseClasses (the
   debug version is built
   properly, so it seems). Can anymore please give me
   some advice how to do
   that? Cedric? Jason?

   I am using Microsoft DirectX SDK (August 2007) and
   Microsoft Platform SDK
   for Windows Server 2003 R2, using Visual Studio
2008.
   I tried to build the
   strmbase.lib by running nmake in the Visual Studio
   command prompt but then
   it only builds the debug version. Should I hack the
   makefile or is there
   another way?

   Thanks a lot already, cheers
   Raymond

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

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

[osg-users] Computer Graphics For Simulation paper track at SCSC'10 Call for papers

2010-02-04 Thread John F. Richardson
Hello,

Deadline Feb 28, 2010.

One of the topic areas is Scenegraphs and general Web3D and their
applications to Simulation.

-

Second Call for Papers for the Computer Graphics for Simulation Track at the
Summer Computer Simulation Conference (SCSC'10)
July 11-14, 2010 [Ottawa, Canada]

http://www.dacya.ucm.es/jlrisco/SCSC10/doku.php?id=scsc [general conference
topics of interest list plus general author information, Ottawa
information,.]

http://www.dacya.ucm.es/jlrisco/SCSC10/doku.php?id=tracks [this has the
SCSC'10 Tracks with the Computer Graphics for Simulation track details]

The details are at
http://www.liophant.org/scsc/scsc2010/summersim2010_file/cg_scsc2010.pdf 
{please note that the submission deadline was moved forward to February 28,
2010 and acceptance notification to April 30, 2010, camera ready to May 28,
2010}

SCSC'10 is part of the 2010 International Simulation Multi-conference
(ISMc'10)
[http://www.scs.org/confernc/summersim/summersim10/cfp/summersim10.htm]
You can go straight to the details or start at www.scs.org and browse...

Details above in cg_scsc2010.pdf, but a synopsis of topics is:
-   General Computer Graphics [rendering, terrain, deformations, large
VE's, volume visualization, military, CG support for simulation
methodologies,.]
-   Web3D for Simulation [VRML/X3D/COLLADA/OSG/KML/O3D, NVIDIA CUDA,
OpenCL [Open Compute Language for CPU/GPU scheduling,.]
-   Computational Grids for Simulation [adaptive, parallel,.]
-   3-D Modeling and Animation Systems use in Simulations [commercial,
open source, video, CAD, solid, organic, file export interoperability,.]
-   Art in Simulation [color, textures, lighting, art for VE's,.]


John F. Richardson



smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Problem building osgOcean in visual studio 9.0.

2010-02-04 Thread Chris Innanen
Hiya, Kim...

I seem to have fixed the problem...

In the osgOcean project settings, the additional include directories includes 
the osg header directories, including osgDB and osgText. These are put there by 
CMake, which demands those paths in order to generate the project files.

osgText has its own String class based on std::string and osgDB has it's own 
fstream. Both are defined in headers with the same name as the standard library 
headers. So when osgOcean tries to include the standard varieties, it gets 
these overridden files.

By removing those two directories from the additional includes, osgOcean builds 
correctly.


 ~ Chris Innanen
 ~ Nonsanity

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





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


Re: [osg-users] [osgOcean] Problem building osgOcean in visual studio 9.0.

2010-02-04 Thread Jean-Sébastien Guay

Hi Chris,


In the osgOcean project settings, the additional include directories includes 
the osg header directories, including osgDB and osgText. These are put there by 
CMake, which demands those paths in order to generate the project files.

osgText has its own String class based on std::string and osgDB has it's own 
fstream. Both are defined in headers with the same name as the standard library 
headers. So when osgOcean tries to include the standard varieties, it gets 
these overridden files.

By removing those two directories from the additional includes, osgOcean builds 
correctly.


Hm, interesting. CMake should be adding only osg root/include to the 
project's include paths, and not any of osg root/include/osg, osg 
root/include/osgText, osg root/include/osgDB or anything like that. 
If that were the case, the include lines in osgOcean (presumably 
#include string and #include fstream) would not find the osgText and 
osgDB versions, you would need to do #include osgText/String and 
#include osgDB/fstream specifically to get those, and all would be 
well in the world (and curse Windows' case-insensitive filesystem in the 
case of String vs string...).


What version of CMake are you using? I'm pretty sure if CMake generated 
project files that way for you, it should have generated them that way 
for us too, unless there's a bug in the version of CMake you're using.


The other possibility - did you manually specify the include 
directories? If that's the case, then you should have specified the same 
directory (osg root/include) for all *_INCLUDE_DIR settings. Doing 
that in the CMake GUI and then regenerating should fix the problem too, 
without needing to remove include paths manually from the project files. 
This should perhaps be better documented.


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] [osgOcean] Problem building osgOcean in visual studio 9.0.

2010-02-04 Thread Jean-Sébastien Guay

Hi Chris,


By removing those two directories from the additional includes, osgOcean builds 
correctly.


Oh, and I forgot to mention - great work tracking this down, it was 
certainly not obvious what the problem was when considering only the 
compiler errors you posted :-)


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] [osgOcean] osgOcean Geometry

2010-02-04 Thread Peter Bear
Question, would that change make it possible to make a round earth using 
osgOcean. I noticed it talking about tiles in that post and it sparked my 
interest.

Cheers,
Peter

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





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


Re: [osg-users] [osgOcean] osgOcean Geometry

2010-02-04 Thread Tian Ma
Good work Kim! I have update the svn code! A little real-time |-) 
 :D 


Kim Bale wrote:
 Hi Paul,
 
 Yes you're right this is due to the rather inefficient method of updating the 
 surface primitives and vertices that osgOcean uses at the moment. Explained 
 here:
 
 
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-December/036735.html
  
 (http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-December/036735.html)
 
 
 Like I say in that post I have written a test case which significantly 
 improves the performance of this area but haven't actually added it into the 
 library code yet. This isn't helped by the fact that I keep forgetting to put 
 the test code on the svn so other people can't see the approach. However, I 
 WILL remember to do that tonight so if you want to see a solution for it you 
 can have a go. 
 
 
 I've done the hard bit, I just haven't had time to add it into the core 
 library code. If you check the sandbox directory on the svn later this 
 evening you can have a look. 
 
 
 Regards,
 
 
 Kim.
 
 
 
 On 4 February 2010 13:13, Paul Palumbo  () wrote:
 
  I'm running osgOcean and I'm only interested into ocean surface effects 
  (the geometry in particular). I also have a hard time limit on each frame 
  time. However, with osgOcean, I'm seeing some large spikes in processing 
  time that are causing me problems.
  
  In particular, I'm seeing the FFTOceanSurface::computeVertices routine 
  (called every 50ms) taking around 17-25ms per call and 
  FFTOceanSurface::computePrimitives routine (called when tile LOD changes) 
  taking 10-15ms and I'm looking for a way to make this more real-time. 
  These timing numbers are with osgOcean parameters using in the oceanExample 
  code.
  
  Could the ocean surface geometry be defined at initialization at the scene 
  graph level for each tile/frame rather than being redefined every 50ms as 
  it doing now. In computePrimitives, couldn't the geometry only need to be 
  regenerated for the times that changed LOD?
  
  Any advice would be appreciated.
  
  Thanks,
  Paul P.
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=23670#23670 
  (http://forum.openscenegraph.org/viewtopic.php?p=23670#23670)
  
  
  
  
  
  ___
  osg-users mailing list
   ()
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
  (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
  
 
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] Multipass Rending

2010-02-04 Thread Craig Lane
Hi,

Thanks for the tip.  Yes multiparenting is working a treat now.  It just took 
my brain a while to understand how to nest the groups correctly.  I am using 
the setRenderBinDetails() method on the osg::Group for setting the order of 
each rendering pass.  Works perfectly.

I did not use multi-camera's as I already have few RTT cameras.  Multiparenting 
seems nice and simple.

Cheers,
Craig
Formation Design Systems

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





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


Re: [osg-users] Example of geographical position

2010-02-04 Thread Tony Vasile
Shayne,
   What is the type of Entity and entityGrp in the following code snippet?

Along with Robert's suggestion, you can use the following code snippet to
place a vehicle on a spheroid that has VPB terrain, into the scenegraph.
You'll need osgSim and osg::EllipsoidModel to do this.

Entity-lat = 36.4;
Entity-lon = -115.015;
Entity-alt = GetHeightOnTerrain(Entity-
lat, Entity-lon);
entityGrp-addChild(Entity-transform);

double GetHeightOnTerrain(double lat, double lon)
{
   double X,Y,Z;
   double maxElevation = 13000 / 3.281;
   earth-convertLatLongHeightToXYZ(osg::DegreesToRadians(lat),
osg::DegreesToRadians(lon),maxElevation, X,Y,Z);
   double hat =
osgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain.get(),
osg::Vec3(X,Y,Z), -1);
   return (maxElevation - hat);
}

The earth is an osg::EllipsoidModel object and the terrain is a node
loaded in from the ive file build by VPB. The entity group node is simply
added to your scenegraph and you're ready to go.

Hopefully this will get you started...:)

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