Re: [osg-users] [osgPPU] osgPPU for image processing

2009-09-29 Thread Harash Sharma
Dear Mr. Art Tevs,

 I have been able to sort out the problem I posed yesterday, i.e., making 
the texture Image available for analysis / parameter determination. Similar to 
your osgPPU::UnitOutCapture, a class called UnitTextureTap is derived from 
osgPPU::UnitOut. It overrides the noticeFinishRendering where I store a copy of 
the last rendered texture into an image and give an interface to access this 
Image. I have tested it and seems to work fine for my application. In case this 
class will be useful to anyone else, I would be more than happy to contribute.

    Thanks for the kind support.

Regards


Harash.  





From: Art Tevs 
To: osg-users@lists.openscenegraph.org
Sent: Monday, September 28, 2009 3:04:19 PM
Subject: Re: [osg-users] [osgPPU] osgPPU for image processing

Hello Harash,


Harash Sharma wrote:
> 
> I have been able to incorporate osgPPU into my application. Image filtering 
> and color space conversions are working fine for a desired resolution that I 
> set at the beginning of the osgPPU Pipeline. 
> 

Nice to hear that the library is also used not only for rendering, but also for 
some online/offline computations/processing. 


> 
> 1. We require to carry out filtering at a higher resolution followed by sub 
> sampling. Can you suggest a method to sub-sample the image to a lower 
> resolution.
> 

Huh, I suppose there exists multiple works in the field of image processing 
which handles about sub-sampling. The straight forward implementation, which is 
enabled by default in osgPPU uses GL_LINEAR for filtering. Although it is very 
simple approach and is supported by the hardware, so is very fast, it suffers 
by not-preventing high frequency details very well. Yeah, it even may create 
some kind of aliasing artifacts, when subsampling high frequency data. Maybe 
using gaussian kernel, one can produce smoother subsampled images.
If you haven't done it yet, then take a look into the lecture slides about 
image resampling of princton university here:
http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/sampling/index.htm


> 
> 2. We need to stretch the contrast of the image. Earlier we were doing this 
> on CPU. We build a histogram of the image, identify the lower and higher gray 
> levels, followed by the pixel by pixel transformation of gray levels.
> 

Computing any kind of histogram on a GPU is not efficient, because this 
operation can not be parallelized. However if you just want to find the minimum 
and maximum value of your contrast, then I would propose to use custom build 
mipmaps for that. So you first transform your image into contrast 
representation, computing contrast for every pixel. Then you do the same thing 
as in the HDR example of osgPPU, where you build the mipmap of your image upto 
the 1x1 level. The mipmap will consist of two channels, the minimum and maximum 
value. 
At the end you read out the last level and use those both values to transform 
each pixel of the original image correspondigly. It seem this is almost the 
same thing as in the HDR example, so take a look there.

I hope, I was able to help.

regards,
art

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





___
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 WPF Questions

2009-09-29 Thread Rick Pingry
Hi,

I am interested in WPF development as well.  I have been playing around with 
the C++/CLI example to make a managed window.  It seemed to work ok, except 
when I tried running it in Release mode, in which case it kept crashing, 
apparently with some memory corruption errors.

I am using a relatively new snapshot from SVN for my OpenSceneGraph library.  I 
have been using it in C++ for quite some time now with not too many problems 
(none that this great community has not helped with so far) :)

I also started playing with OsgDotNet wrappers, but when I run it, it crashes 
trying to create the osgShadow wrapper.  I noticed that it was made for OSG 
2.0, so I downloaded that, but the download I had seems to be missing osgViewer 
in the include directories.

I would love to know how you are able to get the DotNet stuff working, in one 
of these options.  

Thank you!

Cheers,
Rick

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





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


Re: [osg-users] Terrain generator compatible with OSG

2009-09-29 Thread Martin Beckett
Sorry for the slight thread hijack - but does anyone know of a free artificial 
terrain builder that is in any way compatible with OSG?

I would just like some interesting looking terrain (mountains etc) to use when 
demoing some software - and because it's boring to be testing with the same 
sample surface all the time.

I used to have some toy software that would start with a flat plain and erode 
river valleys, run glaciers, create mountains etc - there must be something 
like that out there.

thanks
Martin

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





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


Re: [osg-users] osgconv IVE to OSG create DDS?

2009-09-29 Thread Chris 'Xenon' Hanson
Jean-Sébastien Guay wrote:
> I remember converting VPB databases from .ive to .osg to debug problems
> I was having or inspect the scene graph structure in the past, but I
> probably never output the textures while converting. I'll generally
> avoid loading a VPB database in .osg format because it takes ages... :-)

  Yes. The only reason to use .osg with VPB is that OSG databases are 
inter-version
compatible and .ive is not. So, we need to be able to long-term archive 
databases in .osg
format and convert them back to .ive as new versions of OSG break IVE 
compatibility.

> The ImageLayer class dates back to 2007 according to SVN logs so it's
> not a recent problem.

  And now, it is a fixed problem. I migrated over the OutputTextureFiles 
feature and it
seems to be working nicely.

  Aside: The real work I've been doing is making osgconv recursive on VPB-type 
databases
so that the scripting silliness of this procedure:
http://www.openscenegraph.org/projects/VirtualPlanetBuilder/wiki/CompressExisting
  is no longer needed.

