Re: [osg-users] projective texture mapping and lighting

2012-02-21 Thread Sebastian Messerschmidt

Hello Mike,

I didn't dive into the last part, but it seems you want to have your 
projection only on certain parts.
In order to sort out the rest of the scene you can either use stencil 
tests or depth tests. Think about it like some kind of inverse shadow 
mapping. You want only those parts being textured which are sort of in 
front of the shadow.


Maybe this is helpful.

cheers
Sebastian

Apparently I spoke too soon; the method I described in my last post doesn’t 
work when I rotate the viewer.  If I had an object outside the texture 
projection area and rotated it so it should obscure the image, I could see the 
image through the object.  Likewise, if I had an object inside the projection 
and rotated so that the top appeared to be outside the projection area, I would 
not see the projection on the part of the object outside the projection area.

Another technique I tried was to use clipping planes.  I used two nodes that 
each added the rest of my scene as a child.  One node did not use the texture 
projection, and the other did use it but also added a ClipNode in order to clip 
everything but the desired texture projection area.  This resulted in 
Z-fighting between my image and the color of the underlying geometry.

Finally I tried a hybrid of the two methods, where I took my stencil mask node 
and added a child ClipNode, then added my model as a child of the ClipNode.  I 
wanted the stencil to “wrap” exactly the model, but only within the borders of 
my image.  However, the ClipNode had no effect.  The appearance was that the 
texture was applied to my entire scene, and everything outside my image 
boundary was dark, like my original problem.

Can anyone please help?

Thanks,
Mike

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





___
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] Warping an image for display onto a curved screen

2012-02-21 Thread Roy Caligan
Thanks for replying, Robert. I've talked with others about this same problem, 
and I know it can be done. I just don't have the programming skills to make it 
happen. But you have been helpful; I didn't really know if this was something I 
could do on my own or not.

Thanks again!
 
Roy

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





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


Re: [osg-users] projective texture mapping and lighting

2012-02-21 Thread Michael Schanne
Apparently I spoke too soon; the method I described in my last post doesn’t 
work when I rotate the viewer.  If I had an object outside the texture 
projection area and rotated it so it should obscure the image, I could see the 
image through the object.  Likewise, if I had an object inside the projection 
and rotated so that the top appeared to be outside the projection area, I would 
not see the projection on the part of the object outside the projection area.

Another technique I tried was to use clipping planes.  I used two nodes that 
each added the rest of my scene as a child.  One node did not use the texture 
projection, and the other did use it but also added a ClipNode in order to clip 
everything but the desired texture projection area.  This resulted in 
Z-fighting between my image and the color of the underlying geometry.

Finally I tried a hybrid of the two methods, where I took my stencil mask node 
and added a child ClipNode, then added my model as a child of the ClipNode.  I 
wanted the stencil to “wrap” exactly the model, but only within the borders of 
my image.  However, the ClipNode had no effect.  The appearance was that the 
texture was applied to my entire scene, and everything outside my image 
boundary was dark, like my original problem.

Can anyone please help?

Thanks,
Mike

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





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


Re: [osg-users] Shader lookup table method: does lookup texture have to be bound to a separate geometry?

2012-02-21 Thread Ethan Fahy
Gotcha, thanks.  No need for apologies, I never would have got as far as I did 
to begin with if it weren't for that post.  Thanks again everyone for the 
assistance on this one, I have the LUT method working perfectly now with 
floating point values.


Jean-Sébastien Guay wrote:
> Hi Ethan,
> 
> 
> > Thanks Sergey, that clears it up for me.
> > 
> 
> Yes, Sergey has it right, that post was written from memory and 
> obviously I got it backwards. I always cast the variable to int, or 
> explicitly create a uniform of type SAMPLER_2D which avoids this issue 
> altogether but is more lines of code.
> 
> Sorry for the confusion,
> 
> J-S
> -- 
> __
> Jean-Sebastien Guay  
> http://whitestar02.dyndns-web.com/
> ___
> 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=45663#45663





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


Re: [osg-users] Shader lookup table method: does lookup texture have to be bound to a separate geometry?

2012-02-21 Thread Jean-Sébastien Guay

Hi Ethan,


Thanks Sergey, that clears it up for me.


Yes, Sergey has it right, that post was written from memory and 
obviously I got it backwards. I always cast the variable to int, or 
explicitly create a uniform of type SAMPLER_2D which avoids this issue 
altogether but is more lines of code.


Sorry for the confusion,

J-S
--
__
Jean-Sebastien Guay  jean_...@videotron.ca
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to simulate dam-break process?

2012-02-21 Thread Buckley, Bob CTR MDA/DES
Paper by Jim Chen while at The Institute for Simulation and Training/Univ. 
Central Florida.

Real-Time Fluid Simulation in a Dynamic Virtual Environment
www.cs.ucf.edu/~vision/papers/rtFluid.pdf

Not quite the implementation info, but is the underlying theory.


From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris Hanson
Sent: Tuesday, February 21, 2012 8:58 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] How to simulate dam-break process?

On Mon, Feb 13, 2012 at 6:12 AM, Tiger Woods 
<95713...@qq.com> wrote:
Hi,All
  I want to simulate the process of a dam break. i have change data about  dam 
breach in different time . please give me some suggestion about how can i do it 
!
Thank you!
  This is really beyond the scope of basic OSG.

  You might be able to generate multiple VPB terrain models and load and 
