Occlusion Demo - Objects on Blitz Terrains

Community Forums/Showcase/Occlusion Demo - Objects on Blitz Terrains

TartanTangerine (was Indiepath)(Posted 2004) [#1]
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


Dreamora(Posted 2004) [#2]
hmm get about 10 FPS while looking at the spot with the most objects

P4-M 1,7ghz, GF4 440go


TartanTangerine (was Indiepath)(Posted 2004) [#3]
@Dreamora - How many objects?


Dreamora(Posted 2004) [#4]
oh sorry
10'000


TartanTangerine (was Indiepath)(Posted 2004) [#5]
Nice :)

Anyone else tried it?


Pete Rigz(Posted 2004) [#6]
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.


puki(Posted 2004) [#7]
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).


TartanTangerine (was Indiepath)(Posted 2004) [#8]
@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 ;)


TartanTangerine (was Indiepath)(Posted 2004) [#9]
New version uploaded - I get a 20% speed increase (use same link above)

Next version will have oriented bounding boxes for checks.


cermit(Posted 2004) [#10]
I get 20 Fps with 10.000 objects.