Hi Robert,

  What kind of information I need to send to you?  I am wondering why the image 
is changed during rotation.  The inner green rectangle image should be solid, 
but it only displayed the bottom surface on some angles. This is my settings 
for volume property.  See if the code below can help.  Thanks again.

                osg::ref_ptr<osgVolume::AlphaFuncProperty> ap = new 
osgVolume::AlphaFuncProperty(0.1f); // 0.1
                osg::ref_ptr<osgVolume::SampleDensityProperty> sd = new 
osgVolume::SampleDensityProperty(0.005f); // 0.005
                osg::ref_ptr<osgVolume::TransparencyProperty> tp = new 
osgVolume::TransparencyProperty(1.0f); // 1.0

                osg::ref_ptr<osgVolume::CompositeProperty> cp = new 
osgVolume::CompositeProperty;
                cp->addProperty(ap.get());
                cp->addProperty(sd.get());
                cp->addProperty(tp.get());



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, 10 February 2012 10:41 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgvolume opacity settings

Hi Clement,

The pictures and your description don't provide sufficient information
to have any idea what might be wrong.

Robert.

On 10 February 2012 03:01,  <clement....@csiro.au> wrote:
> Hi Robert,
>
>   I captured two screen shots about the volume data display.  I don't know 
> why in some volume data is disappear in some angles.  The screenshot 
> test1.jpg and test2.jpg contain a green cube.  In test1.jpg, it only shows 
> two walls.  If I rotated to another angle like test2.jpg, all walls showed.  
> Do you know how to fix it?  Many 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 8:05 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] osgvolume opacity settings
>
> Hi Clement,
>
> On 18 January 2012 23:37,  <clement....@csiro.au> wrote:
>>                osgImage->setImage(nx, ny, nz, GL_RGB16F_ARB, GL_RGBA, 
>> GL_UNSIGNED_BYTE, (unsigned char*)data, osg::Image::NO_DELETE);
>>
>>
>>      My question is about the 4th parameter GL_RGB16F_ARB.  It is very 
>> difficult to find out how this parameter affect the image.  In this method, 
>> I am sure rest of other parameters used correctly, so I would like to know 
>> more about this parameter.  Thanks again for your help.
>
> The fourth parameter is internalTextureformat which is the format that
> the OSG will tell OpenGL to use as it's internal format for the
> texture objects down on the GPU.  The fifth and sixth parameters are
> pixelFormat and dataType of the source image data.  It's kinda odd
> that you'd want to use a different internal format to the source image
> format. Could it be that the later two parameters don't match your
> source data?
>
> 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