Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-20 Thread Bastian Rieck
Hi Robert,

I have collected the debug output under http://pastebin.com/usHWJYgT.
This time, there is no failed validation. Instead, we obtain:

Linking osg::Program  id=1 contextID=1
Uniform AlphaFuncValue loc=0 size=1 type=float
Uniform TransparencyValue loc=65536 size=1 type=float
Uniform SampleDensityValue loc=131072 size=1 type=float
Uniform baseTexture loc=196608 size=1 type=sampler3D

This seems to indicate that the error is related to the usage of the
transfer function. What can we do about this? I have already taken a
look at Property.cpp and Layer.cpp, but I did not come across anything
that seemed even remotely related to shaders...

All the best,
  Bastian
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-20 Thread Robert Osfield
Hi Bastian,

On 20 September 2012 16:51, Bastian Rieck
bastian.ri...@iwr.uni-heidelberg.de wrote:
 I have collected the debug output under http://pastebin.com/usHWJYgT.
 This time, there is no failed validation. Instead, we obtain:

 Linking osg::Program  id=1 contextID=1
 Uniform AlphaFuncValue loc=0 size=1 type=float
 Uniform TransparencyValue loc=65536 size=1 type=float
 Uniform SampleDensityValue loc=131072 size=1 type=float
 Uniform baseTexture loc=196608 size=1 type=sampler3D

Did you select a different property combination when running debug?

What properties have you been using when setting up osgVolume?

 This seems to indicate that the error is related to the usage of the
 transfer function. What can we do about this? I have already taken a
 look at Property.cpp and Layer.cpp, but I did not come across anything
 that seemed even remotely related to shaders...

The shader is selected based on the osgVolume::Property that you
assign, so if you don't assign the TransferFunctionProperty you want
get the shader used to rendering the volume with a transfer function
texture lookup.

Beyond changing the settings to avoid shaders that are problematic
there is little I can do.  You could try and experiment with providing
your own shaders - have a look at the readShaderFile entries used in
RayTracedTechnique to see what shaders it uses for different property
combinations.  If you can find out what exactly is tripping up the
OpenGL GLSL compiler then we'd be a position to develop a workaround
or at least send the shader off to AMD to help them fix the issue.  As
I don't see the problem here I can't pursue it, I'm afraid you'll need
to chase this one up if you need a solution.

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-19 Thread Bastian Rieck
Hi Robert,

 It's likely to be a driver bug, or perhaps a sensitivity in the driver
 to the GLSL shaders that are used - sometimes some drivers can be more
 picky than others.

We also thought about this possibility. Is it possible to obtain debug
information about the way the card processes the shaders?

 I previously worked with an ATI card under Linux
 with osgVolume and didn't have problems so perhaps there has been a
 regression on the driver front.
 
 To investigate further you'll need to see if there are any OpenGL
 errors reported - have a look on the console to see if the OSG has
 picked up on any OpenGL errors.

Unfortunately, there aren't any errors. Is there anything else we can do
to debug this? We will first check with a modified OSG_NOTIFY_LEVEL, but
what could we do if the drivers turn out to be defective?

Kind regards,
  Bastian

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-19 Thread Robert Osfield
Hi Bastian,

On 19 September 2012 10:06, Bastian Rieck
bastian.ri...@iwr.uni-heidelberg.de wrote:
 It's likely to be a driver bug, or perhaps a sensitivity in the driver
 to the GLSL shaders that are used - sometimes some drivers can be more
 picky than others.

 We also thought about this possibility. Is it possible to obtain debug
 information about the way the card processes the shaders?

The OSG is limited to what information it get back from OpenGL to just
what the driver provides in the standard OpenGL error/status
mechanism, if you set the OSG_NOTIFY_LEVEL env var to DEBUG you'll get
the OSG to output the shaders it passing to OpenGL and the
errors/status of the compilation and linking, but this is as much as
you get.

 I previously worked with an ATI card under Linux
 with osgVolume and didn't have problems so perhaps there has been a
 regression on the driver front.

 To investigate further you'll need to see if there are any OpenGL
 errors reported - have a look on the console to see if the OSG has
 picked up on any OpenGL errors.

 Unfortunately, there aren't any errors. Is there anything else we can do
 to debug this? We will first check with a modified OSG_NOTIFY_LEVEL, but
 what could we do if the drivers turn out to be defective?

