Mel wrote:Congrats! It looks great, and very impressive. How do you decide which detail level show?
Thanks!
I use simple array with distances, in the code it defined next way:
Code: Select all
readonly float[] lodDistance = new float[] {
150, // LOD 0: 0 ... 150
300, // LOD 1: 150 ... 300
600, // LOD 2: 300 ... 600
1200, // LOD 3: 600 ... 1200
2500, // LOD 4: 1200 ... 2500
6000, // LOD 5: 2500 ... 6000
-1 // LOD 6: 6000+; value "-1" doesn't play any role,
// because anything that is further than 6000 will stay at the last available LOD, which is 6
};
I calc LOD for every single planet, BUT i do so with different frequences. I get about 17 fps when do it for all planets each frame, and i get 55+ fps if i calc LOD using different time intervals, i use next array:
Code: Select all
readonly uint[] updateIntervals = new uint[] {
10,
20,
40,
80,
120,
200,
1500 };
This is one of the tricks i did to get good fps.
p.s.: source code (c#) and release build can be downloaded from
http://www.irrlicht.ru/articles/2011/06 ... plelod.zip
p.s.s.: windows && dx9 && .net 4.0 && visual c++ 2010 redistr == must be installed to run exe.