Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-05 Thread Robert Osfield
Hi Clement,

On 5 March 2012 03:04,  clement@csiro.au wrote:
    My program was using coin3D for volume rendering before.  Now it is 
 replaced with osg, but I still want the existing machine is able to run osg 
 version.  Last time you mentioned it is possible to implement a crude 3D 
 volume rendering based on 2D textures.  Can you tell me more in details how 
 to do?  Do you mean the current osg doesn't have this feature?  Is it 
 required to modify the source code and recompile again?  Thanks.

I am not about to complicate osgVolume with backwards compatibility to
hardware that can't do volume rendering properly so this will be
something you'll have to implement at your end.

The way to do volume rendering with 2D textures is very limited but
possible - you need to create a stack of 2D images that build up the
volume, and then render a each of images as a 2D texture assigned to
an axis aligned quad, building up the image from back to front.  To
handle viewing from all angles you'll need to create three sets of 2D
images, one for each axis so as you rotate around the volume you can
select the most closely aligned axis.  This will use more memory than
using proper 3D textures, and it'll be far less flexible as you won't
be able to compute normal on the GPU or do any decent shader
operations.  The final product of you work will be compatibility but
on as far as the lowest common denominator - i..e. really crude low
res volumes.

Alternatively you could spend a small amount of money on a graphics
card for your systems that is capable of doing volume rendering.  Even
a low end ATI or NVidia card will be able to do volume rendering -
it'll be slow, but still way faster than the Intel graphics and way
higher visual quality.  You'll save lots of time - you'll only need to
save a couple of hours work to break even on the purchase of the
graphics card - in fact I have little doubt that you've already wasted
far more time and money trying to get by with crappy hardware that
isn't up to the job.

As for Coin3D doing it, well it's implementation of volume rendering
is not too advanced - it's stuck at the lowest common denominator
level that you really should be expecting to exceed these days.

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


Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-04 Thread Clement.Chu
Hi Robert,

My program was using coin3D for volume rendering before.  Now it is 
replaced with osg, but I still want the existing machine is able to run osg 
version.  Last time you mentioned it is possible to implement a crude 3D volume 
rendering based on 2D textures.  Can you tell me more in details how to do?  Do 
you mean the current osg doesn't have this feature?  Is it required to modify 
the source code and recompile again?  Thanks.


Regards,
Clement



From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Friday, 2 March 2012 8:24 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Clement,

On 2 March 2012 04:12,  clement@csiro.au wrote:
 The graphic details of this machine is Intel Q35 Express Chipset.  Is 
 osgVolume not support this chipset?

I'm rather surprised that you'd even attempt volume rendering on such
in capble hardware.

Volume rendering is one of most challenging tasks for any graphics
card to handle, it tougher than *any* game available, it pushes the
memory bandwidth and capacity to the limit, it can brings high end
hardware to it knees.  Yet you are trying to get things working on
crappy Intel embedded graphics and virtual machine.

You really need to reset your expectations. Volume rendering requires
decent graphics hardware. Is not the osgVolume doesn't support crappy
graphics, it's that crappy graphics doesn't support volume rendering.

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] osgVolume RayTracedTechnique problem

2012-03-02 Thread Robert Osfield
Hi Clement,

On 2 March 2012 00:47,  clement@csiro.au wrote:
  I have updated the driver on one of machines.  The 3D texture message is 
 gone, but I got other message.

 Warning: Could not find plugin to read objects from file 
 shaders/volume.vert.
 Warning: Could not find plugin to read objects from file 
 shaders/volume.frag.

This would suggest that you plugins aren't on the search path that
your application is using.

 Locator::computeLocalBounds
 Scaling image from (350,350) to (128,128)
 Error Image::scaleImage() do not succeed : scaling of volumes not implemented.
 Scaling image from (350,350) to (128,128)
 Error Image::scaleImage() do not succeed : scaling of volumes not implemented.

  Any idea what is it?  Thank you for your help again.

