Re: [osg-users] MetaFlight loader

2010-01-06 Thread Trajce Nikolov
Hi Guys,

I ve been thinking more about this and I come up with an idea of having
general purpose large db plugin that will use PageLOD. There are some
formats around nowdays like TerraPage, OpenFlight, MetaFlight (well, this
one is an xml and it works mostly with OpenFlight files). TerraPage has each
lod and each tile available in the archive, and I know there are some
approaches to have the similar schema with OpenFlight as well (both
TerraVista and Creator Terrain Studio can export each LOD of a tile
separately). So my idea is to make most of the TerraPage like handling
(Robert wrote the TileMapper needed for smart mesh management in the
TerraPage loader) available natively  for large database management of any
format. This includes proper tile management (similar to what is in in the
txp loader).

Another issue I discussed with Robert is memory pools for fast and small
allocations. I ve done some tests and the results are promising. Things like
vertices can be allocated from the pool and perhaps other objects that are
heavily used.

Thoughts?

Nick

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


On Sat, Dec 26, 2009 at 1:54 PM, Trajce Nikolov nikolov.tra...@gmail.comwrote:

 Hi Community,

 I started today with writing a metaflight loader. My plan is to do it like
 the TerraPage loader (with TileMapper, TileLoader). If you have some
 thoughts, hints, ideas, let me know, so I can implement them

 Cheers,

 Nick

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

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


Re: [osg-users] Drawable culling and near/far computation

2010-01-06 Thread Robert Osfield
Hi Paul,

Adding a Drawable::g/setCullingActive(bool) to be consistent with
osg::Node seems appropriate.

I also wound like to clean up the initial bound setting in Drawable to
improve the situtation of where we transform the points in a geometry
in the vertex shader to somewhere completely different than the
initial vertex array would suggest the object is. We current have the
Drawable::setInitialBound() but I'm not happy with this as it still
has the vertex position contributing to the final bounding volume.

As for toggling on/off the compute of the the near/far, I guess we
could add a bool into Drawable for this, but I'd rather not add more
bool checks than absolutely necessary.  Given we can use a cull
callback to cache and restore and for disabling the near/far compute
locally for subgraphs that we don't want to propagate the near/far
compute the actual need isn't critical.  The cull callback would
actually be more flexible as well, as you could disable the near/far
compute for a whole subgraph.

Robert.

On Tue, Jan 5, 2010 at 11:35 PM, Paul Martz pma...@skew-matrix.com wrote:
 Hi Robert and all -- I've ran into an interesting culling issue and wanted
 to raise it on the list in case someone thought there should be a code
 change.

 The issue is at CullVisitor.cpp line 746. This line of code causes a
 Drawable to be culled if compute near/far is on, and the call to
 updateCalculatedNearFar() returns false (because the Drawable bounds place
 it behind the viewpoint).

 I'm rendering a skydome with custom transformations in the vertex shader, so
 the host bounding box is really quite meaningless. I want to disable culling
 on the Drawable.

 There seems to be two ways to handle this:
  * Set a profoundly large initial bound. (This has the unfortunate side
 effect of slaughtering the near/far computation.)
  * Disable near/far computation just for this subgraph. I'm currently doing
 this with a custom Group node. In the traverse() method during cull. I
 disable compute near/far, traverse the subgraph, then restore the saved
 compute near/far mode. (Is there a better way to do this?)

 If I use either of the two options cited above, I feel compelled to add lots
 of explanatory comments, because it's not clear to future code maintainers
 that the reason I'm doing these things is to prevent culling from happening.

 In the presence of vertex and geometry shaders that do their own
 transformation, it seems like others could run into this same issue. I don't
 care whether there's an OSG code change or not, but wanted to mention the
 issue for consideration by others, future archive searches, etc.
 --
 Paul Martz
 Skew Matrix Software LLC
 _http://www.skew-matrix.com_ http://www.skew-matrix.com/
 +1 303 859 9466

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

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


Re: [osg-users] Error moving in Z-axis

2010-01-06 Thread Robert Osfield
Hi Wanger,

Right now osgWidget is designed as a 2D interface, rather than a full
3D object so the objects can't be moved around as flexibly as normal
3D objects in the scene.

The author of osgWidget, Jeremy Moles, has discussed work that has
been undertaking to refactor osgWidget to allow the widgets to be used
in more flexible way - including in a full 3D scene.  Please check
through the osg-users archive for discussion on this.

Robert.

On Wed, Jan 6, 2010 at 2:23 AM, Wagner Dias wagnerld...@gmail.com wrote:
 Hi,

     Let me explain better (sorry for my bad English!).
     My application has to let you walk over geometry and turn around using 
 mouse or joystick.
     I have to show the geometry and some images and boxes, but that can’t 
 move with geometry.
     In first version I just handle geometry. Using camera-setHomePosition 
 and basic math everything works.
     To put boxes (menu) and images I have to use osgWidget::WindowManager, 
 like I saw in examples. But WindowManager’s camera has a different behavior. 
 I can´t move it with setHomePosition or setViewMatrixAsLookAt.
     Then I did a new version moving the geometry, osg::Matrix::translate and 
 osg::Matrix::rotate, and not the camera. X-axis and Y-axis moving was easy, 
 but Z-axis not.
     I think Z-axis is a projection in 2D, then I set WindowManager to MASK_3D 
 and set setProjectionMatrixAsOrtho to replace setProjectionMatrixAsOrtho2D 
 defined in createParentOrthoCamera.
     Now I’m trying to know where is wrong.

 Thank you!

 Cheers,
 Wagner

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





 ___
 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] Need some help with osg Producer

2010-01-06 Thread Robert Osfield
Hi Brett,

I'm not familiar with osgHaptics but if it's open source it should be
relatively straight forward to port to osgViewer.

Robert.

On Wed, Jan 6, 2010 at 3:27 AM, Brett Thomas Lee brettle...@hotmail.com wrote:
 Hi,

    I am using a library, OsgHaptics which uses osgProducer.Now osgProducer is 
 replaced by osgViewer right. I am trying to compile osgProducer available 
 right now.But the library uses come other thing called producer(not 
 openproducer). Can some one help me where can I find this library??

 Thank you!

 Cheers,
 Brett

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





 ___
 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] New 3DS reader/writer is ready to test

2010-01-06 Thread Robert Osfield
Hi Simon,

On Wed, Jan 6, 2010 at 4:38 AM, Simon Armstrong nitrolo...@gmail.com wrote:
 This comes as a surprise.

 After reviewing contents of my OpenSceneGraph-2.9.6 directory including 
 license, readme and directory layout I find your statement a little matter of 
 fact considering the way in which this information has been disclosed.

In the src/osgPlugins/3ds directory there is a README that explains
the LGPL license, this README has been in place since the inception of
this plugin, nearly a decade now.  So the matter of fact is that I'm
not disclosing any new information that hasn't been available to
everybody since the very earliest days of the OSG project.

Now one could try and formalize the licensing of plugins, perhaps even
make it possible in CMake to select the license and prevent
compilation of the components that don't fit with that license.  I'm
not a Cmake guru so can't point to an clean and easy way to do this
right out the way, I'm open to suggest though.

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


Re: [osg-users] Native osgdb_bin format in progress (was: Develop a scalable binary file format for native OSG scenes)

2010-01-06 Thread Robert Osfield
Hi Wang,

Happy New Year!

On Wed, Jan 6, 2010 at 7:38 AM, Wang Rui wangra...@gmail.com wrote:
 I'd like to announce the latest progress of the new extensible
 ascii/binary native format,

Quick response... haven't looked at the code yet... but Whooo hooo! :-)

The changes sound all good developments, performance right on the
money too.  Support for xml sounds intriguing as well, it's something
that some users have requested before to aid interporability, and now
that we have the osgDB::XmlParser it's actually pretty easy to knock
together parsing of the files.

I'll get you testing your new code drop later this morning.

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


Re: [osg-users] MetaFlight loader

2010-01-06 Thread Robert Osfield
Hi Nick,

I'm not familiar with MetaFlight at all so can't comment on it
specifically, or the idea about making the functionality more general
until I know more about what you have in mind.  Are you thinking about
providing an extension to osgDB/osgSim/osgTerrain that provides the
framework for a 3rd party plugin to leverage to implement MetaFlight
etc?  Could you explain what you current class+plugin structure might
look like.

