Re: [osg-users] [forum] how add SDL in osg project

2009-11-19 Thread Alberto Luaces
Ivan,

you are running in circles. Begin compiling the OSG from source as
written in

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

after reading that, continue with the VS specifics:

http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio

Finally, as stated in point 5 of Getting Started, modify the example you
are interested, osgmovie, and recompile.

--

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


[osg-users] Using OsgSim Overlay

2009-11-19 Thread Vaibhav Bansal
Hello,
 
I have added a geometry as an overlay over another geometry.
The overlay texture seems to distort(stretch) under certain viewing angles.
It seems the projected texture is generating incorrect texture coordinates.

The white area is the overlaySubgraph geometry, and the colored area is the
Overlay Node (base) geometry.
The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.

Can anyone suggest where should I start troubleshooting.

Thanks
Vaibhav Bansal
attachment: UnDistorted.JPGattachment: Distorted.JPG___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Warning: Could not find plugin to read objects from file *.jpg

2009-11-19 Thread Robert Osfield
Hi James,

You'll need to use the Win32 3rd party dependencies package, either
using the binaries if you use the same VS version as they were built
with, or to build from scratch.  For me details read the
PlatformSpecifics docs on openscenegraph.org:

http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio

Robert.

On Wed, Nov 18, 2009 at 10:56 PM, James Adkison  ARA/CFD
jadki...@ara.com wrote:
 This is my first time building OSG and everything went well in Linux but I
 am having a problem in Windows.



 Building: OSG 2.8.2

 OS: Windows XP

 Compiler: Visual Studio 2005 Professional



 The build seems to go through okay and I do have the osgdb_jpeg.dll in the
 plugins directory but I still get the warning when loading a JPEG texture.
 I also built the osgd_png.dll and those textures are loading without any
 problems.



 Any help pointing me in the right direction is appreciated.



 Thanks,

 James

 ___
 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] OpenGL ES-2.0, OpenGL ES-1.1 and OpenGL 3.x support now ready for testing :-)

2009-11-19 Thread Hansoo Kim
I'm happy to hear that. 
I hope to check dev version out soon. :) 


robertosfield wrote:
 
 



VR Lab, Konkuk University, South Korea

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





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


Re: [osg-users] Warning: Could not find plugin to read objects from file *.jpg

2009-11-19 Thread Mourad Boufarguine
Hi James,

It is most probably a side-by-side problem. If you are using the precompiled
binairies provided here
http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies ,
make sure you have installed SP1 for VS2005. These binairies are compiled
using VS 2005 SP1. To be sure, you can use the dependency walker (
http://www.dependencywalker.com/) to check the side-by-side configuration of
osgdb_jpeg.dll.

Mourad


On Wed, Nov 18, 2009 at 11:56 PM, James Adkison ARA/CFD jadki...@ara.comwrote:

  This is my first time building OSG and everything went well in Linux but
 I am having a problem in Windows.



 Building: OSG 2.8.2

 OS: Windows XP

 Compiler: Visual Studio 2005 Professional



 The build seems to go through okay and I do have the osgdb_jpeg.dll in the
 plugins directory but I still get the warning when loading a JPEG texture.
 I also built the osgd_png.dll and those textures are loading without any
 problems.



 Any help pointing me in the right direction is appreciated.



 Thanks,

 James

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


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


Re: [osg-users] Using OsgSim Overlay

2009-11-19 Thread J.P. Delport

Hi Vaibhav,

Vaibhav Bansal wrote:

Hello,
 
I have added a geometry as an overlay over another geometry.

The overlay texture seems to distort(stretch) under certain viewing angles.
It seems the projected texture is generating incorrect texture coordinates.


The texture coordinates might be OK, but the resolution of your 
overlayed geometry might change in the generated overlayed texture. What 
happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the 
resolution/stretch stay the same?


jp



The white area is the overlaySubgraph geometry, and the colored area is the
Overlay Node (base) geometry.
The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.

Can anyone suggest where should I start troubleshooting.

Thanks
Vaibhav Bansal










___
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] Best ways to render FE models with millions of tris and quads

2009-11-19 Thread Robert Osfield
Hi Andrew,

As Bryan explains, you have stubmled upon and osg::Geometry usage
combination that forces the OSG to use OpenGL slow paths where it has
to pass the data within glBegin/glVertex/glNormal/glEnd which is very
slow for large datasets.  Display lists reduce this overhead as the GL
calling overhead is just paid once during compilation.  The reason why
the OSG is forced to adopt slow paths (glBegin/glEnd) rather than fast
paths (glVertexPointer/glDrawElements) is that there is now way to
specify per primitive attributes with GL vertex arrays.

During my work on GLES I had to replace the whole glBegin/glEnd usage
as GLES doesn't have these functions, I replaced them with a
GLBeginEndAdapter class that encodes glBegin/glEnd style usage into
vertex arrays which are then dispatched to OpenGL as a fast path -
there is still the hefty cost of all the C++ calls building the data
structures though, so alas it doesn't make it any more efficient
coping with this non optimal osg::Geometry.

Since you really want to use fast paths and flat lit traingles then it
leaves us with some achieve this.  The brute force way would be to
specify a normal per vertex, but this would lead to smooth shading -
so the next step would be to use the osg::ShadeMode StateAttribute to
set the shading to flat.  To do this you'll need to be careful about
the normal ordering so the right vertices on each triangle are set
(have a read up on GL docs of glShadeModel), even then it won't be
perfect.

Another possibility would be to ditch the normals completely and
compute the lighting in a whole different way - using differed
lighting.  To do differed lighting you'll need to render your scene
into a FBO to capture the colour and depth of the scene.  Then you use
a second pass that uses the resulting depth texture of the scene to
compute the normals, and from this the lighting, and then combine this
with the base colour of the scene.

Perhaps others in the community might have other ideas of how to
achieve what you are looking for.

Robert.


On Wed, Nov 18, 2009 at 10:51 PM, Andrew Cunningham
o...@a-cunningham.com wrote:
 OK, I think I have resolved the mystery. The VBO was being stalled by a 
 setNormalBinding(osg::Geometry::BIND_PER_PRIMITIVE);

 If I remove that, and compare FPS,  then the VBO performance is slightly 
 better than the displaylist version

 Why do I use setNormalBinding(osg::Geometry::BIND_PER_PRIMITIVE); Because by 
 definition, finite element geometry is a discretized geometry, so you want 
 each element to have one normal. You don't want to smooth the surface.

  If anyone has a way to do that without using BIND_PER_PRIMITIVE .. let me 
 know!


 Andrew

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





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

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


Re: [osg-users] Using OsgSim Overlay

2009-11-19 Thread Vaibhav Bansal
Hello jp,

Thanks for the quick reply.
How do I check if the 'resolution' of ovelay geometry is changing.

Regards
Vaibhav Bansal

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
Delport
Sent: Thursday, November 19, 2009 2:41 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Using OsgSim Overlay

Hi Vaibhav,

Vaibhav Bansal wrote:
 Hello,
  
 I have added a geometry as an overlay over another geometry.
 The overlay texture seems to distort(stretch) under certain viewing
angles.
 It seems the projected texture is generating incorrect texture
coordinates.

The texture coordinates might be OK, but the resolution of your 
overlayed geometry might change in the generated overlayed texture. What 
happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the 
resolution/stretch stay the same?

jp

 
 The white area is the overlaySubgraph geometry, and the colored area is
the
 Overlay Node (base) geometry.
 The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.
 
 Can anyone suggest where should I start troubleshooting.
 
 Thanks
 Vaibhav Bansal
 
 
 
 
 
 
 
 
 
 
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] question about osgShadow and shader

2009-11-19 Thread Benoît Poulard
Hi, does it is possible to use a shader(vert+frag) on a node, and after to
apply osgshadow on it? i want to apply a shader that modify my geometry
before that osgshadow process the node.

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


Re: [osg-users] Using OsgSim Overlay

2009-11-19 Thread J.P. Delport

Hi,

Vaibhav Bansal wrote:

Hello jp,

Thanks for the quick reply.
How do I check if the 'resolution' of ovelay geometry is changing.