I would seem that the max 3D texture size is just 128x128 which is
pretty hopeless.

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


Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-02 Thread Robert Osfield
Hi Clement,

On 2 March 2012 04:12,  clement@csiro.au wrote:
 The graphic details of this machine is Intel Q35 Express Chipset.  Is 
 osgVolume not support this chipset?

I'm rather surprised that you'd even attempt volume rendering on such
in capble hardware.

Volume rendering is one of most challenging tasks for any graphics
card to handle, it tougher than *any* game available, it pushes the
memory bandwidth and capacity to the limit, it can brings high end
hardware to it knees.  Yet you are trying to get things working on
crappy Intel embedded graphics and virtual machine.

You really need to reset your expectations. Volume rendering requires
decent graphics hardware. Is not the osgVolume doesn't support crappy
graphics, it's that crappy graphics doesn't support volume rendering.

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


Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-01 Thread Robert Osfield
Hi Clement,

On 29 February 2012 14:26,  clement@csiro.au wrote:
   My program is set to use RayTracedTechnique for display voxel.  I tested 
 the same program on windows XP and windows 7 machines.  Only windows 7 
 machine can display the image properly.  In windows XP, it shows the cube 
 filled with white colour.  I found out the problem is related to 
 RayTracedTechnique.  Any one got similar problem?  How to fix this?  Many 
 thanks.

This is most likely to be an error in the OpenGL driver, unless your
hardware is dramatically different and can't handle the shaders.

As how to fix it... well you don't provide any information about any
OpenGL errors being reported, what hardware you are using, what size
of volume - you say voxel which is means one single data value which
can't be right...

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


Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-01 Thread Clement.Chu
Hi Robert,

  There is no any error message popup.  I tested on three machines which are 
running windows xp.  They also have the same problem.  I guess the problem may 
be related to opengl32.dll file which is at c:\windows\system32.  The version 
of this file is 5.1 in Windows XP and 6.1 in windows 7.  I tried to run the 
program with opengl32 5.1 version in Windows 7.  It also comes out the same 
problem (volume filled with white).  If I replaced with the 6.1 version, the 
problem is gone.  But I cannot use the 6.1 opengl32 in windows xp since this 
file is linking to mscvrt.dll file and it cannot be replaced.  My test code is 
very simple. Even the size of voxel is small, the problem is still existed.

int nx = 20;
int ny = 20;
int nz = 10;

   unsigned char *pdisp_ptr;
   pdisp_ptr = (unsigned char*)malloc(nx * ny *nz * 4 *(sizeof(unsigned 
char)));
   
osg::ref_ptrosgVolume::Volume osgVolume = new osgVolume::Volume;
osg::ref_ptrosgVolume::VolumeTile tile = new osgVolume::VolumeTile;
osgVolume-addChild(tile.get());
osg::ref_ptrosg::Image osgImage = new osg::Image;
osg::ref_ptrosgVolume::ImageLayer layer = new 
osgVolume::ImageLayer(osgImage.get());

tile-setLayer(layer.get());
tile-setVolumeTechnique(new osgVolume::RayTracedTechnique());
osgImage-setImage(nx, ny, nz, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, 
pdisp_ptr, osg::Image::NO_DELETE);

osg::ref_ptrosg::RefMatrix matrix = new osg::RefMatrix;
osg::ref_ptrosgVolume::Locator locator = new 
osgVolume::Locator(*matrix.get());
layer-setLocator(locator.get());
tile-setLocator(locator.get());
locator-setTransformAsExtents(-nx/2.0, -ny/2.0, nx/2.0, ny/2.0, 
-nz/2.0, nz/2.0); 

osg::ref_ptrosgVolume::CompositeProperty cp = new 
osgVolume::CompositeProperty;
layer-addProperty(cp.get());

