Re: [osg-users] osg::TextureCubeMap and HDR

2010-01-12 Thread Peter Wraae Marino
Hi David,

i have a very new graphics card that supports floating point textures.

Peter

On Mon, Jan 11, 2010 at 4:45 PM, David Spilling
david.spill...@gmail.com wrote:
 Dear Peter,

 I think that some (older) graphics cards support floating point 2D textures,
 but not cube maps.

 I'm also aware that even if you do support floating point cube maps, many
 older cards can't do interpolation on them. Can you turn it to GL_NEAREST
 and see if that makes a difference?

 Regards,

 David


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





-- 
Regards,
Peter Wraae Marino

www.osghelp.com - OpenSceneGraph support site
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::TextureCubeMap and HDR

2010-01-12 Thread Peter Wraae Marino
Hi osgUsers,

followup:

been debugging the texturecubemap because it seems like it was the sinner.
my debugging has brought forth that the texture given must be squared
for cube-maps
.. i did not know that.. the texturecubemap does some rescaling and when it does
this it destroys all hdr values. Apparently the rescalling the
texturecubemap uses
 can't handle textures with floats.

is this correct?

Peter Wraae Marino

On Fri, Jan 8, 2010 at 2:22 PM, Peter Wraae Marino osgh...@gmail.com wrote:
 Hi osgUsers,

 I've been doing some testing on HDR with a backdrop with a .hdr image
 using osg::Texture2D for the backdrop works great.. really nice HDR effects.

 using osg::TextureCubeMap results with textures loosing values over 1.0
 and resulting with a rainbow effect of colors in those areas

 in short:

 this doesn't work:
        osg::TextureCubeMap* texture = new osg::TextureCubeMap;
        osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr);

        texture-setInternalFormat( GL_RGB16F_ARB );
        texture-setResizeNonPowerOfTwoHint(false);

        texture-setImage( 0, pImage );
        texture-setImage( 1, pImage );
        texture-setImage( 2, pImage );
        texture-setImage( 3, pImage );
        texture-setImage( 4, pImage );
        texture-setImage( 5, pImage );

 this works:
        osg::ref_ptrosg::Texture2D texture = new osg::Texture2D(
 osgDB::readImageFile(vinesunset.hdr) );
        texture-setInternalFormat( GL_RGB16F_ARB );
        texture-setResizeNonPowerOfTwoHint(false);

        texture-setImage( pImage );

 can anyone spot what I'm missing?

 --
 Regards,
 Peter Wraae Marino

 www.osghelp.com - OpenSceneGraph support site




-- 
Regards,
Peter Wraae Marino

www.osghelp.com - OpenSceneGraph support site
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::TextureCubeMap and HDR

2010-01-12 Thread Robert Osfield
Hi Peter,

The scaling is done with glu and it probably doesn't support the all
new float formats so this may well be the issue.

Have you been able to correct your texture dimensions and get it working?

Robert.

On Tue, Jan 12, 2010 at 8:51 AM, Peter Wraae Marino osgh...@gmail.com wrote:
 Hi osgUsers,

 followup:

 been debugging the texturecubemap because it seems like it was the sinner.
 my debugging has brought forth that the texture given must be squared
 for cube-maps
 .. i did not know that.. the texturecubemap does some rescaling and when it 
 does
 this it destroys all hdr values. Apparently the rescalling the
 texturecubemap uses
  can't handle textures with floats.

 is this correct?

 Peter Wraae Marino

 On Fri, Jan 8, 2010 at 2:22 PM, Peter Wraae Marino osgh...@gmail.com wrote:
 Hi osgUsers,

 I've been doing some testing on HDR with a backdrop with a .hdr image
 using osg::Texture2D for the backdrop works great.. really nice HDR effects.

 using osg::TextureCubeMap results with textures loosing values over 1.0
 and resulting with a rainbow effect of colors in those areas

 in short:

 this doesn't work:
        osg::TextureCubeMap* texture = new osg::TextureCubeMap;
        osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr);

        texture-setInternalFormat( GL_RGB16F_ARB );
        texture-setResizeNonPowerOfTwoHint(false);

        texture-setImage( 0, pImage );
        texture-setImage( 1, pImage );
        texture-setImage( 2, pImage );
        texture-setImage( 3, pImage );
        texture-setImage( 4, pImage );
        texture-setImage( 5, pImage );

 this works:
        osg::ref_ptrosg::Texture2D texture = new osg::Texture2D(
 osgDB::readImageFile(vinesunset.hdr) );
        texture-setInternalFormat( GL_RGB16F_ARB );
        texture-setResizeNonPowerOfTwoHint(false);

        texture-setImage( pImage );

 can anyone spot what I'm missing?

 --
 Regards,
 Peter Wraae Marino

 www.osghelp.com - OpenSceneGraph support site




 --
 Regards,
 Peter Wraae Marino

 www.osghelp.com - OpenSceneGraph support site
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] osg::TextureCubeMap and HDR