Cheers,
Robert.

On Wed, Jan 6, 2010 at 8:09 AM, Trajce Nikolov nikolov.tra...@gmail.com wrote:
 Hi Guys,
 I ve been thinking more about this and I come up with an idea of having
 general purpose large db plugin that will use PageLOD. There are some
 formats around nowdays like TerraPage, OpenFlight, MetaFlight (well, this
 one is an xml and it works mostly with OpenFlight files). TerraPage has each
 lod and each tile available in the archive, and I know there are some
 approaches to have the similar schema with OpenFlight as well (both
 TerraVista and Creator Terrain Studio can export each LOD of a tile
 separately). So my idea is to make most of the TerraPage like handling
 (Robert wrote the TileMapper needed for smart mesh management in the
 TerraPage loader) available natively  for large database management of any
 format. This includes proper tile management (similar to what is in in the
 txp loader).
 Another issue I discussed with Robert is memory pools for fast and small
 allocations. I ve done some tests and the results are promising. Things like
 vertices can be allocated from the pool and perhaps other objects that are
 heavily used.
 Thoughts?
 Nick

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


 On Sat, Dec 26, 2009 at 1:54 PM, Trajce Nikolov nikolov.tra...@gmail.com
 wrote:

 Hi Community,
 I started today with writing a metaflight loader. My plan is to do it like
 the TerraPage loader (with TileMapper, TileLoader). If you have some
 thoughts, hints, ideas, let me know, so I can implement them
 Cheers,
 Nick

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


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


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


Re: [osg-users] Write to texture file for lightning

2010-01-06 Thread J.P. Delport

Hi,

just flip to texture coordinates of the quad you are drawing in the RTT
camera.

jp

Dominic Stalder wrote:

Hi

if I attach the texture instead of the image it is working. But when I
call the methode renderToTexture right after osgViewer-setSceneData() I 
get the following error:


GraphicsWindowCarbon::grabFocusIfPointerInWindow

When I wait about 200 ms with an QTimer, it works but then I have the 
problem that the scene is not yet ready when it gets painted to the 
screen - ugly artefacts.


Another problem: how can I scale / mirror the texture directly? I know 
TexMat's but they need to be applied to an osg:Node and can not be 
applied to a osg:Texture2D?


Thanks a lot

Am 05.01.10 13:45, schrieb Dominic Stalder:

Hi

I solved the problem, the projection matrix was the problem. Now if I 
call the following method, ONE image is made successful, if I call it 
a second time, the image gets all black again. Do I have to clear or 
reset something in between?


void GameViewOSG::renderToTexture(ref_ptrNode node, 
ref_ptrTexture2D texture, Camera::BufferComponent buffer)

{
// just for testing
ref_ptrImage image = new Image;
image-allocateImage(osgViewer-width(), osgViewer-height(), 1, 
GL_RGBA, GL_UNSIGNED_BYTE); // TODO: maybe GL_UNSIGNED_BYTE


// sets the viewport of the texture camera
texCamera-setViewport(0, 0, osgViewer-width(), 
osgViewer-height());


// attaches the texture to the texture camera
// buffer component, texture, level, face, mip map generation, 
samples, color samples

//texCamera-attach(buffer, texture.get(), 0, 0, false, 4, 0);
texCamera-attach(buffer, image, 4, 0); // just for testing

// adds the node to the texture camera (this node will be rendered 
to the texture)

texCamera-addChild(node);

if (!root-containsNode(texCamera))
// adds the texture camera to the root node
root-addChild(texCamera);

osgViewer-frame();

// just for testing
osgDB::writeImageFile(*image, /Users/dst/Downloads/test.bmp);
}

Dominic

Am 05.01.10 07:23, schrieb J.P. Delport:

Hi,

have you tried writing the image in the camera callback? Maybe have a 
look at osgprerender and osgscreencapture.


jp

Dominic Stalder wrote:

Sorry for hesitating, but the time of our project is running ;-)

Someone any idea what I did wrong with the texture / image camera? 
Or is there a problem with the addChild hirarchy?


Thanks a lot

Am 03.01.10 12:05, schrieb Dominic Stalder:

Hi Ulrich

thanks a lot, big mistake ;-)

Now the color is not black any more, but it only takes the gl clear 
color of the the camera. Do I have to set some view matrices?


Dominic

Am 03.01.10 11:50, schrieb Ulrich Hertlein:

Hi Dominic,

a happy new year to you too.

On 2/01/10 10:00 PM, Dominic Stalder wrote:

 Image* image = new Image;
 image-allocateImage(osgViewer-width(), 
osgViewer-height(), 1,

GL_RGBA, GL_UNSIGNED_BYTE);

 // creates a new camera that will render into the image and 
sets the

rendering settings
 ref_ptrCamera  imgCamera = new Camera;
...
 imgCamera-addChild(rootLighting.get());

 root-addChild(imgCamera.get());

 osgDB::writeImageFile(*image, /Users/xyz/tmp/test.bmp);

It allocates the image with the right size (1400 x 736) and 
writes it to

disk. But the image is all black.
Did you omit some code between 'root-addChild()' and 
'writeImageFile'?  There should be a
call to render the frame (like 'osgViewer-frame()') otherwise the 
Image will remain black.



Does anybody see an error or what could be the problem? I also tried
with GL_INT instead of GL_UNSIGNED_BYTE but this didn't work too. Is
there a problem with the hirachy:

GL_U_B is fine, this will probably also give you better performance.

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





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





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







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



___
osg-users 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 

[osg-users] osg::Image::update

2010-01-06 Thread Trajce Nikolov
What is the purpose of this method. When it is called? I tried to implement
it in ImageStream but it is never been called? Any hints?
Nick

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


Re: [osg-users] osg::Image::update

2010-01-06 Thread Robert Osfield
Hi Nick,

On Wed, Jan 6, 2010 at 10:01 AM, Trajce Nikolov
nikolov.tra...@gmail.com wrote:
 What is the purpose of this method. When it is called? I tried to implement
 it in ImageStream but it is never been called? Any hints?

It's used by the osg::ImageSequence subclass from ImageStream, but
most ImageStream subclasses don't use this as they have their own
threads for reading.  ImageSequence by contrast uses an external
thread (the osgDB::ImagePager) to do reading.

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


Re: [osg-users] Write to texture file for lightning

2010-01-06 Thread Dominic Stalder

Hi jp

thanks, but I'm using the texture directly in my shader so I don't use a 
geometry. Don't ask me how I resolved all the problem, but now it works 
(crossing my fingers) ;-) For the rotation I used a Matrix and a 
MatrixTransform, added the node (which gets rendered to texture) and 
added this MatrixTransform to the texture camera.


Thanks all you guys for the patient help!

Dominic

Am 06.01.10 10:57, schrieb J.P. Delport:

Hi,

just flip to texture coordinates of the quad you are drawing in the RTT
camera.

jp

Dominic Stalder wrote:

Hi

if I attach the texture instead of the image it is working. But when I
call the methode renderToTexture right after 
osgViewer-setSceneData() I get the following error:


GraphicsWindowCarbon::grabFocusIfPointerInWindow

When I wait about 200 ms with an QTimer, it works but then I have the 
problem that the scene is not yet ready when it gets painted to the 
screen - ugly artefacts.


Another problem: how can I scale / mirror the texture directly? I 
know TexMat's but they need to be applied to an osg:Node and can not 
be applied to a osg:Texture2D?


Thanks a lot

Am 05.01.10 13:45, schrieb Dominic Stalder:

Hi

I solved the problem, the projection matrix was the problem. Now if 
I call the following method, ONE image is made successful, if I call 
it a second time, the image gets all black again. Do I have to clear 
or reset something in between?


void GameViewOSG::renderToTexture(ref_ptrNode node, 
ref_ptrTexture2D texture, Camera::BufferComponent buffer)

