Game Development Community

LOD issue, 1.1 and 1.2 - LOGGED (THREED-3153)

by Bloodknight · in Torque 3D Professional · 11/26/2011 (6:48 am) · 2 replies

The number of pixels reported by torque for LODs is incorrect (roughly double)

bloodknightstudios.co.uk/t3d/lodtest1.png
bloodknightstudios.co.uk/t3d/lodtest2.pngThe images are actual size, simple ruler confirms that the objects are only 200 or so pixels.

Here is a copy of the source object dl.dropbox.com/u/38119855/LODTest.zip should anybody want to test with the same object.

#1
11/26/2011 (7:59 am)
I dont know if its just a hack or a simple oversight by the original author, but ive found a solution that works for me, not thoroughly tested i'll admit, but so far it does what I expected it to do.

in
Torque 3D 1.2EnginesourcetstsShapeInstance.cpp around line 595

// We're inlining SceneRenderState::projectRadius here to 
   // skip the unnessasary divide by zero protection.
   //F32 pixelRadius = ( mShape->radius / scaledDistance ) * state->getWorldToScreenScale().y * pixelScale;			// Original
   F32 pixelRadius = ( (mShape->radius / 2) / scaledDistance ) * state->getWorldToScreenScale().y * pixelScale;		// BKS
The 1.1 location is probably similar.
#2
01/11/2012 (11:03 am)
Thanks Bloodknight. I've gone ahead and logged this issue under ticket number THREED-3153 for review.