[osg-users] Volume Rendering and Depth Buffer

Chris Hanson xenon at alphapixel.com
Tue Apr 16 08:31:30 PDT 2019


Yeah, I wouldn't totally expect it would, but you can probably do that
intersection test yourself if needed. I think it'll be faster and more
accurate than the Z-buffer.

I did a tool that relied on the Z-buffer once. It was a bad choice...

On Tue, Apr 16, 2019 at 1:05 PM Anna Osvin <osgforum at tevs.eu> wrote:

> If you mean osgViewer::View::computeIntersections, then we tried it. For
> some reason it does not check intersections with volume model.
>
> Here is raycast intersection check code:
>
> Code:
>
> bool pickPolygonalSceneIntersection( osgViewer::View& view, const
> osg::Vec2& point2d, osg::Vec3& pickedPoint )
> {
>     const osg::Camera* camera = view.getCamera();
>     if ( camera == nullptr ) {
>         Q_ASSERT_X( false, "bool pickPolygonalSceneIntersection( ... )",
> "View has no camera." );
>         return false;
>     }
>
>     osgUtil::LineSegmentIntersector::Intersections intersections;
>
>     if ( view.computeIntersections( camera,
> osgUtil::Intersector::CoordinateFrame::WINDOW, point2d.x(), point2d.y(),
> intersections ) )
>     {
>         for (osgUtil::LineSegmentIntersector::Intersections::iterator hitr
> = intersections.begin();
>             hitr != intersections.end();
>             ++hitr)
>         {
>             if (hitr->nodePath.size() > 4)
>             {
>                 pickedPoint = hitr->getWorldIntersectPoint();
>
>                 return true;
>             }
>         }
>     }
>
>     return false;
> }
>
>
>
>
>
> Chris Hanson wrote:
> > Instead of reading Z depth values, can you simply run an intersection of
> the click ray-vector against the model data (polygonal and volumetric) when
> they click to place markdown points?
> >
> > On Mon, Apr 15, 2019 at 2:34 PM Anna Osvin < ()> wrote:
> >
> >
> > > We are working on medical software for Dentists. We need to render
> CBCT and give user possibility to place some markdown points on it, for
> future diagnostics. Also sometimes it's required to render polygonal jaw
> models alongside with CBCT. As I said earlier, we nailed down the rendering
> and even "hit detection", but there is a nasty bag with Z Buffer values of
> the background being incorrect, therefore user can place points onto
> nothing.
> > >
> > > ...
> > >
> > > Thank you!
> > >
> > > Cheers,
> > > Anna
> > >
> > > ------------------
> > > Read this topic online here:
> > > http://forum.openscenegraph.org/viewtopic.php?p=75839#75839 (
> http://forum.openscenegraph.org/viewtopic.php?p=75839#75839)
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > osg-users mailing list
> > >  ()
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> )
> > >
> >
> >
> >
> > --
> > Chris 'Xenon' Hanson, omo sanza lettere.  http://www.alphapixel.com/ (
> http://www.alphapixel.com/)
> > Training • Consulting • Contracting
> > 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL
> 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
> > Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
> osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
> iPhone/iPad/iOS • Android
> > @alphapixel (https://twitter.com/alphapixel) facebook.com/alphapixel (
> http://facebook.com/alphapixel) (775) 623-PIXL [7495]
> >
> >  ------------------
> > Post generated by Mail2Forum
> [/code]
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75845#75845
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190416/74699b62/attachment.html>


More information about the osg-users mailing list