Thursday, 31 August 2017

testing video

here's a short video to demonstrate a simple Line of Sight occlusion system.
I'm just trying out my video capture unit at the moment, no sound as yet though. I need to find a small mic to put sound in it

Since there's no sound, I'll explain, each character becomes the target of a ray cast from the player (which would normally hold the FPS camera), if the Ray hits the character it is white and the character displays. If a wall gets between the the character and the ray, the ray turns red to indicate it hit a wall and the character is not drawn, saving quite some amount of GPU time.
One character is actually being detected but not displaying, I'm not actually sure why, some small bug somewhere I suspect.

The system is pretty basic, and only a single ray is firing, for total accuracy you would fire at the extreme corners and only exclude the model if all 4 rays hit the wall. But ray casts on this are not cheap, so if you can get away with one, its better.

The ray is always being cast wherever you are in the map, to indicate that the draw system for that model is indeed still running but not drawing. A Distance or Frustum cull would probably also be used before a ray cast was done to reduce the amount of maths being done.

No comments:

Post a Comment