imagine the following:
You want to overlay a 1024x1024 checkerboard onto the earth and you have 
a 512x512 overlay texture. If you view the whole earth it obviously 
would not look good - too much detail to fit into the texture. What the 
view dependent modes try to do is this: When you zoom in, you only see a 
piece of the checkerboard, so now the 512x512 texture can contain only a 
piece of the checkerboard and so you see more detail of the overlayed 
geometry.


I think this is the effect you are seeing when you are moving the view 
around.


jp



Regards
Vaibhav Bansal

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
Delport
Sent: Thursday, November 19, 2009 2:41 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Using OsgSim Overlay

Hi Vaibhav,

Vaibhav Bansal wrote:

Hello,
 
I have added a geometry as an overlay over another geometry.

The overlay texture seems to distort(stretch) under certain viewing

angles.

It seems the projected texture is generating incorrect texture

coordinates.

The texture coordinates might be OK, but the resolution of your 
overlayed geometry might change in the generated overlayed texture. What 
happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the 
resolution/stretch stay the same?


jp


The white area is the overlaySubgraph geometry, and the colored area is

the

Overlay Node (base) geometry.
The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.

Can anyone suggest where should I start troubleshooting.

Thanks
Vaibhav Bansal










___
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] [osgOcean] 3D model material display error!

2009-11-19 Thread Tian Ma
Hi Kim,

When add my own island model to the oceanscene and of cource nodemask and 
shaders have been set to the model, I found that the reflection of the model on 
the ocean surface is not complete.

Will you please tell me what caused this problem? And coule the problem be 
solved?

Thank you!

Cheers,
Tian[/img]

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



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


Re: [osg-users] [osgOcean] 3D model material display error!

2009-11-19 Thread Kim Bale
Hi Tian,

I can't really see what's wrong from the attached picture, it kind of
looks like a dirty blue splodge...

K.


2009/11/19 Tian Ma tianxiao...@foxmail.com:
 Hi Kim,

 When add my own island model to the oceanscene and of cource nodemask and 
 shaders have been set to the model, I found that the reflection of the model 
 on the ocean surface is not complete.

 Will you please tell me what caused this problem? And coule the problem be 
 solved?

 Thank you!

 Cheers,
 Tian[/img]

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




 ___
 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] [osgOcean] Wake effects?

2009-11-19 Thread Erik Johnson
Hi,

I thought this would have come up before, but does anyone have suggestions how 
to render a boat's wake?  Using osgParticle provides an ok solution, but 
falls apart rapidly if the ocean waves are too large (the particles go 
underwater).

Would be cool to leverage the same texturing effects as the wave crest foam 
stuff - just not sure how.  :)

Thanks for any suggestions,
Erik

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



attachment: Untitled-3.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Main branch MSFBO support change

2009-11-19 Thread Robert Osfield
Hi Paul,

I haven't reviewed this submission yet, but it clearly overlaps with
the changes that Wojtek was working on.  I've already checked in some
of Wojtek's changes (the interface changes to osg::Camera and
osg::DisplaySettings) but haven't checked in the changes to
RenderStage.cpp.  I'm awaiting feedback from Wojtek before merging the
remaining elements his changes.

Could you give me a heads up on where you think we stand with respect
this submission?  Is it complimentary, no longer needed at all, will
need to be refactor?

I'll hold off from doing a review of your changes till you give me a heads up.

Cheers,
Robert.

On Sat, Oct 24, 2009 at 8:09 PM, Paul Martz pma...@skew-matrix.com wrote:
 Hi Robert -- Here is my submission to increase application control over
 implicit creation of FBO attachments, MSFBO resolve attachments, and blit,
 as discussed in the thread Improving multisampled FBO.

 By default, the current behavior is preserved, which means that OSG
 implicitly creates both color and depth FBO attachments if they were not
 already attached to the Camera. In the multisampled case, this is done for
 both the multisampled FBO as well as the resolve FBO.

 However, the app can now explicitly set a mask to control which attachments
 OSG creates implicitly, using Camera::setUseBufferMasks(). There is a mask
 bit for color, depth, and stencil. The default is USE_COLOR_BUFFER |
 USE_DEPTH_BUFFER.

 If you pass you parameter and are not using MSFBO, the mask controls the
 attachments to the rendered FBO.

 If you are using MSFBO, then you can pass two parameters: the first controls
 attachments to the multisampled FBO, and the second controls attachments to
 the resolve FBO.

 I've also changed the computation of the glBlitFramebuffer mask. Formerly,
 this iterated over all attachments to compute the mask, once per frame --
 very inefficient. This was really unnecessary, as OSG always copies all
 attachments. Now, the code simply sets all bits and lets OpenGL sort it out.
 (OpenGL silently ignores a bit if the attachment isn't set in both the
 source and destination FBOs.)

 This gives me a permanent fix for the glBlitFramebuffer issue on OS X, as I
 can now explicitly leave the depth buffer out of the resolve FBO.

 (As an additional aside, I'll note that the current FBO handling by Camera
 and RenderStage is pretty hairy and it'd be nice to completely scrap and
 reimplement this. However, it'd be difficult to do so without breaking
 backwards compatibility. So, this is best left for an OSG v3.0 change.)
 --
 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] Using OsgSim Overlay

2009-11-19 Thread Vaibhav Bansal
Yes, this is what the overlay node does for me.
But I am unable to understand, why the stretching occurs only 'at' some
specific angles.

Regards
Vaibhav Bansal

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
Delport
Sent: Thursday, November 19, 2009 3:47 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Using OsgSim Overlay

Hi,

Vaibhav Bansal wrote:
 Hello jp,
 
 Thanks for the quick reply.
 How do I check if the 'resolution' of ovelay geometry is changing.

imagine the following:
You want to overlay a 1024x1024 checkerboard onto the earth and you have 
a 512x512 overlay texture. If you view the whole earth it obviously 
would not look good - too much detail to fit into the texture. What the 
view dependent modes try to do is this: When you zoom in, you only see a 
piece of the checkerboard, so now the 512x512 texture can contain only a 
piece of the checkerboard and so you see more detail of the overlayed 
geometry.

I think this is the effect you are seeing when you are moving the view 
around.

jp

 
 Regards
 Vaibhav Bansal
 
 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
 Delport
 Sent: Thursday, November 19, 2009 2:41 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Using OsgSim Overlay
 
 Hi Vaibhav,
 
 Vaibhav Bansal wrote:
 Hello,
  
 I have added a geometry as an overlay over another geometry.
 The overlay texture seems to distort(stretch) under certain viewing
 angles.
 It seems the projected texture is generating incorrect texture
 coordinates.
 
 The texture coordinates might be OK, but the resolution of your 
 overlayed geometry might change in the generated overlayed texture. What 
 happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the 
 resolution/stretch stay the same?
 
 jp
 
 The white area is the overlaySubgraph geometry, and the colored area is
 the
 Overlay Node (base) geometry.
 The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.

 Can anyone suggest where should I start troubleshooting.

 Thanks
 Vaibhav Bansal


 


 


 

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


Re: [osg-users] Using OsgSim Overlay

2009-11-19 Thread Glenn Waldron
Vaibhav,

The area covered by the projected texture changes based on your view angle.
As your angle of view gets less steep, the texture resolution appears to
descrease since it has to cover a larger area. Try
view-dependend-with-perspective-overlay, which helps with this issue. Also,
increase the texture size hint in the OverlayNode api.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


On Thu, Nov 19, 2009 at 7:29 AM, Vaibhav Bansal vaib...@darshan3d.comwrote:

 Yes, this is what the overlay node does for me.
 But I am unable to understand, why the stretching occurs only 'at' some
 specific angles.

 Regards
 Vaibhav Bansal

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
 Delport
 Sent: Thursday, November 19, 2009 3:47 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Using OsgSim Overlay

 Hi,

 Vaibhav Bansal wrote:
  Hello jp,
 
  Thanks for the quick reply.
  How do I check if the 'resolution' of ovelay geometry is changing.

 imagine the following:
 You want to overlay a 1024x1024 checkerboard onto the earth and you have
 a 512x512 overlay texture. If you view the whole earth it obviously
 would not look good - too much detail to fit into the texture. What the
 view dependent modes try to do is this: When you zoom in, you only see a
 piece of the checkerboard, so now the 512x512 texture can contain only a
 piece of the checkerboard and so you see more detail of the overlayed
 geometry.

 I think this is the effect you are seeing when you are moving the view
 around.

 jp

 
  Regards
  Vaibhav Bansal
 
  -Original Message-
  From: osg-users-boun...@lists.openscenegraph.org
  [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
  Delport
  Sent: Thursday, November 19, 2009 2:41 PM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] Using OsgSim Overlay
 
  Hi Vaibhav,
 
  Vaibhav Bansal wrote:
  Hello,
 
  I have added a geometry as an overlay over another geometry.
  The overlay texture seems to distort(stretch) under certain viewing
  angles.
  It seems the projected texture is generating incorrect texture
  coordinates.
 
  The texture coordinates might be OK, but the resolution of your
  overlayed geometry might change in the generated overlayed texture. What
  happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the
  resolution/stretch stay the same?
 
  jp
 
  The white area is the overlaySubgraph geometry, and the colored area is
  the
  Overlay Node (base) geometry.
  The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.
 
  Can anyone suggest where should I start troubleshooting.
 
  Thanks
  Vaibhav Bansal
 
 
  
 
 
  
 
 
  
 
  ___
  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 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] Main branch MSFBO support change

