Re: [osg-users] [vpb] resuming vpb build, revisited :)

2010-06-09 Thread J.P. Delport

Hi,

On 08/06/10 17:52, Felix Morsdorf wrote:

Dear all,

I am a happy (and thus mostly quite user) of OSG since a number of years but 
now have run into a problem with VPB:

when generating a Pagedlod database with 10 subtiles regions, it will use the 
eight cores of my mac pro and build these tiles correctly, but will then fail 
to build the remaining two (which were scheduled to run when processors becomes 
idle, as far as I understood).

Trying to resume the build with the --tasks option fails as well and  in the 
log files I find this:

0.017: Adding terrainTile
0.067: DataSet::_run() 0 0
0.068: DataSet::assignDestinationCoordinateSystem() : assigning first 
source file as the destination coordinate system
0.068: started DataSet::createDestination(30)
0.068: Time for after_reproject 0.03
0.068: DataSet::assignDestinationCoordinateSystem() : assigning first 
source file as the destination coordinate system
0.069: AR=2.857143 C1=3 R1=1
0.069: createNewDestinationGraph
0.074: Time for _destinationGraph-computeMaximumSourceResolution() = 
0.00
0.074: Time for createDestinationGraph 0.005443
0.074: Time for after_computeNeighbours 0.09
0.074: completed DataSet::createDestination(30)
0.074: Error: no destination graph built, cannot proceed with build.
0.074: Elapsed time = 0.074030

Any idea on what I might be doing wrong ?


Can you give some more info on:
+ the command line you used for vpbmaster
+ your input file sizes and projections
+ versions of OSG/VPB



And : is there a way of limit the number of cores that VBP uses ?


Have a look at the --machines option. You can create a file that will 
run on local only with a given number of processes. I think there is an 
example of this on the VPB wiki. Other option is to edit the source of 
vpb :) Search for the message it prints out when finding the number of 
cores.


cheers
jp


Using all eight cores on my machine with one disk does not seem to make sense, 
since the single osgdem processes seem to hang quite often (Application not 
responding). If that is an I/O limitation, I'd like to use only four cores.

Thank you for this wonderful tool!

Cheers,
Felix

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





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



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


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


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


Re: [osg-users] DatabasePager performance problem

2010-06-09 Thread Robert Osfield
Hi Dieter,

On Tue, Jun 8, 2010 at 4:52 PM, PFEFFER Dieter  In my terrain
database I use satellite images and a generic water texture.
 In the highest LOD I can see many tiles which have all the same water
 texture (512x512); I suppose this texture, although it is identically for
 all water tiles, is loaded for every visible tile into the memory and the
 performance drops from 60 fps to 0.5 fps.

 Is it possible to force the databasePager to load the water texture only
 once ?

There isn't a scheme in the DatabasePager for removing duplicate
state, but there is the osgDB::SharedStateManager that you could
experiment with as this is it's role.  I'm afraid I'm not the author
or have actively used the later so I can't provide specific guidance
on this.

As for the idea that tiles with duplicate texture will cause
performance drop from 60fps to 0.5 fps, this does sound rather far
fetched.  VPB generates tiles that all have unique textures,
regardless of the contents and the OSG on a modern machine can happily
chug along at 60fps all day long.   If you have seeing a drop of
performance then it's unlikely to be the repeated sea textures at
fault, and I'd strongly suggest you look into why as it rather does
sound like your database is poorly conditioned for real-time use.

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


Re: [osg-users] physics and terrain

2010-06-09 Thread J.P. Delport

Hi,

think it's Paul Martz that did it:
http://code.google.com/p/osgbullet/

jp

On 09/06/10 01:11, Martin Naylor wrote:

Hello,
I must have unconsciously read that somewhere. I didn't even know Bullet
existed, not alone osgBullet ;)

Cheers
Martin.


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mathias
Buhr
Sent: 08 June 2010 19:13
To: OpenSceneGraph Users
Subject: Re: [osg-users] physics and terrain

Hi Martin,

sorry for the misunderstanding but I have no experience with osgBullet.
I've done the integration by myself. I'm sure there are more efficient
ways to integrate Bullet :)

Best regards
Mathias


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



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


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


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


Re: [osg-users] [vpb] resuming vpb build, revisited :)

2010-06-09 Thread Robert Osfield
Hi Felix,

Using the all the cores on a the master is a fallback for when you do
provide any information about the machines you want to use.  To
specify the machine setup you use the --machine mylocal.machines, then
set mylocal.machines to:

Machine
{
hostname localhost
processes 4
}

Then run vpbmaster.  As for osgdem hanging, there is good chance that
the build is just too big for a single osgdem run to handle as the
larger the portion of the database a single osgdem attempts to handle
the more memory it uses - the cause of this is the boundary
equalization requires neighbouring tiles to kept in memory.  vpbmaster
allows you to scale better by subdiving the complete database down
into small tasks.

Robert.

On Tue, Jun 8, 2010 at 4:52 PM, Felix Morsdorf
felix.morsd...@geo.uzh.ch wrote:
 Dear all,

 I am a happy (and thus mostly quite user) of OSG since a number of years but 
 now have run into a problem with VPB:

 when generating a Pagedlod database with 10 subtiles regions, it will use the 
 eight cores of my mac pro and build these tiles correctly, but will then fail 
 to build the remaining two (which were scheduled to run when processors 
 becomes idle, as far as I understood).

 Trying to resume the build with the --tasks option fails as well and  in the 
 log files I find this:

 0.017        : Adding terrainTile
 0.067        : DataSet::_run() 0 0
 0.068        : DataSet::assignDestinationCoordinateSystem() : assigning first 
 source file as the destination coordinate system
 0.068        : started DataSet::createDestination(30)
 0.068        : Time for after_reproject 0.03
 0.068        : DataSet::assignDestinationCoordinateSystem() : assigning first 
 source file as the destination coordinate system
 0.069        : AR=2.857143 C1=3 R1=1
 0.069        : createNewDestinationGraph
 0.074        : Time for _destinationGraph-computeMaximumSourceResolution() = 
 0.00
 0.074        : Time for createDestinationGraph 0.005443
 0.074        : Time for after_computeNeighbours 0.09
 0.074        : completed DataSet::createDestination(30)
 0.074        : Error: no destination graph built, cannot proceed with build.
 0.074        : Elapsed time = 0.074030

 Any idea on what I might be doing wrong ?

 And : is there a way of limit the number of cores that VBP uses ?
 Using all eight cores on my machine with one disk does not seem to make 
 sense, since the single osgdem processes seem to hang quite often 
 (Application not responding). If that is an I/O limitation, I'd like to use 
 only four cores.

 Thank you for this wonderful tool!

 Cheers,
 Felix

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





 ___
 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] DataPager issue

