DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Site Discussions > Articles Discussion
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 09-16-2003, 12:28 AM   #1
DmEditor
DevMaster Editor
 
Join Date: Jan 2005
Posts: 54
Default

Hidden Surface Removal
Author: Samuel Ranta-Eskola
Description: The article describes how to remove surfaces that are not visible with portal rendering. It also contains a detailed set of algorithms for implementing such hidden surface removal techniques.

Post a reply to ask a question or discuss the topic.
DmEditor is offline   Reply With Quote
Old 04-15-2005, 09:08 AM   #2
Ioncycle
New Member
 
Join Date: Oct 2004
Posts: 4
Default

How complex would it be to create a C# example from this code or would I need to get one of the books? Are there any C# examples out there?

Thanks
Ioncycle is offline   Reply With Quote
Old 04-15-2005, 04:22 PM   #3
Ed Mack
DevMaster Staff
 
Join Date: Jul 2003
Location: Northern Ireland
Posts: 1,250
Default

If you know C# it shouldn't be too bad, C# doesn't lack anything needed to impliment it.
Ed Mack is offline   Reply With Quote
Old 04-25-2005, 08:28 AM   #4
Dan East
New Member
 
Join Date: Apr 2004
Posts: 3
Default

It appears that line 5 in the pseudo-code for DISTRIBUTE-SAMPLE-POINTS is incorrect and should be removed.

Discussion or pseudo-code for DISTRIBUTE-POINTS would be appreciated. For a large map the set of points for the root node could easily exceed 500 million, and that is using a course granularity that could miss small windows / portals between nodes.

I'm curious what granularity was actually used, and if it was attenuated based on the size of the bounding box of for the node.

Dan East
Dan East is offline   Reply With Quote
Old 09-20-2005, 03:25 AM   #5
Samuel
New Member
 
Join Date: Sep 2003
Location: Uppsala, Sweden
Posts: 8
Default Re: Hidden Surface Removal

Hi Dan

Sorry that my reply was so late. The distribute sample points sux. If I might say so

Due to time issuses when I developed my thesis I didn't have time to create a more complex solution.

A bettter way to go is to create a volume between the two opening and then reduce it every time it passes through a polygon. If there are anything left when it arrives at the target opening it should be considered as visible.
Samuel is offline   Reply With Quote
Old 09-20-2005, 07:32 AM   #6
.oisyn
DevMaster Staff
 
.oisyn's Avatar
 
Join Date: Sep 2005
Location: The Netherlands
Posts: 1,442
Default Re: Hidden Surface Removal

About the sphere-frustum intersection test: although an exact test is not needed (false positives are ok, false negatives obviously not), a simple set of plane-sphere tests can be quite inaccurate when working with large spheres, due to the corner problem. If you draw a large sphere outside the frustum but near one of it's corners, the sphere can actually intersect multiple planes while it doesn't even nearly intersect the frustum. This is especially true for sharp corners, which view frustums tend to have after being clipped by multiple portals.

I'm currently working on culling and portal rendering for our upcoming engine, and this seems to be a major problem since we use large spheres as the bounding volumes for lights in order to test whether or not to draw the light or it's shadows on an entity. And to make it worse, lighting and shadowing are exactly the things that cost the most on the rendering side, so it pays to have a more accurate but slightly slower intersection algorithm .

But since we're nowhere near the optimization phase right now, I haven't looked into a better algorithm yet, although I do have some thoughts I need to work out. But I recon that won't be any time soon . A quick'n'dirty solution would be to add helper planes around those edges that are too sharp.
___________________________________________
C++ addict
-
Currently working on: the 3D engine for Tomb Raider: Underworld and Deus Ex 3.

Last edited by .oisyn : 09-20-2005 at 07:36 AM.
.oisyn is offline   Reply With Quote
Old 10-04-2005, 11:42 PM   #7
darkelf2k5
New Member
 
Join Date: Jul 2005
Posts: 3
Default Re: Hidden Surface Removal

A solution to this problem can be to test the bounding volumes againist the frustum planes in the conventional way, then test those who passed, again, but now against a bounding volume built around the frustum. In .oisyn's case for example sphere vs OBB(built from the 8 corners of the frustum). The second test is more expensive, but in most cases we already eliminated most of the objects with the first swipe. Kind of a 2-pass VFC.

Again, the possibility of these invalid passes are slim, so the second pass might only be neeeded in cases again like .oisyn's, where even one invalid invalid failure can bring a lot of extra computation.
darkelf2k5 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 12:23 AM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.