2009-11-19 Thread Wojciech Lewandowski

Robert, Paul and everyone interested,

My changes in Re: [osg-submissions] DisplaySettings masks 
forimplicitbufferattachments were based on initial Paul submission. And of 
course my submission included Pauls changes and added support for setting 
IMPLICIT_BUFFER_ATTACHMENT policy through DisplaySettings. You may treat 
last of my DisplaySettings masks forimplicitbufferattachments posts as 
final result of my and Paul colaboration on this topic.  Btw I just have 
submitted  RenderStage cpp modifications made versus Roberts latest merges 
in today SVN.  I believe topic of  implicit buffer attachemnts for fbo and 
msfbo will be closed when Robert merges my today fixes I just posted.


Cheers,
Wojtek


- Original Message - 
From: Robert Osfield robert.osfi...@gmail.com

To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Thursday, November 19, 2009 1:22 PM
Subject: Re: [osg-users] Main branch MSFBO support change



Hi Paul,

I haven't reviewed this submission yet, but it clearly overlaps with
the changes that Wojtek was working on.  I've already checked in some
of Wojtek's changes (the interface changes to osg::Camera and
osg::DisplaySettings) but haven't checked in the changes to
RenderStage.cpp.  I'm awaiting feedback from Wojtek before merging the
remaining elements his changes.

Could you give me a heads up on where you think we stand with respect
this submission?  Is it complimentary, no longer needed at all, will
need to be refactor?

I'll hold off from doing a review of your changes till you give me a heads 
up.


Cheers,
Robert.

On Sat, Oct 24, 2009 at 8:09 PM, Paul Martz pma...@skew-matrix.com 
wrote:

Hi Robert -- Here is my submission to increase application control over
implicit creation of FBO attachments, MSFBO resolve attachments, and 
blit,

as discussed in the thread Improving multisampled FBO.

By default, the current behavior is preserved, which means that OSG
implicitly creates both color and depth FBO attachments if they were not
already attached to the Camera. In the multisampled case, this is done 
for

both the multisampled FBO as well as the resolve FBO.

However, the app can now explicitly set a mask to control which 
attachments
OSG creates implicitly, using Camera::setUseBufferMasks(). There is a 
mask

bit for color, depth, and stencil. The default is USE_COLOR_BUFFER |
USE_DEPTH_BUFFER.

If you pass you parameter and are not using MSFBO, the mask controls the
attachments to the rendered FBO.

If you are using MSFBO, then you can pass two parameters: the first 
controls
attachments to the multisampled FBO, and the second controls attachments 
to

the resolve FBO.

I've also changed the computation of the glBlitFramebuffer mask. 
Formerly,

this iterated over all attachments to compute the mask, once per frame --
very inefficient. This was really unnecessary, as OSG always copies all
attachments. Now, the code simply sets all bits and lets OpenGL sort it 
out.

(OpenGL silently ignores a bit if the attachment isn't set in both the
source and destination FBOs.)

This gives me a permanent fix for the glBlitFramebuffer issue on OS X, as 
I

can now explicitly leave the depth buffer out of the resolve FBO.

(As an additional aside, I'll note that the current FBO handling by 
Camera

and RenderStage is pretty hairy and it'd be nice to completely scrap and
reimplement this. However, it'd be difficult to do so without breaking
backwards compatibility. So, this is best left for an OSG v3.0 change.)
--
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 


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


[osg-users] ShadowedScene, Camera and Callback

2009-11-19 Thread Benoît Bayol
Hi,

I want to make a screenshot of a osgShadow::ShadowScene.
I have created an osg::Camera this way :

Code:

  camera-setClearColor(osg::Vec4(0.8f,0.8f,0.8f,1.0f));
  camera-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);
  camera-setProjectionMatrixAsPerspective(90,1.0,x,2*x);
  camera-setViewMatrixAsLookAt(_position,
_lookAt,
osg::Vec3f(0.0f,0.0f,1.0f)
);
  camera-setViewport(0,0, xres, yres);
  camera-setRenderOrder(osg::Camera::POST_RENDER);
  camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);

  camera-attach(osg::Camera::COLOR_BUFFER, myImage);
  camera-setFinalDrawCallback(new WriteCallback(filename, camera, myImage));

  camera-addChild(_originalModel);
[\code]

If I make 
viewer.realize();
viewer.frame();

I will not see my 3D model.
If I do viewer.frame() once more I will see my 3D model but no shadow on it.

I know the problem is coming from the camera because if i create a viewer and 
run it with the same _originalModel before entering my screenshot procedure 
there is no problem.

Someone could explain me the logic behind it ? I mean do I have to make a trick 
for having shadow on my screenshot. I have read about 2 cameras on another 
topic but not sure about.

Thank you all :)

Cheers,
Benoît




-- 
Benoît Bayol
benoit.ba...@gmail.com

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





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


[osg-users] Using both osgViewer::Viewer and CompositeViewer simultaneously

2009-11-19 Thread dasari pavan kumar
Hi,
  I am trying to use osgViewerQT example where in I am trying to enable
both compositeViewer and Viewer. But if I toggle between both windows, I am
unable to register any input events for one of them, depending on which I
enable first. I badly need help with this scenario.

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


Re: [osg-users] Warning: Could not find plugin to read objects from file *.jpg

2009-11-19 Thread James Adkison
Hi Robert, Mourad,

Thanks for the help, it  solved the problem.  After using the dependency walker 
I was able to see that I was missing the jpeg62.dll.

Thanks again,
James

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





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


Re: [osg-users] [osgOcean] 3D model material display error!

2009-11-19 Thread Tian Ma
Hi Kim,

I have amended the attachment problem. Can you see the picture clearly now?

Cheers,
MT


Kim Bale wrote:
 Hi Tian,
 
 I can't really see what's wrong from the attached picture, it kind of
 looks like a dirty blue splodge...
 
 K.
 
 
 2009/11/19 Tian Ma :
 
  Hi Kim,
  
  When add my own island model to the oceanscene and of cource nodemask and 
  shaders have been set to the model, I found that the reflection of the 
  model on the ocean surface is not complete.
  
  Will you please tell me what caused this problem? And coule the problem be 
  solved?
  
  Thank you!
  
  Cheers,
  Tian[/img]
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=19879#19879
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
  
 ___
 osg-users mailing list
 
 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=19896#19896





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


Re: [osg-users] [osgOcean] 3D model material display error!

2009-11-19 Thread Kim Bale
There's no attachment at all now :(

K.


2009/11/19 Tian Ma tianxiao...@foxmail.com:
 Hi Kim,

 I have amended the attachment problem. Can you see the picture clearly now?

 Cheers,
 MT


 Kim Bale wrote:
 Hi Tian,

 I can't really see what's wrong from the attached picture, it kind of
 looks like a dirty blue splodge...

 K.


 2009/11/19 Tian Ma :

  Hi Kim,
 
  When add my own island model to the oceanscene and of cource nodemask and 
  shaders have been set to the model, I found that the reflection of the 
  model on the ocean surface is not complete.
 
  Will you please tell me what caused this problem? And coule the problem be 
  solved?
 
  Thank you!
 
  Cheers,
  Tian[/img]
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=19879#19879
 
 
 
 
  ___
  osg-users mailing list
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 
 ___
 osg-users mailing list

 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=19896#19896





 ___
 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] Optimal Rendering setup

