Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 21-Nov-2002, 12:26   #1
Axl
Registered
 
Join Date: Aug 2002
Posts: 4
Default BSP build and shared vertices

I'm trying to build an adequate axis aligned BSP tree for my raytracer that
only uses triangles. Usually the stop criteria for the build is when the
amount of triangles is less than a number (usually 2 or 3) or when the
maximum depth is reached. The problem is with triangles that share verices the build will only stop when reached maximum depth which is very sub-optimal. Usually one vertex is shared by 5 or 6 triangles which is
usually higher that you want in a node. The nodes that contains vertices
seem impossible to decompose any further.

I'm trying to solve this by with either when a node contains one or more
vertices recursion stops. Or, if a node contains only one vertex, set split
plane at the vertex and look at the other vertices to see what side the
triangle is on.

Do you have any better way to solve this? Because this is for a raytracer I
don't have to care about splitting the triangles.
Axl is offline   Reply With Quote
Old 21-Nov-2002, 13:55   #2
Saem
Senior Member
 
Join Date: Feb 2002
Posts: 1,532
Send a message via ICQ to Saem Send a message via AIM to Saem Send a message via MSN to Saem
Default

I don't know much about raytracing, but shared vertices, makes me thinkg of KD-trees.
__________________
Regards.
Saem is offline   Reply With Quote
Old 22-Nov-2002, 01:16   #3
Axl
Registered
 
Join Date: Aug 2002
Posts: 4
Default

Quote:
Originally Posted by Saem
I don't know much about raytracing, but shared vertices, makes me thinkg of KD-trees.
An axis aligned BSP is basically a KD-tree, just a another name for it. Some called it BSP some call it KD-tree.
Axl is offline   Reply With Quote
Old 23-Nov-2002, 07:13   #4
Saem
Senior Member
 
Join Date: Feb 2002
Posts: 1,532
Send a message via ICQ to Saem Send a message via AIM to Saem Send a message via MSN to Saem
Default

Out of curiosity, why is 5 to 6 polys considered too many?
__________________
Regards.
Saem is offline   Reply With Quote
Old 23-Nov-2002, 15:03   #5
Axl
Registered
 
Join Date: Aug 2002
Posts: 4
Default

Quote:
Originally Posted by Saem
Out of curiosity, why is 5 to 6 polys considered too many?
I think I have set the number a little too low. The reason I used 2 or 3 is because I got better performance for a few objects. On a second thought I think I have to raise that threshold a bit.
Axl is offline   Reply With Quote
Old 25-Nov-2002, 09:34   #6
Saem
Senior Member
 
Join Date: Feb 2002
Posts: 1,532
Send a message via ICQ to Saem Send a message via AIM to Saem Send a message via MSN to Saem
Default

AFAICT, I don't think restricting the number of polygons per node is really necessary. One can only have so many polygons that have a common vertex divider.
__________________
Regards.
Saem is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:12.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.