Skip to main content
GameDev.net gamedev.net
🔒 Locked

Ray collision detection problem

Started by MultiVersal Gaming_001 Dec 14, 2002 at 10:54 PM 3 replies 300+ views
Original Post
MultiVersal Gaming_001
MultiVersal Gaming_001
Is there a more efficient way to detect what polygon a ray intersects than testing the entire scene? Inversing the problem and testing the ray doesn''t help, as each polygon still has to be considered, and I''m using 700,000 polygon scenes minimum and that is far too slow for the framerate I''m seeking.(20) Bounding Boxes are ineffectual here, as I''m seeking precision for wat I''m doing. Thanks in advance. ChrisPugh
Multiversal Gaming-redefining engine technology, graphics, and neworking technology in our upcoming MMORPG and FPS gameIf interested Contact MBRAM32@aol.com Huge royalties will benefit
The Reindeer Effect
The Reindeer Effect
Try using a BSP tree or something and you will be able to cut down bigtime by just calculating what nodes your ray goes through, then checking the poly''s in those nodes.

Not sure if this is the best way to do things though.



_______________________________
It''s not reality that''s important, but how you perceive things.

A man''s reach should exceed his grasp.
MultiVersal Gaming_001
MultiVersal Gaming_001
Thank You very much. I needed a different angle on this problem for an opinion, as I didn''t have time to test. I asked, and didn''t get flamed or called a n00b, unlike so many messageboards. You all rock Anyways, I''ve gone from 150,000 calculations on the cpu around 10,000. Big difference. Now a 1.7Ghz Athlon should be able to play my game (first person shooter, cutting edge tech, cutting edge art, 500-1000 character battles, etc) in 800X600, 40-60fps :D
Multiversal Gaming-redefining engine technology, graphics, and neworking technology in our upcoming MMORPG and FPS gameIf interested Contact MBRAM32@aol.com Huge royalties will benefit
Teknofreek
Teknofreek
Just to re-iterate what the others said, things like Bounding Boxes, Bounding Spheres, BSP trees, Quad/Oct-Trees, etc all are very useful mechanisms. Not to get accurate final testing mind you, but for early dismissal of objects/polys. Quick collision/intersection testing is all about figuring out as quickly as possible what things you DON''T have to an in-depth test on

-John
John

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.