[osg-users] intersect() methods in LineSegment (probably others)
Adrian Egli OpenSceneGraph (3D)
3dhelp at gmail.com
Wed Feb 6 07:55:00 PST 2008
:-) only the first version of my kd.tree. latest i still extermly slow with
about 700K-800K intersection test per second. there are latest kd-Tree ray
check with more than ++ 6M rays per second. www.ompf.org :-)
so if we will have such a datastructure, we can do lot special effects, like
global illumination, high quality shadows, reflection , ... :-)
2008/2/6, Jean-Sébastien Guay <jean-sebastien.guay at cm-labs.com>:
>
> Hi Andy,
>
> > In your work, could you give me an idea of how often you intersect with
> a particular line segment object? I'm trying to decide if it is worth it to
> keep a Vec3d in the class (marking whether it is valid), or keeping double
> versions of _s and _e.
> >
>
> In general terms, my program will do n^2 intersections from each vertex
> in directions around a sphere, where n=20 to 100 (so 400 to 10,000
> intersections per vertex). And right now, I'm working with scenes which
> have roughly 5,000 to 100,000 vertices. So say for the simplest scene at
> n=20, that would be 2 million intersection tests. And in terms of time,
> I'll take what I can get, but with Adrian Egli's kdtree I'm currently
> getting about 20 seconds (IIRC) for that, so that's about 100,000
> intersections per second. With the LineSegmentIntersector, I was getting
> about 10,000 to 20,000 intersections per second.
>
> But I don't keep the line segment objects since none of my tests are
> have the same start _and_ end values... I guess I could precompute them
> and store them and then just use them each time, but since my goal is to
> do this for dynamic scenes, it would be one more thing to recalculate if
> something changes...
>
> J-S
>
> --
> ______________________________________________________
> Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
> http://www.cm-labs.com/
> http://whitestar02.webhop.org/
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
--
********************************************
Adrian Egli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080206/17beba25/attachment.htm
More information about the osg-users
mailing list