2010-06-09 Thread Robert Osfield
Hi Thomas,

You aren't specific about which version of the OSG you are talking
about so it's difficult to give any specific advice.  The best I can
suggest is that svn/trunk has a number of bug fixes/improvements to
DatabasePager that would make it worthy of updating to.

Robert.

On Wed, Jun 9, 2010 at 1:25 AM, Thomas Canipel thomas.cani...@gmail.com wrote:
 Hi,

  I was using the release of osg to perform some screenshot of a scene using 
 pbuffer . The memory usage was fine , but since I update to the last version 
 of osg I see memory problem, it seems that it come from the DataPager , When 
 I display my scene into an osgViewer the datapager act normally and release 
 the tiles that is not seen anymore , when I begin to use the pbo and creating 
 the screenshot by moving the camera , the memory is not release correctly , 
 seems taht the datapager doesnt release properly the tiles, I try to do it 
 manually but since ExpiryDelay is depracated I try to use Clear() on the 
 DataPager but I was surprise taht even by using getDataPager()-clear() no 
 memory was realeased...

 if you have an idea of whats going on ? i will try to break it into a small 
 test.

 Thank you!

 Cheers,
 Thomas

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





 ___
 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] DataPager issue

2010-06-09 Thread Thomas Canipel
hi,

 I was using the last trunk version of today ( i dont have the version number 
right now ...)  something really weird was happening because even by using a 
osgviewer and setting a large file the datapager was not working and was 
increasing the memory ... after removing  the environment variable OSG_RELEASE 
(the value was 1) the memory went back to normal. I still have the problem by 
using a pbuffer and moving the camera trough my scene the memory increase 
without control. What I do in this program basically is simple I set up a 
osgviewer with a scene reder in it , and use offscreen rendering to take 
screenshot of it (oscreencapture example), I move the camera to take my scene 
at a certain resolution.

I will try to provide a simple test tomorrow based on osgscreencapture example 
to show the increasing memory .

Thank you!

Cheers,
Thomas

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





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


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Michael Platings
This was just a bug brought in with the 3D Studio Max texturing features.
Now fixed :)

On 8 June 2010 09:08, Alessandro Terenzi a.tere...@gmail.com wrote:

 I'm trying the FBX plugin with some models with more than one material
 applied to a single mesh. I created a box and assigned it a different
 material to each face: 3 faces have a different texture (diffuse maps)  and
 the other 3 faces have a simple colored material (one red, one green and one
 blue).

 As far as I understood, the plugin currently manages to display multiple
 materials assigned to the same mesh, but if using more than one texture (for
 example 3 diffuse maps) then it doesn't work: only not-textured materials
 are displayed correctly while no texture is displayed or only one is
 displayed if assigned to a particular face).

 I'm sending a sample model to Michael only (it's 1MB). Any suggestion on
 how to proceed to add support to this kind of models?

 Thanks.
 Alessandro



 ___
 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] Camera highlighting

2010-06-09 Thread nikhil raprolu simha
Hi all,

I need to 
set up two cameras in my scene and highlight the region seen by a particular 
camera when seen thru the other camera.
Is there a simple way to do it?

Thanks,
Nikhil

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





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


Re: [osg-users] FBX Plugin: vertex animation support

2010-06-09 Thread Alessandro Terenzi
Hi,
as you know I wanted to try to add the possibility to read vertex animation
data from point cache files, so I started looking at existing code in order
to figure out where the integrations should be done. I have really basic
experience with animations in OSG, so I'd like to share my ideas with you
before doing anything.

First of all, looking at the FBX SDK doc it looks like that there are 3
ways *geometries can be deformed: using skinning, shapes, or vertex caches.
A vertex cache is a way to store directly the vertex animations inside a cache
file*. Looking at the existing code in osgfbx, I see that what is managed
so far are 'static', 'rigged' and 'morph' geomerty types that I guess
correspond to no animations or skinning and shapes deformers respectively. I
thought to add also another type (GEOMETRY_CACHE) corrensponding to
KFbxDeformer::eVERTEX_CACHE.

In the examples provided with the SDK there is the ViewScene example that
shows how to load point cache files (there are just 2 functions to use
almost in a straightforwar way: PreparePointCacheData() and
ReadVertexCacheData()).

Well, this is the easy part I guess. But then I don't know how to handle
that animation data...of course there are no bones for this kind of
animation, also there is just one shape (unlike morphing where I guess at
least 2 shapes are required) so I can just think about creating an
UpdateCallback that keeps reading animation data (of course loaded once
forever outside the application loop) and keeps updating vertex positions.

What do you think about this? Can you give me suggestions or point me to
other examples that do almost the same thing?

Thanks.
Alessandro

PS: along the ViewScene example there is a sample FBX file (Humanoid.FBX)
that I'll suggest you to check, it should contain at least skinning
animation, but is not played correctly.