2009-11-19 Thread Mark Jones
I have a pre-render to generate a texture of an object without drawable
culling, after that, I'm going to cull various drawables in the object to
let its insides peek thru, I'll be blending the old exterior (via texture)
with the interior view of the object that shows up when the drawables are
culled.  (Think of it like a transporter effect in Star Trek where the
surfaces are phasing in and out.)

I only need to generate the original texture once, and then blend it with a
procession of new frames where different faces are coming and going.
(Unless of course, someone rotates the view.)

What is the best way to do this?  Do I need to just let it pre-render
everytime, then render the whole image with blending or is there some way to
prevent the unculled image from rendering repeatedly?  Or am I worrying
about nothing in the first place?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SO version inconsistency

2009-11-19 Thread Alberto Luaces
Hi,

Robert Osfield writes:

 I've now removed it to return the include file list to what it was
 before I made the changes so should fix the build.  Right now I
 haven't removed Version from the include/osg, so having it in the
 include file list won't be a problem, but... do we now remove Version
 from svn?  We probably don't need to as it's not something that varies
 from install to install like Config does.

I think we should remove Version, because things are not working
now. What it is getting installed is the old Version file. I did the
test of modifying it with some incorrect values and I could verify that
those values were present on the file copied by the installation
process.

IMHO the fixes would be either to remove Version and put the output of
the configured Version.in in its place, PROJECT_SOURCE_DIR, as my
snippet showed, or to write an install rule to copy the configured
Version.in after the build from the binary directory.

--

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


Re: [osg-users] [osgOcean] 3D model material display error!

2009-11-19 Thread Tian Ma
Hi Kim:

I just give the picture's URL link below:

http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg

Cheers,
MT



Kim Bale wrote:
 There's no attachment at all now :(
 
 K.
 
 
 2009/11/19 Tian Ma :
 
  Hi Kim,
  
  I have amended the attachment problem. Can you see the picture clearly now?
  
  Cheers,
  MT
  
  
  Kim Bale wrote:
  
   Hi Tian,
   
   I can't really see what's wrong from the attached picture, it kind of
   looks like a dirty blue splodge...
   
   K.
   
   
   2009/11/19 Tian Ma :
   
   
Hi Kim,

When add my own island model to the oceanscene and of cource nodemask 
and shaders have been set to the model, I found that the reflection of 
the model on the ocean surface is not complete.

Will you please tell me what caused this problem? And coule the problem 
be solved?

Thank you!

Cheers,
Tian[/img]

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




___
osg-users mailing list

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




   ___
   osg-users mailing list
   
   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=19896#19896
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 osg-users mailing list
 
 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=19901#19901





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


Re: [osg-users] [osgOcean] 3D model material display error!

2009-11-19 Thread Kim Bale
Are you using a matrix transform above OceanScene to alter the sea level?

K.


2009/11/19 Tian Ma tianxiao...@foxmail.com:
 Hi Kim:

 I just give the picture's URL link below:

 http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg

 Cheers,
 MT



 Kim Bale wrote:
 There's no attachment at all now :(

 K.


 2009/11/19 Tian Ma :

  Hi Kim,
 
  I have amended the attachment problem. Can you see the picture clearly now?
 
  Cheers,
  MT
 
 
  Kim Bale wrote:
 
   Hi Tian,
  
   I can't really see what's wrong from the attached picture, it kind of
   looks like a dirty blue splodge...
  
   K.
  
  
   2009/11/19 Tian Ma :
  
  
Hi Kim,
   
When add my own island model to the oceanscene and of cource nodemask 
and shaders have been set to the model, I found that the reflection of 
the model on the ocean surface is not complete.
   
Will you please tell me what caused this problem? And coule the 
problem be solved?
   
Thank you!
   
Cheers,
Tian[/img]
   
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19879#19879
   
   
   
   
___
osg-users mailing list
   
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
   
   
   
   
   ___
   osg-users mailing list
  
   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=19896#19896
 
 
 
 
 
  ___
  osg-users mailing list
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list

 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=19901#19901





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

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


Re: [osg-users] Using OsgSim Overlay

2009-11-19 Thread Vaibhav Bansal
Hello Glenn,

 

The view dependent-with-perspective-overlay uses a shader, I am already
using a shader for my terrain(base geometry, osgearth).

Secondly for VIEW_DEPENDENT_WITH_ORTHOGRAPHIC mode the projected texture
resolution does not decrease(/projected area does not increase) even when
the viewing direction is near parallel to terrain, it stretches 'only' at
certain specific angles.

 

Is there a way to use overlay if I am already using a shader on my base
terrain?

 

Thanks and Regards

Vaibhav Bansal

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn
Waldron
Sent: Thursday, November 19, 2009 6:52 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Using OsgSim Overlay

 

Vaibhav,

The area covered by the projected texture changes based on your view angle.
As your angle of view gets less steep, the texture resolution appears to
descrease since it has to cover a larger area. Try
view-dependend-with-perspective-overlay, which helps with this issue. Also,
increase the texture size hint in the OverlayNode api.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791



On Thu, Nov 19, 2009 at 7:29 AM, Vaibhav Bansal vaib...@darshan3d.com
wrote:

Yes, this is what the overlay node does for me.
But I am unable to understand, why the stretching occurs only 'at' some
specific angles.


Regards
Vaibhav Bansal

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
Delport

Sent: Thursday, November 19, 2009 3:47 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Using OsgSim Overlay

Hi,

Vaibhav Bansal wrote:
 Hello jp,

 Thanks for the quick reply.
 How do I check if the 'resolution' of ovelay geometry is changing.

imagine the following:
You want to overlay a 1024x1024 checkerboard onto the earth and you have
a 512x512 overlay texture. If you view the whole earth it obviously
would not look good - too much detail to fit into the texture. What the
view dependent modes try to do is this: When you zoom in, you only see a
piece of the checkerboard, so now the 512x512 texture can contain only a
piece of the checkerboard and so you see more detail of the overlayed
geometry.

I think this is the effect you are seeing when you are moving the view
around.

jp


 Regards
 Vaibhav Bansal

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
 Delport
 Sent: Thursday, November 19, 2009 2:41 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Using OsgSim Overlay

 Hi Vaibhav,

 Vaibhav Bansal wrote:
 Hello,

 I have added a geometry as an overlay over another geometry.
 The overlay texture seems to distort(stretch) under certain viewing
 angles.
 It seems the projected texture is generating incorrect texture
 coordinates.

 The texture coordinates might be OK, but the resolution of your
 overlayed geometry might change in the generated overlayed texture. What
 happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the
 resolution/stretch stay the same?

 jp

 The white area is the overlaySubgraph geometry, and the colored area is
 the
 Overlay Node (base) geometry.
 The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.

 Can anyone suggest where should I start troubleshooting.

 Thanks
 Vaibhav Bansal


 


 


 

 ___
 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 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] SO version inconsistency

2009-11-19 Thread Robert Osfield
Hi Alberto,

On Thu, Nov 19, 2009 at 2:42 PM, Alberto Luaces alua...@udc.es wrote:
 I think we should remove Version, because things are not working
 now. What it is getting installed is the old Version file. I did the
 test of modifying it with some incorrect values and I could verify that
 those values were present on the file copied by the installation
 process.

Are you talking about an out of source build here?  An in source build
certainly works from the testing I've done, but I haven't tested an
out of source build yet.

 IMHO the fixes would be either to remove Version and put the output of
 the configured Version.in in its place, PROJECT_SOURCE_DIR, as my
 snippet showed, or to write an install rule to copy the configured
 Version.in after the build from the binary directory.

Removing Version from include/osg/Version would break the hand
maintained XCode projects, and force it to have it's own local copy of
Version which would be a backwards step all round.   So if we remove
Version then we really have to kick the XCode projects to touch as
well.

Assuming the problem you are seeing is down to an out of source build
then the short term solution is the simple change the location that
the autogenerated Version to be place in the PROJECT_SOURCE_DIR.
You've never said it explictly but I presume you mean this to get rout
the out of source build issue.

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


Re: [osg-users] Using OsgSim Overlay

2009-11-19 Thread Glenn Waldron
I'm no shader expert, so I cannot answer that.