2010-01-12 Thread Peter Wraae Marino
Hi Robert,

yes.. just completed the test now.. and using squared hdr textures does work.

regards,
Peter Wraae Marino


On Tue, Jan 12, 2010 at 10:06 AM, Robert Osfield
robert.osfi...@gmail.com wrote:
 Hi Peter,

 The scaling is done with glu and it probably doesn't support the all
 new float formats so this may well be the issue.

 Have you been able to correct your texture dimensions and get it working?

 Robert.

 On Tue, Jan 12, 2010 at 8:51 AM, Peter Wraae Marino osgh...@gmail.com wrote:
 Hi osgUsers,

 followup:

 been debugging the texturecubemap because it seems like it was the sinner.
 my debugging has brought forth that the texture given must be squared
 for cube-maps
 .. i did not know that.. the texturecubemap does some rescaling and when it 
 does
 this it destroys all hdr values. Apparently the rescalling the
 texturecubemap uses
  can't handle textures with floats.

 is this correct?

 Peter Wraae Marino

 On Fri, Jan 8, 2010 at 2:22 PM, Peter Wraae Marino osgh...@gmail.com wrote:
 Hi osgUsers,

 I've been doing some testing on HDR with a backdrop with a .hdr image
 using osg::Texture2D for the backdrop works great.. really nice HDR effects.

 using osg::TextureCubeMap results with textures loosing values over 1.0
 and resulting with a rainbow effect of colors in those areas

 in short:

 this doesn't work:
        osg::TextureCubeMap* texture = new osg::TextureCubeMap;
        osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr);

        texture-setInternalFormat( GL_RGB16F_ARB );
        texture-setResizeNonPowerOfTwoHint(false);

        texture-setImage( 0, pImage );
        texture-setImage( 1, pImage );
        texture-setImage( 2, pImage );
        texture-setImage( 3, pImage );
        texture-setImage( 4, pImage );
        texture-setImage( 5, pImage );

 this works:
        osg::ref_ptrosg::Texture2D texture = new osg::Texture2D(
 osgDB::readImageFile(vinesunset.hdr) );
        texture-setInternalFormat( GL_RGB16F_ARB );
        texture-setResizeNonPowerOfTwoHint(false);

        texture-setImage( pImage );

 can anyone spot what I'm missing?

 --
 Regards,
 Peter Wraae Marino

 www.osghelp.com - OpenSceneGraph support site




 --
 Regards,
 Peter Wraae Marino

 www.osghelp.com - OpenSceneGraph support site
 ___
 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




-- 
Regards,
Peter Wraae Marino

www.osghelp.com - OpenSceneGraph support site
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::TextureCubeMap and HDR

2010-01-12 Thread Peter Wraae Marino
Hi Robert,

two additions...

1. the hdr values also get destroyed by texturecubemap if you allow
the default texture filter to be used. I had to change this to
osg::Texture::Linear or else texturecubemap creates mipmaps and
rescale the texture and destroys the hdr values.

2. it seems that texture2D has by default not to make mipmaps and
texturecubemap by default makes them??? which makes things a little
confusing.

hope this helps,
Peter Wraae Marino