osg::ref_ptrosgVolume::AlphaFuncProperty ap = new 
osgVolume::AlphaFuncProperty(0.1f);
osg::ref_ptrosgVolume::SampleDensityProperty sdProperty = new 
osgVolume::SampleDensityProperty(0.005);
osg::ref_ptrosgVolume::TransparencyProperty tp = new 
osgVolume::TransparencyProperty(1.0f);

cp-addProperty(ap.get());
cp-addProperty(sdProperty.get());
cp-addProperty(tp.get());

   osgViewer-setSceneData(osgVolume .get());
   osgViewer-realize();


All machines in windows XP can run 3D program such as coin3D. If it is hardware 
or driver problem, they should have the problem to run others 3D program.  Let 
me know if you need any information.  Thanks.


Regards,
Clement



From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Thursday, 1 March 2012 7:59 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Clement,

On 29 February 2012 14:26,  clement@csiro.au wrote:
   My program is set to use RayTracedTechnique for display voxel.  I tested 
 the same program on windows XP and windows 7 machines.  Only windows 7 
 machine can display the image properly.  In windows XP, it shows the cube 
 filled with white colour.  I found out the problem is related to 
 RayTracedTechnique.  Any one got similar problem?  How to fix this?  Many 
 thanks.

This is most likely to be an error in the OpenGL driver, unless your
hardware is dramatically different and can't handle the shaders.

As how to fix it... well you don't provide any information about any
OpenGL errors being reported, what hardware you are using, what size
of volume - you say voxel which is means one single data value which
can't be right...

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] osgVolume RayTracedTechnique problem

2012-03-01 Thread Robert Osfield
Hi Clement,

Check the console output from the OSG for errors, the OSG itself
doesn't create pop up for error reporting as it's a scene graph not a
user interface tool.

As for other OpenGL applications not having problems on the system, as
they may well not be using 3D texture and shaders it's pretty likely
that they don't test the OpenGL driver and hardware anywhere close to
what the osgVolume will be doing so is of little relevance.  If you
want to avoid using shaders try the FixedFunctionTechnique instead of
RayTracedTechnique.

Robert.

