About 1M entities!

Posted By: 20BN

About 1M entities! - 12/12/18 15:58

Hi all.

How to judge an entity within the visible range of the screen?
I need to hide the occluded entity.

My initial idea was to define the ENTITY* XX[######] and determine the location of the camera to set INVISIBLE entities outside the scope.

I want a way like Minecraft, but for MDL entities is not FACE.

Thanks.
Posted By: txesmi

Re: About 1M entities! - 12/12/18 17:32

CLIPPED eflag is set when an entity is out of the view range, but I am afraid it will not help you. 1 million entities is crazy.
Posted By: 20BN

Re: About 1M entities! - 12/13/18 07:29

Originally Posted By: txesmi
CLIPPED eflag is set when an entity is out of the view range, but I am afraid it will not help you. 1 million entities is crazy.


Thanks.

if in view range but player can't see, How to judge?
Posted By: Ayumi

Re: About 1M entities! - 12/13/18 12:30

You should use regions (A8) to load data.
If objects are clipped, you can check by vec_dist (i understand right?)
Posted By: txesmi

Re: About 1M entities! - 12/13/18 13:16

As far as I know it is not possible. It is too expensive. It needs some sort of level cutting data to work with and make the process cheaper. The point is that if you check a million entities in order to do something with them, just a little complexity in the process will kill the frame rate for sure. That is the main role of any engine anyway. The proffesional edition has the BSP tree and regions, but I doubt they could be efficiently applied to any level. On the contrary, the level must be designed with those tools in mind. If I am not wrong, the engines BSP tree is an octree.
© 2024 lite-C Forums