> J-S

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgconv IVE to OSG create DDS?

2009-09-29 Thread Jean-Sébastien Guay

Hi Chris,


  So, apparently no one has ever tried using the OutputTextureFiles on 
OSGDEM/VPB terrain
databases or they'd have noticed it was unimplemented. ;)


I remember converting VPB databases from .ive to .osg to debug problems 
I was having or inspect the scene graph structure in the past, but I 
probably never output the textures while converting. I'll generally 
avoid loading a VPB database in .osg format because it takes ages... :-)


The ImageLayer class dates back to 2007 according to SVN logs so it's 
not a recent problem.


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] osgconv IVE to OSG create DDS?

2009-09-29 Thread Chris 'Xenon' Hanson
Paul Martz wrote:
> So it looks like if you "osgconv -O OutputTextureFiles in.ive out.osg"
> that should do the trick.

  Thanks for that tip. "It would have worked too, if it weren't for you 
meddling kids!"
Oh, sorry, wrong script.

  I beat my forehead a bit on this because it wasn't working, and finally put 
some
breakpoints in the .OSG Texture2D saver, only to find the OutputTextureFiles 
option code
in Texture2D was never hit. Turns out, some dissection of the OSGDEM-created 
.osg scene
file shows it does not use a Texture2D object, it uses something known as 
ImageLayer. The
.osg output code for ImageLayer (in osgPlugins/osgTerrain/ImageLayer.cpp,
ImageLayer_writeLocalData() ) does not support the OutputTextureFiles option.

  I confess I'm not really familiar with why ImageLayer is unrelated to 
Texture2D (it
seems like one would be a subclass of the other).

  My goal at this point is to try to migrate the OutputTextureFiles support 
from Texture2D
to ImageLayer, if that's something Robert feels is appropriate?

  So, apparently no one has ever tried using the OutputTextureFiles on 
OSGDEM/VPB terrain
databases or they'd have noticed it was unimplemented. ;)

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


-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::readNodeFIle and osg::Material

2009-09-29 Thread Miguel Lokida
Ok. So this mean that it is possible.
Thank you.

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





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


Re: [osg-users] osg::readNodeFIle and osg::Material

2009-09-29 Thread Paul Martz

You'll need to debug this yourself. Here's how.

After you add the Material and StateSet, dump out a node file and do the 
following:

 1) Check to make sure your Material and StateSet were added correctly.
 2) Look at child nodes and make sure they don't override the Material 
you set.
 3) Make sure other lighting-related state is correct. (E.g., make sure 
the scene graph isn't turning lighting off, has correct normals, etc.)


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



Miguel Lokida wrote:

Hello,

When using readNodeFile method to charge an object, I have try to set a material on this node ( creating a stateset, addinf the material  and attribute the stateset to the node). 
But, when it works for other geometry with readNodeFile, the material is not on the geometry. 
Is it possible to add a material when a node is created using readNodeFile ?


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





___
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] osg::readNodeFIle and osg::Material

2009-09-29 Thread Miguel Lokida
Hello,

When using readNodeFile method to charge an object, I have try to set a 
material on this node ( creating a stateset, addinf the material  and attribute 
the stateset to the node). 
But, when it works for other geometry with readNodeFile, the material is not on 
the geometry. 
Is it possible to add a material when a node is created using readNodeFile ?

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





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


Re: [osg-users] [osgPPU] osgPPU for image processing

2009-09-29 Thread Harash Sharma
Dear Mr. Art Tevs,

 Thanks for the informative reply. I was going thru your example codes and 
came accross "UnitInResampleOut" class. This happens to be exactly what I 
wanted. I can attach it to a unit that does all the prefiltering / High 
resolution processing and am able to resample image to a lower resolution. I 
have incorporated this unit and is working just fine. 
 
 Now I have another doubt. I want to access the texture attached to any 
Unit, do a pixel by pixel analysis and use the results in a shader while 
rendering the next frame. I have used the getOrCreateOutputTexture() function 
for the purpose. The problem now is that even though I am able to access the 
texture, the attached image is null. So I am unable to do a pixelwise 
computation. Can you please suggest a way out. This method I am planning to use 
for methods like histogram analysis of frame-N and use the results in 
Frame-(N+1)
 
Regards
 
Harash





From: Art Tevs 
To: osg-users@lists.openscenegraph.org
Sent: Monday, September 28, 2009 7:34:19 PM
Subject: Re: [osg-users] [osgPPU] osgPPU for image processing

Hello Harash,


Harash Sharma wrote:
> 
> I have been able to incorporate osgPPU into my application. Image filtering 
> and color space conversions are working fine for a desired resolution that I 
> set at the beginning of the osgPPU Pipeline. 
> 

Nice to hear that the library is also used not only for rendering, but also for 
some online/offline computations/processing. 


> 
> 1. We require to carry out filtering at a higher resolution followed by sub 
> sampling. Can you suggest a method to sub-sample the image to a lower 
> resolution.
> 