I do know that osgEarth plays well with OverlayNode though -- it has some
built-in vector overlay support that uses OverlayNode in perspective mode
(see the osgearth_feature_overlay driver).


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


On Thu, Nov 19, 2009 at 10:24 AM, Vaibhav Bansal vaib...@darshan3d.comwrote:

  Hello Glenn,



 The view dependent-with-perspective-overlay uses a shader, I am already
 using a shader for my terrain(base geometry, osgearth).

 Secondly for VIEW_DEPENDENT_WITH_ORTHOGRAPHIC mode the projected texture
 resolution does not decrease(/projected area does not increase) even when
 the viewing direction is near parallel to terrain, it stretches ‘only’ at
 certain specific angles.



 Is there a way to use overlay if I am already using a shader on my base
 terrain?



 Thanks and Regards

 Vaibhav Bansal



 *From:* osg-users-boun...@lists.openscenegraph.org [mailto:
 osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Glenn Waldron
 *Sent:* Thursday, November 19, 2009 6:52 PM

 *To:* OpenSceneGraph Users
 *Subject:* Re: [osg-users] Using OsgSim Overlay



 Vaibhav,

 The area covered by the projected texture changes based on your view angle.
 As your angle of view gets less steep, the texture resolution appears to
 descrease since it has to cover a larger area. Try
 view-dependend-with-perspective-overlay, which helps with this issue. Also,
 increase the texture size hint in the OverlayNode api.


 Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
 +1.703.652.4791

  On Thu, Nov 19, 2009 at 7:29 AM, Vaibhav Bansal vaib...@darshan3d.com
 wrote:

 Yes, this is what the overlay node does for me.
 But I am unable to understand, why the stretching occurs only 'at' some
 specific angles.


 Regards
 Vaibhav Bansal

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
 Delport

 Sent: Thursday, November 19, 2009 3:47 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Using OsgSim Overlay

 Hi,

 Vaibhav Bansal wrote:
  Hello jp,
 
  Thanks for the quick reply.
  How do I check if the 'resolution' of ovelay geometry is changing.

 imagine the following:
 You want to overlay a 1024x1024 checkerboard onto the earth and you have
 a 512x512 overlay texture. If you view the whole earth it obviously
 would not look good - too much detail to fit into the texture. What the
 view dependent modes try to do is this: When you zoom in, you only see a
 piece of the checkerboard, so now the 512x512 texture can contain only a
 piece of the checkerboard and so you see more detail of the overlayed
 geometry.

 I think this is the effect you are seeing when you are moving the view
 around.

 jp

 
  Regards
  Vaibhav Bansal
 
  -Original Message-
  From: osg-users-boun...@lists.openscenegraph.org
  [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
  Delport
  Sent: Thursday, November 19, 2009 2:41 PM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] Using OsgSim Overlay
 
  Hi Vaibhav,
 
  Vaibhav Bansal wrote:
  Hello,
 
  I have added a geometry as an overlay over another geometry.
  The overlay texture seems to distort(stretch) under certain viewing
  angles.
  It seems the projected texture is generating incorrect texture
  coordinates.
 
  The texture coordinates might be OK, but the resolution of your
  overlayed geometry might change in the generated overlayed texture. What
  happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the
  resolution/stretch stay the same?
 
  jp
 
  The white area is the overlaySubgraph geometry, and the colored area is
  the
  Overlay Node (base) geometry.
  The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.
 
  Can anyone suggest where should I start troubleshooting.
 
  Thanks
  Vaibhav Bansal
 
 
  
 
 
  
 
 
  
 
  ___
  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] Using OsgSim Overlay

2009-11-19 Thread Vaibhav Bansal
Smooth, I would say distortions occur in certain angle ranges.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
Delport
Sent: Thursday, November 19, 2009 8:43 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Using OsgSim Overlay

Hi,

Vaibhav Bansal wrote:
 Yes, this is what the overlay node does for me.
 But I am unable to understand, why the stretching occurs only 'at' some
 specific angles.

Are the transitions smooth or are you seeing jumps?

jp

 
 Regards
 Vaibhav Bansal
 
 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
 Delport
 Sent: Thursday, November 19, 2009 3:47 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Using OsgSim Overlay
 
 Hi,
 
 Vaibhav Bansal wrote:
 Hello jp,

 Thanks for the quick reply.
 How do I check if the 'resolution' of ovelay geometry is changing.
 
 imagine the following:
 You want to overlay a 1024x1024 checkerboard onto the earth and you have 
 a 512x512 overlay texture. If you view the whole earth it obviously 
 would not look good - too much detail to fit into the texture. What the 
 view dependent modes try to do is this: When you zoom in, you only see a 
 piece of the checkerboard, so now the 512x512 texture can contain only a 
 piece of the checkerboard and so you see more detail of the overlayed 
 geometry.
 
 I think this is the effect you are seeing when you are moving the view 
 around.
 
 jp
 
 Regards
 Vaibhav Bansal

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P.
 Delport
 Sent: Thursday, November 19, 2009 2:41 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Using OsgSim Overlay

 Hi Vaibhav,

 Vaibhav Bansal wrote:
 Hello,
  
 I have added a geometry as an overlay over another geometry.
 The overlay texture seems to distort(stretch) under certain viewing
 angles.
 It seems the projected texture is generating incorrect texture
 coordinates.

 The texture coordinates might be OK, but the resolution of your 
 overlayed geometry might change in the generated overlayed texture. What 
 happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the 
 resolution/stretch stay the same?

 jp

 The white area is the overlaySubgraph geometry, and the colored area is
 the
 Overlay Node (base) geometry.
 The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION.

 Can anyone suggest where should I start troubleshooting.

 Thanks
 Vaibhav Bansal


 


 


 

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


Re: [osg-users] Best ways to render FE models with millions of tris and quads

2009-11-19 Thread Andrew Cunningham
Thanks for all the help guys - I will experiment with the duplicate vertices 
option - that may actually not be that bad in memory usage vs. using display 
lists.
Anyway, I can expose that to the user in some way for them to make a 
speed/memory tradeoff if required.
The main thing is that at least I understand what is going on!

BTW, 2.8.2 seems much more stable than 2.8.1 on Windows. I used to get some 
weird problems , even in single-threaded mode. Great job to all involved.

Andrew

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





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


Re: [osg-users] Mac OS X Snow Leopard

2009-11-19 Thread Robert Osfield
Hi Stefan,

I'm just reviewing submissions and have just checked your changes to
include/osg/Atomic and rather perplexed by the changes.   It concerns
me that while it might hack around a problem elsewhere it'll introduce
bugs under other build combinations.  You changes were the addition
of:

#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)  defined(__i386__)
volatile unsigned _value;

And the removal of the lines:

#else
volatile unsigned _value;

From the same block of code.  Neither change seems easily explainable
or valid for the long term.

Robert.

On Mon, Nov 2, 2009 at 11:56 PM, stefan) ste...@nortd.com wrote:
 Hey Paul,

 I just built osg 2.8.2 from scratch on 10.6.1 (snow leopard). I would
 be happy if we could roll a 2.8.3 release with the required patches.

 The patched files in question are attached. Is there anything else I
 can do to make this 2.8.3 release happen?

 It's also good to note that there is a bug in cmake 2.6 which has been
 resolved in the 2.8-0 preview release. The architecture is not set
 correctly in the xcode project files. this mean even though i386 is
 set in cmake the xcode project will be set to $(NATIVE_ARCH) which
 results in a 64-bit build. Using cmake 2.8 or manually setting the
 architecture resolves this issue.


 /stefanix

 ___
 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] Main branch MSFBO support change

2009-11-19 Thread Robert Osfield
HI All,

Wojtek's changes and now checked in to svn/trunk.

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


[osg-users] OSG wiki site not responding from Colorado

2009-11-19 Thread Chris 'Xenon' Hanson
  http://www.openscenegraph.org/

  Responds, but

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

   seems to be timing out right now.


  Several friends of mine confirm it's unreachable for them too.

-- 
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] Optimal Rendering setup

2009-11-19 Thread Paul Martz

Generate two textures, then use a shader to combine the two images.

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



Mark Jones wrote:

I have a pre-render to generate a texture of an object without drawable
culling, after that, I'm going to cull various drawables in the object to
let its insides peek thru, I'll be blending the old exterior (via texture)
with the interior view of the object that shows up when the drawables are
culled.  (Think of it like a transporter effect in Star Trek where the
surfaces are phasing in and out.)