display them in sequence with some sort of fading effect.

  osgEarth might also be able to help you, by altering the terrain model on the 
fly in some way.

--
Chris 'Xenon' Hanson, omo sanza lettere. 
xe...@alphapixel.com http://www.alphapixel.com/
Training * Consulting * Contracting
3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 * 
GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL
Digital Imaging * GIS * GPS * Telemetry * Cryptography * Digital Audio * LIDAR 
* Kinect * Embedded * Mobile * iPhone/iPad/iOS * Android

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


[osg-users] osg, macosx-x86_64 imageio plugin color byte swap problem

2012-02-21 Thread Chris Hanson
I had a user contact me for some assistance on this issue. I'm not an
OSX/imageio guy, so I don't know the ramifications of this, and I thought
I'd throw it out for the wider community to comment on before proposing a
patch.

>From the user:
>We have found some image color ordering issue on MacOS Snow Leopard 10.6.
>We do x86_64 build, with imageio plugin.
>We set CMAKE flag: OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio
>For some reason, for all tested images, color channels Red and Blue were
swapped.
>For instance in RGBA case, we have BGRA image.

  Now, I'm not familiar with the imageio plugin, but it seems like if it
was horribly broken and returning the wrong channel order, someone would
have noticed by now.

  Has anyone had problems with this on OSX 32-bit or 64-bit?

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Implementing a HUD in QTviewer - hud projection matrix

2012-02-21 Thread Ron Mayer
OK I found a solution to what I was trying to achieve.
I stopped using a 2nd HUD camera, because I couldn't figure out the proper 
projection with the resizable QT dialog.
Instead I added a Geode to my projector node (I forgot to mention in my 
previous post that the image is actually a projection of an image, and a 
modified version of the osgspotlight example).
In this added geode I draw the lines exactly above (and centered around) the 
projected image.
To make sure the crosshair lines overlay everything else in the scene, I turned 
off depth test, and used a transparent bin (similar to using an AutoTransform).
Code:

> xhairGeode->getOrCreateStateSet()->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF);
> xhairGeode->getOrCreateStateSet()->setRenderingHint( 
> osg::StateSet::TRANSPARENT_BIN );
> xhairGeode->getOrCreateStateSet()->setRenderBinDetails( 11, "RenderBin");


And now it works  :D , the crosshair is overlaid on the center of the 
projection.

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





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


Re: [osg-users] Problem with osgEarth::ImageOverlay::setAlpha

2012-02-21 Thread Glenn Waldron
Yes, appears to be malfunctioning. I will open an issue for it...thanks.
http://github.com/gwaldron/osgearth/issues/66


Glenn Waldron / @glennwaldron


On Wed, Feb 8, 2012 at 11:38 AM, Ou Yang  wrote:

> Hi,
>
> I use osgEarth::ImageOverlay::setAlpha(float alpha) to change the
> transparency of images, which was draped on terrain, just like what google
> earth does, but this method seems has no effect at all! It also doesn't
> work in the sample osgearth_imageoverlay. Is it a bug?
> I use openscenegraph 3.0.0 and osgearth 2.1.1, build with visual studio
> 2010.
>
>
> Thank you!
>
> Cheers,
> Ou
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45341#45341
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/1_538.jpg
>
>
> ___
> 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] Animated skybox? Feasible in OSG?

2012-02-21 Thread Jason Daly

On 02/21/2012 03:08 AM, Sergey Polischuk wrote:

Hi, Christian

You can do this, although can say anything about hardware accelerated 
decoding... that depends on backend of plugin that you use for movie loading to 
osg (there are xine ffmpeg directshow and quicktime plugins in osg for video 
decoding, i dont know for sure if any of these use hardware accelerated video 
decoding)


I think the more recent versions of ffmpeg have some support for VAAPI 
as well as nVidia's VDPAU, which would work for Linux.  There may also 
be support in ffmpeg for Apple's VDA.  For Windows, you might be best 
off with the DirectShow plugin, which should benefit from DxVA.


--"J"

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


Re: [osg-users] Animated skybox? Feasible in OSG?

2012-02-21 Thread Chris Hanson
 Mon, Feb 20, 2012 at 3:09 PM, Christian Buchner <
christian.buch...@gmail.com> wrote:

> Hi,
>  do you think doing an animated skybox is feasible using OSG? We would
> like to do this on Windows using hardware-accelerated decoding of an
> MP4 or H.264 or WMV file into a texture, so it does not suck up all
> our precious CPU resources.
> For rendering the skybox I would use software like Vue, which does
> animated clouds, sun, stars,  This is for a simulator that does
> some long term simulation of a radio network, and having a bit of an
> indication of day and night would be cool to have.
>
>

You could also use the free osgEphemeris, or the commercial SilverLining to
do it in real time, without pre-rendering in Vue.


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with osgEarth::ImageOverlay::setAlpha

2012-02-21 Thread Chris Hanson
>
> I use osgEarth::ImageOverlay::setAlpha(float alpha) to change the
> transparency of images, which was draped on terrain, just like what google
> earth does, but this method seems has no effect at all! It also doesn't
> work in the sample osgearth_imageoverlay. Is it a bug?
> I use openscenegraph 3.0.0 and osgearth 2.1.1, build with visual studio
> 2010.
>
>
You will probably get wider exposure for this on the osgEarth forums:

http://forum.osgearth.org/

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to simulate dam-break process?