On 1 March 2012 09:44,  clement@csiro.au wrote:
 Hi Robert,

  There is no any error message popup.  I tested on three machines which are 
 running windows xp.  They also have the same problem.  I guess the problem 
 may be related to opengl32.dll file which is at c:\windows\system32.  The 
 version of this file is 5.1 in Windows XP and 6.1 in windows 7.  I tried to 
 run the program with opengl32 5.1 version in Windows 7.  It also comes out 
 the same problem (volume filled with white).  If I replaced with the 6.1 
 version, the problem is gone.  But I cannot use the 6.1 opengl32 in windows 
 xp since this file is linking to mscvrt.dll file and it cannot be replaced.  
 My test code is very simple. Even the size of voxel is small, the problem is 
 still existed.

        int nx = 20;
        int ny = 20;
        int nz = 10;

       unsigned char *pdisp_ptr;
       pdisp_ptr = (unsigned char*)malloc(nx * ny *nz * 4 *(sizeof(unsigned 
 char)));

        osg::ref_ptrosgVolume::Volume osgVolume = new osgVolume::Volume;
        osg::ref_ptrosgVolume::VolumeTile tile = new osgVolume::VolumeTile;
        osgVolume-addChild(tile.get());
        osg::ref_ptrosg::Image osgImage = new osg::Image;
        osg::ref_ptrosgVolume::ImageLayer layer = new 
 osgVolume::ImageLayer(osgImage.get());

        tile-setLayer(layer.get());
        tile-setVolumeTechnique(new osgVolume::RayTracedTechnique());
        osgImage-setImage(nx, ny, nz, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, 
 pdisp_ptr, osg::Image::NO_DELETE);

        osg::ref_ptrosg::RefMatrix matrix = new osg::RefMatrix;
        osg::ref_ptrosgVolume::Locator locator = new 
 osgVolume::Locator(*matrix.get());
        layer-setLocator(locator.get());
        tile-setLocator(locator.get());
        locator-setTransformAsExtents(-nx/2.0, -ny/2.0, nx/2.0, ny/2.0, 
 -nz/2.0, nz/2.0);

        osg::ref_ptrosgVolume::CompositeProperty cp = new 
 osgVolume::CompositeProperty;
        layer-addProperty(cp.get());

        osg::ref_ptrosgVolume::AlphaFuncProperty ap = new 
 osgVolume::AlphaFuncProperty(0.1f);
        osg::ref_ptrosgVolume::SampleDensityProperty sdProperty = new 
 osgVolume::SampleDensityProperty(0.005);
        osg::ref_ptrosgVolume::TransparencyProperty tp = new 
 osgVolume::TransparencyProperty(1.0f);

        cp-addProperty(ap.get());
        cp-addProperty(sdProperty.get());
        cp-addProperty(tp.get());

       osgViewer-setSceneData(osgVolume .get());
       osgViewer-realize();


 All machines in windows XP can run 3D program such as coin3D. If it is 
 hardware or driver problem, they should have the problem to run others 3D 
 program.  Let me know if you need any information.  Thanks.


 Regards,
 Clement


 
 From: osg-users-boun...@lists.openscenegraph.org 
 [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
 [robert.osfi...@gmail.com]
 Sent: Thursday, 1 March 2012 7:59 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] osgVolume RayTracedTechnique problem

 Hi Clement,

 On 29 February 2012 14:26,  clement@csiro.au wrote:
   My program is set to use RayTracedTechnique for display voxel.  I tested 
 the same program on windows XP and windows 7 machines.  Only windows 7 
 machine can display the image properly.  In windows XP, it shows the cube 
 filled with white colour.  I found out the problem is related to 
 RayTracedTechnique.  Any one got similar problem?  How to fix this?  Many 
 thanks.

 This is most likely to be an error in the OpenGL driver, unless your
 hardware is dramatically different and can't handle the shaders.

 As how to fix it... well you don't provide any information about any
 OpenGL errors being reported, what hardware you are using, what size
 of volume - you say voxel which is means one single data value which
 can't be right...

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


Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-01 Thread Clement.Chu
Hi Robert,  


  If I set to use RayTracedTechnique, the output message shows below:

Windows Error #127: [Screen #0] ChooseMatchingPixelFormat() - 
wglChoosePixelFormatARB extension not found, trying GDI. R
eason: The specified procedure could not be found.

Rendering in software: pixelFormatIndex 3
Locator::computeLocalBounds
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.


  If I set to use FixedFunctionTechnique, the output message shows below:

Matrix = {
350 0 0 0
0 350 0 0
0 0 60 0
-175 -175 -30 1
}

Windows Error #127: [Screen #0] ChooseMatchingPixelFormat() - 
wglChoosePixelFormatARB extension not found, trying GDI. R
eason: The specified procedure could not be found.

Rendering in software: pixelFormatIndex 3
Locator::computeLocalBounds
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.


  Is it my hardware problem?  It cannot support texturing?


Regards,
Clement



From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Thursday, 1 March 2012 9:30 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Clement,

Check the console output from the OSG for errors, the OSG itself
doesn't create pop up for error reporting as it's a scene graph not a
user interface tool.

As for other OpenGL applications not having problems on the system, as
they may well not be using 3D texture and shaders it's pretty likely
that they don't test the OpenGL driver and hardware anywhere close to
what the osgVolume will be doing so is of little relevance.  If you
want to avoid using shaders try the FixedFunctionTechnique instead of
RayTracedTechnique.

Robert.

On 1 March 2012 09:44,  clement@csiro.au wrote:
 Hi Robert,

  There is no any error message popup.  I tested on three machines which are 
 running windows xp.  They also have the same problem.  I guess the problem 
 may be related to opengl32.dll file which is at c:\windows\system32.  The 
 version of this file is 5.1 in Windows XP and 6.1 in windows 7.  I tried to 
 run the program with opengl32 5.1 version in Windows 7.  It also comes out 
 the same problem (volume filled with white).  If I replaced with the 6.1 
 version, the problem is gone.  But I cannot use the 6.1 opengl32 in windows 
 xp since this file is linking to mscvrt.dll file and it cannot be replaced.  
 My test code is very simple. Even the size of voxel is small, the problem is 
 still existed.