On Mon, Jun 7, 2010 at 6:56 PM, Michael Platings mplati...@gmail.comwrote:

 I just tried opening the files you posted again in the FBX Quicktime Viewer
 and this time they work! It seems that having the files in the root of C:
 magically fixes it.
 Ideally osgfbx will be able to any file that the official viewer can, so if
 you can submit PC2/XML support then that would be very welcome :)

   On 7 June 2010 16:25, Alessandro Terenzi a.tere...@gmail.com wrote:


  On Mon, Jun 7, 2010 at 4:57 PM, Michael Platings mplati...@gmail.comwrote:

  Anyway, given that I'm not an expert Max user, I think that pc2/xml
 files are the only means used by FBX files (created by Max) to refer to
 cached animations data coming from the widely used Point Cache modifier.
 In other words I think that if we export a FBX from Max it is not possible
 to embed cached animation data into the FBX file, but we must refer to 
 one
 of those external files.


 There's no reason why that should be the case as FBX has full support for
 vertex animation. You're attacking this problem at the wrong point - get on
 the Max forums and ask how can I export this model so it animates in the
 official viewer?


 I agree, but there is also no reason to not support it :) because
 referring to external pc2/xml files is a feature that is available in the
 FBX format and so, for completeness' sake, it would be nice to support it in
 OSG even if there is another way to 'embed' the same cached animations data
 in the FBX file itself.

 Alessandro

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



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


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


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Alessandro Terenzi
Great!
Cheers.
Alessandro

On Wed, Jun 9, 2010 at 11:14 AM, Michael Platings mplati...@gmail.comwrote:

 This was just a bug brought in with the 3D Studio Max texturing features.
 Now fixed :)

   On 8 June 2010 09:08, Alessandro Terenzi a.tere...@gmail.com wrote:

  I'm trying the FBX plugin with some models with more than one material
 applied to a single mesh. I created a box and assigned it a different
 material to each face: 3 faces have a different texture (diffuse maps)  and
 the other 3 faces have a simple colored material (one red, one green and one
 blue).

 As far as I understood, the plugin currently manages to display multiple
 materials assigned to the same mesh, but if using more than one texture (for
 example 3 diffuse maps) then it doesn't work: only not-textured materials
 are displayed correctly while no texture is displayed or only one is
 displayed if assigned to a particular face).

 I'm sending a sample model to Michael only (it's 1MB). Any suggestion on
 how to proceed to add support to this kind of models?

 Thanks.
 Alessandro



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



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


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


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Raymond de Vries

Hi guys,

With great interest I am reading all the FBX related threads. I picked 
it myself and the first tests are working well. Thanks for your efforts!


Michael, you mention 3D Studio Max... Which version are you using? I 
have 3dsmax8 and 9 so I wonder if I can use these too.


Thanks
Raymond


On 6/9/2010 11:14 AM, Michael Platings wrote:
This was just a bug brought in with the 3D Studio Max texturing 
features. Now fixed :)


On 8 June 2010 09:08, Alessandro Terenzi a.tere...@gmail.com 
mailto:a.tere...@gmail.com wrote:


I'm trying the FBX plugin with some models with more than one
material applied to a single mesh. I created a box and assigned it
a different material to each face: 3 faces have a different
texture (diffuse maps)  and the other 3 faces have a simple
colored material (one red, one green and one blue).

As far as I understood, the plugin currently manages to display
multiple materials assigned to the same mesh, but if using more
than one texture (for example 3 diffuse maps) then it doesn't
work: only not-textured materials are displayed correctly while no
texture is displayed or only one is displayed if assigned to a
particular face).

I'm sending a sample model to Michael only (it's 1MB). Any
suggestion on how to proceed to add support to this kind of models?

Thanks.
Alessandro



___
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] Strange error only in debug mode

2010-06-09 Thread daniele argiolas
Thank you, I understand but how can I disable this VC errors?
Are an OSG bug?

Another error that breaks also in NodeCallback function is 
Access violation reading location 0xcdcdcdcd.

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





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


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Michael Platings
Hi Raymond, I'm not using 3D Studio but the plugin should read FBX files
exported from any version of any application. The test I apply is this - if
the official Autodesk FBX Quicktime Viewer can view an FBX file,
OpenSceneGraph should be able to view it just as well or better. For the
majority of files this is true, but if you find any that don't display
correctly please let me know and I'll do my best to get it fixed.
Cheers!

On 9 June 2010 10:35, Raymond de Vries ree...@xs4all.nl wrote:

  Hi guys,

 With great interest I am reading all the FBX related threads. I picked it
 myself and the first tests are working well. Thanks for your efforts!

 Michael, you mention 3D Studio Max... Which version are you using? I have
 3dsmax8 and 9 so I wonder if I can use these too.

 Thanks
 Raymond

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


Re: [osg-users] FBX Plugin: vertex animation support

2010-06-09 Thread Michael Platings
Thanks for your research Alessandro :)
Vertex caches sound like just another way to store morph geometry.
osgAnimation::MorphGeometry is just a series of 1 or more geometries (each
one stored in a MorphTarget) so in theory it should be as simple as loading
each bit of vertex cache geometry into a MorphTarget. I hope it proves that
simple!