2012-02-21 Thread Chris Hanson
On Mon, Feb 13, 2012 at 6:12 AM, Tiger Woods <95713...@qq.com> wrote:

> Hi,All
>   I want to simulate the process of a dam break. i have change data about
>  dam breach in different time . please give me some suggestion about how
> can i do it !
> Thank you!
>
>   This is really beyond the scope of basic OSG.

  You might be able to generate multiple VPB terrain models and load and
display them in sequence with some sort of fading effect.

  osgEarth might also be able to help you, by altering the terrain model on
the fly in some way.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] [ANN] PDF3D toolkit includes advanced OpenSceneGraph integration for technical publishing

2012-02-21 Thread Tomlinson, Gordon
Congrats on the new release Ian


For those looking for a PDF SDK that’s integrated with OSG you cannot go better 
than this, the software is great and easy to use and we have been using it for 
2+ years now and the team behind it are highly respsonsive to help and possible 
feature enhancements


Gordon Tomlinson
Chief Engineer(Remoteview)
Overwatch
An Operating Unit of Textron Systems
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ian Curington
Sent: Sunday, February 12, 2012 9:07 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [ANN] [ANN] PDF3D toolkit includes advanced OpenSceneGraph 
integration for technical publishing

Dear OSG-community,

PDF3D® toolkit includes advanced multi-platform OpenSceneGraph integration for  
technical publishing.  The PDF3D® software development toolkit from Visual 
Technology Services includes multi-platform integration for OpenSceneGraph 
3.0.1 applications. Systems using interactive high performance 
OpenSceneGraph-based applications can integrate PDF3D, capturing live models to 
interactive 3D PDF documents. Sharing and distributing interactive documents 
improves collaboration, communication and effectiveness of distributed teams. 
These documents let anyone with the free Adobe® Reader easily rotate, pan, 
zoom, select parts, review annotations and play back animation without 
requiring access to the original application.

Sequences of files using database loaders are used to create 3D flip-book 
movies with playback controls embedded in the PDF page. The PDF3D export is 
available as a toolkit for interactive applications, server-based conversions, 
or within the PDF3DReportGen desktop application. Development environments 
include Microsoft® Windows Visual Studio 2005/2008/2010, Linux and Apple 
MacOSX®. Assembly part dimensioning annotations (PMI) and view selection 
part-level visibility enhance the technical information content for reporting 
documentation. Large models benefit from highly compressed ISO-24517-1:2008 
PDF/Engineering PRC encoding methods and 64-bit support.

PDF3D is by Visual Technology Services Ltd.
Contact Ian Curington; OSG forum member "pdf3d" messages accepted.
Moderator: if acceptable, can also go into "community news" list.

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





___
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] [vpb] The principle of Spliting the earth to terrain tile in VPB

2012-02-21 Thread Robert Osfield
Hi Wei,

I haven't used an particular paper/online resource as a guide to how
the quad tree is set up, I simple computed the values from first
principles.  The basic idea is that the one is aiming to create as
even tile dimensions as is possible on the Level 1 - this will be 2:1
for a whole earth database, then each individual tile is then divided
into the 4, and then VPB keeps subdividing the tiles in this way till
the resolution of the output tiles matches well the resolution of the
source imagery and DEMS.

Robert.

On 7 February 2012 05:51, Wei Y  wrote:
> Hi,
>
> I am reading the source code of the VBP, but I could not get the idea how the 
> earth be chunked ,It's difficult to understand
> the principle just by the source code , Such as this function 
> DataSet::computeOptimumTileSystemDimensions(int& C1, int& R1)
>
> Does the VPB running according to some articles, is there any resources i can 
> reference?
>
> Thank you!
>
> Cheers,
> wei
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45274#45274
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Strange results from osgviewer

2012-02-21 Thread Robert Osfield
Hi Chris,

Which version of the OSG are you using?

Robert.

On 28 January 2012 19:29, Chris Blizniak  wrote:
> Hi,
>
> I've got a strange problem.
> By running osgviewer.exe dumptruck.osgt. The 3D model is not displayed 
> properly. The problem exists with the following models: cow, dumptruck, 
> cessnafire... I haven't tested more. There are no problems with displaying 
> cessna.osg or robot.osg.
>
> I cannot post a screenshot yet, as I need to have at least two posts.
> The result from osgviewer is quite strange and it looks like only certain 
> number of vertices has been loaded. It simply doesn't display a whole mesh 
> but only few lines.
>
> Thank you!
>
> Cheers,
> chris
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45099#45099
>
>
>
>
>
> ___
> 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] [vpb] The principle of Spliting the earth to terrain tile in VPB

2012-02-21 Thread Wei Y
Hi,

I am reading the source code of the VBP, but I could not get the idea how the 
earth be chunked ,It's difficult to understand 
the principle just by the source code , Such as this function 
DataSet::computeOptimumTileSystemDimensions(int& C1, int& R1)

Does the VPB running according to some articles, is there any resources i can 
reference? 

Thank you!

Cheers,
wei

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





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


[osg-users] setViewMatrixAsLookAt in Qt

2012-02-21 Thread Chris Blizniak
Hi,

I would like to ask if there is an easy way of setting position and orientation 
of view matrix.
Currently I've got simple project in VS2010, using 'osgViewerQt.cpp' file, I 
disabled the camera manipulator and I am trying to control the camera using 
setViewMatrixAsLookAt() function, the problem is that I am not sure how to 
update that in real time. 
The idea is simple, I want to add three sliders to my main window where the osg 
widget is present, currently with the cessna.osgt model, and by adjusting 
sliders I want to change, X, Y, Z coordinates corresponding to the position of 
the camera. I tried signals and slots, but that did not work as I would expect. 
Any suggestions are more than welcome.