Huh, I suppose there exists multiple works in the field of image processing 
which handles about sub-sampling. The straight forward implementation, which is 
enabled by default in osgPPU uses GL_LINEAR for filtering. Although it is very 
simple approach and is supported by the hardware, so is very fast, it suffers 
by not-preventing high frequency details very well. Yeah, it even may create 
some kind of aliasing artifacts, when subsampling high frequency data. Maybe 
using gaussian kernel, one can produce smoother subsampled images.
If you haven't done it yet, then take a look into the lecture slides about 
image resampling of princton university here:
http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/sampling/index.htm


> 
> 2. We need to stretch the contrast of the image. Earlier we were doing this 
> on CPU. We build a histogram of the image, identify the lower and higher gray 
> levels, followed by the pixel by pixel transformation of gray levels.
> 

Computing any kind of histogram on a GPU is not efficient, because this 
operation can not be parallelized. However if you just want to find the minimum 
and maximum value of your contrast, then I would propose to use custom build 
mipmaps for that. So you first transform your image into contrast 
representation, computing contrast for every pixel. Then you do the same thing 
as in the HDR example of osgPPU, where you build the mipmap of your image upto 
the 1x1 level. The mipmap will consist of two channels, the minimum and maximum 
value. 
At the end you read out the last level and use those both values to transform 
each pixel of the original image correspondigly. It seem this is almost the 
same thing as in the HDR example, so take a look there.

I hope, I was able to help.

regards,
art

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





___
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] osgviewerQtWidget Quadbuffer Stereo & Alpha Problems

2009-09-29 Thread Scott Senften
Pierre,

Thanks for the response.  osgviewer works as expected.  It must be
something like you describe in the initialization.

Thanks

Scott

On Tue, Sep 29, 2009 at 2:50 AM, Pierre Bourdin (gmail)
 wrote:
> Hi Scott,
> does it works with osgviewer ?
>
> something like
>
> osgviewer --stereo QUAD_BUFFER cow.osg
>
> should display the cow in stereo without any error...
>
> Also I can't remember it exactly, but I think you have to re-init the
> context or something like this when switching to quadbuffer stereo...
> When switching in other stereo mode it is not necessary...
>
> Maybe others can be more helpful...
>
> Pierre.
>
> Le lundi 28 septembre 2009 à 17:42 -0500, Scott Senften a écrit :
>> HI all,
>>
>> I'm having two difficulties with osgviewerQtWidget on linux, and I was
>> hoping someone else may have already seen this and can give me some
>> insight as to my troubles.
>>
>> In main.cpp, I added the following lines to turn on quadbuffer stereo.
>>
>>
>>     QPointer myMainWindow = new testMainWin;
>>
>> #if DO_OUTBOARD_WINDOW
>>     QPointer mySecondaryWindow = new testOutboardWin;
>> #endif
>>
>>     /* added these 3 lines */
>>     osg::DisplaySettings* ds = osg::DisplaySettings::instance();
>>     ds->setStereo( true );
>>     ds->setStereoMode( osg::DisplaySettings::QUAD_BUFFER );
>>
>>   // The .ui file uses the "Promoted" widget, CompositeViewerQOSG
>>     osg::ref_ptr compositeViewer =
>> myMainWindow->ui.osgGraphicsArea;
>>
>>     osg::ref_ptr view1 = new ViewQOSG(
>> myMainWindow->ui.graphicsView1 );
>>     view1->setObjectName("ViewQOSG 1");
>>
>>
>> When I do so, I get the following warning/error
>>
>> Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,)
>>
>> quadbuffer stereo is anabled on the system and I have other OGL apps
>> that work as expected.  It appears that the context is valid but I
>> haven't been able to retrieve the visual it thinks it's using to see
>> if it's picked an appropriate one.
>>
>> ANAGLYPHIC stereo works as expected.
>>
>> My other issue is trying to get a visual with alpha.  Similarly...
>>
>>     QPointer myMainWindow = new testMainWin;
>>
>> #if DO_OUTBOARD_WINDOW
>>     QPointer mySecondaryWindow = new testOutboardWin;
>> #endif
>>
>>     /* added these two lines */
>>     osg::DisplaySettings* ds = osg::DisplaySettings::instance();
>>     ds->setMinimumNumAlphaBits( 1 );
>>
>>   // The .ui file uses the "Promoted" widget, CompositeViewerQOSG
>>     osg::ref_ptr compositeViewer =
>> myMainWindow->ui.osgGraphicsArea;
>>
>>     osg::ref_ptr view1 = new ViewQOSG(
>> myMainWindow->ui.graphicsView1 );
>>     view1->setObjectName("ViewQOSG 1");
>>
>>
>> This gives me
>>
>> X Error: BadMatch (invalid parameter attributes) 8
>>   Extension:    143 (Uknown extension)
>>   Minor opcode: 5 (Unknown request)
>>   Resource id:  0x6400026
>> Error: In Texture::Extensions::setupGLExtensions(..) OpenGL version
>> test failed, requires valid graphics context.
>> Segmentation fault
>>
>> which I'm assuming is because the context is either invalid or not current.
>>
>> If anyone has seen these problems and has some insight, I'd be
>> grateful for your experience.
>>
>> Thanks
>>
>> Scott
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
> Pierre BOURDIN
> I.M.E.R.I.R.
> Av. Pascot BP 90443
> 66004 PERPIGNAN
> tél: 04 68 56 84 95
> fax: 04 68 55 03 86
> email: bour...@imerir.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