{
// just for testing
ref_ptrImage image = new Image;
image-allocateImage(osgViewer-width(), osgViewer-height(), 1, 
GL_RGBA, GL_UNSIGNED_BYTE); // TODO: maybe GL_UNSIGNED_BYTE


// sets the viewport of the texture camera
texCamera-setViewport(0, 0, osgViewer-width(), 
osgViewer-height());


// attaches the texture to the texture camera
// buffer component, texture, level, face, mip map generation, 
samples, color samples

//texCamera-attach(buffer, texture.get(), 0, 0, false, 4, 0);
texCamera-attach(buffer, image, 4, 0); // just for testing

// adds the node to the texture camera (this node will be 
rendered to the texture)

texCamera-addChild(node);

if (!root-containsNode(texCamera))
// adds the texture camera to the root node
root-addChild(texCamera);

osgViewer-frame();

// just for testing
osgDB::writeImageFile(*image, /Users/dst/Downloads/test.bmp);
}

Dominic

Am 05.01.10 07:23, schrieb J.P. Delport:

Hi,

have you tried writing the image in the camera callback? Maybe have 
a look at osgprerender and osgscreencapture.


jp

Dominic Stalder wrote:

Sorry for hesitating, but the time of our project is running ;-)

Someone any idea what I did wrong with the texture / image camera? 
Or is there a problem with the addChild hirarchy?


Thanks a lot

Am 03.01.10 12:05, schrieb Dominic Stalder:

Hi Ulrich

thanks a lot, big mistake ;-)

Now the color is not black any more, but it only takes the gl 
clear color of the the camera. Do I have to set some view matrices?


Dominic

Am 03.01.10 11:50, schrieb Ulrich Hertlein:

Hi Dominic,

a happy new year to you too.

On 2/01/10 10:00 PM, Dominic Stalder wrote:

 Image* image = new Image;
 image-allocateImage(osgViewer-width(), 
osgViewer-height(), 1,

GL_RGBA, GL_UNSIGNED_BYTE);

 // creates a new camera that will render into the image 
and sets the

rendering settings
 ref_ptrCamera  imgCamera = new Camera;
...
 imgCamera-addChild(rootLighting.get());

 root-addChild(imgCamera.get());

 osgDB::writeImageFile(*image, /Users/xyz/tmp/test.bmp);

It allocates the image with the right size (1400 x 736) and 
writes it to

disk. But the image is all black.
Did you omit some code between 'root-addChild()' and 
'writeImageFile'?  There should be a
call to render the frame (like 'osgViewer-frame()') otherwise 
the Image will remain black.


Does anybody see an error or what could be the problem? I also 
tried
with GL_INT instead of GL_UNSIGNED_BYTE but this didn't work 
too. Is

there a problem with the hirachy:
GL_U_B is fine, this will probably also give you better 
performance.


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





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





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







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






Re: [osg-users] osg::Image::update

2010-01-06 Thread Trajce Nikolov
I am trying to do some more work with the directshow plugin, to implement
the loop mode. The rendering is done in the back by directshow so I need
some hook to test for completition

Nick

http://www.linkedin.com/in/tnick
Sent from Devlet, Ankara, Turkey

On Wed, Jan 6, 2010 at 12:16 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Wed, Jan 6, 2010 at 10:01 AM, Trajce Nikolov
 nikolov.tra...@gmail.com wrote:
  What is the purpose of this method. When it is called? I tried to
 implement
  it in ImageStream but it is never been called? Any hints?

 It's used by the osg::ImageSequence subclass from ImageStream, but
 most ImageStream subclasses don't use this as they have their own
 threads for reading.  ImageSequence by contrast uses an external
 thread (the osgDB::ImagePager) to do reading.

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

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


Re: [osg-users] osg::Image::update

2010-01-06 Thread Robert Osfield
Hi Nick,

On Wed, Jan 6, 2010 at 10:48 AM, Trajce Nikolov
nikolov.tra...@gmail.com wrote:
 I am trying to do some more work with the directshow plugin, to implement
 the loop mode. The rendering is done in the back by directshow so I need
 some hook to test for completition

Currently there isn't any callback system for informing client apps
that the image has been updated, so the only way right now is to watch
the image modifiedCount to see if it's been updated.  This is crude
but if you do it once per frame it probably isn't too bad, just a bit
clumsy.

The other route is add a callback mechanism into osg::ImageStream to
allow plugins to pass events such as image updated back to the client
application.  Feel free to come up with such a change :-)

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


Re: [osg-users] osg::Image::update

2010-01-06 Thread Trajce Nikolov
Nick

http://www.linkedin.com/in/tnick
Sent from Devlet, Ankara, Turkey

On Wed, Jan 6, 2010 at 12:53 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Wed, Jan 6, 2010 at 10:48 AM, Trajce Nikolov
 nikolov.tra...@gmail.com wrote:
  I am trying to do some more work with the directshow plugin, to implement
  the loop mode. The rendering is done in the back by directshow so I need
  some hook to test for completition

 Currently there isn't any callback system for informing client apps
 that the image has been updated, so the only way right now is to watch
 the image modifiedCount to see if it's been updated.  This is crude
 but if you do it once per frame it probably isn't too bad, just a bit
 clumsy.


as is at present, talking about the directshow plugin, this will not do the
job



 The other route is add a callback mechanism into osg::ImageStream to
 allow plugins to pass events such as image updated back to the client
 application.  Feel free to come up with such a change :-)


ok



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

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


Re: [osg-users] osg::Image::update

2010-01-06 Thread Trajce Nikolov
Hi Robert,

what I did here is I launch observer thread that checks for that. Simple and
working. How to submit the update?

Nick

http://www.linkedin.com/in/tnick
Sent from Devlet, Ankara, Turkey

On Wed, Jan 6, 2010 at 12:59 PM, Trajce Nikolov nikolov.tra...@gmail.comwrote:


 Nick

 http://www.linkedin.com/in/tnick
 Sent from Devlet, Ankara, Turkey

 On Wed, Jan 6, 2010 at 12:53 PM, Robert Osfield 
 robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Wed, Jan 6, 2010 at 10:48 AM, Trajce Nikolov
 nikolov.tra...@gmail.com wrote:
  I am trying to do some more work with the directshow plugin, to
 implement
  the loop mode. The rendering is done in the back by directshow so I need
  some hook to test for completition

 Currently there isn't any callback system for informing client apps
 that the image has been updated, so the only way right now is to watch
 the image modifiedCount to see if it's been updated.  This is crude
 but if you do it once per frame it probably isn't too bad, just a bit
 clumsy.


 as is at present, talking about the directshow plugin, this will not do the
 job



 The other route is add a callback mechanism into osg::ImageStream to
 allow plugins to pass events such as image updated back to the client
 application.  Feel free to come up with such a change :-)


 ok



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



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


Re: [osg-users] [osgOcean] wave generator

2010-01-06 Thread Kim Bale
Kim,

This is to some extent what already happens with the mipmapping LOD that
osgOcean currently uses.

The problem is that the multi-res surface is dependant on the position of
the camera and not on local features. The code to recompute the surface
primitives is already pretty complicated, to do it based on both camera
position and local features would be a nightmare (if at all possible).

One way to address this would be to increase the resolution of the highest
level of detail and only apply the iwave algorithm to tiles in close
proximity to the camera.

K.

2010/1/5 Trajce Nikolov nikolov.tra...@gmail.com

 ok. I will have a look

  It is however a pretty expensive effect and the resolution of the ocean
 has to be increased

 How about having multi-res ocean, what I mean to have it tiled with
 different res on each tile

 Nick

 http://www.linkedin.com/in/tnick
 Sent from Devlet, Ankara, Turkey

 On Tue, Jan 5, 2010 at 12:10 PM, Kim Bale kcb...@googlemail.com wrote:

 Hi Nick,

 It isn't support in osgOcean at the moment. However, Tessendorf discusses
 a technique called iwave which can be used to create localised wave
 deformation in conjunction with the FFT ocean technique. You can read about
 it here:

 http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf

 I had a student implement it in an ogl app a while back and the effect was
 quite good. It is however a pretty expensive effect and the resolution of
 the ocean has to be increased rather a lot otherwise its very chunky.

 http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf
 K.


 2010/1/5 Trajce Nikolov nikolov.tra...@gmail.com

 Hi gurus,

 Is it possible to have a wave generator at specific position in the
 ocean? Like the rear or front of the boat, rain drops .. etc ..?
 Nick

 http://www.linkedin.com/in/tnick
 Sent from Izmit, 41, Turkey

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



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



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


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