On 9 June 2010 10:24, Alessandro Terenzi a.tere...@gmail.com wrote:

 Hi,
 as you know I wanted to try to add the possibility to read vertex animation
 data from point cache files, so I started looking at existing code in order
 to figure out where the integrations should be done. I have really basic
 experience with animations in OSG, so I'd like to share my ideas with you
 before doing anything.

 First of all, looking at the FBX SDK doc it looks like that there are 3
 ways *geometries can be deformed: using skinning, shapes, or vertex
 caches. A vertex cache is a way to store directly the vertex animations
 inside a cache file*. Looking at the existing code in osgfbx, I see that
 what is managed so far are 'static', 'rigged' and 'morph' geomerty types
 that I guess correspond to no animations or skinning and shapes deformers
 respectively. I thought to add also another type (GEOMETRY_CACHE)
 corrensponding to KFbxDeformer::eVERTEX_CACHE.

 In the examples provided with the SDK there is the ViewScene example that
 shows how to load point cache files (there are just 2 functions to use
 almost in a straightforwar way: PreparePointCacheData() and
 ReadVertexCacheData()).

 Well, this is the easy part I guess. But then I don't know how to handle
 that animation data...of course there are no bones for this kind of
 animation, also there is just one shape (unlike morphing where I guess at
 least 2 shapes are required) so I can just think about creating an
 UpdateCallback that keeps reading animation data (of course loaded once
 forever outside the application loop) and keeps updating vertex positions.

 What do you think about this? Can you give me suggestions or point me to
 other examples that do almost the same thing?

 Thanks.
 Alessandro

 PS: along the ViewScene example there is a sample FBX file (Humanoid.FBX)
 that I'll suggest you to check, it should contain at least skinning
 animation, but is not played correctly.


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


Re: [osg-users] Strange error only in debug mode

2010-06-09 Thread Alberto Luaces
daniele argiolas writes:

 Thank you, I understand but how can I disable this VC errors?
 Are an OSG bug?

You'd better not do that, because they point errors in *your* code. OSG
is accesing a node that you might have deleted from the heap. It could
work in Release mode because freed memory might not be overwritten and
by pure luck the data stays there. But that is undefined behaviour, so
the system can allocate new memory over that piece of data
anytime. Debug mode makes this clear erasing former data so it's evident
what is happening.

 Another error that breaks also in NodeCallback function is 
 Access violation reading location 0xcdcdcdcd.

Again, you have some bugs to remove in your code.

-- 
Alberto

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


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Raymond de Vries

Hi Michael,

Ok, I understand, thnx. I will try it out.

Cheers
Raymond


On 6/9/2010 12:13 PM, Michael Platings wrote:
Hi Raymond, I'm not using 3D Studio but the plugin should read FBX 
files exported from any version of any application. The test I apply 
is this - if the official Autodesk FBX Quicktime Viewer can view an 
FBX file, OpenSceneGraph should be able to view it just as well or 
better. For the majority of files this is true, but if you find any 
that don't display correctly please let me know and I'll do my best to 
get it fixed.

Cheers!

On 9 June 2010 10:35, Raymond de Vries ree...@xs4all.nl 
mailto:ree...@xs4all.nl wrote:


Hi guys,

With great interest I am reading all the FBX related threads. I
picked it myself and the first tests are working well. Thanks for
your efforts!

Michael, you mention 3D Studio Max... Which version are you using?
I have 3dsmax8 and 9 so I wonder if I can use these too.

Thanks
Raymond


___
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] Reduce size of Texture with respect to Viewport

2010-06-09 Thread Nitin Rangari
Hi All,

   How Can I display image or texture  very small
   with respect  to  viewport Size .

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


Re: [osg-users] Camera highlighting

2010-06-09 Thread nikhil raprolu simha
it is a 3d region

thanks for the info

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





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


Re: [osg-users] [osgPlugins] Porting FFMpeg to OSG 2.8.2

2010-06-09 Thread Jean-Sébastien Guay

Hello Vincent,


I was wondering if anyone has tried back porting ffmpeg to 2.8.2? Please advise.


We have used the ffmpeg plugin in OSG versions as old as 2.6 without 
problems (at least none I can recall now, so if we had any problems they 
must have been easy to fix).


In theory all you should have to do is copy the plugin's directory 
(src/osgPlugins/ffmpeg) to your OSG version's source tree, add that 
directory to src/osgPlugins/CMakeLists.txt, see if there is any Find* 
script for ffmpeg in the CMakeModules directory and if so, copy that 
too, and then run CMake to generate build files. Make sure Show 
advanced values is enabled in CMake and fill in any ffmpeg-related 
fields to point to your ffmpeg includes/libs. Then generate, build and 
install.


You might have to force OSG to use the ffmpeg plugin when using 
osgDB::readImageFile() by appending .ffmpeg to the end of the path to 
your movie. Or if you want to explicitly load something through the 
ffmpeg plugin, you could do this (untested):


  osgDB::ReaderWriter * reader =
osgDB::Registry::findReaderWriterForExtension(ffmpeg);
  osgDB::ReaderWriter::ReadResult rr =
reader-readImage(reading-streamURL);
  delete reader;

  if (!rr.validImage())
  {
 // Print warning that the image couldn't be read.
  }
  else
  {
osg::ref_ptrosg::Image image = rr.takeImage();
// Do something with it.
  }

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


[osg-users] Using osgAnimation for material animation?

2010-06-09 Thread Raymond de Vries

Hi everyone,

I would like to find a way to animate my material (amb, diff, spec, 
emiss), and more specifically for now: the alpha component. Now that 
osgAnimation is very useful I would like to implement this via 
osgAnimation. In the examples (svn) I don't see an example, or else I am 
overlooking it maybe.


Is there such an example? Or else what's the best way to animate the 
material colors?


Also, does anyone know a way to get an animated opacity from 3dsmax into 
osg?


thanks a lot
Raymond

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


Re: [osg-users] Using osgAnimation for material animation?

2010-06-09 Thread Serge Lages
Hi,

Have a look to the nathan.osg example file, one of the animations animates
the material.

Cheers,

On Wed, Jun 9, 2010 at 2:48 PM, Raymond de Vries ree...@xs4all.nl wrote:

 Hi everyone,

 I would like to find a way to animate my material (amb, diff, spec, emiss),
 and more specifically for now: the alpha component. Now that osgAnimation is
 very useful I would like to implement this via osgAnimation. In the examples
 (svn) I don't see an example, or else I am overlooking it maybe.

 Is there such an example? Or else what's the best way to animate the
 material colors?

 Also, does anyone know a way to get an animated opacity from 3dsmax into
 osg?

 thanks a lot
 Raymond

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