Re: [osg-users] osgconv IVE to OSG create DDS?

2009-09-29 Thread Paul Martz
Hi Chris -- New feature for osgconv you should be aware of is the 
ability to write out plugin options:


>osgconv --format osg
Plugin osgPlugins-2.8.2/osgdb_osg.dll
{
ReaderWriter : OSG Reader/Writer
{
extensions : .osg  OpenSceneGraph Ascii file format
extensions : .osgs Psuedo OpenSceneGraph file 
loaded, with file encoded in filename string
options: OutputTextureFilesWrite out the texture images 
to file
options: precision Set the floating point 
precision when writing out files

}
}

So it looks like if you "osgconv -O OutputTextureFiles in.ive out.osg" 
that should do the trick.


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



Chris 'Xenon' Hanson wrote:

  I was just converting a VPB terrain scenegraph from IVE to OSG format, and I 
notice that
it didn't generate new .DDS texture files. Is there an option I'm missing to do 
this?


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


Re: [osg-users] osg volume features and the future?

2009-09-29 Thread Chris 'Xenon' Hanson
Jason Jerald wrote:
> Which of these features are currently implemented?  For those that are
> not yet implemented, are there plans to implement them?  Also what are
> your thoughts of integrating some vtk code into osg?

  I'm interested in this answer too, as I may have some volume work coming up.

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osg volume features and the future?

2009-09-29 Thread Jason Jerald
Hi Robert, we successfully got volumetric rendering working in OSG from 
dicom files and are quite impressed with the quality and performance.  
We are currently considering different options for our needs and OSG may 
very well be the answer.


I found the info on osgvolume at the following page:
http://www.openscenegraph.org/projects/osg/wiki/Community/Tasks/osgVolume

Which of these features are currently implemented?  For those that are 
not yet implemented, are there plans to implement them?  Also what are 
your thoughts of integrating some vtk code into osg?



Thanks,

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


[osg-users] osgconv IVE to OSG create DDS?

2009-09-29 Thread Chris 'Xenon' Hanson
  I was just converting a VPB terrain scenegraph from IVE to OSG format, and I 
notice that
it didn't generate new .DDS texture files. Is there an option I'm missing to do 
this?

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] change ocean height

2009-09-29 Thread Jean-Sébastien Guay

Hi again,

It works well, but with the skybox images that come with osgOcean, if 
you lower the ocean surface past a certain point you'll start seeing 
black. That's because the skydome images are cut off below the "normal" 
horizon, which should generally be z=0. This was not visible before, but 
now since we can lower the ocean, we can see it. I'll probably just 
modify the images so they have the same color as the last valid line 
below the normal horizon.


Err, sorry, I was mixed up with another project of mine. The 
oceanExample uses a skydome and not a skybox, but it's still the source 
of the black line you'll start seeing as you lower the ocean surface, 
because the dome only exists above z=0. I'll see about fixing that so 
the example looks better with the ocean surface at a height of less than 0.


Sorry for the confusion...

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] [3rdparty] change ocean height

2009-09-29 Thread Jean-Sébastien Guay

Hi again Sebastien,


I am sorry to bother you but did you work or are you still plannning to work on 
the aspect we talked in this thread ?


Well, I had some downtime while I waited for a big project to compile, 
so I decided to go ahead and do it. If you're using osgOcean SVN trunk, 
just update and you'll have the new methods in OceanScene.


It works well, but with the skybox images that come with osgOcean, if 
you lower the ocean surface past a certain point you'll start seeing 
black. That's because the skydome images are cut off below the "normal" 
horizon, which should generally be z=0. This was not visible before, but 
now since we can lower the ocean, we can see it. I'll probably just 
modify the images so they have the same color as the last valid line 
below the normal horizon.


You shouldn't see this problem in your own apps if you make a normal 
skydome/skybox where all sides can potentially be visible.


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] Terrain generator compatible with OSG

2009-09-29 Thread Chris 'Xenon' Hanson
Robert Osfield wrote:
> Hi Felipe,
> If you are needing to populate your world with lots of cultral data
> like roads, forests, rivers, towns, cars etc

  Robert, I'm curious, while working in VPB/OSGDEM I see some code intending to 
support
extrusion of polygons into buildings and something that looks like support for 
maybe
inserting models into the scenegraph. Can you clarify how far along those 
options are, and
if any of it is functional? If it's incomplete, I might keep my eyes open for a 
client who
would be open to underwriting finishing that functionality in the future. 
Currently I
don't know what is finished and works, and what isn't/doesn't.

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] change ocean height

2009-09-29 Thread Jean-Sébastien Guay

Hi Sebastien,


I am sorry to bother you but did you work or are you still plannning to work on 
the aspect we talked in this thread ?


Actually I did implement part of it in my project, and recently merged 
the changes back into osgOcean SVN trunk. The change is that the ocean 
surface is now under a MatrixTransform called _oceanTransform which is 
under the OceanScene, instead of being a straight child.


The problem is that I didn't expose any setter/getter for the 
MatrixTransform's Z height in OceanScene. I was getting to it, but 
didn't need it quite yet in my own projects, so it was lower on my 
priority list. If you want to add it, it should be pretty easy. Here's 
what you'll need to do:


