Page 1 of 1

[COMPLETED 075C] Calculation of LODs for StaticMeshes

Posted: Fri Dec 22, 2006 1:13 pm
by Jay
LOD switching of StaticMeshes is calculated from the range of the player to the entity's origin.

It would be more accurate if it was calculated from the center of the BoundingBox.

I am talking about split terrains (terrains split into several sections) which are then much easier to produce... right now we have to do some pretty annoying work with EntityOrigins to get LOD to work properly.


If i am right this can be changed by altering only two lines of code:

in CStaticMesh.cpp:

float dist = (geVec3d_DistanceBetween(&CamPosition, &pMesh->origin) / CCD->CameraManager()->AmtZoom());

changes to

Code: Select all

float dist = (geVec3d_DistanceBetween(&CamPosition, OBBcenter) / CCD->CameraManager()->AmtZoom());
(there are two of them in the file)

However, i cannot compile it because i don't have MFC, so i don't know if this works.

I attached the file so that someone who has MFC can compile it to see if it works... please let me know or send me the compiled RealityFactory.exe because i have a level that has need of this feature. Either way please respond here on the forums first.

(i didn't know if i should put this into the programming-section, i thought i cannot prove it so it is a request for someone to test it.)

Posted: Fri Dec 22, 2006 1:15 pm
by QuestOfDreams
Will change this...