[COMPLETED 075C] Calculation of LODs for StaticMeshes

Post your Feature Requests here...
Post Reply
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

[COMPLETED 075C] Calculation of LODs for StaticMeshes

Post by Jay » Fri Dec 22, 2006 1:13 pm

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.)
Attachments
CStaticMesh.zip
(14.07 KiB) Downloaded 59 times
Last edited by Jay on Fri Dec 22, 2006 7:27 pm, edited 2 times in total.
Everyone can see the difficult, but only the wise can see the simple.
-----

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams » Fri Dec 22, 2006 1:15 pm

Will change this...

Post Reply