int nx = 20;
int ny = 20;
int nz = 10;

   unsigned char *pdisp_ptr;
   pdisp_ptr = (unsigned char*)malloc(nx * ny *nz * 4 *(sizeof(unsigned 
 char)));

osg::ref_ptrosgVolume::Volume osgVolume = new osgVolume::Volume;
osg::ref_ptrosgVolume::VolumeTile tile = new osgVolume::VolumeTile;
osgVolume-addChild(tile.get());
osg::ref_ptrosg::Image osgImage = new osg::Image;
osg::ref_ptrosgVolume::ImageLayer layer = new 
 osgVolume::ImageLayer(osgImage.get());

tile-setLayer(layer.get());
tile-setVolumeTechnique(new osgVolume::RayTracedTechnique());
osgImage-setImage(nx, ny, nz, GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, 
 pdisp_ptr, osg::Image::NO_DELETE);

osg::ref_ptrosg::RefMatrix matrix = new osg::RefMatrix;
osg::ref_ptrosgVolume::Locator locator = new 
 osgVolume::Locator(*matrix.get());
layer-setLocator(locator.get());
tile-setLocator(locator.get());
locator-setTransformAsExtents(-nx/2.0, -ny/2.0, nx/2.0, ny/2.0, 
 -nz/2.0, nz/2.0);

osg::ref_ptrosgVolume::CompositeProperty cp = new 
 osgVolume::CompositeProperty;
layer-addProperty

Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-01 Thread Clement.Chu
Hi Robert,

   I think all my windows xp machines cannot support 3D texture.  Is possible 
to force osg to use 2D texture on osgVolume?  Thanks.


Regards,
Clement

From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of clement@csiro.au 
[clement@csiro.au]
Sent: Thursday, 1 March 2012 11:32 PM
To: osg-users@lists.openscenegraph.org
Subject: [ExternalEmail] Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Robert,


  If I set to use RayTracedTechnique, the output message shows below:

Windows Error #127: [Screen #0] ChooseMatchingPixelFormat() - 
wglChoosePixelFormatARB extension not found, trying GDI. R
eason: The specified procedure could not be found.

Rendering in software: pixelFormatIndex 3
Locator::computeLocalBounds
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.


  If I set to use FixedFunctionTechnique, the output message shows below:

Matrix = {
350 0 0 0
0 350 0 0
0 0 60 0
-175 -175 -30 1
}

Windows Error #127: [Screen #0] ChooseMatchingPixelFormat() - 
wglChoosePixelFormatARB extension not found, trying GDI. R
eason: The specified procedure could not be found.

Rendering in software: pixelFormatIndex 3
Locator::computeLocalBounds
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..)
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.
Warning: Texture3D::apply(..) failed, 3D texturing is not support by OpenGL 
driver.


  Is it my hardware problem?  It cannot support texturing?


Regards,
Clement



From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Thursday, 1 March 2012 9:30 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Clement,

Check the console output from the OSG for errors, the OSG itself
doesn't create pop up for error reporting as it's a scene graph not a
user interface tool.

As for other OpenGL applications not having problems on the system, as
they may well not be using 3D texture and shaders it's pretty likely
that they don't test the OpenGL driver and hardware anywhere close to
what the osgVolume will be doing so is of little relevance.  If you
want to avoid using shaders try the FixedFunctionTechnique instead of
RayTracedTechnique.

Robert.

