HI Robert,

     I replaced the program from coin to osg and I don't know why osg display 
the image from the same volume data is different from coin.  I think the 
problem is on texture format since I changed to use different parameter of 
texture format such as  GL_RGBA, GL_RGB16F_ARB, GL_RGBA8.  The display images 
are different.  When GL_RGB16F_ARB is used, the colour is closer to I expected, 
but I have no idea why the volume body is empty (1st attached file).  When 
GL_RGBA is used, the body of volume is filled, but the colour is not sharp 
enough.  I don't know how to set to use the right texture parameter.  Sorry for 
my worse explanation.  Hope this time better.  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, 19 January 2012 4:15 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgvolume opacity settings

Hi Clement,

I can't work out specifically what you are expecting to happen.  What
coin does is something I have no experience with so can't comment on
how you might try to obtain a similar image.

Robert.

On 18 January 2012 15:14,  <clement....@csiro.au> wrote:
> Hi Robert,
>
>   Thanks for your reply.  I found the problem may relate to the texture 
> format when called setImage.  I attached three images to describe my problem. 
>  The image texture_GL_RGBA.jpg is used GL_RGBA for the 4th parameter in 
> setImage.
>
> eg.  osgImage->setImage(nx, ny, nz, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, 
> (uint8*)pdisp), osg::Image::NO_DELETE);
>
>
>   The image texture_GL_RGB16F_ARB.jpg is used GL_RGB16F_ARB parameter.  The 
> colour of this image is I expected, but the problem is that this image is no 
> body (only surface have colour).  If I used GL_RGBA, it can fill in the whole 
> volume, but the colour is very light and blur.  The last attachment is 
> captured from coin3d library and it is my original render library.  Now I 
> have replaced with osg, so I expect the osg can display the same result as 
> coin3d.
>
>   From the first two images, do you know which texture format parameter I 
> should use?  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: Monday, 16 January 2012 8:21 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] osgvolume opacity settings
>
> Hi Clement,
>
> On 16 January 2012 06:21,  <clement....@csiro.au> wrote:
>>   My application is using osgvolume to display CT data.  There is class 
>> called CompositeProperty and there are three property classes 
>> (AlphaFuncProperty, SampleDensityProperty and TransparencyProperty) as well. 
>>  I would like to know more details of those classes and how to apply on 
>> osgvolume.  I did to follow the example to use those classes, but when I 
>> changed the value of SampleDensityProperty from 0.05 to 0.5.  Some CT data 
>> are disappear, so I would like to know more how to control property values.  
>> Many thanks.
>
> AlphaFuncProperty is equivalent to glAlphaFunc and sets the alpha
> value below which fragments will be discarded
>
> TransparencyProperty is an alpha value multiplier that you can use to
> make your volume more transparent.
>
> SampleDensityProperty controls the size of the step during the ray
> tracing through the volume, the lower the value
> the more samples, the higher the value the less the samples.  If you
> use a value of 0.5 you'll only get 3 samples which clearly won't be
> enough!
>
> 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to