Hi Alex, I have just looked at the code and for some reason the FixedFunctionTechnque is enforcing NEAREST, not sure why. I haven't touched this code particular bit of code for a long while.
FixedFunctionTechnique is a fallback implementation though, you really should be using RayTracedTechnique as the results will be much better. And yes you should upgrade to OSG-3.4. osgVolume has a number of improvements as well as the rest of the OSG being more mature. Robert. On 19 November 2015 at 01:11, Alex Taylor <[email protected]> wrote: > This is probably a silly question, but I'm playing around with the > osgVolume nodekit. I have FixedFunctionTechnique putting graphics on the > screen, but things are rendering more "blocky" than I would like. The > culprit is the NEAREST neighbor choice that is used by default as the > min/mag filter for the Texture3D object created by FixedFunctionTechnique. > I'd like to change to LINEAR. The problem I'm seeing is that when I use the > setMinFilter and setMaxFilter methods on the associated ImageLayer, things > aren't getting updated for some reason.* I know that's what's going on > because if I actually edit the code in FixedFunctionTechnique to use LINEAR > for the min/max filter on the Texture3D, I get the texture I want on the > screen.* > > Here is some code for context: > > osg::ref_ptr<osgVolume::Volume> volume = new > osgVolume::Volume; > > osg::ref_ptr<osgVolume::VolumeTile> tile = new > osgVolume::VolumeTile; > volume->addChild(tile.get()); > > osg::ref_ptr<osg::Image> image_3d = > createTexture3D(data,xfer_table); > > osg::ref_ptr<osgVolume::ImageLayer> layer = new > osgVolume::ImageLayer(image_3d.get()); > > tile->setLayer(layer.get()); > > layer->addProperty(new osgVolume::AlphaFuncProperty(0.02f)); > > osg::ref_ptr<osgVolume::FixedFunctionTechnique> technique = > new osgVolume::FixedFunctionTechnique(); > technique->setNumSlices(200); > tile->setVolumeTechnique(technique); > > layer->setMagFilter(osg::Texture3D::LINEAR); > layer->setMinFilter(osg::Texture3D::LINEAR); > > How can I force the Texture3D object created by FixedFunctionTechnique to > use LINEAR for minFilter/magFiltering? > > I'm using OSG 3.0 (I know I need to upgrade). > > Thanks, > > Alex > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

