Occlusion Demo - Objects on Blitz Terrains
Community Forums/Showcase/Occlusion Demo - Objects on Blitz Terrains
| ||
This is a demo of my first Occlusion system, it uses a couple of checks to see if an object is truly in view of the camera. Check 1: Is the object in the Field of Vision AND Check 2: Is the object occluded by the Blitz Terrain Check 2 is done by casting a ray from the object to the camera, if it hits the terrain then it is occluded. I wrote a small routine using Vectors that does this check (lots faster than Linepick) Controls are Cursors and Mouse. Mouse Button (right) = Rotate camera Mouse Button (left) = Wireframe mode When in wireframe use cursors left/right to see the objects being occluded when behind the terrain. Please let me know how this works for you. On my 700Mhz laptop with the ATI mobility card I get 20Fps with 10,000 objects. http://www.morphlings.com/tim/occlusion.zip |
| ||
hmm get about 10 FPS while looking at the spot with the most objects P4-M 1,7ghz, GF4 440go |
| ||
@Dreamora - How many objects? |
| ||
oh sorry 10'000 |
| ||
Nice :) Anyone else tried it? |
| ||
Seems to work well and fast, but was hard to tell how accurate it is because the camera moves too fast. How does it cast the ray, from the centre of the object or from the outer most edges of the object? With small objects like this its hard to say how effective this method could be when larger objects are on the terrain. But maybe if u checked the points of a bounding box of each object it would still be really fast. I think you'd only need to check the 4 upper corners of each bounding box which isn't too bad. |
| ||
I am going to download the sucker now and edit the post when I have had a play. I went to the centre of the map and rotated around a bit - I ranged from 10 - 18 FPS with 10,000 thingies. I am running this on a 1GHz Thunderbird with GF3ti - although have stuff running in the background (as I am on-line). |
| ||
@Rigz : Yes just checks the centre of the object at the moment BUT you can offset it if you want - I will change it to work with a bounding box very soon. I'll also release the source soon :) we'll soonish ;) |
| ||
New version uploaded - I get a 20% speed increase (use same link above) Next version will have oriented bounding boxes for checks. |
| ||
I get 20 Fps with 10.000 objects. |