I only need to generate the original texture once, and then blend it with a
procession of new frames where different faces are coming and going.
(Unless of course, someone rotates the view.)

What is the best way to do this?  Do I need to just let it pre-render
everytime, then render the whole image with blending or is there some way to
prevent the unculled image from rendering repeatedly?  Or am I worrying
about nothing in the first place?





___
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] osgManipulator error bug? in removeTransformUpdating

2009-11-19 Thread Robert Osfield
Hi Mathias,

I've now merged Stephan's bug fix, could you please test svn/trunk to
see if things are now fixed.

Cheers,
Robert.

On Sun, Nov 1, 2009 at 11:40 AM, Matthias Asselborn
matthias.asselb...@gmx.de wrote:
 Hi,

 iam using the trunk of OSG
 i ve a simple code snipped
 a Group with a dragger and two transformmatrix objects
 and their childs

 there is no problem to call the method
 pDragger-addTransformUpdating( pTransformBrick1 );
 pDragger-addTransformUpdating( pTransformBrick2 );

 but when i call the methods

 pDragger-removeTransformUpdating( pTransformBrick1 );
 pDragger-removeTransformUpdating( pTransformBrick2 );

 the code crashes with Expression: (This-_has_container(),0)
 in dragger.cpp line 204

 Code:

 void Dragger::removeTransformUpdating(osg::MatrixTransform* transform)
 {
    for(Dragger::DraggerCallbacks::iterator itr = _draggerCallbacks.begin();
        itr != _draggerCallbacks.end();
        ++itr)




 here is my test programm


 Code:

 int main( int argc, char **argv )
 {
        osgViewer::Viewer viewer;

        osg::ref_ptrosg::Group pRoot = new osg::Group;

        osg::ref_ptrosg::Node pBrick1 = osgDB::readNodeFile( 
 D:\\bricks\\obj\\3001.obj );
        osg::ref_ptrosg::Node pBrick2 = osgDB::readNodeFile( 
 D:\\bricks\\obj\\3005.obj );

        osg::MatrixTransform* pTransformBrick1 = new osg::MatrixTransform;
    pTransformBrick1-addChild( pBrick1 );

        osg::MatrixTransform* pTransformBrick2 = new osg::MatrixTransform;
    pTransformBrick2-addChild( pBrick2 );

        osgManipulator::Dragger* pDragger = 0;
        osg::ref_ptrosgManipulator::TabBoxDragger pTabBoxDragger = new 
 osgManipulator::TabBoxDragger();
    pTabBoxDragger-setupDefaultGeometry();
    pDragger = pTabBoxDragger;

        pRoot-addChild(pTransformBrick1);
        pRoot-addChild(pTransformBrick2);
        pRoot-addChild( pDragger );

     float scale = pBrick1-getBound().radius() * 1.6;
     pDragger-setMatrix(osg::Matrix::scale( scale, scale, scale ) *
                        osg::Matrix::translate( pBrick1-getBound().center() ) 
 );

    pDragger-addTransformUpdating( pTransformBrick1 );
        pDragger-addTransformUpdating( pTransformBrick2 );
        pDragger-removeTransformUpdating( pTransformBrick1 );
        pDragger-removeTransformUpdating( pTransformBrick2 );

    pDragger-setHandleEvents(true);

    osgUtil::Optimizer optimizer;
    optimizer.optimize( pRoot.get() );

        viewer.setSceneData( pRoot.get() );
    return viewer.run();
 }



 Why doesnt it work?
 Is there another way to activate and deactivate the dragger to the nodes?

 Thank you!

 Cheers,
 Matthias

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





 ___
 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] ReaderWriterModifyTerrain.cpp

2009-11-19 Thread Chris 'Xenon' Hanson
  I just submitted this code over on submissions for Robert to consider, but 
since there's
some opportunity for discussion of the future of this, I'm reposting the 
accompanying
description here for discussion.




  This pseudo-loader permits on-the-fly modifications of a PagedLOD database's 
terrain
heightfield's elevation values during load or save operations by simply 
appending the
.modifyterrain suffix to the database filename and setting some ReaderWriter 
Options like
MODIFYTERRAIN_ELEV_ADD. These can be specified through the command-line 
osgViewer like:

osgviewer -O MODIFYTERRAIN_ELEV_ADD 5 terrain.osg.modifyterrain

  Currently the sample code permits adding a positive or negative constant 
value, scaling,
enforcing a maximum or minimum clamp (ceiling/floor), replacement of a known 
constant
value with another known constant value, as well as replacing all values below 
a constant
with a potentially different constant.

  The underlying code is equipped to do non-spatially uniform terrain elevation
modification (similar to osg::TDS) through the use of generalized visitors and 
functors
offering point-elevation-evaluation callbacks. The callback provides the 
current spatial
point location and elevation and allows user code to return a new elevation 
value that
will replace the heightfield's existing elevation at that point.

  No spatial-feature-deformation library (for raising/lowering regional 
features like
lakes, building sites, roads, ordinance craters, etc) is included at this 
point. My client
isn't able to release this work yet, but may be able to in the future. This 
framework is
designed so that any API capable of answering what elevation should be in 
effect at this
X/Y position can be plugged in by deriving from the ModifyTerrainFunctor class,
constructing a ModifyTerrainVisitor with it, and apply()ing it to a scenegraph.

  A CMakeLists.txt is included. ReaderWriterMODIFYTERRAIN.cpp replies on some 
of the
PagedLOD/ProxyNode suffix enhancements I have already submitted in order to 
propagate the
psuedoloader suffix through child PagedLODs and ProxyNodes so that deeper 
levels of the
scenegraph get the modify treatment as they are loaded.

  While this code is finished and working, it could use a bit of cut  paste 
before being
checked in as-is. Much of the code within the ReaderWriterMODIFYTERRAIN.cpp 
file should be
(I feel, without arrogance) incorporated into the broader osg/osgTerrain 
architecture. The
three classes/APIs: ModifyTerrainFunctor, ModifyTerrainHeightField and
ModifyTerrainVisitor are applicable to in-scenegraph modification of 
VPB/PagedLOD terrain
whether it is done through the .modifyterrain pseudoloader or through
user-application-invoked code. Additionally the ModifyDatabaseSuffixVisitor is 
generally
applicable to any application of the pseudoloader technique in a database 
containing
PagedLOD or ProxyNode entities -- this class could be placed into any convenient
library/namespace -- osgDB suggests itself to me. The code for each of these is 
marked in
the comments with a  token and an explanation of where it might go in the 
osg Core
code if it were broken out of .modifyterrain.


  This is just the tip of what I'm working on as far as terrain tools, but it's 
all I can
release right now. It has already been tested pretty thoroughly, and can do 
some great
things. The pseudoloader technique means that you can apply these terrain 
modifications at
numerous different stages: During loading of a scenegraph in osgViewer, using 
-O to pass
the modification parameters. While building the scenegraph within OSGDEM/VPB. 
While
converting a scenegraph using osgconv (see my recent recursive-conversion 
submissions).
The pseudoloader also abstracts away any file-format dependency -- you can use 
the
pseudoloader atop any format plugin that can load and save PagedLOD databases 
made of
osgTerrain/heightfield geometry. Currently this is just .osg and .IVE.

  Moving the ModifyTerrainFunctor, ModifyTerrainHeightField and 
ModifyTerrainVisitor
classes out of .modifyterrain should allow any osg program to perform 
on-the-fly elevation
modifications to the terrain even after it is loaded.


  I have some additional work in progress that would facilitate selectively 
requesting
PagedLOD nodes to reload their already-loaded-and-displayed children 
(presumably through
the pseudoloader layer) so that runtime dynamic terrain alterations (think, 
explosion
craters) can easily be performed on the database without affecting the pristine 
on-disk
copy. Alternately, this could be used to load permanently-updated copies of the 
terrain
model that had been built by VPB (patching the database to include 
newly-incorporated but
permanent modifications such as data updated from UAVs, etc). I intend to 
submit as much
of this as I can as time and client allows.

  Essentially, there's an enormous amount of terrain technology I can provide 
to OSG in
the near future, as my client allows me 

[osg-users] Shadows on two-sided polygons