-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Using osgAnimation for material animation?

2010-06-09 Thread Raymond de Vries

Hi,

Ah, I did take a look at nathan but not close enough, obviously...

Any idea how to get it from 3dsmax?

thnx
Raymond


On 6/9/2010 2:51 PM, Serge Lages wrote:

Hi,

Have a look to the nathan.osg example file, one of the animations 
animates the material.


Cheers,

On Wed, Jun 9, 2010 at 2:48 PM, Raymond de Vries ree...@xs4all.nl 
mailto:ree...@xs4all.nl wrote:


Hi everyone,

I would like to find a way to animate my material (amb, diff,
spec, emiss), and more specifically for now: the alpha component.
Now that osgAnimation is very useful I would like to implement
this via osgAnimation. In the examples (svn) I don't see an
example, or else I am overlooking it maybe.

Is there such an example? Or else what's the best way to animate
the material colors?

Also, does anyone know a way to get an animated opacity from
3dsmax into osg?

thanks a lot
Raymond

___
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




--
Serge Lages
http://www.tharsis-software.com


___
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] Read texels from texture in GPU memory

2010-06-09 Thread Martin Aasen
Hi all!

I am currently rendering to a texture by attaching it to a camera as 
Camera::COLOR_BUFFER. 

Now I want to read data back to the CPU from this texture. I have looked at the 
examples and examined the forum, but I still don't understand how to do this.  

Can anyone please point me to the information I need or provide some code 
examples to get me started?

Cheers,
Martin

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





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


Re: [osg-users] DatabasePager performance problem

2010-06-09 Thread PFEFFER Dieter
Thanks Robert,

you are right - the duplicate texture cannot be the problem.

I will check the database structure. I guess that the water tiles are not paged.


Dieter 
 
 
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Wednesday, 09 June, 2010 09:46
To: OpenSceneGraph Users
Subject: Re: [osg-users] DatabasePager performance problem

Hi Dieter,

On Tue, Jun 8, 2010 at 4:52 PM, PFEFFER Dieter  In my terrain
database I use satellite images and a generic water texture.
 In the highest LOD I can see many tiles which have all the same water
 texture (512x512); I suppose this texture, although it is identically for
 all water tiles, is loaded for every visible tile into the memory and the
 performance drops from 60 fps to 0.5 fps.

 Is it possible to force the databasePager to load the water texture only
 once ?

There isn't a scheme in the DatabasePager for removing duplicate
state, but there is the osgDB::SharedStateManager that you could
experiment with as this is it's role.  I'm afraid I'm not the author
or have actively used the later so I can't provide specific guidance
on this.

As for the idea that tiles with duplicate texture will cause
performance drop from 60fps to 0.5 fps, this does sound rather far
fetched.  VPB generates tiles that all have unique textures,
regardless of the contents and the OSG on a modern machine can happily
chug along at 60fps all day long.   If you have seeing a drop of
performance then it's unlikely to be the repeated sea textures at
fault, and I'd strongly suggest you look into why as it rather does
sound like your database is poorly conditioned for real-time use.

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

Unclassified Mail


Disclaimer:

If you are not the intended recipient of this email, please notify the sender 
and delete it. 
Any unauthorized copying, disclosure or distribution of this email or its 
attachment(s) is forbidden. 
Thales Nederland BV will not accept liability for any damage caused by this 
email or its attachment(s). 
Thales Nederland BV is seated in Hengelo and is registered at the Chamber of 
Commerce under number 06061578.


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


Re: [osg-users] Read texels from texture in GPU memory

2010-06-09 Thread Tomlinson, Gordon
glReadPixels is one way you have to call something like glDrawBuffer
(GL_COLOR_ATTACHMENT0_EXT); when with FBO's  I think
( along time since I have done this )


Gordon Tomlinson
Product Manager 3d Technology  Project Wyvern
Overwatch(r)
An Operating Unit of Textron Systems
-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin
Aasen
Sent: Wednesday, June 09, 2010 9:33 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Read texels from texture in GPU memory

Hi all!

I am currently rendering to a texture by attaching it to a camera as
Camera::COLOR_BUFFER. 

Now I want to read data back to the CPU from this texture. I have looked
at the examples and examined the forum, but I still don't understand how
to do this.  

Can anyone please point me to the information I need or provide some
code examples to get me started?

Cheers,
Martin

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





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


Re: [osg-users] Read texels from texture in GPU memory

2010-06-09 Thread Frederic Bouvier
Hi Martin,

you can look at the osgprerender example when use_image is set. You attach an 
image to the camera and read the image data in a postdraw callback

-Fred

- Martin Aasen a écrit :

 Hi all!
 
 I am currently rendering to a texture by attaching it to a camera as
 Camera::COLOR_BUFFER. 
 
 Now I want to read data back to the CPU from this texture. I have
 looked at the examples and examined the forum, but I still don't
 understand how to do this.  
 
 Can anyone please point me to the information I need or provide some
 code examples to get me started?
 
 Cheers,
 Martin
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=28741#28741
 
 
 
 
 
 ___
 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] old QOSGWidget and new trunk Manipulators : mouse event problem

2010-06-09 Thread Eric Pouliquen
Hi all,

I'm using an old version of a CompositeViewerQOSG and QOSGWidget, modified for 
my needs, and as I switched to OSG trunk version to have good fbx animation 
behavior, my NodeTrackerManipulators seems to not receive mouse events at all...

