Game Development Community

LOD not working?

by Mark Harmon · in Torque Game Engine · 01/02/2004 (6:12 pm) · 6 replies

It seems like void dglGetModelview(MatrixF *m) is returning the wrong value when being called by S32 TSShapeInstance::selectCurrentDetailEx(bool ignoreScale) which is making the LOD not work. Anyone else run into this.

#1
01/02/2004 (7:03 pm)
Explain... "LOD not work"?
#2
01/02/2004 (7:49 pm)
Sorry, caveman talk there. I need to do a few more tests so that I can explain it better. But basically the LOD is not changing automatically as the shape moves to the threshold sizes set in the modeler. Need to study the code more.

size: 66.5 makes it detail size: 32
size: 67.5 makes it detail size: 128
#3
01/02/2004 (8:00 pm)
I have TWO different problems.
1. In HEAD it's as I described in my previous post.
2. In my own game (slightly modified), the size of a tsShapeInstance is being calculated wrong.

--------------------------------------
Modifed rock3.dts with 3 detail levels
HEAD
size: 258 dist: 20
Aegis (my game)
size: 119 dist: 20
--------------------------------------

I made sure the projection matrix is the same. It's probably something really stupid. I just haven't figure it out yet.
#4
01/03/2004 (11:42 am)
I tried using the showTsShape and tsShapeInstance files from HEAD and I am still having the same problems in my game. I guess have to diff every modified file until I find the problem. That is unless someone has a clue as to why this might happen.
#5
01/03/2004 (12:54 pm)
None offhand. Check the selectCurrentDetail stuff in TS.
#6
01/04/2004 (2:11 am)
I copied the source and header files from HEAD to my project and did a clean build and I still get the problem. I've copied the torqueDemo.exe compiled from HEAD into my projects dir and ran it and the details work. So I know it's not my script files and I know it's not the source. It must be the compiler settings.

edited:
I was wrong, it was my prefs. Sorry for all the noise.

BAD VALUES HERE
$pref::TS::detailAdjust = "0.451";
$pref::TS::screenError = "0.0015";


Now to figure out how to get the size and the detail size to sync up somehow.