Thank you in advance!

Chris

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





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


[osg-users] [forum] About the camera direction of the AnimationPathManipulator.

2012-02-21 Thread Chow Ngaiman
Thanks for the ticket.

I'm a open scene graph user.
When I'm using the AnimationPathManipulator and AnimationPath. I'm not able to 
set needed camera direction.
The method is AnimationPath.insert(time,controlPoint).
But I'm not sure of wath the original direction of the camera is. Is it the z 
axis  positive direction in object space?
If I decide to set it goes along with the vector(1.0,1.0,1.0), what the 
controlPoint's rotation member is?

Thanks in advance.

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





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


[osg-users] problems with osg::Image in QtWidget

2012-02-21 Thread Islamov Denis
Hello.

I try to connect OSG (3.0.1) and Qt Creator (2.4.1) on MacOs (10.6). I faced 
with some problems:

1) When i compile Qt Viewer, program can't find plugins for loading models (but 
all dylib's in usr/local/lib and .so files in usr/local/lib/osgPlugins-3.0.1)

2) When i try to compile QtWidget and connect -losgQt and -losgWidget to 
project i have:

Code:
Undefined symbols:
"osg::Image::setImage(int, int, int, int, unsigned int, unsigned int, unsigned 
char*, osg::Image::AllocationMode, int)", referenced from:
vtable for osgQt::QWebViewImagein main.o
vtable for osgWidget::BrowserImagein main.o



Sorry for my English and thanx for answers...

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





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


[osg-users] How to simulate dam-break process?

2012-02-21 Thread Tiger Woods
Hi,All

   I want to simulate the process of a dam break. i have change data about  dam 
breach in different time . please give me some suggestion about how can i do it 
!
Thank you!

Cheers,
  tiger

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





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


[osg-users] [ANN] [ANN] PDF3D toolkit includes advanced OpenSceneGraph integration for technical publishing

2012-02-21 Thread Ian Curington
Dear OSG-community,

PDF3D® toolkit includes advanced multi-platform OpenSceneGraph integration for  
technical publishing.  The PDF3D® software development toolkit from Visual 
Technology Services includes multi-platform integration for OpenSceneGraph 
3.0.1 applications. Systems using interactive high performance 
OpenSceneGraph-based applications can integrate PDF3D, capturing live models to 
interactive 3D PDF documents. Sharing and distributing interactive documents 
improves collaboration, communication and effectiveness of distributed teams. 
These documents let anyone with the free Adobe® Reader easily rotate, pan, 
zoom, select parts, review annotations and play back animation without 
requiring access to the original application.

Sequences of files using database loaders are used to create 3D flip-book 
movies with playback controls embedded in the PDF page. The PDF3D export is 
available as a toolkit for interactive applications, server-based conversions, 
or within the PDF3DReportGen desktop application. Development environments 
include Microsoft® Windows Visual Studio 2005/2008/2010, Linux and Apple 
MacOSX®. Assembly part dimensioning annotations (PMI) and view selection 
part-level visibility enhance the technical information content for reporting 
documentation. Large models benefit from highly compressed ISO-24517-1:2008 
PDF/Engineering PRC encoding methods and 64-bit support.

PDF3D is by Visual Technology Services Ltd.
Contact Ian Curington; OSG forum member "pdf3d" messages accepted.
Moderator: if acceptable, can also go into "community news" list.

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





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


[osg-users] CxxTest: Custom delta-comparison for osg::Vec3

2012-02-21 Thread Colin Steinberg
Hi,

I'm using CxxTest 3.10.1 to unit-test my code.  I wrote an extension to 
correctly handle osg::Vec3 data, which works fine on MSVC, but won't compile 
using GCC 4.3.3.

The extension consists of two parts - a ValueTraits-implementation to print 
osg::Vec3 data in readable form, and a delta-function to check if two osg::Vec3 
are almost equal.

The extension:

Code:

#include 
#include 

namespace CxxTest {
CXXTEST_TEMPLATE_INSTANTIATION
class ValueTraits {
std::string s;
  public:
ValueTraits(const osg::Vec3& v) {
std::ostringstream oss;
oss << "osg::Vec3(" << v << ")";
s = oss.str();
}
const char* asString() const { return s.c_str(); }
};

template 
bool delta (osg::Vec3 x, osg::Vec3 y, D d) {
return ((y.x() >= x.x() - d) && y.x() <= x.x() + d) &&
(y.y() >= x.y() - d) && y.y() <= x.y() + d) &&
(y.z() >= x.z() - d) && y.z() <= x.z() + d));
}
}




I use it in a test like this:

Code:

void test_vec3 {
osg::Vec3 a(1.0, 1.0, 1.0);
osg::Vec3 b(1.01, 1.01, 1.01);

TS_ASSERT_DELTA(a, b, 0.001);   // Fails
TS_ASSERT_DELTA(a, b, 0.1); // Passes
}




When compiling with gcc it seems like my delta-function is not found or used,
the compiler tries to use the generic templated "delta(X x, Y y, D d)", which
tries to test for "y >= x - d && y <= x + d".

Compiler-output:


Code:

/home/docdrum/dev/OsgProjectTests/tests/cpptests/lib/cxxtest/cxxtest/TestSuite.h:
 In function »bool CxxTest::delta(X, Y, D) [with X = osg::Vec3f, Y = 
osg::Vec3f, D = double]«:
/home/docdrum/dev/OsgProjectTests/tests/cpptests/lib/cxxtest/cxxtest/TestSuite.h:172:
   instantiated from »void CxxTest::doAssertDelta(const char*, unsigned int, 
const char*, X, const char*, Y, const char*, D, const char*) [with X = 
osg::Vec3f, Y = osg::Vec3f, D = double]«
/home/docdrum/dev/OsgProjectTests/tests/cpptests/unit/UnitTest.h:122:   
instantiated from here
/home/docdrum/dev/OsgProjectTests/tests/cpptests/lib/cxxtest/cxxtest/TestSuite.h:162:
 Fehler: no match für »operator+« in »x + d«
/usr/include/osg/Vec3f:135: Anmerkung: Kandidaten sind: const osg::Vec3f 
osg::Vec3f::operator+(const osg::Vec3f&) const
/home/docdrum/dev/OsgProjectTests/tests/cpptests/lib/cxxtest/cxxtest/TestSuite.h:162:
 Fehler: no match für »operator-« in »x - d«
/usr/include/osg/Vec3f:152: Anmerkung: Kandidaten sind: const osg::Vec3f 
osg::Vec3f::operator-(const osg::Vec3f&) const
/usr/include/osg/Vec3f:167: Anmerkung:  const osg::Vec3f 
osg::Vec3f::operator-() const
make[2]: *** [tests/cpptests/unit/CMakeFiles/UnitTest.dir/UnitTest.cpp.o] 
Fehler 1
make[1]: *** [tests/cpptests/unit/CMakeFiles/UnitTest.dir/all] Fehler 2
make: *** [all] Fehler 2




I tried using all combinations of osg::Vec3f instead of osg::Vec3, using 
const-references, float- and double-parameters for d instead of templating...

Any ideas how I can make this work on GCC?

Thank you!

Cheers,
Colin
[/code]

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





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


Re: [osg-users] Help: issue about "NaN" detected by CullVisitor.

2012-02-21 Thread Matt Xu
Hi, all

I am a newer for osg and graphic programming. And, now I am try to port osg 
with opengles2.0 onto QNX system.

Currently, the osg can be compiled ok. and I use the simple osg Tutorial_02 
(GeometryTest.cpp) for testing. The test program can be compiled and linked ok.

When I running the test program on QNX target, I get the following error 
information, and I have asked for Mr.Google, but I still cannot get over it, 
help to give me your comments, steps, etc. and thanks with kindly.

---error information--
Screen Window (640 x 480) Created with OpenGL ES 2.0 and EGL.
Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile
CullVisitor::apply(Geode&) detected NaN,
depth=nan, center=(5 5 5),
matrix={
nan nan nan nan 
nan nan nan nan 
nan nan nan nan 
nan nan nan nan 
}

CullVisitor::apply(Geode&) detected NaN,
depth=nan, center=(0 0 0),
matrix={
nan nan nan nan 
nan nan nan nan 
nan nan nan nan 
nan nan nan nan 
}

CullVisitor::apply(Geode&) detected NaN,
depth=nan, center=(5 5 5),
matrix={
nan nan nan nan 
nan nan nan nan 
nan nan nan nan 
nan nan nan nan 
}

...
---

Thank you!

Cheers,
Matt


-
Update: 
It has been fixed.
I have forget to port the "getScreenSettings" function, once it been ported, 
the test program can running on the target.

Thanks for all.

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




Attachments: 
http://forum.openscenegraph.org//files/geometrytest_106.cpp


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


Re: [osg-users] Shader lookup table method: does lookup texture have to be bound to a separate geometry?

2012-02-21 Thread Ethan Fahy
Thanks Sergey, that clears it up for me.

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





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


[osg-users] Problem with osgEarth::ImageOverlay::setAlpha

2012-02-21 Thread Ou Yang
Hi,

I use osgEarth::ImageOverlay::setAlpha(float alpha) to change the transparency 
of images, which was draped on terrain, just like what google earth does, but 
this method seems has no effect at all! It also doesn't work in the sample 
osgearth_imageoverlay. Is it a bug?
I use openscenegraph 3.0.0 and osgearth 2.1.1, build with visual studio 2010.


Thank you!

Cheers,
Ou

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




Attachments: 
http://forum.openscenegraph.org//files/1_538.jpg


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


[osg-users] Strange results from osgviewer

2012-02-21 Thread Chris Blizniak
Hi,

I've got a strange problem.
By running osgviewer.exe dumptruck.osgt. The 3D model is not displayed 
properly. The problem exists with the following models: cow, dumptruck, 
cessnafire... I haven't tested more. There are no problems with displaying 
cessna.osg or robot.osg. 

I cannot post a screenshot yet, as I need to have at least two posts.
The result from osgviewer is quite strange and it looks like only certain 
number of vertices has been loaded. It simply doesn't display a whole mesh but 
only few lines.

Thank you!

Cheers,
chris

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





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


Re: [osg-users] Shader lookup table method: does lookup texture have to be bound to a separate geometry?

2012-02-21 Thread Sergey Polischuk
From opengl docs:

glUniform1i and glUniform1iv are the only two functions
that may be used to load uniform variables defined as sampler
types. Loading samplers with any other function will result in a
GL_INVALID_OPERATION error.

