Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / BSP or other things to do raycasting Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Infinite Reboot

May 11, 1999, 07:36 PM

Hi
I am in the progress of writing a 3d engine in openGL and i encounter the following problem:
z-buffer reads are REALLY slow, so to calculate z values i think it is better to cast a ray
and calc the intersection point (like to test whether or not to draw a flare on a light).
I read this can easily be done with BSP trees. The question is HOW? (Don't seem to find docs
on that, only on building and plotting BSP, not on other uses) or are there better systems
than BSP for that, coz you can split your ray with the partition planes, but in the end you
still need to do testing whether intersectionpoint is in a triangle or not (me thinks)
Hope you can help (Ask the Phantom :)).

IR

 
Conor Stokes

May 12, 1999, 06:01 AM



Infinite Reboot wrote:
>>Hi
>>I am in the progress of writing a 3d engine in openGL and i encounter the following problem:
>>z-buffer reads are REALLY slow, so to calculate z values i think it is better to cast a ray
>>and calc the intersection point (like to test whether or not to draw a flare on a light).
>>I read this can easily be done with BSP trees. The question is HOW? (Don't seem to find docs
>>on that, only on building and plotting BSP, not on other uses) or are there better systems
>>than BSP for that, coz you can split your ray with the partition planes, but in the end you
>>still need to do testing whether intersectionpoint is in a triangle or not (me thinks)
>>Hope you can help (Ask the Phantom :)).
>>
>>IR
>>
Well, It can be done using a BSP, and you can do certain speed ups. It can only hit a certain part of a BSP tree if it crosses a node it is in. I personally prefer the octree, or kd-tree. They both are very nice simple systems that can help you. As they are axis aligned, you can do quick simple tests to find out which polygons need testing. Then again, if you are smart, and implement a good visiblity system, you need less to worry about it. Coronas can be tested rather easily BEFORE such a thing, if you happen to have used a system that gets good vis, like portals, you may never have to worry. If you are using a PVS, it might be better to calculate a few tangent planes, or shadow volumes.

Conor Stokes

 
Infinite Reboot

May 12, 1999, 06:49 AM



Conor Stokes wrote:
>>Well, It can be done using a BSP, and you can do certain speed ups. It can only hit a certain part of a BSP tree if it crosses a node it is in. I personally prefer the octree, or kd-tree. They both are very nice simple systems that can help you. As they are axis aligned, you can do quick simple tests to find out which polygons need testing. Then again, if you are smart, and implement a good visiblity system, you need less to worry about it. Coronas can be tested rather easily BEFORE such a thing, if you happen to have used a system that gets good vis, like portals, you may never have to worry. If you are using a PVS, it might be better to calculate a few tangent planes, or shadow volumes.

Have you got any links to urls concerning this topic ?
Like i dont think i can use portal engines coz i use 3dsmax output for scenes to use in the engine, so BSPing would be easier
How can you test coronas BEFORE such(what do you mean by such?) a thing?
Have you got docs about k-d trees?
Perhaps i can use those.

 
Conor Stokes

May 13, 1999, 06:17 AM



Infinite Reboot wrote:
>>
>>
>>Conor Stokes wrote:
>>>>Well, It can be done using a BSP, and you can do certain speed ups. It can only hit a certain part of a BSP tree if it crosses a node it is in. I personally prefer the octree, or kd-tree. They both are very nice simple systems that can help you. As they are axis aligned, you can do quick simple tests to find out which polygons need testing. Then again, if you are smart, and implement a good visiblity system, you need less to worry about it. Coronas can be tested rather easily BEFORE such a thing, if you happen to have used a system that gets good vis, like portals, you may never have to worry. If you are using a PVS, it might be better to calculate a few tangent planes, or shadow volumes.
>>
>>Have you got any links to urls concerning this topic ?

www.grafix3d.tzo.com is good, if you don't mind Journal Papers

>>Like i dont think i can use portal engines coz i use 3dsmax output for scenes to use in the engine, so BSPing would be easier

Well you could but it would be innefficient.

>>How can you test coronas BEFORE such(what do you mean by such?) a thing?

Aghh, tangent planes can pretest a few things. You could include coronas into a PVS, and then do ray casting,
which would be pretty good.

>>Have you got docs about k-d trees?

Unfortunately no, but there are things on flipcode, under Harmless Algorithms.

>>Perhaps i can use those.

Very probably, if you want to make a quick system.

Conor Stokes

 
This thread contains 4 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.