Re: [osg-users] [osgOcean] wave generator

2010-01-06 Thread Kim Bale
 Kim,

*ahem*

Replying to myself there for some reason..

K.


2010/1/6 Kim Bale kcb...@googlemail.com

 Kim,

 This is to some extent what already happens with the mipmapping LOD that
 osgOcean currently uses.

 The problem is that the multi-res surface is dependant on the position of
 the camera and not on local features. The code to recompute the surface
 primitives is already pretty complicated, to do it based on both camera
 position and local features would be a nightmare (if at all possible).

 One way to address this would be to increase the resolution of the highest
 level of detail and only apply the iwave algorithm to tiles in close
 proximity to the camera.

 K.

 2010/1/5 Trajce Nikolov nikolov.tra...@gmail.com

 ok. I will have a look

  It is however a pretty expensive effect and the resolution of the ocean
 has to be increased

 How about having multi-res ocean, what I mean to have it tiled with
 different res on each tile

 Nick

 http://www.linkedin.com/in/tnick
 Sent from Devlet, Ankara, Turkey

 On Tue, Jan 5, 2010 at 12:10 PM, Kim Bale kcb...@googlemail.com wrote:

 Hi Nick,

 It isn't support in osgOcean at the moment. However, Tessendorf discusses
 a technique called iwave which can be used to create localised wave
 deformation in conjunction with the FFT ocean technique. You can read about
 it here:

 http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf

 I had a student implement it in an ogl app a while back and the effect
 was quite good. It is however a pretty expensive effect and the resolution
 of the ocean has to be increased rather a lot otherwise its very chunky.

 http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf
 K.


 2010/1/5 Trajce Nikolov nikolov.tra...@gmail.com

 Hi gurus,

 Is it possible to have a wave generator at specific position in the
 ocean? Like the rear or front of the boat, rain drops .. etc ..?
 Nick

 http://www.linkedin.com/in/tnick
 Sent from Izmit, 41, Turkey

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

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



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



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



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


Re: [osg-users] [osgPlugins] Rendering 3DS objects with bump maps

2010-01-06 Thread Eduardo Pinheiro
Hi,

Sorry the late answer but i was out.

Well I have some question, in fact:

  - I have my 3D Max Team

How is the better way to export they're work to openscenegraphic?

Imagine this simple object: A bottle of glass.

They make the 3d object. 
They make the textures
They make the bump of the bottle (bottle label for example)
They make the transparency
They make the reflex
The make the render

At this moment they are exporting to me:

 - The 3d object in .obj way (because the .fbx plugin its only available in 
2.9.6 release - i believe)

- The textures in .tga files

But the rest, how can i use they're work in order to have the same object with 
a similar transparency, reflex and render? I have to do everything by code? 

I hope you can understand what i'm trying to say.

Thanks.

Eduardo








... 

Thank you!

Cheers,
Eduardo

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





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


[osg-users] VBO's and masking/updating geometry

2010-01-06 Thread Otto Cologne
Hi,

I'm in the process of rewriting a program I did earlier but this time using 
OSG. One part contained rendering a large amount of lines which would be 
selected by various selection tools. For that I used VBO's and a bit mask. The 
rendering function (after all the initializations) then looked like this


Code:

for ( int i = 0; i  m_countLines; ++i )
{
if ( m_selected[i] )
glDrawArrays( GL_LINE_STRIP, getStartIndexForLine( i ), 
getPointsPerLine( i ) );
}




Now i'm reading through the osg doc and  the tutorials, but the coverage on 
VBO's is rather thin. I'd appreciate some hints on how to do it if the 
functionality exists or if I have to write my own osg node.
... 

Thank you!

Cheers,
Otto

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





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


Re: [osg-users] OSG Max Exporter Modifications

2010-01-06 Thread Chris Rodgers
Thank you Robert and Fabien,

I will send the changes to Farshid. Hopefully he will like the updates :)

Talk to you soon!

Chris

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





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


Re: [osg-users] VBO's and masking/updating geometry

2010-01-06 Thread Jason Beverage
Hi Otto,

To use VBO's in OSG, you just need to set up an osg::Geometry as you
normally would and then call:

geometry-setUseDisplayList( false );  //Disable display lists
geometry-setUseVertexBufferObjects( true ); //Enable VBO

After that everything is handled under the hood for you, you can look at the
osgTerrain library or the osgdrawinstanced example for examples.

Thanks!

Jason

On Wed, Jan 6, 2010 at 9:12 AM, Otto Cologne schur...@gmx.de wrote:

 Hi,

 I'm in the process of rewriting a program I did earlier but this time using
 OSG. One part contained rendering a large amount of lines which would be
 selected by various selection tools. For that I used VBO's and a bit mask.
 The rendering function (after all the initializations) then looked like this


 Code:

 for ( int i = 0; i  m_countLines; ++i )
 {
if ( m_selected[i] )
glDrawArrays( GL_LINE_STRIP, getStartIndexForLine( i ),
 getPointsPerLine( i ) );
 }




 Now i'm reading through the osg doc and  the tutorials, but the coverage on
 VBO's is rather thin. I'd appreciate some hints on how to do it if the
 functionality exists or if I have to write my own osg node.
 ...

 Thank you!

 Cheers,
 Otto

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





 ___
 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::Image::update

2010-01-06 Thread Robert Osfield
HI Nick,

On Wed, Jan 6, 2010 at 11:22 AM, Trajce Nikolov
nikolov.tra...@gmail.com wrote:
 what I did here is I launch observer thread that checks for that. Simple and
 working. How to submit the update?

What do you mean by submit the update?  Update to what?  submit it what way?

As for using a dedicated thread to observer changes to the
modifiedCount() this sounds like a very expensive way to implement the
feature.  I know nothing of the context of what you are trying to
achieve so I can't really comment beyond this.

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


[osg-users] multiple OSG viewers in different threads

2010-01-06 Thread Rosen Diankov
Dear OSG users,

OpenSceneGraph sounds like a very promising library to use for a robotics 
package we've been developing; but before I commit any time to it, I would like 
to ask a couple of questions:

Can OSG manage multiple GL contexts for Linux? I would like to be able to 
launch multiple viewers for several different threads. I have no intention of 
sharing the 3D data between these viewers, but do need them all in a single 
process. The threads will be frequently teared down and restarted again, so I'm 
also worried about memory leaks and shared global variables.

Also, what is the most lightweight/cross platform GUI people would recommend to 
use with OSG. I've seen threads with Qt, but would really rather avoid it if 
possible.

thank you,
rosen diankov,

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





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


Re: [osg-users] osg::Image::update

2010-01-06 Thread Trajce Nikolov
I extended the directshow plugin to support video LOOPING mode. That is the
update

Nick

http://www.linkedin.com/in/tnick
Sent from Devlet, Ankara, Turkey

On Wed, Jan 6, 2010 at 4:46 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 HI Nick,

 On Wed, Jan 6, 2010 at 11:22 AM, Trajce Nikolov
 nikolov.tra...@gmail.com wrote:
  what I did here is I launch observer thread that checks for that. Simple
 and
  working. How to submit the update?

 What do you mean by submit the update?  Update to what?  submit it what
 way?

 As for using a dedicated thread to observer changes to the
 modifiedCount() this sounds like a very expensive way to implement the
 feature.  I know nothing of the context of what you are trying to
 achieve so I can't really comment beyond this.

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

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


Re: [osg-users] osg::Image::update

2010-01-06 Thread Robert Osfield
Hi Nick,

On Wed, Jan 6, 2010 at 3:24 PM, Trajce Nikolov nikolov.tra...@gmail.com wrote:
 I extended the directshow plugin to support video LOOPING mode. That is the
 update

Ahh... great... to submit the changes just send them to
osg-submissions and I can then review them.

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


Re: [osg-users] osg::Image::update

2010-01-06 Thread Trajce Nikolov
ok .. I just registered myself to that list. waiting for approval
Nick

http://www.linkedin.com/in/tnick
Sent from Devlet, Ankara, Turkey