I see that a lot of changes have been made on manipulators on trunk version, so 
there is somehting with this new code doing like handle function is never 
called :( What I don't  understand is that the example osgviewerQT 
--CompositeViewer runs well in the trunk version also...

I tried to uncomment the #ifndef WIN32 in QOSGWidget (I'm on Windows) to 
enable mousePressEvent function, but nothing changed.

Does anyone have any any about that ?

The behaviour is the same for any manipulator... 

Thanks

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





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


[osg-users] ffmpeg synchronisation

2010-06-09 Thread Michael Platings
I've been playing around with the ffmpeg plugin and I've been very impressed
with how capable it is. The only problem I have with it is that its playback
speed is decoupled from the timing of the main scene.
Does anyone know of an easy way to ensure that the time of the ffmpeg video
is consistent with the time of the FrameStamp?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Read texels from texture in GPU memory

2010-06-09 Thread Martin Aasen
Hi,

Thanks for the replies, guys! I think we are on to something, but I have to 
make myself a bit more clear. 

What I want is a function like

float getSample(Texture2D* tex, Vec2 pos),

which will return the float value stored in tex at pos (tex is a float 32 
texture with one component) on demand. I would also need a function that will 
read a subset of the texture, not only a single texel. I guess I want the 
functionality provided by osg::Image::readPixels, but I want to read from a 
specified texture, not the window frame buffer.

I don't want to transfere the full texture image from GPU to CPU on each frame, 
which is what I believe osgprerender does. Sorry for not making this clear from 
the start. Any ideas on how to do this?


Cheers,
Martin

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





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


Re: [osg-users] Read texels from texture in GPU memory

2010-06-09 Thread Frederic Bouvier
As far as I can tell, glGetTexImage retrieve the whole texture data.

If you want to read a subset of that, you'll have to read the framebuffer 
object with glReadBuffer/glReadPixels as suggested by Gordon.

-Fred

- Martin Aasen martin-ferstad.aa...@ffi.no a écrit :

 Hi,
 
 Thanks for the replies, guys! I think we are on to something, but I
 have to make myself a bit more clear. 
 
 What I want is a function like
 
 float getSample(Texture2D* tex, Vec2 pos),
 
 which will return the float value stored in tex at pos (tex is a float
 32 texture with one component) on demand. I would also need a function
 that will read a subset of the texture, not only a single texel. I
 guess I want the functionality provided by osg::Image::readPixels, but
 I want to read from a specified texture, not the window frame buffer.
 
 I don't want to transfere the full texture image from GPU to CPU on
 each frame, which is what I believe osgprerender does. Sorry for not
 making this clear from the start. Any ideas on how to do this?
 
 
 Cheers,
 Martin
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=28748#28748
 
 
 
 
 
 ___
 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] Small test program gets segmentation fault when doing own viewer loop in Qt environment

2010-06-09 Thread Zachary Hilbun
Hi,

I'm writing a small test program (source below) that is doing its own viewer 
loop.  This program runs fine if I run it using viewerWindow-show.  If I run 
it with my own viewer loop it crashes the fist time it calls frame with a 
Segmentation fault in osg::LightModel::apply (see stack trace below).

OSG v 2.8.1 
Qt 4 (Eclipse integration version 1.6.1) environment 
Linux using Eclipse in debug mode 

I got ViewerQT from the Qt integration example AdapterWidget.cpp. 

I got the viewer loop code from the Quick Start Guide.  I noticed some examples 
had viewerWindow-realize in them so I tried it with and without that.  It 
didn't make any difference.  

Any ideas of what the problem is?


ViewerQT*viewerWindow = new ViewerQT;

viewerWindow-setCameraManipulator (new osgGA::TrackballManipulator);
viewerWindow-setSceneData 
(osgDB::readNodeFile(/home/zacharyh/OpenSceneGraph-Data-2.8.0/cow.osg));


// display the scene graph /


#define loop

#ifndef loop

viewerWindow-show ();

#else

viewerWindow-getCamera ()-setProjectionMatrixAsPerspective (40., 1., 1., 60. 
* 36.);
// Create a matrix to specify a distance from the viewpoint.
osg::Matrix trans;
trans.makeTranslate (0., 0., 0.);

double angle (0.);  // Rotation angle (in radians)

viewerWindow-realize ();   // crashes with and without this

while ( ! viewerWindow-done ())
{ // do view loop
// Create the rotation matrix.
osg::Matrix rot;
rot.makeRotate (angle, osg::Vec3 (0., 0., 1.));
//  angle += 0.01;
// Set the view matrix (the concatenation of the rotation and
//   translation matrices).
viewerWindow-getCamera ()-setViewMatrix (rot * trans);
// Draw the next frame.
viewerWindow-frame ();
} // do view loop

#endif
a.connect (a, SIGNAL (lastWindowClosed ()), a, SLOT (quit ()));

return a.exec ();




gdb Debugger (6/9/10 10:15 AM) (Suspended)  
Thread [1] (Suspended: Signal 'SIGSEGV' received. Description: 
Segmentation fault.) 
18 osg::LightModel::apply(osg::State) const()  0x0027778a  
17 osg::State::applyAttribute()  0x002d33b0 
16 osg::State::applyAttributeList()  0x002d3613 
15 osg::State::apply()  0x002ce9b1  
14 osgUtil::RenderLeaf::render()  0x016f6b1e
13 osgUtil::RenderBin::drawImplementation()  0x016f0d13 
12 osgUtil::RenderStage::drawImplementation()  0x016f93c4   
11 osgUtil::RenderBin::draw()  0x016f09a0   
10 osgUtil::RenderStage::drawInner()  0x016f9776
9 osgUtil::RenderStage::draw()  0x016fd51d  
8 osgUtil::SceneView::draw()  0x017065af
7 osgViewer::Renderer::cull_draw()  0x00480cb0  
6 osgViewer::Renderer::operator()()  0x0047e208 
5 osg::GraphicsContext::runOperations()  0x0024b928 
4 osgViewer::ViewerBase::renderingTraversals()  0x004bfb42  
3 osgViewer::ViewerBase::frame()  0x004bd8dd
2 shotTrail() 
/home/zacharyh/workspace/osgViewerQt/ShotTrail.cpp:86 0x0805454d  
1 main() /home/zacharyh/workspace/osgViewerQt/main.cpp:40 
0x0805edf5


