Re: [Algorithms] Leafy BSP Tree Contruction
Brought to you by:
vexxed72
|
From: <chr...@pl...> - 2009-05-20 17:43:47
|
You have to be very careful about the robustness of your
floating-point calculations when working with BSP-trees.
Adrian mentioned several things already, but to summarize:
1. Wherever possible refer back to the original polygon
instead of the pieces clipped from it. Certainly for
obtaining the normal.
2. Always clip edges in a consistent direction wrt. a
plane; e.g. direct the edges to always go into the
plane befoer you clip.
3. Treat the planes as if they are fat (have thickness).
4. Move your calculations to the origin to retain as
much precision as possible.
5. Insert objects conservatively into the tree (duplicating
data if necessary).
Overall though, WHY are you using a BSP tree? There are
some valid uses for them, but for a lot of applications
they are a bad choice of data structure!
Christer Ericson, Director of Tools and Technology
Sony Computer Entertainment, Santa Monica
Adrian Bentley
<ad...@gm...
> To
Game Development Algorithms
05/19/2009 09:29 <gda...@li...
PM e.net>
cc
Please respond to Subject
Game Development Re: [Algorithms] Leafy BSP Tree
Algorithms Contruction
<gdalgorithms-lis
t...@li...
ge.net>
I seem to remember a thread about this, try searching the archives
(you might need to search Sweng Gamedev too).
One thing important for good results is to generate the plane from the
source triangle and just reference it from all polygons split from
that triangle, that way splitting doesn't dirty your plane equation.
Try combining that with penalizing splitting planes with other
parallel triangles and higher precision math.
Also, Real Time Collision Detection contains a some good guidelines on
"fat" bsp construction (using epsilons and such). IIRC the key
involves treating transitions from/to side A/B and On in a logically
consistent way so slivers are never created. You can probably derive
them yourself, but it does take lots of diagrams and brain mangling
about degenerate cases.
Cheers,
Adrian
On Tue, May 19, 2009 at 12:01 PM, Manolache Adrian <pro...@ya...>
wrote:
> During the bsp tree compilation there happens sometimes that
a
> polygon would be split so much until it becomes very thin with an area
> almost 0. This polygon would further be split and thus obtaining
degenerate
> triangles. The problem is that the construction fails when fed this kind
of
> polygons and full leaves(all polygons used as splitter) arive in back
nodes.
> When clipping triangles or classifying them i used a small epsilon to
> compare to 0(absolute tolerance test). How can i go around avoiding
> degenerate triangle creation, how can these be handled? Is it the sole
duty
> of the artist to avoid such cases?
>
>
------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> GDAlgorithms-list mailing list
> GDA...@li...
> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
>
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
GDAlgorithms-list mailing list
GDA...@li...
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
|