On Wed, Jan 6, 2010 at 5:28 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Wed, Jan 6, 2010 at 3:24 PM, Trajce Nikolov nikolov.tra...@gmail.com
 wrote:
  I extended the directshow plugin to support video LOOPING mode. That is
 the
  update

 Ahh... great... to submit the changes just send them to
 osg-submissions and I can then review them.

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

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


[osg-users] Publicly Available TerraPage Database

2010-01-06 Thread Ryan H. Kawicki
It seems that TerraPage experts are running thin these days for OSG.  In the 
spirit of trying to help out, I was wondering if the community has a publicly 
available TerraPage database that is used for testing.  If there is not one, I 
can begin the process of producing one for public consumption.  I just wanted 
to know if this is something the community would use or even like to have.  It 
would not be anything too complicated, but I hope to have something that can 
represent what we are currently consuming.

Thanks,
Ryan

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





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


[osg-users] social organization of the open source R project

2010-01-06 Thread Chris 'Xenon' Hanson
Reposted from the GDAL mailing list, because i thought it would be of interest 
here too.



See page 5, Aspects of the Social Organization and Trajectory of the
R Project.

http://journal.r-project.org/archive/2009-2/RJournal_2009-2.pdf

In particular I found this interesting:

Many open-source projects, such as the Linux operating system, have
strongly hierarchical structures, and some, such as Perl, revolve
around a central individual. . . . Although I haven’t formally
surveyed the many existing open source projects, the R Project is
apparently unusual in its flat formal organization of independent
volunteers. This structure has attracted a remarkably talented and
competent group of individuals, but, as I will argue later in this
aper, it poses challenges for moving the R Project forward.


-- 
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] Problem BlendEquation in Shader GLSL

2010-01-06 Thread clement vidal
Hi,


I have a problem with BlendEquations and shaders. That is the situation:

I attach several textures to my camera using COLOR_BUFFER0, COLOR_BUFFER1,
...
I use a shader to make the rendering into this textures.

There is some values in this textures and i would like to use a max blending
between the value wich are already in and the values i affect in the shader.

When I define an osg::BlendEquation with RGBA_MAX blending, i have the blend
result between the value in the frame buffer (background color or ClearColor
) and the value in the shader.

What I do wrong? Somebody have a idea?

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


Re: [osg-users] New 3DS reader/writer is ready to test

2010-01-06 Thread Chris 'Xenon' Hanson
Robert Osfield wrote:
 Most plugins are OSGPL, but some are GPL and some are LGPL.  The 3ds
 plugin has always been based on LGPL code, and the new rev hasn't
 changed this.
 
 If you want to use LGPL plugins you have to use dynamic linking.
 This comes as a surprise.
 
 In the src/osgPlugins/3ds directory there is a README that explains
 the LGPL license, this README has been in place since the inception of
 this plugin, nearly a decade now.  So the matter of fact is that I'm
 not disclosing any new information that hasn't been avaiexlable to
 everybody since the very earliest days of the OSG project.
 
 Now one could try and formalize the licensing of plugins, perhaps even
 make it possible in CMake to select the license and prevent
 compilation of the components that don't fit with that license.  I'm
 not a Cmake guru so can't point to an clean and easy way to do this
 right out the way, I'm open to suggest though.

  It might suffice to simply elevate a listing of plugin licenses (and the 
admonition
against static linking LGPL plugins) to a top-level document like our own 
LICENSE.txt.

  There could also be a community project to enumerate the LGPL plugins and 
seek out their
projects to request a specific LGPL static link exemption, such as many 
projects have
already done:
http://teem.sourceforge.net/lgpl.html

  Also from that page: It is also interesting to note, however, that while the 
text of
the GPL and LGPL assert that linking with the library creates a derived work, 
some legal
experts believe that linking creates a compilation, in the copyright sense, and 
not a
derived work. Depending on interpretation, this might render the LGPL static 
link issue moot.

  I personally (IANAL) believe that it probably does produce a compilation 
rather than a
derived work. http://en.wikipedia.org/wiki/Derivative_work Basically, my take 
is that to
be derivative, it must transformatively modify the original, which obviously 
linking
does not. It merely includes it unmodified.

  However, I believe the FSF's original intention was COUNTER to this 
interpretation, and
they explicitly claim LGPL static linked works are derivative works. I 
understand FSF's
motivation -- they want to keep software modularized so that the LGPL portion 
of the
library can be seamlessly upgraded by the end user, preserving the freedom to 
fix
problems. However, I also acknowledge that except for extremely minor fixes, 
this
technique is hardly ever feasible with modern code due to function signature 
changes and
base class data alterations. It might have worked fine on Linux, with C-only 
code or with
extremely simple fixes with no new functionality, but in the Real World, C++, 
Windows, OSX
and major fixes or functional improvements make this eseentially a pipe dream.

  So:

  If you screwed up and statically linked LGPL code in a plugin, you might be 
going
against FSF's wishes, and you might or might not be legally infringing the 
copyright
holder of the original plugin code. However, it might still be possible to get 
an
LGPL-static exemption from the original copyright holders, which seems like a 
worthy
endeavour, given OSG's goals to be open source, yet freely usable commercially 
without
glitches.

  Discussion? Anyone want to step forward to do a non-technical project of 
summarizing the
license and maybe approaching 3rd party contributors about an exemption?

 Robert.

-- 
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 Viewer and JOGL

2010-01-06 Thread Kevin Tacke
We currently have an application that is built around the OSG Viewer using a 
glut window.  We are interesting in adding a considerable GUI interface to the 
application and we would prefer to use JAVA to implement the GUI.  So basically 
I am trying to find a way, probably using JOGL, to create the GUI and graphics 
window on the JAVA side and perform all of the drawing on the C++/OSG side.

I think I should be able to create a glContext on the JAVA size, with JOGL, and 
when making a call to C++ with JNI have access to the same context as long as 
it is done within the same thread.  Unfortunately, I have not figured out how 
to assign the JAVA created glContex, retrieved with a call to 
wglGetCurrentContext, to the OSG Viewer/Camera.  

I know that osgvp has created a JAVA/JOGL/JNI interface to OSG but it looks 
like a lot of effort went into creating the JNI interface and making calls into 
OSG.  I would really like to reduce the JNI to little more than init, display, 
keyboard, and mouse functions.

Any help is appreciated.

Thanks,
Kevin

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





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


[osg-users] Native multitouch support on OSG

2010-01-06 Thread Serge Lages
Hi Robert,

Just a quick question, are you inclined to see native multi-touch support
for OSG ? We should only need to add an ID information on the
GUIEventAdapter class to be able to make the difference between 2 or more
push from different points. It will be enough to handle basic multi-touch
support (the next step should be to add pressure information like the size
of a point).

Then it will be possible to modify the GraphicsWindow* files to add this
information on the events for systems working with multi-touch (like Windows
7, the latest OSX, Linux or IPhone).

Cheers,

-- 
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] OSG Viewer and JOGL

2010-01-06 Thread Robert Osfield
Hi Kevin,

I know nothing about Java/JNI so can't comment on the specifics, but
in general I'd suggest that you could use the
osgViewer::GraphicsWindowEmbedded functionality that enables the
standard osgViewer::Viewer/CompositeViewer to handle a single window
without doing any of its own windows/wgl/glx calls - leaving these
entirely up to the calling application.  For examples of this in
action have a look at the osgviewerSDL and osgviewerGLUT examples that
come as part of the OSG's example set.  Such a embedded window is fine
for most apps that just require a single window and single threading
of the viewer, but isn't a scalable as the native OSG windowing
implementations.

Another route might be to try and get the underlying window handle of
a window created by java and then pass this to
osgViewer::GraphicsWindowWin32/X11 using it's support for inheriting
windows and adding it's own graphics context.  This approach is the
most flexible w.r.t the OSG as it enables the OSG to handle threading
and multiple graphics contexts directly.

Robert.