1. void setOceanSurfaceHeight(double height)
  1a. will set the _oceanTransform to a translation matrix with height 
in Z.

  1b. will set _isDirty = true;
2. OceanScene::init() will need to set the clip planes for reflection 
and refraction to Z = _oceanTransform.getTrans().z() + 
_oceanSurface->getSurfaceHeight()
3. Also add a getter double getOceanSurfaceHeight() const that returns 
_oceanTransform.getTrans().z()


Once you've done that, you should be able to call 
setOceanSurfaceHeight(someValue) and it should work well. Also you could 
 add keys to the OceanScene event handler to be able to change the 
height interactively (perhaps '+' to raise it, '-' to lower would be nice).


Let me know how that works for you, and if you get something that works 
well, send me the changes and I'll merge them in.


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] [3rdparty] change ocean height

2009-09-29 Thread Sebastien Nerig
Hi Jean Sebastien

I am sorry to bother you but did you work or are you still plannning to work on 
the aspect we talked in this thread ?

Thank you

Sebastien

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





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


Re: [osg-users] [3rdparty] Is the osgOcean Linux bug still present?

2009-09-29 Thread Kim Bale
Hi gopal,


osgOcean assumes that you have downloaded the OSG sample datasets
(http://www.openscenegraph.org/projects/osg/wiki/Downloads/SampleDatasets)
and setup a path variable to it, like so:

setenv OSG_FILE_PATH  /home/myaccount/MyData/OpenSceneGraph-Data

see: http://www.openscenegraph.org/projects/osg/wiki/Support/GettingStarted

However that shouldn't cause a seg fault.

If you're using the version of osgOcean in the trunk, i should point
out that it was only just merged in by J-S, and I haven't had a chance
to test it properly yet, so there may be bugs which I don't know
about.


Regards,

Kim.



2009/9/29 gopal goenka :
> Hi,
>
> the osgOcean was built successfully
> but on running the oceanExample i got following error
> may i have missed some step.
> can somebody help me.please..
>
>
> [r...@localhost bin]# ./oceanExample --isNotChoppy
> Warning: font file "fonts/arial.ttf" not found.
> Warning: font file "fonts/arial.ttf" not found.
> Warning: font file "fonts/arial.ttf" not found.
> Building scene...
>  . Loading cubemaps: 0.349368s
>  . Generating ocean surface: 0.000247s
>  . Creating ocean scene: 0.00127s
>  . Loading islands: 0.098262s
>  . Setting up lighting: 4.4e-05s
> complete.
> Time Taken: 0.450368s
> Segmentation fault
>
>
>
> Thank you!
>
> Cheers,
> gopal :?
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=17708#17708
>
>
>
>
>
> ___
> 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] [3rdparty] Is the osgOcean Linux bug still present?

2009-09-29 Thread gopal goenka
Hi,

the osgOcean was built successfully
but on running the oceanExample i got following error
may i have missed some step.
can somebody help me.please..


[r...@localhost bin]# ./oceanExample --isNotChoppy
Warning: font file "fonts/arial.ttf" not found.
Warning: font file "fonts/arial.ttf" not found.
Warning: font file "fonts/arial.ttf" not found.
Building scene...
  . Loading cubemaps: 0.349368s
  . Generating ocean surface: 0.000247s
  . Creating ocean scene: 0.00127s
  . Loading islands: 0.098262s
  . Setting up lighting: 4.4e-05s
complete.
Time Taken: 0.450368s
Segmentation fault



Thank you!

Cheers,
gopal :?

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





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


Re: [osg-users] OSG Windows XP environment setup?? SOLVED

2009-09-29 Thread Montgomery, John T.
Useful tip - thanks, Robert.
:-)
John Montgomery
Medi-CAL Unit, CLSM, Polwarth Bldg., Forresterhill, Aberdeen AB25 2ZD.
Mob: 07592453757, Skype search: jmmp08
Web: http://www.abdn.ac.uk/JMVP/ | http://www.abdn.ac.uk/clsm/  |  
http://www.thevigils.co.uk/


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: 29 September 2009 09:39
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG Windows XP environment setup?? SOLVED

Hi John,

On Mon, Sep 28, 2009 at 3:36 PM, Montgomery, John T.
 wrote:
> Not clear why, but...
>
> Each time I was running from within C:\OSG_dev\OSG-Data and therefore, using 
> only 'introduction.p3d'
> However, running from 'C:\Documents and Settings' - thus requiring a 
> full-path for the input file - ' C:\OSG_dev\OSG-Data\introduction.p3d'
> It worked!

I'm not clear on why either... but my guess is that there must be a
difference in the current working directory setting or the
OSG_FILE_PATH env var that is being picked up in these different
instances.  Running with a full path will avoid the need for being in
the correct directory or having OSG_FILE_PATH set up.

One way to investigate these issues is to set the env var
OSG_NOTIFY_LEVEL to DEBUG and then run the app, and watch the output
to the console, as it'll list where it's looking for files.

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


The University of Aberdeen is a charity registered in Scotland, No SC013683.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to improve frame rate of my scene with lots ofcubes and cylinders?

2009-09-29 Thread Tomlinson, Gordon
Search the forums for things like LOD and Instancing, look at some of
the examples like osgforest

