HI Clement, The image simply looks like texels outside the inner circle are clipped out by the alpha test, could it be that there alpha value is near zero?
Robert. On Tue, Sep 13, 2011 at 11:30 AM, <clement....@csiro.au> wrote: > Hi Robert, > > Sorry for the misunderstanding. I would like to repeat my question. The > following codes I used to input colour into image. The file contains all r, > g, b and a values each voxel data. > > int nx = 350; > int ny = 350; > int nz = 60; > int size = nx * ny * nz; > unsigned char *pdisp_ptr = (unsigned char*)malloc(size * 4 > *(sizeof(unsigned char))); > > int pos = 0; > int r, g, b, a; > FILE *pf = fopen("file.txt", "r"); > while (!feof(pf) && pos < size) { > fscanf_s(pf, "%d %d %d %d", &r, &g, &b, &a); > *ptr++ = (disptype)r; > *ptr++ = (disptype)g; > *ptr++ = (disptype)b; > *ptr++ = (disptype)a; > pos++; > } > fclose(pf); > > image->setImage(nx, ny, nz, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, > pdisp_ptr, osg::Image::NO_DELETE); > > > The above code is working fine if there size of volume is 350, 350 and > 60. When I changed to use another large volume file (the dimension is 1000 * > 1000 * 50), osg still display the image, but it only shows party. Please see > the attached images. Do you know any reason? 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: Tuesday, 13 September 2011 5:51 PM > To: OpenSceneGraph Users > Subject: Re: [osg-users] osgVolume volume size limitation > > Hi Clement, > > I can't really make much sense from your post so can't make any > specific suggestions. > > General comments I would add are that different graphics hardware > supports different Texture3D resolution, you have to keep within this > to be able doing volume rendering. Also if you don't set up the > osg::Image correctly then you'll have problems too - garbage in, > garbage out. > > Robert. > > On Tue, Sep 13, 2011 at 5:16 AM, <clement....@csiro.au> wrote: >> Hi, >> >> I got to display volume data problem on windows MFC before. I got an >> useful information in this forum and now I have fixed the problem. When I >> tried different test cases, I found the volume image cannot be shown >> probably if the volume is large such as 1000*1000*20. It cannot show the >> whole volume. It shows the centre of image only. I am thinking whether >> there is a limitation on osg::Volume. >> >> >> I created osg image and set into layer. The problem occurrs if nx, ny and >> nz are very hight. >> >> image->setImage(nx, ny, nz, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, pdisp_ptr, >> osg::Image::NO_DELETE); >> >> >> >> Regards, >> Clement >> _______________________________________________ >> 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