On Wed, Jan 6, 2010 at 5:05 PM, Kevin Tacke kta...@gmail.com wrote:
 We currently have an application that is built around the OSG Viewer using a 
 glut window.  We are interesting in adding a considerable GUI interface to 
 the application and we would prefer to use JAVA to implement the GUI.  So 
 basically I am trying to find a way, probably using JOGL, to create the GUI 
 and graphics window on the JAVA side and perform all of the drawing on the 
 C++/OSG side.

 I think I should be able to create a glContext on the JAVA size, with JOGL, 
 and when making a call to C++ with JNI have access to the same context as 
 long as it is done within the same thread.  Unfortunately, I have not figured 
 out how to assign the JAVA created glContex, retrieved with a call to 
 wglGetCurrentContext, to the OSG Viewer/Camera.

 I know that osgvp has created a JAVA/JOGL/JNI interface to OSG but it looks 
 like a lot of effort went into creating the JNI interface and making calls 
 into OSG.  I would really like to reduce the JNI to little more than init, 
 display, keyboard, and mouse functions.

 Any help is appreciated.

 Thanks,
 Kevin

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





 ___
 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] How to render last with multiple cameras

2010-01-06 Thread Mike Greene
I have a view with two cameras - a HUD camera and a regular 3D 
perspective camera. I have my scene set up so that I can vary the alpha 
of the HUD (drawn with a polygon) so that I can see the 3D view behind 
at various intensities. What I would like to be able to do is have some 
of the 3D components drawn at full brightness while the HUD is also 
fully opaque. I tried using renderbins, but I think the problem is that 
the HUD and the 3D items are seen with different cameras. Is there a way 
to accomplish this?


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


Re: [osg-users] Error moving in Z-axis

2010-01-06 Thread Wagner Dias
Hi Robert,

 What do you suggest for show banners and menu whithout osgWidget?

Thank you!

Cheers,
Wagner

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





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


Re: [osg-users] How to render last with multiple cameras

2010-01-06 Thread Simon Hammett
2010/1/6 Mike Greene mgre...@hiwaay.net

I have a view with two cameras - a HUD camera and a regular 3D perspective
 camera. I have my scene set up so that I can vary the alpha of the HUD
 (drawn with a polygon) so that I can see the 3D view behind at various
 intensities. What I would like to be able to do is have some of the 3D
 components drawn at full brightness while the HUD is also fully opaque. I
 tried using renderbins, but I think the problem is that the HUD and the 3D
 items are seen with different cameras. Is there a way to accomplish this?


The important calls for setting up a hud camera are:

  camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
  camera-setClearMask(GL_DEPTH_BUFFER_BIT);
  camera-setRenderOrder(osg::Camera::POST_RENDER);
  camera-setViewport(x, y, w, h);

And maybe also:
  camera-setAllowEventFocus(false);

If that doesn't resolve it, you'll need to post some code and a screenshot.

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


Re: [osg-users] OSG Viewer and JOGL

2010-01-06 Thread Rafa Gaitan
Hi Kevin,

Well osgvp is quite large currently, but you can take a look to
libosgvp-viewer library and take only what you need. If you feel
comfortable with maven, you can try to compile it and use only
libosgvp-viewer and libosgvp-core library. Currently trunk compiles
against osg 2.8.2, but you can use a trick to compile it against osg
trunk just setting the OSG_DIR env var pointing to the osg compiled
sdk.

This two libraries allow to create the context using jogl with the
first method that Robert commented. You can take libosgvp-viewer and
use it and even with a few mods I think you can use without all the
libosgvp-core wrappers.

The JNI code is inside osgvp/libosgvp/libjni-osgvp/, so you can take a
look there and use the code you need.

Good luck with  your project,
Rafa.


On Wed, Jan 6, 2010 at 7:05 PM, Robert Osfield robert.osfi...@gmail.com wrote:
 Hi Kevin,

 I know nothing about Java/JNI so can't comment on the specifics, but
 in general I'd suggest that you could use the
 osgViewer::GraphicsWindowEmbedded functionality that enables the
 standard osgViewer::Viewer/CompositeViewer to handle a single window
 without doing any of its own windows/wgl/glx calls - leaving these
 entirely up to the calling application.  For examples of this in
 action have a look at the osgviewerSDL and osgviewerGLUT examples that
 come as part of the OSG's example set.  Such a embedded window is fine
 for most apps that just require a single window and single threading
 of the viewer, but isn't a scalable as the native OSG windowing
 implementations.

 Another route might be to try and get the underlying window handle of
 a window created by java and then pass this to
 osgViewer::GraphicsWindowWin32/X11 using it's support for inheriting
 windows and adding it's own graphics context.  This approach is the
 most flexible w.r.t the OSG as it enables the OSG to handle threading
 and multiple graphics contexts directly.

 Robert.

 On Wed, Jan 6, 2010 at 5:05 PM, Kevin Tacke kta...@gmail.com wrote:
 We currently have an application that is built around the OSG Viewer using a 
 glut window.  We are interesting in adding a considerable GUI interface to 
 the application and we would prefer to use JAVA to implement the GUI.  So 
 basically I am trying to find a way, probably using JOGL, to create the GUI 
 and graphics window on the JAVA side and perform all of the drawing on the 
 C++/OSG side.

 I think I should be able to create a glContext on the JAVA size, with JOGL, 
 and when making a call to C++ with JNI have access to the same context as 
 long as it is done within the same thread.  Unfortunately, I have not 
 figured out how to assign the JAVA created glContex, retrieved with a call 
 to wglGetCurrentContext, to the OSG Viewer/Camera.

 I know that osgvp has created a JAVA/JOGL/JNI interface to OSG but it looks 
 like a lot of effort went into creating the JNI interface and making calls 
 into OSG.  I would really like to reduce the JNI to little more than init, 
 display, keyboard, and mouse functions.

 Any help is appreciated.

 Thanks,
 Kevin

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





 ___
 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




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


Re: [osg-users] OSG Viewer and JOGL

2010-01-06 Thread Gerrick Bivins
Hi Rafa,

How much of the OSG is exposed through osgvp?
Is it possible to extract out the wrapping into a separate project? I've
been looking into how I can use maven and jna to possibly get access to OSG
from java but I'm just beginning. If the work is already done or you have
some tips/pointers on how to get going that would be great.
Gerrick

On Wed, Jan 6, 2010 at 2:43 PM, Rafa Gaitan rafa.gai...@gmail.com wrote:

 Hi Kevin,

 Well osgvp is quite large currently, but you can take a look to
 libosgvp-viewer library and take only what you need. If you feel
 comfortable with maven, you can try to compile it and use only
 libosgvp-viewer and libosgvp-core library. Currently trunk compiles
 against osg 2.8.2, but you can use a trick to compile it against osg
 trunk just setting the OSG_DIR env var pointing to the osg compiled
 sdk.

 This two libraries allow to create the context using jogl with the
 first method that Robert commented. You can take libosgvp-viewer and
 use it and even with a few mods I think you can use without all the
 libosgvp-core wrappers.

 The JNI code is inside osgvp/libosgvp/libjni-osgvp/, so you can take a
 look there and use the code you need.

 Good luck with  your project,
 Rafa.


 On Wed, Jan 6, 2010 at 7:05 PM, Robert Osfield robert.osfi...@gmail.com
 wrote:
  Hi Kevin,
 
  I know nothing about Java/JNI so can't comment on the specifics, but
  in general I'd suggest that you could use the
  osgViewer::GraphicsWindowEmbedded functionality that enables the
  standard osgViewer::Viewer/CompositeViewer to handle a single window
  without doing any of its own windows/wgl/glx calls - leaving these
  entirely up to the calling application.  For examples of this in
  action have a look at the osgviewerSDL and osgviewerGLUT examples that
  come as part of the OSG's example set.  Such a embedded window is fine
  for most apps that just require a single window and single threading
  of the viewer, but isn't a scalable as the native OSG windowing
  implementations.
 
  Another route might be to try and get the underlying window handle of
  a window created by java and then pass this to
  osgViewer::GraphicsWindowWin32/X11 using it's support for inheriting
  windows and adding it's own graphics context.  This approach is the
  most flexible w.r.t the OSG as it enables the OSG to handle threading
  and multiple graphics contexts directly.
 
  Robert.
 
  On Wed, Jan 6, 2010 at 5:05 PM, Kevin Tacke kta...@gmail.com wrote:
  We currently have an application that is built around the OSG Viewer
 using a glut window.  We are interesting in adding a considerable GUI
 interface to the application and we would prefer to use JAVA to implement
 the GUI.  So basically I am trying to find a way, probably using JOGL, to
 create the GUI and graphics window on the JAVA side and perform all of the
 drawing on the C++/OSG side.
 
  I think I should be able to create a glContext on the JAVA size, with
 JOGL, and when making a call to C++ with JNI have access to the same context
 as long as it is done within the same thread.  Unfortunately, I have not
 figured out how to assign the JAVA created glContex, retrieved with a call
 to wglGetCurrentContext, to the OSG Viewer/Camera.
 
  I know that osgvp has created a JAVA/JOGL/JNI interface to OSG but it
 looks like a lot of effort went into creating the JNI interface and making
 calls into OSG.  I would really like to reduce the JNI to little more than
 init, display, keyboard, and mouse functions.
 
  Any help is appreciated.
 
  Thanks,
  Kevin
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=22166#22166
 
 
 
 
 
  ___
  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
 



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

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


