[Suggestion] Line of Sight Culling

Line of Sight means only things the player can see, assuming they can’t see behind a wall. I’ve been trying to squeeze every ounce of performance I can out of JME3.

I know about Ray and the intersection results obtained from that can be used to determine visible objects. It is slow for many boxs in view, around 2000 and about half have their corners visible. Not a Minecraft Clone, there are too many of those already, the boxes were used for testing purposes.

Maybe there is a way to do this on the GPU side which would improve speed a lot.

1 Like

Or maybe a way to cull vertices built in to jme3 camera to improve performance running on a separate thread to prevent clogging up the update queue.

The amount of time it takes to do this will always be dwarfed by the speed increase of batching things into fewer meshes.

2000 boxes is a pretty high amount of objects in a scene… you should treat that as a near maximum for your whole scene and batch as appropriate. This will save far more time than object level line of sight culling.

I agree with squizzle. This would be a great improvement.

Let’s say I have just 100 objects in sight - if I run through them all to see whether they are visible, it would kill the machine. I did this by rays from the centre of each box, although I would have preferred to use corners. However, this alone brought the FPS to a very low value (about 5FPS).