On 1 March 2012 09:44,  clement@csiro.au wrote:
 Hi Robert,

  There is no any error message popup.  I tested on three machines which are 
 running windows xp.  They also have the same problem.  I guess the problem 
 may be related to opengl32.dll file which is at c:\windows\system32.  The 
 version of this file is 5.1 in Windows XP and 6.1 in windows 7.  I tried to 
 run the program with opengl32 5.1 version in Windows 7.  It also comes out 
 the same problem (volume filled with white).  If I replaced with the 6.1 
 version, the problem is gone.  But I cannot use the 6.1 opengl32 in windows 
 xp since this file is linking to mscvrt.dll file and it cannot be replaced.  
 My test code is very simple. Even the size of voxel is small, the problem is 
 still existed.

int nx = 20;
int ny = 20;
int nz = 10;

   unsigned char *pdisp_ptr;
   pdisp_ptr = (unsigned char*)malloc(nx * ny *nz * 4 *(sizeof(unsigned 
 char)));

osg::ref_ptrosgVolume::Volume osgVolume = new osgVolume::Volume;
osg::ref_ptrosgVolume::VolumeTile tile = new osgVolume::VolumeTile;
osgVolume-addChild(tile.get());
osg::ref_ptrosg::Image osgImage = new osg::Image;
osg::ref_ptrosgVolume::ImageLayer layer = new 
 osgVolume::ImageLayer(osgImage.get());

tile-setLayer(layer.get());
tile-setVolumeTechnique(new osgVolume::RayTracedTechnique());
osgImage-setImage(nx, ny, nz

Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-01 Thread Robert Osfield
Hi Clement,

On 1 March 2012 12:47,  clement@csiro.au wrote:
   I think all my windows xp machines cannot support 3D texture.  Is possible 
 to force osg to use 2D texture on osgVolume?  Thanks.

osgVolume is designed around 3D texturing, both the fixed function and
shader techniques use 3D textures.  It would be possible to implement
a crude 3D volume rendering based on 2D textures but it would be very
limited in what it could do.

3D texturing has been a standard feature for graphics cards for quite
a few years now so if one is doing volume rendering it's normally a
reasonable requirement to have the hardware that is capable of
handling the task.  It also begs the question about just what hardware
is in those WindowsXP machines, I asked this earlier but you haven't
yet mentioned.  Could it be some old intel hardware?

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


Re: [osg-users] osgVolume RayTracedTechnique problem

2012-03-01 Thread Clement.Chu
Hi Robert,

   One of the machines is using Intel E8300 Du e core 2.83 cpu with using on 
board graphic.  Another XP machine I created by virtual machine.  I am not sure 
the spec of last machine and I will confirm later.


Regards,
Clement



From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Friday, 2 March 2012 2:02 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Clement,

On 1 March 2012 12:47,  clement@csiro.au wrote:
   I think all my windows xp machines cannot support 3D texture.  Is possible 
 to force osg to use 2D texture on osgVolume?  Thanks.

osgVolume is designed around 3D texturing, both the fixed function and
shader techniques use 3D textures.  It would be possible to implement
a crude 3D volume rendering based on 2D textures but it would be very
limited in what it could do.

3D texturing has been a standard feature for graphics cards for quite
a few years now so if one is doing volume rendering it's normally a
reasonable requirement to have the hardware that is capable of
handling the task.  It also begs the question about just what hardware
is in those WindowsXP machines, I asked this earlier but you haven't
yet mentioned.  Could it be some old intel hardware?

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] osgVolume RayTracedTechnique problem

2012-03-01 Thread Clement.Chu
Hi Robert, 

  I have updated the driver on one of machines.  The 3D texture message is 
gone, but I got other message.

Warning: Could not find plugin to read objects from file shaders/volume.vert.
Warning: Could not find plugin to read objects from file shaders/volume.frag.
Locator::computeLocalBounds
Scaling image from (350,350) to (128,128)
Error Image::scaleImage() do not succeed : scaling of volumes not implemented.
Scaling image from (350,350) to (128,128)
Error Image::scaleImage() do not succeed : scaling of volumes not implemented.

  Any idea what is it?  Thank you for your help again.


