Draw distances for interior objects

Problems building or running the engine, queries about how to use features etc.
slapin
Bronze Sponsor
Bronze Sponsor
Posts: 388
Joined: Fri May 23, 2025 5:04 pm
x 28

Draw distances for interior objects

Post by slapin »

Hi, all!
As I completely failed with portals scene manager, I still try to reduce drawing calls from my furniture inside buildings.
I can't use StaticGeometry with furniture as it is potentially moveable and I need to reduce 500 draw calls to 100 or less.
I think I can start with limiting visibility distance. Is it possible to limit Entity draw distance?
Can I also limit Entity's proximity i.e. for it to be not visible when closer than N to the camera?

chilly willy
Halfling
Posts: 82
Joined: Tue Jun 02, 2020 4:11 am
x 27

Re: Draw distances for interior objects

Post by chilly willy »

You can clip far and near for all objects per camera with Camera::setFarClipDistance() and Camera::setNearClipDistance().

You can do it per MovableObject/Entity with MovableObject::setRenderingDistance(). Make sure Camera::setUseRenderingDistance() is true.

slapin
Bronze Sponsor
Bronze Sponsor
Posts: 388
Joined: Fri May 23, 2025 5:04 pm
x 28

Re: Draw distances for interior objects

Post by slapin »

I need per entity thing as for houses should be possible to see them from quite long distance, but furniture should be seen from quite close range.