And osg uses this calls only for int uniforms or sampler uniforms, for unsigned 
it calls glUniformui* funcitons.

Cheers.

21.02.2012, 17:45, "Ethan Fahy" :
> By the way I had originally put the TEXTURE_UNIT as a const unsigned int 
> because of the 10th post in this thread:
> http://forum.openscenegraph.org/viewtopic.php?t=8273
> as it was suggested by Jean-Sebastien.  Not sure if there is some disconnect 
> that I am still not getting but changing it to a regular int seems to have 
> solved my problems so I will just move forward using a regular int.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45637#45637
>
> ___
> 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] projective texture mapping and lighting

2012-02-21 Thread Michael Schanne
Never mind; I was able to figure out a solution by studying the 
osgpackeddepthstencil example and some OpenGL stencil buffer tutorials I found 
online.

What I did was add a node to the root where I created a geometry the same size 
as my video projection, and added a Stencil.  I also turned off depth testing 
and set the ColorMask to false.  This became my stencil mask.

Then, I added two more nodes to the root.  Each had a stencil.  One was set to 
draw if the stencil was equal to 1, the other if not equal to 1.  To the first 
node's StateSet I also added the texture I am projecting.  To each of these, I 
added the node which was the root of my model geometry.  This caused the video 
projection to be drawn inside the mask, and the rest of the scene without the 
projection outside the mask.

-Mike

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





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


Re: [osg-users] Shader lookup table method: does lookup texture have to be bound to a separate geometry?

2012-02-21 Thread Ethan Fahy
By the way I had originally put the TEXTURE_UNIT as a const unsigned int 
because of the 10th post in this thread:
http://forum.openscenegraph.org/viewtopic.php?t=8273
as it was suggested by Jean-Sebastien.  Not sure if there is some disconnect 
that I am still not getting but changing it to a regular int seems to have 
solved my problems so I will just move forward using a regular int.

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





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


Re: [osg-users] Shader lookup table method: does lookup texture have to be bound to a separate geometry?

2012-02-21 Thread Ethan Fahy
Jean-Sebastien and Sergey,

Thanks very much to you both.  Sergey, you were spot-on about the unsigned int 
vs int thing causing my OpenGL error and Jean-Sebastien you were correct about 
the texture clamping default.

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





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


Re: [osg-users] Compilation fails with recent version of osg for IOS / opengl es-builds

2012-02-21 Thread Stephan Maximilian Huber
Hi Robert,

I am sorry about the introduced bug, your fixes compile and work fine on
my end.

Looks like I should spend some time learning compiler macros again :)

Stephan


Am 21.02.12 11:38, schrieb Robert Osfield:
> Hi Stephan,
> 
> On 27 January 2012 13:09, Stephan Maximilian Huber
>  wrote:
>> attached you'll find a compile fix for the new introduced rowlength-feature.
> 
> I've just spotted an error with the changes you made to avoid building
> the RowLength  feature under GLES - you changes disabled the feature
> for all platforms because you used the form:
> 
>#if !defined(OSG_GLES1_FEATURES) && !defined(OSG_GLES2_FEATURES)
> 
> Which is always fails as both OSG_GLES1_FEATURES and
> OSG_GLES2_FEATURES are always defined - it's only their value either 0
> or 1 that determines which the GLES features are available.   By
> contrast the OSG_GLES1_AVAILABLE and OSG_GLES2_AVAILABLE are only
> defined when GLES is present so can be used in a similar manner -
> something that is already in use elsewhere in the OSG:
> 
> #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
> 
> I've now modified your changes to use the _AVAILABLE form.  Could you
> do an svn update and let me know if it works fine for you.
> 
> Thanks
> 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] [build] Android OSG display problem

2012-02-21 Thread Jorge Izquierdo Ciges
Be N00b my friend! :P

Let my guess for you

This is GLES2 so you need Shaders, if you don't add a Shader then you will
see nothing. Usually in OSG the scene graph adds a Shader for you but that
standard shaders don't work well with GLES2, it's easier to use your own
shaders

To Load textures you NEED to compile OSG WITH the 3rd party package or you
will not have any textures in jpeg,png or anything more complex. To use
those libraries and OSG plugins you need to use the Macros for static
plugins/libraries. If you look into the first part of the example you'll
see them. Also you need to add the libraries and plugins in the Android.mk
to be linked correctly.

Just keep on trying and hitting your head with the wall and all will be ok.
Doing things for Android and Iphone in a Native Level requiere a little bit
of perseverance.

2012/2/21 Giulio Pierucci 

> c3Array can be used to store these triples. Since
>//osg::Vec3Array is derived from the STL vector class, we can use the
>//push_back method to add array elements. Push back adds elements to
>//the end of the vector, thus the index of first element entered is
>//zero, the second entries index is 1, etc.
>//Using a right-handed coordinate system with 'z' up, array
>//elements zero..four below represent the 5 points required to create
>//a simple pyramid.
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Origin of pixel coordinates?

2012-02-21 Thread Jen Hunter
Hi Paul,

oh ok, my fault. I should have thought of that.
Thank you very much for your reply, now it's clear. :)

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





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


Re: [osg-users] [build] Android OSG display problem

2012-02-21 Thread Giulio Pierucci
Thanks for reply, Jorge. I really appreciate your help!

I'll try today to load a simpler model. May i use ".osg" model or ".osgt"?
It's possible to try to load directly a ".dae" model?