On Tue, Jan 12, 2010 at 11:07 AM, Peter Wraae Marino osgh...@gmail.com wrote:
 Hi Robert,

 yes.. just completed the test now.. and using squared hdr textures does work.

 regards,
 Peter Wraae Marino


 On Tue, Jan 12, 2010 at 10:06 AM, Robert Osfield
 robert.osfi...@gmail.com wrote:
 Hi Peter,

 The scaling is done with glu and it probably doesn't support the all
 new float formats so this may well be the issue.

 Have you been able to correct your texture dimensions and get it working?

 Robert.

 On Tue, Jan 12, 2010 at 8:51 AM, Peter Wraae Marino osgh...@gmail.com 
 wrote:
 Hi osgUsers,

 followup:

 been debugging the texturecubemap because it seems like it was the sinner.
 my debugging has brought forth that the texture given must be squared
 for cube-maps
 .. i did not know that.. the texturecubemap does some rescaling and when it 
 does
 this it destroys all hdr values. Apparently the rescalling the
 texturecubemap uses
  can't handle textures with floats.

 is this correct?

 Peter Wraae Marino

 On Fri, Jan 8, 2010 at 2:22 PM, Peter Wraae Marino osgh...@gmail.com 
 wrote:
 Hi osgUsers,

 I've been doing some testing on HDR with a backdrop with a .hdr image
 using osg::Texture2D for the backdrop works great.. really nice HDR 
 effects.

 using osg::TextureCubeMap results with textures loosing values over 1.0
 and resulting with a rainbow effect of colors in those areas

 in short:

 this doesn't work:
        osg::TextureCubeMap* texture = new osg::TextureCubeMap;
        osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr);

        texture-setInternalFormat( GL_RGB16F_ARB );
        texture-setResizeNonPowerOfTwoHint(false);

        texture-setImage( 0, pImage );
        texture-setImage( 1, pImage );
        texture-setImage( 2, pImage );
        texture-setImage( 3, pImage );
        texture-setImage( 4, pImage );
        texture-setImage( 5, pImage );

 this works:
        osg::ref_ptrosg::Texture2D texture = new osg::Texture2D(
 osgDB::readImageFile(vinesunset.hdr) );
        texture-setInternalFormat( GL_RGB16F_ARB );
        texture-setResizeNonPowerOfTwoHint(false);

        texture-setImage( pImage );

 can anyone spot what I'm missing?

 --
 Regards,
 Peter Wraae Marino

 www.osghelp.com - OpenSceneGraph support site




 --
 Regards,
 Peter Wraae Marino

 www.osghelp.com - OpenSceneGraph support site
 ___
 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




 --
 Regards,
 Peter Wraae Marino

 www.osghelp.com - OpenSceneGraph support site




-- 
Regards,
Peter Wraae Marino

www.osghelp.com - OpenSceneGraph support site
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::TextureCubeMap and HDR

2010-01-11 Thread David Spilling
Dear Peter,

I think that some (older) graphics cards support floating point 2D textures,
but not cube maps.

I'm also aware that even if you do support floating point cube maps, many
older cards can't do interpolation on them. Can you turn it to GL_NEAREST
and see if that makes a difference?

Regards,

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


[osg-users] osg::TextureCubeMap and HDR

2010-01-08 Thread Peter Wraae Marino
Hi osgUsers,

I've been doing some testing on HDR with a backdrop with a .hdr image
using osg::Texture2D for the backdrop works great.. really nice HDR effects.

using osg::TextureCubeMap results with textures loosing values over 1.0
and resulting with a rainbow effect of colors in those areas

in short:

this doesn't work:
osg::TextureCubeMap* texture = new osg::TextureCubeMap;
osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr);

texture-setInternalFormat( GL_RGB16F_ARB );
texture-setResizeNonPowerOfTwoHint(false);

texture-setImage( 0, pImage );
texture-setImage( 1, pImage );
texture-setImage( 2, pImage );
texture-setImage( 3, pImage );
texture-setImage( 4, pImage );
texture-setImage( 5, pImage );

this works:
osg::ref_ptrosg::Texture2D texture = new osg::Texture2D(
osgDB::readImageFile(vinesunset.hdr) );
texture-setInternalFormat( GL_RGB16F_ARB );
texture-setResizeNonPowerOfTwoHint(false);

texture-setImage( pImage );

can anyone spot what I'm missing?

-- 
Regards,
Peter Wraae Marino

www.osghelp.com - OpenSceneGraph support site
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org