[osg-users] osgDB::XmlParser question

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

Hi Robert,

I need to read an XML file and thought of using osgDB::XmlParser to do 
it. Calling this:


  osgDB::readXmlFile(filename);

results in Could not open XML file: somefilename.xml. But the file is 
there and some simple code using an ifstream to read the file (using the 
same filename variable) works. So I started looking into the code. One 
thing strikes me as weird in osgDB::readXmlFile() :


  // ...
  XmlNode::Input input;
  input.open(foundFile);
  if (!input)
  {
  // error Could not open XML file: ... 
  }

  input.readAllDataIntoBuffer();
  // ...

XmlNode::Input::Input() initializes _currentPos to 0. Then 
input.open(foundFile) calls ifstream::open(foundFile.c_str()) so up to 
there, all's well. But then XmlNode::Input::operator bool() is this:


  operator bool () const { return _currentPos_buffer.size(); }

Now, nothing has touched _buffer yet (readAllDataIntoBuffer() below the 
error is what fills it) so its size is 0, and _currentPos was set to 0 
in the ctor, so this check ( _currentPos_buffer.size(); ) will 
obviously return false.


I don't think that's what is intended... is it? I don't see how this 
code could work at all, won't it error out every time?


I searched for readXmlFile in the OSG sources and didn't get any 
results, is this used at all?


A change that makes it work would be, for example:

  operator bool () const { return (_fin.good()  _currentPos == 0) ||
  _currentPos_buffer.size(); }

What's funny is that the XmlParser code is used in the present3D 
application (and I assume the p3d plugin too) but it doesn't use 
readXmlFile at all and just bypasses the check:


  osgDB::XmlNode::Input input;
  input.open(fileName);
  input.readAllDataIntoBuffer();

Is this intended? Why would OSG not use its own helper function?

--

Once I do this in my code (awaiting a good fix to readXmlFile() ), I get 
errors end tag is not matched correctly for items like:


item someattribute=somevalue /

This is valid XML syntax, but is it not supported by the XmlParser? I 
could add support for it, but it seems weird that it's not supported...


Thanks,

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] Utility of using Drawable:: ...

2010-01-06 Thread François Bodic
Hi,

I cannot figure out the role of the next two lines in the ShapeDrawable 
implementation. I thought that the keyword using was only for namespaces...
Can someone help me?

using Drawable::supports
using Drawable::accept


Thank you!

Cheers,
François

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





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


Re: [osg-users] OSG Viewer and JOGL

2010-01-06 Thread Rafa Gaitan
Hi Gerrick,

On Wed, Jan 6, 2010 at 9:51 PM, Gerrick Bivins
gbiv...@objectreservoir.com wrote:
 Hi Rafa,
 How much of the OSG is exposed through osgvp?

Well, in libosgvp-core is a one-to-one (more or less) wrapp for the
most common nodes and functionalities of OSG. libosgvp-viewer has the
logic to manage the render contexts in java and also integrates some
manipulators. The other libraries are mainly for GIS development
inside gvSIG3D.

 Is it possible to extract out the wrapping into a separate project? I've
 been looking into how I can use maven and jna to possibly get access to OSG
 from java but I'm just beginning. If the work is already done or you have
 some tips/pointers on how to get going that would be great.
 Gerrick

Are you trying to do a complete wrapp? or only the basics? We began
with a simple wrapp covering our first milestones and we never
finished growing :). Our goal was a GIS 3D framework for Java using
OSG, but we tried to separate libraries/functionalities with a little
coherence :).

It is possible to use only libosgvp-viewer and libosgvp-core
independently. All the C/C++ JNI source is in a single CMake project
which generates different dynamic libraries (normal dynamic libraries
and jni ones). I think separate only the java OSG part is really easy.
Even use it directly if you decide use maven too in your project
(maven is really a good choice if you work in java).

In this project and also in gvSIG I had to solve the problem of
compile/deploy of native libraries with maven. It is possible to
compile all the source using maven (with cmake accesible). Maven
downloads the native dependencies in a tar.gz and jar dependencies for
the current platform, and is able to use them to compile the sources
with CMake. Once compiled you can point to the necessary dependencies
with maven in your project.

Tomorrow I want to release a new build of gvSIG3D, and of course I
also want to deploy osgvp in the maven repository, so use it is only
add the repo to your pom.xml (maven) file and the dependencies. I will
also upload a ready to use package of osgvp to the web. If you want to
check some code, take a look to libosgvp-examples (trunk version)
there is examples grouped by library, if you take a look to viewer
examples maybe you can get an idea of how use osgvp for a minimal
scene graph in Java.

Cheers,
Rafa.


 On Wed, Jan 6, 2010 at 2:43 PM, Rafa Gaitan rafa.gai...@gmail.com wrote:

 Hi Kevin,

 Well osgvp is quite large currently, but you can take a look to
 libosgvp-viewer library and take only what you need. If you feel
 comfortable with maven, you can try to compile it and use only
 libosgvp-viewer and libosgvp-core library. Currently trunk compiles
 against osg 2.8.2, but you can use a trick to compile it against osg
 trunk just setting the OSG_DIR env var pointing to the osg compiled
 sdk.

 This two libraries allow to create the context using jogl with the
 first method that Robert commented. You can take libosgvp-viewer and
 use it and even with a few mods I think you can use without all the
 libosgvp-core wrappers.

 The JNI code is inside osgvp/libosgvp/libjni-osgvp/, so you can take a
 look there and use the code you need.

 Good luck with  your project,
 Rafa.


 On Wed, Jan 6, 2010 at 7:05 PM, Robert Osfield robert.osfi...@gmail.com
 wrote:
  Hi Kevin,
 
  I know nothing about Java/JNI so can't comment on the specifics, but
  in general I'd suggest that you could use the
  osgViewer::GraphicsWindowEmbedded functionality that enables the
  standard osgViewer::Viewer/CompositeViewer to handle a single window
  without doing any of its own windows/wgl/glx calls - leaving these
  entirely up to the calling application.  For examples of this in
  action have a look at the osgviewerSDL and osgviewerGLUT examples that
  come as part of the OSG's example set.  Such a embedded window is fine
  for most apps that just require a single window and single threading
  of the viewer, but isn't a scalable as the native OSG windowing
  implementations.
 
  Another route might be to try and get the underlying window handle of
  a window created by java and then pass this to
  osgViewer::GraphicsWindowWin32/X11 using it's support for inheriting
  windows and adding it's own graphics context.  This approach is the
  most flexible w.r.t the OSG as it enables the OSG to handle threading
  and multiple graphics contexts directly.
 
  Robert.
 
  On Wed, Jan 6, 2010 at 5:05 PM, Kevin Tacke kta...@gmail.com wrote:
  We currently have an application that is built around the OSG Viewer
  using a glut window.  We are interesting in adding a considerable GUI
  interface to the application and we would prefer to use JAVA to implement
  the GUI.  So basically I am trying to find a way, probably using JOGL, to
  create the GUI and graphics window on the JAVA side and perform all of the
  drawing on the C++/OSG side.
 
  I think I should be able to create a glContext on the JAVA size, with
  JOGL, and when making a 

Re: [osg-users] Utility of using Drawable:: ...

2010-01-06 Thread D.J. Caldwell
Hi, François.

A using directive can be used for things other than namespaces.