Yesterday, i've downloaded "OpenSceneGraph-Data-3.0.0", unzipped and put in my 
HTC sdcard.

I tried all ".osg" and "osgt" examples; this is the result:

Model visible   Texture visible
avatar.osg  --> No  No  
axes.osgt   --> Yes No
bignathan.ogs   --> No  No
cessna.ogs  --> Yes No
cessna.ogst --> Yes No
cessnafire.ogs  --> Yes No
cessnafire.ogst --> Yes No
clock.ogst  --> Yes No
cow.ogs --> Yes No
cow.ogsy--> Yes No
cube_mapped_torus   --> Yes No
dumptruck.ogs   --> Yes No
dumptruck.ogst  --> Yes No
example.ogs --> No  No
fountain.ogst   --> Yes No
glider.ogs  --> Yes No
glider.ogst --> Yes No
glsl_confetti.ogst  --> No  No
glsl_julia.ogst --> Yes No
glsl_mandelbrot.ogs --> Yes No
glsl_simple.ogs --> No  No
Jansens.ogs --> No  No
lz.ogs  --> Yes No
lz.ogst --> Yes No
morphing.ogs--> No  No
morphtarget_shape0  --> Yes No
morphtarget_shape1  --> Yes No
nathan.ogs  --> No  No
osgcool.ogst--> Yes No
robot.ogs   --> No  No
skydome.ogst--> Yes No
SmokeBox.ogs--> Yes No
spaceship.ogs   --> Yes No

All model are too advanced for android frameword or i do something wrong?

Another try: I like to start from the beginning.
I've tried to convert BasicGeometry tutorial, for learn.
I took osgAndroidExampleGLES2 for project base. I modified OsgMainApp like this:


Code:
#include "OsgMainApp.hpp"
#include 

OsgMainApp::OsgMainApp(){

_lodScale = 1.0f;
_prevFrame = 0;

_initialized = false;
_clean_scene = false;

}
OsgMainApp::~OsgMainApp(){

}

