Re: [osg-users] osg::notify crash, not thread safe

2013-08-04 Thread Robert Osfield
Hi David,

There were various changes to osg::Notify during the 3.1.x dev cycle.
Could you try out OSG-3.2 and see how you get on.

Robert.

On 2 August 2013 22:54, David Fries da...@fries.net wrote:
 I spent a few days tracking down a crash I was having generally when a
 terrapage terrain was paging.  This is using OSG 3.1, when I finally
 caught the corruption I found that both the DatabasePager thread and
 the Draw thread were calling OSG_NOTIFY.

 I wrote up a test that does little more than start up a bunch of
 threads and print messages and found it too crashes.  I am testing on
 both Linux x86-64 gcc 4.7.2, and Windows 7 Visual Studio 10 and both
 crash, though it crashes much quicker on Windows.

 It will crash pretty quickly with the default (no arguments) on Windows.

 The following arguments are working for me to crash on Linux on a 12
 core (24 with hyperthreading), x86-64 system.
 ./ThreadedNotify 48 1000 2 2

 It has been pointed out that cout/cerr are thread safe, so it should
 be possible to make osg::notify thread safe as well.  In this program
 it helps when I reduce the notification level, at least with the low
 number of messages being printed it seems to be unlikely.

 --
 David Fries da...@fries.netPGP pub CB1EE8F0
 http://fries.net/~david/

 ___
 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] Problem loading RGB values when alpha = 0 on mac osx

2013-08-04 Thread Robert Osfield
HI Paulo,

I'll have to defer to OSX experts to help out with this one as I don't
have experitise on the Mac, nor a Mac to work with.  Hopefully they
will chip in.

Robert.

On 3 August 2013 13:35, Paulo Silva paulo.jn...@gmail.com wrote:
 Ok, let me make a small update,

 I was able to get osg-3.2 to load the example image using the code in
 attach.
 I can't be precise in what worked, but I guess updating libpng helped.

 Now it output:
 0 0 0 0
 0 0 0 1
 0 128 128 2
 64 128 191 4
 64 128 191 8
 64 128 191 16
 64 128 191 32
 64 128 191 64
 64 128 191 128
 64 128 192 255

 Which is still not the desired result, but it is different from the old
 result
 0 0 0 0
 0 0 0 1
 0 127 127 2
 63 127 191 4
 63 127 191 8
 63 127 191 16
 63 127 191 32
 63 127 191 64
 63 127 191 128
 64 128 192 255

 Weird, weird. I guess I'll have to separate channels into several images as
 a workaround - at least for now.

 tschüss

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

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


Re: [osg-users] [osgPlugins] Probleme with PNG plugin: when there are no_data value(generated by GDAL)

2013-08-04 Thread Robert Osfield
HI Mohammed,

I don't know whether PNG can handle what you want from it, whether
GDAL is buggy, or whether the OSG's plugin can't handle the niche type
of .png file GDAL is generating.  You are a programming, have all the
OSG source code available to you so if you want to delve deeper that
have a go at see what might being going astray.

As a general comment, GeoTiff is the standard image format for doing
geospatial work, one doesn't normally touch png for geospatial work as
it's not at all designed for it.  I don't know what you are looking at
.png in the convtex of geosptail work.

Robert.


On 3 August 2013 13:52, Mohammed Djeralfia osgfo...@tevs.eu wrote:
 Hi

 I have generated a png image from GDAL with no_data values to set the black 
 color to transparant with this command line:
 gdal_translate.exe --a_nodata 0 -of PNG -ot byte thumbnail.png 
 thumbnail_no_data.png

 the image is loaded correctly in any viewer (Windows , photoshop...)
 BUT when I load it with osgViewer --image thumbnail_no_data.png the image is 
 zoomed and not dispalyed correctly:
 [Image: http://forum.osgearth.org/file/n7581916/badImage.png ]

 if I don not specify the no_data in GDAL transformation it will be displayed 
 correctly in the osgViewer:
 [Image: http://forum.osgearth.org/file/n7581916/goodImage.png ]

 When I maked a comparison between them with photoshop , I see that both have 
 a GRAY CHANNEL , but for the image with no_data there is another CHANNEL that 
 is a mask(perhaps to specify  where there are the no_data???)

 So I think that the PNG Plugin can not read the mask generated by GDAL.

 I hope that someone can help me with this.

 I have post before  this probleme on the GENERAL brunch:
  http://forum.openscenegraph.org/viewtopic.php?t=12492

 The attached images

 Thank you!

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




 Attachments:
 http://forum.openscenegraph.org//files/tempview_512.png
 http://forum.openscenegraph.org//files/tempview_hide_419.png


 ___
 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] Problem loading RGB values when alpha = 0 on mac osx

2013-08-04 Thread Stephan Maximilian Huber
Hi Paulo,

Am 02.08.2013 um 21:14 schrieb Paulo Silva paulo.jn...@gmail.com:

 Somewhere in the loading some sort of alpha pre-multiplying is going on.

Unfortunately the imageio-plugin load its files with premultiplied alpha, as 
you discovered already. The image-io-plugin does demultiply the alpha again, 
but can't restore rgb-values with alpha 0 and there are some rounding 
differences. Between 3.0 and 3.2 I added an optimization to use apples 
optimized demultipliying-algorithm instead of the prior home cooked version.

If you are in need for exact rgba-values use libpng (just edit the cmake-files) 
or another image-plugin like rgba. 

cheers,

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


Re: [osg-users] Problem loading RGB values when alpha = 0 on mac osx

2013-08-04 Thread Paulo Silva
Hi Stephan,

thanks for the tip. I'll look into the cmake-files to see if I can select
libpng instead.

cheers,
Paulo

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


[osg-users] deferred shading in osg

2013-08-04 Thread Trajce Nikolov NICK
Hi Community,

has anyone has done some work on this and willing to share hints, snippets ?

Thanks a lot!

Nick

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


Re: [osg-users] deferred shading in osg

2013-08-04 Thread Wang Rui
Hi Nick,

You may want to have a look at the osgeffectcompositor example in the
osgRecipes project, which is an initial deferred shading framework for OSG.
Also there is the osgPPU project that can do the same work for you, I think.

Wang Rui



2013/8/5 Trajce Nikolov NICK trajce.nikolov.n...@gmail.com

 Hi Community,

 has anyone has done some work on this and willing to share hints, snippets
 ?

 Thanks a lot!

 Nick

 --
 trajce nikolov nick

 ___
 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