2009-11-19 Thread Andreas Goebel
Hi,

I use two-sided polygons (as I display no real objects but mathematical
ones like planes this makes sense) and use shadows on them.

After upgrading to 2.8.2, this does no longer work. I get the correct
shadow on one side of a plane, but if the shadow should be on the other
side, I get strange artifacts but no shadow.

Is there a setting to change the shadow to two-sided? Thanks for your help.

Regards,

Andreas

Correct shadow: http://raumgeometrie.de/NeueBilder/testbilder/Shadow1.png
Incorrect shadow: http://raumgeometrie.de/NeueBilder/testbilder/Shadow2.png
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Main branch MSFBO support change

2009-11-19 Thread Paul Martz
Confirming Wokciech's comments, and can't wait to look at the final 
committed code to see whether bitmasks are signed or unsigned. :-)


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



Wojciech Lewandowski wrote:

Robert, Paul and everyone interested,

My changes in Re: [osg-submissions] DisplaySettings masks 
forimplicitbufferattachments were based on initial Paul submission. And 
of course my submission included Pauls changes and added support for 
setting IMPLICIT_BUFFER_ATTACHMENT policy through DisplaySettings. You 
may treat last of my DisplaySettings masks 
forimplicitbufferattachments posts as final result of my and Paul 
colaboration on this topic.  Btw I just have submitted  RenderStage cpp 
modifications made versus Roberts latest merges in today SVN.  I believe 
topic of  implicit buffer attachemnts for fbo and msfbo will be closed 
when Robert merges my today fixes I just posted.


Cheers,
Wojtek


- Original Message - From: Robert Osfield 
robert.osfi...@gmail.com

To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Thursday, November 19, 2009 1:22 PM
Subject: Re: [osg-users] Main branch MSFBO support change



Hi Paul,

I haven't reviewed this submission yet, but it clearly overlaps with
the changes that Wojtek was working on.  I've already checked in some
of Wojtek's changes (the interface changes to osg::Camera and
osg::DisplaySettings) but haven't checked in the changes to
RenderStage.cpp.  I'm awaiting feedback from Wojtek before merging the
remaining elements his changes.

Could you give me a heads up on where you think we stand with respect
this submission?  Is it complimentary, no longer needed at all, will
need to be refactor?

I'll hold off from doing a review of your changes till you give me a 
heads up.


Cheers,
Robert.

On Sat, Oct 24, 2009 at 8:09 PM, Paul Martz pma...@skew-matrix.com 
wrote:

Hi Robert -- Here is my submission to increase application control over
implicit creation of FBO attachments, MSFBO resolve attachments, and 
blit,

as discussed in the thread Improving multisampled FBO.

By default, the current behavior is preserved, which means that OSG
implicitly creates both color and depth FBO attachments if they were not
already attached to the Camera. In the multisampled case, this is 
done for

both the multisampled FBO as well as the resolve FBO.

However, the app can now explicitly set a mask to control which 
attachments
OSG creates implicitly, using Camera::setUseBufferMasks(). There is a 
mask

bit for color, depth, and stencil. The default is USE_COLOR_BUFFER |
USE_DEPTH_BUFFER.

If you pass you parameter and are not using MSFBO, the mask controls the
attachments to the rendered FBO.

If you are using MSFBO, then you can pass two parameters: the first 
controls
attachments to the multisampled FBO, and the second controls 
attachments to

the resolve FBO.

I've also changed the computation of the glBlitFramebuffer mask. 
Formerly,
this iterated over all attachments to compute the mask, once per 
frame --

very inefficient. This was really unnecessary, as OSG always copies all
attachments. Now, the code simply sets all bits and lets OpenGL sort 
it out.

(OpenGL silently ignores a bit if the attachment isn't set in both the
source and destination FBOs.)

This gives me a permanent fix for the glBlitFramebuffer issue on OS 
X, as I

can now explicitly leave the depth buffer out of the resolve FBO.

(As an additional aside, I'll note that the current FBO handling by 
Camera

and RenderStage is pretty hairy and it'd be nice to completely scrap and
reimplement this. However, it'd be difficult to do so without breaking
backwards compatibility. So, this is best left for an OSG v3.0 change.)
--
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 


___
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] ShadowMap problem...

2009-11-19 Thread Wyatt Earp
Ok... so I did what you suggested mostly... I took the osgshadow example,
add my geometry and it worked.  I added another shader on the root node of
the scenegraph, because in my app, I do that.  I took the shaders from
ShadowMap.cpp and put them into vert/frag files and loaded them into their
respective shaders.  That worked too.

 

In my application, when I load those shaders from ShadowMap.cpp and use
them, I see a change in the lighting but it isn’t what I expect.  Rather
than the objects casting shadows on the terrain, it looks like a shdow is
being cast over the objects, but it isnt'being cast on the terrain.  The
best way I can describe it is that it looks like the objects are in the sun
then a cloud floats between the sun and the object...  I don’t think a
picture will show what I mean, but here are 3 pictures with the shadow
moving progressively to the left over the object... note the white building
in the front gets darker.  But now shadows on the terrain.

 

cid:image001.png@01CA692E.7A38B7F0

 

cid:image002.png@01CA692E.7A38B7F0

 

 

cid:image003.png@01CA692E.7A38B7F0

 

W

 

 

 

 -Original Message-

 From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-

 boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay

 Sent: Thursday, November 12, 2009 1:45 PM

 To: OpenSceneGraph Users

 Subject: Re: [osg-users] ShadowMap problem...

 

 Hi Wyatt,

 

  Any suggestions?

 

 Not really. At this point you'll probably have to trace into OSG to

 make

 sure the shadow map traversal is getting to the right objects (i.e.

 your

 masks are set correctly), and check your shaders (perhaps even try with

 the basic shaders that LISPSM uses by default for starters). Also, try

 to start with the osgShadow example, and work up progressively to

 something similar to what you have in your app, and perhaps in the

 process you'll find out what's not working. If not, then at least

 you'll

 have a small app that can demonstrate the problem, which we might be

 able to help with.

 

 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

image001.jpgimage002.jpgimage003.jpg___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SO version inconsistency

2009-11-19 Thread Philip Lowman
Robert,

Until the XCode files can be removed I would recommend simply substituting
version numbers in by hand.

Also, is there a list of what's holding up switching to CMake in regards to
XCode support?

On Thu, Nov 19, 2009 at 10:31 AM, Robert Osfield
robert.osfi...@gmail.comwrote:

 Hi Alberto,

 On Thu, Nov 19, 2009 at 2:42 PM, Alberto Luaces alua...@udc.es wrote:
  I think we should remove Version, because things are not working
  now. What it is getting installed is the old Version file. I did the
  test of modifying it with some incorrect values and I could verify that
  those values were present on the file copied by the installation
  process.

 Are you talking about an out of source build here?  An in source build
 certainly works from the testing I've done, but I haven't tested an
 out of source build yet.

  IMHO the fixes would be either to remove Version and put the output of
  the configured Version.in in its place, PROJECT_SOURCE_DIR, as my
  snippet showed, or to write an install rule to copy the configured
  Version.in after the build from the binary directory.

 Removing Version from include/osg/Version would break the hand
 maintained XCode projects, and force it to have it's own local copy of
 Version which would be a backwards step all round.   So if we remove
 Version then we really have to kick the XCode projects to touch as
 well.

 Assuming the problem you are seeing is down to an out of source build
 then the short term solution is the simple change the location that
 the autogenerated Version to be place in the PROJECT_SOURCE_DIR.
 You've never said it explictly but I presume you mean this to get rout
 the out of source build issue.

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




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


Re: [osg-users] ShadowMap problem...

2009-11-19 Thread Wojciech Lewandowski
Hi Wyatt,

Buildings getting darker while light is moving can be a normal thing it is 
simply a result of normal diffuse shading. Can you move camera so close that 
view frustum contains a single building ?. Ideally make it look at 45 deg from 
a liitle above. Then make screenshot, with debugHUD. Its really important whats 
on debug hud display.  This will tell me alot. If you have problems with 300 kb 
OSG forum limit, just send this screenshot directly to my address. 

Cheers,
Wojtek Lewandowski




From: Wyatt Earp 
Sent: Thursday, November 19, 2009 10:45 PM
To: 'OpenSceneGraph Users' 
Subject: Re: [osg-users] ShadowMap problem...