//Initialization function
void OsgMainApp::initOsgWindow(int x,int y,int width,int height){

__android_log_write(ANDROID_LOG_ERROR, "OSGANDROID", "Initializing 
geometry");

osg::notify(osg::ALWAYS)<<"Testing"setThreadingModel(osgViewer::ViewerBase::SingleThreaded);

_root = new osg::Group();
_pyramidGeode = new osg::Geode();
_pyramidGeometry = new osg::Geometry();

//OsgMainApp::loadObjects();

// switch off lighting as we haven't assigned any normals.
_root->getOrCreateStateSet()->setMode(GL_LIGHTING, 
osg::StateAttribute::OFF);


_viewer->realize();

_viewer->addEventHandler(new osgViewer::StatsHandler);
_viewer->addEventHandler(new 
osgGA::StateSetManipulator(_viewer->getCamera()->getOrCreateStateSet()));
_viewer->addEventHandler(new osgViewer::ThreadingHandler);
_viewer->addEventHandler(new osgViewer::LODScaleHandler);

_manipulator = new osgGA::KeySwitchMatrixManipulator;

_manipulator->addMatrixManipulator( '1', "Trackball", new 
osgGA::TrackballManipulator() );
_manipulator->addMatrixManipulator( '2', "Flight", new 
osgGA::FlightManipulator() );
_manipulator->addMatrixManipulator( '3', "Drive", new 
osgGA::DriveManipulator() );
_manipulator->addMatrixManipulator( '4', "Terrain", new 
osgGA::TerrainManipulator() );
_manipulator->addMatrixManipulator( '5', "Orbit", new 
osgGA::OrbitManipulator() );
_manipulator->addMatrixManipulator( '6', "FirstPerson", new 
osgGA::FirstPersonManipulator() );
_manipulator->addMatrixManipulator( '7', "Spherical", new 
osgGA::SphericalManipulator() );

_viewer->setCameraManipulator( _manipulator.get() );

//_viewer->getViewerStats()->collectStats("scene", true);

_initialized = true;

__android_log_write(ANDROID_LOG_ERROR, "OSGANDROID", "END INIT");
}
//Draw
void OsgMainApp::draw(){
//Associate the pyramid geometry with the pyramid geode
//   Add the pyramid geode to the root node of the scene graph.

_pyramidGeode->addDrawable(_pyramidGeometry);
_root-

[osg-users] Testing of OpenSceneGraph svn/trunk in prep for 3.1 dev release

2012-02-21 Thread Robert Osfield
Hi All,

I have now mostly cleared the osg-submissions backlog, the only items
left are ones that will require more discussions/work on before they
are ready to merge.  If something you've submitted has been merged and
I haven't got back to you please notify me of the submissions.

With most the submissions handled I'm getting ready to make an
OpenSceneGraph-3.1 dev release, which will be the first proper
milestone on route to the next stable release which will be 3.2.  I
don't yet have a schedule for 3.2, but would like to get it out in the
next few months.  Before I push out 3.1 I'd like to get some feedback
from the community on how well OpenSceneGraph svn/trunk is holding up,
so could as many members of the community check out svn/trunk and let
me know how it builds and runs on your platforms and your
applications.

Thanks for you help in testing,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Compilation fails with recent version of osg for IOS / opengl es-builds

2012-02-21 Thread Robert Osfield
Hi Stephan,

On 27 January 2012 13:09, Stephan Maximilian Huber
 wrote:
> attached you'll find a compile fix for the new introduced rowlength-feature.

I've just spotted an error with the changes you made to avoid building
the RowLength  feature under GLES - you changes disabled the feature
for all platforms because you used the form:

   #if !defined(OSG_GLES1_FEATURES) && !defined(OSG_GLES2_FEATURES)

Which is always fails as both OSG_GLES1_FEATURES and
OSG_GLES2_FEATURES are always defined - it's only their value either 0
or 1 that determines which the GLES features are available.   By
contrast the OSG_GLES1_AVAILABLE and OSG_GLES2_AVAILABLE are only
defined when GLES is present so can be used in a similar manner -
something that is already in use elsewhere in the OSG:

#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)

I've now modified your changes to use the _AVAILABLE form.  Could you
do an svn update and let me know if it works fine for you.

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


Re: [osg-users] Disable all antialiasing

2012-02-21 Thread Sergey Polischuk
Hi

All antialiasing is disabled in opengl by default.
If you mean you should be able to read values as you write them in shader - you 
should choose appropriate render target texture attachment type. I'm not sure 
if it is possible to render to unnormalized integer type color textures in osg, 
you could try to attach texture with format GL_RGBA32UI and internal format 
GL_RGBA_INTEGER_EXT (also there are 8\16 bit formats with different channels 
count, check out GL_EXT_texture_integer extension specification ) to camera to 
check if it works in osg (as it works with this formats in opengl).

Cheers,
Sergey

21.02.2012, 12:44, "Aurelien Albert" :
> Hi,
>
> In my application, I need to render 2 buffers :
> - color buffer
> - "object-code" buffer
>
> I obtain the color-buffer by normal rendering to an FBO.
>
> For some algorithms purpose (object tracking, objects statisitics, etc...) I 
> need also an "object-code" buffer with, for each pixel, an int value 
> corresponding to the object.
>
>  I can do this with a shader in another FBO, but I need this buffer to be not 
> antialiased at all.
>
> For example, if the background code is "0", and there are 2 objects in the 
> scene (codes "10" and "20") the final "object-code" buffer must be filled 
> with "0", "10" and "20" but no other value.
>
> How can I configure my rendering to do so ? Maybe using the stencil buffer as 
> a object-code buffer (I don't know if antialiasing such as MSAA affect 
> stencil buffer) ?
>
> Thank you!
>
> Cheers,
> Aurelien
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45619#45619
>
> ___
> 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] Disable all antialiasing

2012-02-21 Thread Robert Osfield
Hi Aurelien,

You have to explicitly enable multisampling for FBO's when settting up
the RTT Camera, so should it be off by default.

Robert.

On 21 February 2012 08:44, Aurelien Albert  wrote:
> Hi,
>
> In my application, I need to render 2 buffers :
> - color buffer
> - "object-code" buffer
>
> I obtain the color-buffer by normal rendering to an FBO.
>
> For some algorithms purpose (object tracking, objects statisitics, etc...) I 
> need also an "object-code" buffer with, for each pixel, an int value 
> corresponding to the object.
>
>  I can do this with a shader in another FBO, but I need this buffer to be not 
> antialiased at all.
>
> For example, if the background code is "0", and there are 2 objects in the 
> scene (codes "10" and "20") the final "object-code" buffer must be filled 
> with "0", "10" and "20" but no other value.
>
> How can I configure my rendering to do so ? Maybe using the stencil buffer as 
> a object-code buffer (I don't know if antialiasing such as MSAA affect 
> stencil buffer) ?
>
> Thank you!
>
> Cheers,
> Aurelien
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45619#45619
>
>
>
>
>
> ___
> 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] Disable all antialiasing

2012-02-21 Thread Aurelien Albert
Hi,

In my application, I need to render 2 buffers :
- color buffer
- "object-code" buffer

I obtain the color-buffer by normal rendering to an FBO.

For some algorithms purpose (object tracking, objects statisitics, etc...) I 
need also an "object-code" buffer with, for each pixel, an int value 
corresponding to the object.

 I can do this with a shader in another FBO, but I need this buffer to be not 
antialiased at all.

For example, if the background code is "0", and there are 2 objects in the 
scene (codes "10" and "20") the final "object-code" buffer must be filled with 
"0", "10" and "20" but no other value.

How can I configure my rendering to do so ? Maybe using the stencil buffer as a 
object-code buffer (I don't know if antialiasing such as MSAA affect stencil 
buffer) ?

Thank you!

Cheers,
Aurelien

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





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


Re: [osg-users] Animated skybox? Feasible in OSG?

2012-02-21 Thread Sergey Polischuk
Hi, Christian

You can do this, although can say anything about hardware accelerated 
decoding... that depends on backend of plugin that you use for movie loading to 
osg (there are xine ffmpeg directshow and quicktime plugins in osg for video 
decoding, i dont know for sure if any of these use hardware accelerated video 
decoding)

Cheers,
Sergey

21.02.2012, 02:09, "Christian Buchner" :
> Hi,
>
> do you think doing an animated skybox is feasible using OSG? We would
> like to do this on Windows using hardware-accelerated decoding of an
> MP4 or H.264 or WMV file into a texture, so it does not suck up all
> our precious CPU resources.
>
> For rendering the skybox I would use software like Vue, which does
> animated clouds, sun, stars,  This is for a simulator that does
> some long term simulation of a radio network, and having a bit of an
> indication of day and night would be cool to have.
>
> Christian
> ___
> 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