Make sure you build a balanced quad tree Scene graph tree ( again a
search of the archive and Google will yield plenty on balancing trees) 

See http://www.vis-sim.com/imgdp/vp_db_partion_01b.jpg a simple example
you don't want the bottom structure, you want the top but also with more
depth


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


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Maurizio Lodo
Sent: Tuesday, September 29, 2009 2:48 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] how to improve frame rate of my scene with lots
ofcubes and cylinders?

Hi,
I suppose you get many messages like this, so I apologise in advance.
My scene is made of cubes and cylinders generated using ShapeDrawable.
First I generate a large "cell" made of 1000 large cubes and up to 3000
cylinders and then a smaller "cell"  made of the same number of
elements, just smaller. Then I use osg::PositionAttitudeTransform to
place several (16 to 64) of these smaller cells inside one of the cubes
of the larger cell.  Unfortunately this seems to cause the frame rate to
drop to about 8 - 9, while the scene runs at about 120fps when section
with the small cells goes out of the screen. I followed a suggestion I
read on this forum and I tried to remove the use of
osg::PositionAttitudeTransform and draw all the elements of the several
smaller cells but this only makes the program take longer to load, but
once it's loaded it still runs at about the same frame rate.
I am just a beginner and I was wondering if any of you clever people can
give me a pointer in the right direction or indicate some useful
documents that my help me make this run a little faster.

Thank you very much in advance!

Cheers,
Maurizio

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





___
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] OSG_FEM

2009-09-29 Thread Ugras Erdogan
Hi David,
The answers 2 and 3 are the ones for which I am looking for. Thanks for the 
detailed answers. And additionally there is nothing wrong with your answers :). 
Probably I asked the question in a wrong way. Thanks again...
Best Regards,
Ugras





From: David Spilling 
To: OpenSceneGraph Users 
Sent: Tuesday, September 29, 2009 12:28:47 PM
Subject: Re: [osg-users] OSG_FEM

Hi Ugras,

What you ask is slightly strange, and I apologies if this reply appears too 
patronising - it isn't meant to be!

OSG is basically a rendering package; it just draws things. 

To try to interpret your question sensibly:

1) Can OSG import FEM meshes?

I imagine that if your mesher can export the mesh definition in a manner in 
which OSG can read it (i.e. in one of the many graphics formats that OSG 
supports) then you can display the mesh.

However note that all OSG formats are shells, not solids. Solid nodes, in the 
FE sense, don't really exist in graphics land.

2) Can OSG generate meshes?

There are a number of utilities within OSG that might give you a starting point 
for getting OSG to mesh objects (given the surface issue limitations described 
above); for example, the delauneytriangulator, or the tesselator, or the 
optimiser. However, I am not aware of any OSG plugins that perform meshing 
based on FEM rules.

Similarly, OSG doesn't natively know about constraints, or connectivity, 
between surfaces, unless it has somehow been built into the scenegraph.

3) Can OSG perform numerical analysis?

This, again, is something you would have to develop. OSG provides a simple 
library of vector/matrix operations, but decomposition and optimisation are not 
in the current methods. I would also suggest that, rather than extend OSG to 
cover these operations, you use freely available external high performance 
libraries to do this, e.g. linpack/blas etc.

4) Can OSG display FEM results (e.g. mode shapes)

Well, OSG can display anything you like, but the trick, again, would be to find 
some mutual compatible format. For example, you could use OSG to animate a 
model's vertices such that it shows the eigenfrequencies like a movie, but most 
of this would be programmatic, I imagine.

I hope that helps.

David



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


Re: [osg-users] OSG_FEM

2009-09-29 Thread David Spilling
Hi Ugras,

What you ask is slightly strange, and I apologies if this reply appears too
patronising - it isn't meant to be!

OSG is basically a rendering package; it just draws things.

To try to interpret your question sensibly:

1) Can OSG import FEM meshes?

I imagine that if your mesher can export the mesh definition in a manner in
which OSG can read it (i.e. in one of the many graphics formats that OSG
supports) then you can display the mesh.

However note that all OSG formats are shells, not solids. Solid nodes, in
the FE sense, don't really exist in graphics land.

2) Can OSG generate meshes?

There are a number of utilities within OSG that might give you a starting
point for getting OSG to mesh objects (given the surface issue limitations
described above); for example, the delauneytriangulator, or the tesselator,
or the optimiser. However, I am not aware of any OSG plugins that perform
meshing based on FEM rules.

Similarly, OSG doesn't natively know about constraints, or connectivity,
between surfaces, unless it has somehow been built into the scenegraph.

3) Can OSG perform numerical analysis?

This, again, is something you would have to develop. OSG provides a simple
library of vector/matrix operations, but decomposition and optimisation are
not in the current methods. I would also suggest that, rather than extend
OSG to cover these operations, you use freely available external high
performance libraries to do this, e.g. linpack/blas etc.

4) Can OSG display FEM results (e.g. mode shapes)

Well, OSG can display anything you like, but the trick, again, would be to
find some mutual compatible format. For example, you could use OSG to
animate a model's vertices such that it shows the eigenfrequencies like a
movie, but most of this would be programmatic, I imagine.

I hope that helps.

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


Re: [osg-users] [build] problem building OSG under ubuntu 7.04