Ok... so I did what you suggested mostly... I took the osgshadow example, add 
my geometry and it worked.  I added another shader on the root node of the 
scenegraph, because in my app, I do that.  I took the shaders from 
ShadowMap.cpp and put them into vert/frag files and loaded them into their 
respective shaders.  That worked too.

 

In my application, when I load those shaders from ShadowMap.cpp and use them, I 
see a change in the lighting but it isn't what I expect.  Rather than the 
objects casting shadows on the terrain, it looks like a shdow is being cast 
over the objects, but it isnt'being cast on the terrain.  The best way I can 
describe it is that it looks like the objects are in the sun then a cloud 
floats between the sun and the object...  I don't think a picture will show 
what I mean, but here are 3 pictures with the shadow moving progressively to 
the left over the object... note the white building in the front gets darker.  
But now shadows on the terrain.

 



 



 

 



 

W

 

 

 

 -Original Message-

 From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-

 boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay

 Sent: Thursday, November 12, 2009 1:45 PM

 To: OpenSceneGraph Users

 Subject: Re: [osg-users] ShadowMap problem...

 

 Hi Wyatt,

 

  Any suggestions?

 

 Not really. At this point you'll probably have to trace into OSG to

 make

 sure the shadow map traversal is getting to the right objects (i.e.

 your

 masks are set correctly), and check your shaders (perhaps even try with

 the basic shaders that LISPSM uses by default for starters). Also, try

 to start with the osgShadow example, and work up progressively to

 something similar to what you have in your app, and perhaps in the

 process you'll find out what's not working. If not, then at least

 you'll

 have a small app that can demonstrate the problem, which we might be

 able to help with.

 

 Hope this helps,

 

 J-S

 --

 __

 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com

 http://www.cm-labs.com/

  http://whitestar02.webhop.org/

 ___

 osg-users mailing list

 osg-users@lists.openscenegraph.org

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

 openscenegraph.org






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


Re: [osg-users] Why is one object split into two same-level nodes in OSG 2.8.2

2009-11-19 Thread Nguyen Tien Dat
OK. I figured it out. It's due to a strange problem with smoothing
group. In the obj file there are many s 1 and s 2  (mean that
group 1, group 2). It should keep increase the counter (i.e. s 1, s
2, s 3, s 4, etc) instead of using s 1 and s 2 alternatively.
The obj loader consider them as two groups, and when converting to the
scenegraph, it somehow creates two nodes. If I just ignore smoothing
groups (either delete all s ... in the obj file or do not process
s command in obj loader) then it should be fine.
Dat

On Wed, Nov 18, 2009 at 10:03 AM, Nguyen Tien Dat tienda...@gmail.com wrote:
 Dear all,
 I have a model of a box with about 500 triangles. When I load the
 model into OSG 2.8.2, it is split into two nodes that have the same
 level (i.e. both are children of the root node). Please see these
 pictures to visualize what happen
 http://cs.uiowa.edu/~tinguyen/box.html  (for the second and third
 pics, I move one node by apply a matrix transform, while leave the
 other the same)
 Do you know why this happens, and how to stop this behavior. (It seems
 to me that it's kind of restriction when you can't have more than 256
 triangles in a node. Although I'm not sure).
 Attachment is the model of the box.
 Thanks,
 Dat

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


Re: [osg-users] ShadowMap problem...

2009-11-19 Thread Wyatt Earp
Thanks for the reply... I'll do that and post result Thanks,
W

On Thu, Nov 19, 2009 at 4:56 PM, Wojciech Lewandowski lewandow...@ai.com.pl
 wrote:

  Hi Wyatt,

 Buildings getting darker while light is moving can be a normal thing it is
 simply a result of normal diffuse shading. Can you move camera so close
 that view frustum contains a single building ?. Ideally make it look at 45
 deg from a liitle above. Then make screenshot, with debugHUD. Its really
 important whats on debug hud display.  This will tell me alot. If you have
 problems with 300 kb OSG forum limit, just send this screenshot directly to
 my address.

 Cheers,
 Wojtek Lewandowski



  *From:* Wyatt Earp wyattbsearp1...@gmail.com
 *Sent:* Thursday, November 19, 2009 10:45 PM
 *To:* 'OpenSceneGraph Users' osg-users@lists.openscenegraph.org
 *Subject:* Re: [osg-users] ShadowMap problem...

  Ok... so I did what you suggested mostly... I took the osgshadow example,
 add my geometry and it worked.  I added another shader on the root node of
 the scenegraph, because in my app, I do that.  I took the shaders from
 ShadowMap.cpp and put them into vert/frag files and loaded them into their
 respective shaders.  That worked too.



 In my application, when I load those shaders from ShadowMap.cpp and use
 them, I see a change in the lighting but it isn’t what I expect.  Rather
 than the objects casting shadows on the terrain, it looks like a shdow is
 being cast over the objects, but it isnt'being cast on the terrain.  The
 best way I can describe it is that it looks like the objects are in the sun
 then a cloud floats between the sun and the object...  I don’t think a
 picture will show what I mean, but here are 3 pictures with the shadow
 moving progressively to the left over the object... note the white building
 in the front gets darker.  But now shadows on the terrain.



 [image: cid:image001.png@01CA692E.7A38B7F0]



 [image: cid:image002.png@01CA692E.7A38B7F0]





 [image: cid:image003.png@01CA692E.7A38B7F0]



 W







  -Original Message-

  From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-

  boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay

  Sent: Thursday, November 12, 2009 1:45 PM

  To: OpenSceneGraph Users

  Subject: Re: [osg-users] ShadowMap problem...

 

  Hi Wyatt,

 

   Any suggestions?

 

  Not really. At this point you'll probably have to trace into OSG to

  make

  sure the shadow map traversal is getting to the right objects (i.e.

  your

  masks are set correctly), and check your shaders (perhaps even try with

  the basic shaders that LISPSM uses by default for starters). Also, try

  to start with the osgShadow example, and work up progressively to

  something similar to what you have in your app, and perhaps in the

  process you'll find out what's not working. If not, then at least

  you'll

  have a small app that can demonstrate the problem, which we might be

  able to help with.

 

  Hope this helps,

 

  J-S

  --

  __

  Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com

  http://www.cm-labs.com/

   http://whitestar02.webhop.org/

  ___

  osg-users mailing list

  osg-users@lists.openscenegraph.org

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

  openscenegraph.org

 --

 ___
 osg-users 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] get coordinates of intersect point between a Line Segment Intersector and an object

2009-11-19 Thread Nguyen Tien Dat
Dear all,
How can I get the coordinates of the intersect point when I shoot a
ray to the scene and the ray hits an object?
Thanks,
Dat
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] 3D model material display error!

2009-11-19 Thread Tian Ma
Hi Kim:

No, I am not. 

But the model was under a pisitionAttitudeNode, and I just make the model -1 
meter down. Does it matter?

Cheers,
MT



Kim Bale wrote:
 Are you using a matrix transform above OceanScene to alter the sea level?
 
 K.
 
 
 2009/11/19 Tian Ma :
 
  Hi Kim:
  
  I just give the picture's URL link below:
  
  http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg
  
  Cheers,
  MT
  
  
  
  Kim Bale wrote:
  
   There's no attachment at all now :(
   
   K.
   
   
   2009/11/19 Tian Ma :
   
   
Hi Kim,

I have amended the attachment problem. Can you see the picture clearly 
now?

Cheers,
MT


Kim Bale wrote:


 Hi Tian,
 
 I can't really see what's wrong from the attached picture, it kind of
 looks like a dirty blue splodge...
 
 K.
 
 
 2009/11/19 Tian Ma :
 
 
 
  Hi Kim,
  
  When add my own island model to the oceanscene and of cource 
  nodemask and shaders have been set to the model, I found that the 
  reflection of the model on the ocean surface is not complete.
  
  Will you please tell me what caused this problem? And coule the 
  problem be solved?
  
  Thank you!
  
  Cheers,
  Tian[/img]
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=19879#19879
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
  
  
  
 ___
 osg-users mailing list
 
 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=19896#19896





___
osg-users mailing list

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



   ___
   osg-users mailing list
   
   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=19901#19901
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 osg-users mailing list
 
 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=19950#19950





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