Thank you!

Cheers,
Zachary

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





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


Re: [osg-users] FBX Plugin: vertex animation support

2010-06-09 Thread Alessandro Terenzi
Hi Michael,
I've tried to use the same logic of morph geometry but the model couldn't be
loaded. I noticed that fbxMesh-GetShapeCount() returns 0 if the model
contains only point cached data while, I guess, if it were a kind of morph
geometry it should return at least 1, am I wrong? In this case maybe the
approach should be different...or maybe I'm still missing something...

Cheers.
Alessandro

On Wed, Jun 9, 2010 at 12:27 PM, Michael Platings mplati...@gmail.comwrote:

 Thanks for your research Alessandro :)
 Vertex caches sound like just another way to store morph geometry.
 osgAnimation::MorphGeometry is just a series of 1 or more geometries (each
 one stored in a MorphTarget) so in theory it should be as simple as loading
 each bit of vertex cache geometry into a MorphTarget. I hope it proves that
 simple!


 On 9 June 2010 10:24, Alessandro Terenzi a.tere...@gmail.com wrote:

 Hi,
 as you know I wanted to try to add the possibility to read vertex
 animation data from point cache files, so I started looking at existing code
 in order to figure out where the integrations should be done. I have really
 basic experience with animations in OSG, so I'd like to share my ideas with
 you before doing anything.

 First of all, looking at the FBX SDK doc it looks like that there are 3
 ways *geometries can be deformed: using skinning, shapes, or vertex
 caches. A vertex cache is a way to store directly the vertex animations
 inside a cache file*. Looking at the existing code in osgfbx, I see that
 what is managed so far are 'static', 'rigged' and 'morph' geomerty types
 that I guess correspond to no animations or skinning and shapes deformers
 respectively. I thought to add also another type (GEOMETRY_CACHE)
 corrensponding to KFbxDeformer::eVERTEX_CACHE.

 In the examples provided with the SDK there is the ViewScene example
 that shows how to load point cache files (there are just 2 functions to use
 almost in a straightforwar way: PreparePointCacheData() and
 ReadVertexCacheData()).

 Well, this is the easy part I guess. But then I don't know how to handle
 that animation data...of course there are no bones for this kind of
 animation, also there is just one shape (unlike morphing where I guess at
 least 2 shapes are required) so I can just think about creating an
 UpdateCallback that keeps reading animation data (of course loaded once
 forever outside the application loop) and keeps updating vertex positions.

 What do you think about this? Can you give me suggestions or point me to
 other examples that do almost the same thing?

 Thanks.
 Alessandro

 PS: along the ViewScene example there is a sample FBX file (Humanoid.FBX)
 that I'll suggest you to check, it should contain at least skinning
 animation, but is not played correctly.


 ___
 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] Small test program gets segmentation fault when doing own viewer loop in Qt environment

2010-06-09 Thread Paul Martz
LightModel::apply dereferences a pointer when it calls glLightModelfv to set the 
ambient scene color. Check under a debugger to see if that's a NULL pointer. If 
so, the way to resolve this would be to look at how it gets initialized in the 
rest of OSG, then duplicate that in your viewer.


My guess is that LightModel is part of default OSG state, and you're not setting 
it up the same way as OSG's viewers. But this is just a guess. You'd need to dig 
in the code.

   -Paul


Zachary Hilbun wrote:

Hi,

I'm writing a small test program (source below) that is doing its own viewer loop. 
 This program runs fine if I run it using viewerWindow-show.  If I run it with 
my own viewer loop it crashes the fist time it calls frame with a Segmentation 
fault in osg::LightModel::apply (see stack trace below).

OSG v 2.8.1 
Qt 4 (Eclipse integration version 1.6.1) environment 
Linux using Eclipse in debug mode 

I got ViewerQT from the Qt integration example AdapterWidget.cpp. 

I got the viewer loop code from the Quick Start Guide.  I noticed some examples had viewerWindow-realize in them so I tried it with and without that.  It didn't make any difference.  


Any ideas of what the problem is?


ViewerQT*viewerWindow = new ViewerQT;

viewerWindow-setCameraManipulator (new osgGA::TrackballManipulator);
viewerWindow-setSceneData 
(osgDB::readNodeFile(/home/zacharyh/OpenSceneGraph-Data-2.8.0/cow.osg));


// display the scene graph /


#define loop

#ifndef loop

viewerWindow-show ();

#else

viewerWindow-getCamera ()-setProjectionMatrixAsPerspective (40., 1., 1., 60. 
* 36.);
// Create a matrix to specify a distance from the viewpoint.
osg::Matrix trans;
trans.makeTranslate (0., 0., 0.);

double angle (0.);  // Rotation angle (in radians)

viewerWindow-realize ();// crashes with and without this

while ( ! viewerWindow-done ())
{ // do view loop
// Create the rotation matrix.
osg::Matrix rot;
rot.makeRotate (angle, osg::Vec3 (0., 0., 1.));
//  angle += 0.01;
// Set the view matrix (the concatenation of the rotation and
//   translation matrices).
viewerWindow-getCamera ()-setViewMatrix (rot * trans);
// Draw the next frame.
viewerWindow-frame ();
} // do view loop

#endif
a.connect (a, SIGNAL (lastWindowClosed ()), a, SLOT (quit ()));

return a.exec ();