2009-09-29 Thread Robert Osfield
Hi Aburik,

On Tue, Sep 29, 2009 at 5:08 AM, Aburik Mathnan  wrote:
> When i am trying to make osg in my ubuntu, it compiles well but when it is 
> linking i am getting lot of error releted to X11 and OpenGL referances. the 
> error are
>    undefined reference to 'XReparentWindow',
>    undefined reference to 'glMultMatrixd'
>    undefined reference to 'gluTessBeginContour'
>    etc..
> I am new to ubuntu, i dont know how to solve these. please can anyone help me 
> out.

You'll need to install the glu library and headers, and glx, and X11
libs and headers.

I don't recall in 7.04 has the libopenscenegraph package in it, it may
even have a list of build dependency package, but I'm afraid I don't
recall the details.  You could go have dig around.

The other alternative is to install the various dependencies, I'm a
Kubuntu user myself and wrote the following page to enumarate the
range of different dependencies that can be useful/essential to pull
in to build the OSG:

  
http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Debian-Dependencies

The names of repository package names do occasionally change so you
might need to tweak the names to get the right package.

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


Re: [osg-users] osgviewerQtWidget Quadbuffer Stereo & Alpha Problems

2009-09-29 Thread Pierre Bourdin (gmail)
Hi Scott,
does it works with osgviewer ?

something like 

osgviewer --stereo QUAD_BUFFER cow.osg

should display the cow in stereo without any error...

Also I can't remember it exactly, but I think you have to re-init the
context or something like this when switching to quadbuffer stereo...
When switching in other stereo mode it is not necessary...

Maybe others can be more helpful...

Pierre.

Le lundi 28 septembre 2009 à 17:42 -0500, Scott Senften a écrit :
> HI all,
> 
> I'm having two difficulties with osgviewerQtWidget on linux, and I was
> hoping someone else may have already seen this and can give me some
> insight as to my troubles.
> 
> In main.cpp, I added the following lines to turn on quadbuffer stereo.
> 
> 
> QPointer myMainWindow = new testMainWin;
> 
> #if DO_OUTBOARD_WINDOW
> QPointer mySecondaryWindow = new testOutboardWin;
> #endif
> 
> /* added these 3 lines */
> osg::DisplaySettings* ds = osg::DisplaySettings::instance();
> ds->setStereo( true );
> ds->setStereoMode( osg::DisplaySettings::QUAD_BUFFER );
> 
>   // The .ui file uses the "Promoted" widget, CompositeViewerQOSG
> osg::ref_ptr compositeViewer =
> myMainWindow->ui.osgGraphicsArea;
> 
> osg::ref_ptr view1 = new ViewQOSG(
> myMainWindow->ui.graphicsView1 );
> view1->setObjectName("ViewQOSG 1");
> 
> 
> When I do so, I get the following warning/error
> 
> Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,)
> 
> quadbuffer stereo is anabled on the system and I have other OGL apps
> that work as expected.  It appears that the context is valid but I
> haven't been able to retrieve the visual it thinks it's using to see
> if it's picked an appropriate one.
> 
> ANAGLYPHIC stereo works as expected.
> 
> My other issue is trying to get a visual with alpha.  Similarly...
> 
> QPointer myMainWindow = new testMainWin;
> 
> #if DO_OUTBOARD_WINDOW
> QPointer mySecondaryWindow = new testOutboardWin;
> #endif
> 
> /* added these two lines */
> osg::DisplaySettings* ds = osg::DisplaySettings::instance();
> ds->setMinimumNumAlphaBits( 1 );
> 
>   // The .ui file uses the "Promoted" widget, CompositeViewerQOSG
> osg::ref_ptr compositeViewer =
> myMainWindow->ui.osgGraphicsArea;
> 
> osg::ref_ptr view1 = new ViewQOSG(
> myMainWindow->ui.graphicsView1 );
> view1->setObjectName("ViewQOSG 1");
> 
> 
> This gives me
> 
> X Error: BadMatch (invalid parameter attributes) 8
>   Extension:143 (Uknown extension)
>   Minor opcode: 5 (Unknown request)
>   Resource id:  0x6400026
> Error: In Texture::Extensions::setupGLExtensions(..) OpenGL version
> test failed, requires valid graphics context.
> Segmentation fault
> 
> which I'm assuming is because the context is either invalid or not current.
> 
> If anyone has seen these problems and has some insight, I'd be
> grateful for your experience.
> 
> Thanks
> 
> Scott
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com


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


Re: [osg-users] Terrain generator compatible with OSG

2009-09-29 Thread Robert Osfield
Hi Felipe,

If you are needing to populate your world with lots of cultral data
like roads, forests, rivers, towns, cars etc. then you'll need a 3rd
party modeling program, or come up with your own scheme for inserting
the extra models onto to your prepared terrain.  Given you are doing a
final year project my guess is that you won't have a budget to
purchase software, and won't have much time for creating the art path
tools.  There is chance that some companies might provide student
licenses, so perhaps getting 3rd party tools won't be off limits.

Either way I would keep you core goals modest and achievable, and if
you are able to achieve them in the available time then elaborate
later.

Robert.

