Open fallenoak opened 8 years ago
According to schlumpf on #modcraft:
[10:28:48] [fallenoak] i seem to recall seeing doodads fading in as the camera approaches... but perhaps that's just from the files having to load? [10:29:44] [schlumpf] should be based on their bounding box + distance, yes [10:29:57] [fallenoak] right, so bigger objects would stay visible longer? [10:30:11] [schlumpf] yes
As part of this issue, it might be worth spending some time hunting around IDA to see if there's anything to be gleaned about exactly how the official client handles the relationship between doodad bounding boxes and distance.
After watching a few videos of people playing WotLK-era World of Warcraft, I'm almost certain that the client implements distance culling of some sort. In particular, it seems like small-ish map doodads are culled much earlier than large map doodads and WMOs.
Ideas
radius
of the auto-computed bounding sphere to classify map doodads by sizeVisibilityManager
to cull map doodads based on these parametersMisc
Some client constants (from MoP):
CWorldView::s_fadeDistDefault[] = [30.0, 100.0, 200.0, 650.0, 2100.0]
CWorldView::s_fadeSizeDefault[] = [1.0, 4.0, 25.0, 100.0, 100000.0]
CWorldView::s_fadeRangeDefault[] = [5.0, 10.0, 15.0, 20.0, 50.0]
s_fadeDistScale = 1.0
World::s_prevFarClip = 0.0
World::s_farClip = 0.0
World::s_minFarClip = 200.0
(set inWorld::InitializeStartup()
)Potentially interesting client functions (from MoP):
CWorldView::ScaleFadeDist()
World::GetTerrainLodDist()
->return fmaxf(200.0, World::s_terrainLodDist);
World::GetWmoLodDist()
->return fmaxf(200.0, World::s_wmoLodDist);
Other interesting code bits (from MoP):