Regards,
Clement



From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Friday, 2 March 2012 2:02 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Clement,

On 1 March 2012 12:47,  clement@csiro.au wrote:
   I think all my windows xp machines cannot support 3D texture.  Is possible 
 to force osg to use 2D texture on osgVolume?  Thanks.

osgVolume is designed around 3D texturing, both the fixed function and
shader techniques use 3D textures.  It would be possible to implement
a crude 3D volume rendering based on 2D textures but it would be very
limited in what it could do.

3D texturing has been a standard feature for graphics cards for quite
a few years now so if one is doing volume rendering it's normally a
reasonable requirement to have the hardware that is capable of
handling the task.  It also begs the question about just what hardware
is in those WindowsXP machines, I asked this earlier but you haven't
yet mentioned.  Could it be some old intel hardware?

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] osgVolume RayTracedTechnique problem

2012-03-01 Thread Jean-Sébastien Guay

Hello Clement,


One of the machines is using Intel E8300 Du e core 2.83 cpu with using on 
board graphic.  Another XP machine I created by virtual machine.


You're kind of setting yourself up for problems trying to get an 
advanced technique like GPU ray tracing working on onboard graphics or 
the emulation in a virtual machine. IIRC recent versions of VirtualBox 
and maybe others can route OpenGL calls to the driver on the host 
machine, but last I checked there were still bugs and most complex apps 
I tried (complex being defined as more than simple GL test programs) had 
some problem or other.


As soon as you get into shaders and recent graphics features, try to 
have the prerequisites (a good video card, recent drivers) and you'll 
have much less problems.


Hope this helps,

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] osgVolume RayTracedTechnique problem

2012-03-01 Thread Clement.Chu
The graphic details of this machine is Intel Q35 Express Chipset.  Is osgVolume 
not support this chipset?


Regards,
Clement



From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of clement@csiro.au 
[clement@csiro.au]
Sent: Friday, 2 March 2012 11:47 AM
To: osg-users@lists.openscenegraph.org
Subject: [ExternalEmail] Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Robert,

  I have updated the driver on one of machines.  The 3D texture message is 
gone, but I got other message.

Warning: Could not find plugin to read objects from file shaders/volume.vert.
Warning: Could not find plugin to read objects from file shaders/volume.frag.
Locator::computeLocalBounds
Scaling image from (350,350) to (128,128)
Error Image::scaleImage() do not succeed : scaling of volumes not implemented.
Scaling image from (350,350) to (128,128)
Error Image::scaleImage() do not succeed : scaling of volumes not implemented.

  Any idea what is it?  Thank you for your help again.


Regards,
Clement



From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Friday, 2 March 2012 2:02 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgVolume RayTracedTechnique problem

Hi Clement,

On 1 March 2012 12:47,  clement@csiro.au wrote:
   I think all my windows xp machines cannot support 3D texture.  Is possible 
 to force osg to use 2D texture on osgVolume?  Thanks.

osgVolume is designed around 3D texturing, both the fixed function and
shader techniques use 3D textures.  It would be possible to implement
a crude 3D volume rendering based on 2D textures but it would be very
limited in what it could do.

3D texturing has been a standard feature for graphics cards for quite
a few years now so if one is doing volume rendering it's normally a
reasonable requirement to have the hardware that is capable of
handling the task.  It also begs the question about just what hardware
is in those WindowsXP machines, I asked this earlier but you haven't
yet mentioned.  Could it be some old intel hardware?

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


[osg-users] osgVolume RayTracedTechnique problem

2012-02-29 Thread Clement.Chu
Hi,

   My program is set to use RayTracedTechnique for display voxel.  I tested the 
same program on windows XP and windows 7 machines.  Only windows 7 machine can 
display the image properly.  In windows XP, it shows the cube filled with white 
colour.  I found out the problem is related to RayTracedTechnique.  Any one got 
similar problem?  How to fix this?  Many thanks.


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