gdb Debugger (6/9/10 10:15 AM) (Suspended)  
Thread [1] (Suspended: Signal 'SIGSEGV' received. Description: 
Segmentation fault.) 
18 osg::LightModel::apply(osg::State) const()  0x0027778a  
17 osg::State::applyAttribute()  0x002d33b0 
16 osg::State::applyAttributeList()  0x002d3613 
15 osg::State::apply()  0x002ce9b1  
14 osgUtil::RenderLeaf::render()  0x016f6b1e
13 osgUtil::RenderBin::drawImplementation()  0x016f0d13 
12 osgUtil::RenderStage::drawImplementation()  0x016f93c4   
11 osgUtil::RenderBin::draw()  0x016f09a0   
10 osgUtil::RenderStage::drawInner()  0x016f9776
9 osgUtil::RenderStage::draw()  0x016fd51d  
8 osgUtil::SceneView::draw()  0x017065af
7 osgViewer::Renderer::cull_draw()  0x00480cb0  
6 osgViewer::Renderer::operator()()  0x0047e208 
5 osg::GraphicsContext::runOperations()  0x0024b928 
4 osgViewer::ViewerBase::renderingTraversals()  0x004bfb42  
3 osgViewer::ViewerBase::frame()  0x004bd8dd
2 shotTrail() 
/home/zacharyh/workspace/osgViewerQt/ShotTrail.cpp:86 0x0805454d  
1 main() /home/zacharyh/workspace/osgViewerQt/main.cpp:40 
0x0805edf5


Thank you!

Cheers,
Zachary

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





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





--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Picking node with scaled positionattitudetransform as parent

2010-06-09 Thread Greg Myers
Hi,

I'm pretty new to OSG so I could be doing this totally wrong but...

I have a scene that contains the earth and a few (3ds) models.  Each model has 
a PositionAttitudeTransform as its parent.  I need to be able to pick each 
model using the mouse and I have successfully done that when my camera is close 
to these models.  However, when I zoom way out so that the models are just 
specks on the screen I have trouble picking them.  So, I tried scaling the 
models by calling setScale on the PositionAttitudeTransform node.  I can now 
see the models very well but I still cannot pick them.  I'm guessing that the 
intersect test is failing because it's not taking into account the scale.  Am I 
going about this whole thing the wrong way or is there something else I'm 
missing?

Any help or explanation is much appreciated.

I am using the technique in the osgpick example and I'm using OSG 2.8.2

Thank you!

Cheers,
Greg

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





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


Re: [osg-users] DataPager issue

2010-06-09 Thread Thomas Canipel
Hi robert, 

I have done a simple case using the osgscreencapture where there is a memory 
problem , here is the contents :

main , osgscreencapture (I had only one function to send back the image ) , and 
screenshot (which is a custom viewer (move the camera around the scene) )

the data for this example is in  object.rar (compose of a .osg file and all the 
ive files)

if you can play this example and help me to see why the memory increase it will 
be helpful .

link to download the model  (30MB): 
http://www.easy-share.com/1910872194/object.rar

Thank you!

Cheers,
Thomas

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





ScreenCaptureMemory.rar
Description: Binary data


ScreenCaptureMemory.rar
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] Small test program gets segmentation fault when doing own viewer loop in Qt environment

2010-06-09 Thread Zachary Hilbun
Hi,

Paul Martz:

I'm not surprised that this might be something uninitialized as that is what I 
was thinking.   What surprises me is that my code comes from existing examples 
so if my code is not working then the examples should not work either.  The 
only difference I can think of is that because I am using the ViewerQT viewer 
it is somehow not compatible with use of a viewer loop rather than just calling 
viewerWindow-show.  I'll look into seeing what might not be initialized.

Thank you!

Cheers,
Zachary

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





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


[osg-users] Rotating a vector

2010-06-09 Thread John Galt
Hi,

How do I rotate a vector by certain Roll, Pitch, Yaw angles?

Let us say I have a vector osg::Vec3d vector = new osg::Vec3d(10,10,5); 

How do I rotate this?


Thank you!

Cheers,
John

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





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


Re: [osg-users] OSG on Android ?

2010-06-09 Thread Jason Daly

David Glenn wrote:

Hi,

I got my HTC EVO toy this week and I'm already playing with the idea of making Android apps (with OpenGL ES ). 
I know that apps for android are mostly based on java, but I have to be the one to ask! 

Yea! I know! I Know!  |-) 


I know that there was an IPhone version in the works!
  



All I know is here: 


http://forum.openscenegraph.org/viewtopic.php?t=3046


Good luck!

--J

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


Re: [osg-users] Rotating a vector

2010-06-09 Thread Mike Wozniewski

You can make a quaternion from euler angles like this:

osg::Quat q = osg::Quat( pitch, osg::Vec3d(1,0,0),
 roll, osg::Vec3d(0,1,0),
 yaw, osg::Vec3d(0,0,1));

Then multiply your vector by the quat:

osg::Vec3d rotated = vector * q;



On 09/06/10 6:16 PM, John Galt wrote:

Hi,

How do I rotate a vector by certain Roll, Pitch, Yaw angles?

Let us say I have a vector osg::Vec3d vector = new osg::Vec3d(10,10,5);

How do I rotate this?


Thank you!

Cheers,
John

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





___
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] Draw polyline from vertex array

2010-06-09 Thread Manuel Garea
Hi,

I need to draw a polyline from an array of vertex, that is, I have an array of 
points, for example:

vertex[1] = (1,3,4)
vertex[2] = (7,4,0)
vertex[3] = (5,5,1)
vertex[4] = (1,2,9)

and I need to join them making a line strip:

For this I tried the following code, but it doest'n work, do someone know why 
it doesnt show anything???


Code:

osg::Vec3Array* vertices = .

osg::Geometry* geometry = new osg::Geometry;
geometry-setVertexArray(vertices); 
geometry-addPrimitiveSet(new osg::DrawArrays(GL_LINE_STRIP, 0, 
vertices-size())); 
geometry-setColorBinding(osg::Geometry::BIND_OVERALL); 

geode-addDrawable(geometry);



Thank you!

Cheers,
Manuel

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





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