In this case, the using directive introduces all instances of
supports and accepts from the class Drawable scope (I think
they're all in the public scope of that class) into the public scope
of class ShapeDrawable; according to the comment, this is a work
around to prevent name hiding when using a declared pointer/reference
to ShapeDrawable or its derived classes.

By NOT declaring and overriding all instances of virtual member
functions support and accepts, ShapeDrawable would hide those
other instances without the using directive.  With the using
directive, ShapeDrawable only has to declare and override those
instances in which it needs different behavior from the inherited
instances.

Pick up your favorite C++ reference for a more thorough discussion of
the using directive.  For related material, try the following FAQ:

http://www.parashift.com/c++-faq-lite/strange-inheritance.html

Happy coding...

D.J.

On Wed, Jan 6, 2010 at 4:52 PM, François Bodic f56...@hotmail.com wrote:
 Hi,

 I cannot figure out the role of the next two lines in the ShapeDrawable 
 implementation. I thought that the keyword using was only for namespaces...
 Can someone help me?

 using Drawable::supports
 using Drawable::accept


 Thank you!

 Cheers,
 François

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





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

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


Re: [osg-users] [osgOcean] wave generator

2010-01-06 Thread Tian Ma
Funny :)



Kim Bale wrote:
 
  Kim,
  
 
 
 
 *ahem* 
 
 Replying to myself there for some reason..
 
 
 K.
 
 
 2010/1/6 Kim Bale  ()
 
  Kim,
  
  
  This is to some extent what already happens with the mipmapping LOD that 
  osgOcean currently uses.  
  
  The problem is that the multi-res surface is dependant on the position of 
  the camera and not on local features. The code to recompute the surface 
  primitives is already pretty complicated, to do it based on both camera 
  position and local features would be a nightmare (if at all possible).
  
  
  One way to address this would be to increase the resolution of the highest 
  level of detail and only apply the iwave algorithm to tiles in close 
  proximity to the camera. 
  
  
  
  K.
  
  2010/1/5 Trajce Nikolov  ()
  
ok. I will have a look
   
    It is however a pretty expensive effect and the resolution of the ocean 
   has to be increased 
   
   
   
   How about having multi-res ocean, what I mean to have it tiled with 
   different res on each tile
   Nick
   
   http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick)
   
   Sent from Devlet, Ankara, Turkey 
   
   
   On Tue, Jan 5, 2010 at 12:10 PM, Kim Bale  () wrote:
   
 Hi Nick,


It isn't support in osgOcean at the moment. However, Tessendorf 
discusses a technique called iwave which can be used to create 
localised wave deformation in conjunction with the FFT ocean technique. 
You can read about it here: 

http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf 
(http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf)


I had a student implement it in an ogl app a while back and the effect 
was quite good. It is however a pretty expensive effect and the 
resolution of the ocean has to be increased rather a lot otherwise its 
very chunky. 


 
(http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf)K.


2010/1/5 Trajce Nikolov  ()

 
 Hi gurus,
 
 Is it possible to have a wave generator at specific position in the 
 ocean? Like the rear or front of the boat, rain drops .. etc ..? Nick
 
 http://www.linkedin.com/in/tnick (http://www.linkedin.com/in/tnick)
 Sent from Izmit, 41, Turkey 
 
 
 
 ___
 osg-users mailing list
  ()
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
 (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
 
 
 




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


   
   
   
   
   
   
   
   ___
   osg-users mailing list
()
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
   (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
   
   
  
  
  
  
  
  
 
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] OpenGL capture/logging in OSG

2010-01-06 Thread Michael Weiblen
Hi Paul

I'm also interested in the ogldump route, specifically because of the
automated wrapper generation.

cheers
-- mew



On Mon, Dec 14, 2009 at 2:06 PM, Paul Martz pma...@skew-matrix.com wrote:
...


 I don't know if this might help, but Don Burns wrote a parser of the
 gl.h to automatically produce a wrapper library that allowed you that
 calls GL for you, and you just link to the Don's OglDump library.  For
 more details:

   http://www.andesengineering.com/OglDump/ogldump.html

 It's written for unix, using lex/yacc, so one would need to do some
 more work to get it working under Windows, but it might give one a leg
 up.



 Thanks for the pointer. If I'm already going to look at the Linux-centric
 BuGLe, then I could give this a shot too. (Lex and yacc, wow, I used to know
 how to use those back in 1986...)
   -Paul

 --
Mike Weiblen -- Black Hawk, Colorado USA -- http://mew.cx/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Problem with osgmovie

2010-01-06 Thread Shiina Ringo
Hi,

Recently I just added the osgmovie in my object , to play as a media player. 
But here I have a question , that is , is there any method to detect if the 
movie has been over , and then I could switch to other scene.

Any advice would be appreciated.


Thank you very much!

Cheers,
Shiina

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





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


Re: [osg-users] VBO's and masking/updating geometry

2010-01-06 Thread J.P. Delport

Hi Jason/Otto,

I was looking at something similar recently... The only problem I had 
was that osg::Geometry assumed that I wanted to draw from the start of 
the array attached. I think if you want some specialised behaviour, like 
e.g. having a single static array attached to a geometry and drawing 
from different start positions in it, you'll have to make your own 
drawImplementation. Other options might be using drawElements with 
multiple geometries and a shared array, or shaders.


jp

Jason Beverage wrote:

Hi Otto,

To use VBO's in OSG, you just need to set up an osg::Geometry as you 
normally would and then call:


geometry-setUseDisplayList( false );  //Disable display lists
geometry-setUseVertexBufferObjects( true ); //Enable VBO

After that everything is handled under the hood for you, you can look at 
the osgTerrain library or the osgdrawinstanced example for examples.


Thanks!

Jason

On Wed, Jan 6, 2010 at 9:12 AM, Otto Cologne schur...@gmx.de 
mailto:schur...@gmx.de wrote:


Hi,

I'm in the process of rewriting a program I did earlier but this
time using OSG. One part contained rendering a large amount of lines
which would be selected by various selection tools. For that I used
VBO's and a bit mask. The rendering function (after all the
initializations) then looked like this


Code:

for ( int i = 0; i  m_countLines; ++i )
{
   if ( m_selected[i] )
   glDrawArrays( GL_LINE_STRIP, getStartIndexForLine( i ),
getPointsPerLine( i ) );
}




Now i'm reading through the osg doc and  the tutorials, but the
coverage on VBO's is rather thin. I'd appreciate some hints on how
to do it if the functionality exists or if I have to write my own
osg node.
...

Thank you!

Cheers,
Otto

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





___
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


--
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] Problem BlendEquation in Shader GLSL

2010-01-06 Thread J.P. Delport

Hi Clement,

could you explain a bit more what you expect and what you are getting? 
Do you want to blend between the different textures (AFAIK you cannot do 
this unless you do another pass)? Are you expecting max, but getting 
average?


jp

clement vidal wrote:


Hi, 



I have a problem with BlendEquations and shaders. That is the situation:

I attach several textures to my camera using COLOR_BUFFER0,
COLOR_BUFFER1, ...
I use a shader to make the rendering into this textures.

There is some values in this textures and i would like to use a max 
blending between the value wich are already in and the values i affect 
in the shader.


When I define an osg::BlendEquation with RGBA_MAX blending, i have the 
blend result between the value in the frame buffer (background color or 
ClearColor ) and the value in the shader.


What I do wrong? Somebody have a idea?

Thanks for helping




___
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


[osg-users] Qt Labs Blogs » Qt Graphics and Perf ormance - OpenGL

2010-01-06 Thread J.P. Delport

Might be of interest to the Qt/OSG hackers...

http://labs.trolltech.com/blogs/2010/01/06/qt-graphics-and-performance-opengl/

--
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] Utility of using Drawable:: ...

2010-01-06 Thread François Bodic
Thank you for this clear explanation and the interesting link. I really didn't 
know this C++ feature. You make me less idiot :D 

Cheers,
François

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





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


[osg-users] compass icon in lower left corner

2010-01-06 Thread Jack Lee
Hi,

I want to create a compass axis icon in the lower left corner of the osg viewer 
that will show the xyz directions of the object in the viewer.
Can anyone show me some example code of how to do this?

Thank you!

thanks
Jack

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





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