If using the DEBUG notification doesn't provide any clues then only
other tools you have left are 3rd party OpenGL debug tools.
Unfortunately AMD have swallowed up glDEbugger so I you options are
now a bit more limited.  Perhaps others can suggest options.

Another route you could possible look at is using a software renderer
to see if that reports any errors with the shaders.

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-19 Thread Bastian Rieck
Hi Robert,

 [...]

 If using the DEBUG notification doesn't provide any clues then only
 other tools you have left are 3rd party OpenGL debug tools.
 Unfortunately AMD have swallowed up glDEbugger so I you options are
 now a bit more limited.  Perhaps others can suggest options.
 
 Another route you could possible look at is using a software renderer
 to see if that reports any errors with the shaders.


This is an intriguing idea, but how would I choose a software renderer?
By removing the AMD/ATI driver temporarily?

Kind regards,
  Bastian

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-19 Thread Bastian Rieck
Dear list,

we collected some debug output of the shaders in question under
http://pastebin.com/L88sCxBn. Around line 247 of the paste, things seem
to get interesting.

I am not quite sure what to make of the ...is not supported entries.
Is anyone able to help?

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-19 Thread Christian Buchner
 I am not quite sure what to make of the ...is not supported entries.
 Is anyone able to help?

The sections

OpenGL extensions supported by installed OpenGL drivers are:

and

OpenGL extension 'XXX' is supported.

are somewhat contradicting each other.

I suspect your driver installation may be hosed.

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-19 Thread Christian Buchner
Hi,

Sorry, please disregard my last message - I wasn't reading carefully.
There are is supported and is not supported messages.
The is not supported messages require a closer look.

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-19 Thread Robert Osfield
HI Bastien,

On 19 September 2012 16:13, Bastian Rieck
bastian.ri...@iwr.uni-heidelberg.de wrote:
 Dear list,

 we collected some debug output of the shaders in question under
 http://pastebin.com/L88sCxBn. Around line 247 of the paste, things seem
 to get interesting.

 I am not quite sure what to make of the ...is not supported entries.
 Is anyone able to help?

I wouldn't worry about the not supported entries as these are for
features that osgVolume doesn't use.  More telling are the lines:

glValidateProgram FAILED  id=1 contextID=1
infolog:
Texture unit 0 is accessed both as sampler1D and sampler3D

I've just looked at the RayTracedTechnique.cpp and the fragment shader
and haven't spotted anywhere where the textures are assigned to the
same unit, or where the wrong sampler is used.

Could you try the osgVolume property settings that don't require the
transfer function to be used, this will give you a simpler shader and
less room from the driver to screw up.

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-19 Thread Christian Buchner
Have you seen this bit of output? One of the shaders failed validation:

#
glValidateProgram FAILED  id=1 contextID=1
#
infolog:
#
Texture unit 0 is accessed both as sampler1D and sampler3D

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


Re: [osg-users] Rendering issues with `osgVolume::RayTracedTechnique`?

2012-09-17 Thread Robert Osfield
Hi Bastian,

It's likely to be a driver bug, or perhaps a sensitivity in the driver
to the GLSL shaders that are used - sometimes some drivers can be more
picky than others.  I previously worked with an ATI card under Linux
with osgVolume and didn't have problems so perhaps there has been a
regression on the driver front.

To investigate further you'll need to see if there are any OpenGL
errors reported - have a look on the console to see if the OSG has
picked up on any OpenGL errors.

Robert.

On 17 September 2012 15:27, Bastian Rieck
bastian.ri...@iwr.uni-heidelberg.de wrote:
 Dear list,

 we are currently facing rendering issues when using `RayTracedTechnique`
 instead of `FixedFunctionTechnique` for rendering with osgVolume.

 More precisely, we are using a Samsung NP305V5A notebook (with two AMD
 graphics cards) running Ubuntu 12.04 and OpenSceneGraph from the
 official packages (currently 3.0.1-2). See the attached screenshot for
 more details --- it shows the rendering issues that occur when trying to
 volume render a standard data set (engine block). The block is
 rendered normally when using `FixedFunctionTechnique`.

 Did anyone else encounter similar problems (maybe also with AMD graphics
 cards)? If so, how could we resolve them?

 We cannot reproduce the issue on our developer workstations (using
 Geforce GTX 480).

 We would be happy to add more information about this error but we
 currently do not know how to approach it properly. Any help would be
 appreciated.

 Kind regards,
   Bastian

 ___
 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