On Mon, Sep 28, 2009 at 7:12 PM, Felipe Lemus  wrote:
> Hi,
>
> Thanks both for your answers. Sorry, but I have been disconnected the last 
> week. I am doing my final year project. I have designed a multimodal 
> interface for control and monitor UAVs (Unmanned Aerial Vehicles). I have 
> many tools: Head Tracking, Touch screens, 3D sound, etc...
>
> But I want to design with OGS a scenario with a plane with a mobile camera 
> following a road in a 3D space and simulate a real situation for the station. 
> So I only need a 3D scenario with a road, and I will add models imported form 
> 3D studio like cars, trucks, etc...
>
> I am trying to install the programs that you recommended me, Jason. Thanks 
> for the help. All new ideas are welcome!!!
>
> Thank you!
>
> Cheers,
> Felipe
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=17687#17687
>
>
>
>
>
> ___
> 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 Windows XP environment setup?? SOLVED

2009-09-29 Thread Robert Osfield
Hi John,

On Mon, Sep 28, 2009 at 3:36 PM, Montgomery, John T.
 wrote:
> Not clear why, but...
>
> Each time I was running from within C:\OSG_dev\OSG-Data and therefore, using 
> only 'introduction.p3d'
> However, running from 'C:\Documents and Settings' - thus requiring a 
> full-path for the input file - ' C:\OSG_dev\OSG-Data\introduction.p3d'
> It worked!

I'm not clear on why either... but my guess is that there must be a
difference in the current working directory setting or the
OSG_FILE_PATH env var that is being picked up in these different
instances.  Running with a full path will avoid the need for being in
the correct directory or having OSG_FILE_PATH set up.

One way to investigate these issues is to set the env var
OSG_NOTIFY_LEVEL to DEBUG and then run the app, and watch the output
to the console, as it'll list where it's looking for files.

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


Re: [osg-users] [3rdparty] osgOcean collision detection

2009-09-29 Thread Kim Bale
Hi Dimitrios,

Glad to hear you got it working. I have a couple of further hints for you.

You may find that the accuracy is improved if you use _oldFrame
without the increment. The variable name is a little misleading as it
is actually stores the id for the current frame, if you look at the
update function in FFTOceanSurface it is assigned after the vertices
have been updated and is used purely to prevent updates of the
vertices if the frame hasn't changed. This does depend on whether
you're calling getHeight before or after that function is called.

You could also try using a bilinear interpolation between the four
closest vertices, There should be to copy the the interpolation
function in the MipmapData class which I use to smooth out the
vertices for the different mipmap levels.

Regards,

Kim.



2009/9/29 Dimitrios Filiagos :
> Hi,
>
> it seems to work fine but I am still testing. For big models of height 2.0 
> and more works fine, for smaller height models there are frames that goes  
> above water, just a little though and also on some other frames just below 
> the surface, especially on high wind speeds. This behavior might be correct 
> but I 'll try to make it more realistic. For bigger models the behavior is 
> OK. I am thinking of using the surface normal to calculate the models pitch 
> and roll, but it will take sometime .
>
>
> Thanks!
>
> Cheers,
> Dimitrios
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=17697#17697
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to improve frame rate of my scene with lots of cubes and cylinders?

2009-09-29 Thread Andrew Burnett-Thompson
Hi there, this is a quick response as i'm on my pda

If you look in the implementation of shapedrawable, drawcylinder
function, i believe the vertex locations for cylinders are calculated
on each draw, using sin and cos!

Also note the matrices for  positionattitudetransforms are computed per frame

You may be better off creating your own cylinder object with the
vertices pre calculated

Cheers, andrew

On 9/29/09, Maurizio Lodo  wrote:
> Hi,
> I suppose you get many messages like this, so I apologise in advance.
> My scene is made of cubes and cylinders generated using ShapeDrawable.
> First I generate a large "cell" made of 1000 large cubes and up to 3000
> cylinders and then a smaller "cell"  made of the same number of elements,
> just smaller. Then I use osg::PositionAttitudeTransform to place several (16
> to 64) of these smaller cells inside one of the cubes of the larger cell.
> Unfortunately this seems to cause the frame rate to drop to about 8 - 9,
> while the scene runs at about 120fps when section with the small cells goes
> out of the screen. I followed a suggestion I read on this forum and I tried
> to remove the use of osg::PositionAttitudeTransform and draw all the
> elements of the several smaller cells but this only makes the program take
> longer to load, but once it's loaded it still runs at about the same frame
> rate.
> I am just a beginner and I was wondering if any of you clever people can
> give me a pointer in the right direction or indicate some useful documents
> that my help me make this run a little faster.
>
> Thank you very much in advance!
>
> Cheers,
> Maurizio
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=17696#17696
>
>
>
>
>
> ___
> 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] [3rdparty] osgOcean collision detection

2009-09-29 Thread Dimitrios Filiagos
Hi,

it seems to work fine but I am still testing. For big models of height 2.0 and 
more works fine, for smaller height models there are frames that goes  above 
water, just a little though and also on some other frames just below the 
surface, especially on high wind speeds. This behavior might be correct but I 
'll try to make it more realistic. For bigger models the behavior is OK. I am 
thinking of using the surface normal to calculate the models pitch and roll, 
but it will take sometime .


Thanks!

Cheers,
Dimitrios

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





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