Carrying LOD settings through multiple maps
by Ironbelly Studios · in Torque Game Engine · 07/10/2005 (1:40 pm) · 3 replies
So far what we've been doing with our LOD settings is storing them in the .mis files which are associated with a specific .dts file. However as we are moving into the next phase of development we realised a big problem with doing it this way because players are going to be able to move from one map directly into another.. The problem arises because if there is an object that is unique to Map file A and a player picks it up and carries it over to map b and drops it, how will the engine know the LOD settings for that object.
Now I guess you could say 'well just put the LOD settings in both .mis files even if the object doesn't start out in one of them' , however lets say we have 200 mis files which a player can walk through or even more.
So I figured that the best way to do this would be to put the LOD settings/information in a global database seperate from the map/mis files all together, so it wouldn't matter which map file the player was in Torque would always have the information available to it(not necessarily loaded into memory) for every object in the game just incase some player brough something from the far side of the game.
So that is what I am thinking, has anyone got any experience with this sort of thing? Or know of any resources/anything where I can learn more about this? Any help would be greatly appreciated.
Now I guess you could say 'well just put the LOD settings in both .mis files even if the object doesn't start out in one of them' , however lets say we have 200 mis files which a player can walk through or even more.
So I figured that the best way to do this would be to put the LOD settings/information in a global database seperate from the map/mis files all together, so it wouldn't matter which map file the player was in Torque would always have the information available to it(not necessarily loaded into memory) for every object in the game just incase some player brough something from the far side of the game.
So that is what I am thinking, has anyone got any experience with this sort of thing? Or know of any resources/anything where I can learn more about this? Any help would be greatly appreciated.
About the author
#2
07/16/2005 (10:01 am)
We were under the impression(aparently wrongly) that lod settings were supposed to be stored in the .mis files.. I take it you know of a better solution. I'm chomping at the bit to hear it :)
#3
This is a technique where the game engine can choose to render a different model with a lower polycount whenever that model is further away from the player on the screen and less detail would be visible to the player anyway.
For example, maybe you have modelled the bolts on the side of a tank. If you step back to 10-20 meters those bolts are going to be pretty much impossible to see but they are still rendering and cutting into your performance. So you would then create a 2nd LOD mesh that doesn't have the bolts modelled (maybe they are just on the texture) that the engine will switch to automatically when you get further away from the mesh. As you continue to get further away the model could continue to switch to lower and lower detailed versions till you are rendering only a handful of polygons in the extreme distance.
This is a purely automatic (if you model the LOD meshes) client-side rendering effect that isn't tied to a mission in any way which is why we are confused by your questions. I'm really not even sure what "settings" you were storing since the LOD is totally internal to the .dts/.dif file.
I do want to add one more note: I have been speaking of LOD in terms of distance to the player because that is the most common way of doing it and it makes sense if you walk outside and watch a car drive nearer or further to you. However, Torque does something a little more clever. Instead of the LOD being tied to distance it is tied to the pixel size of the object on the screen. At first this may seem odd since the further away the object is, the smaller it will be and the smaller its pixel size. So isn't that just the same thing as distance-based LOD? If everyone was running your game at the same resolution, then yes, it would be the same as distance based LOD. But some people might be running your game at 320x200 while others might be running at 1024x768 and other might be running at 1600x1200. At higher resolutions you are able to see more detail on the shape at further distances and suddenly your smooth LOD transitions start to "pop" (when you can see the actual transition from model to model) which is visually jarring and displeasing. With Torque tying it to the pixel size on the screen, it will always transition the same no matter what the resolution is. Pretty clever, eh?
07/16/2005 (3:24 pm)
LOD = Level of DetailThis is a technique where the game engine can choose to render a different model with a lower polycount whenever that model is further away from the player on the screen and less detail would be visible to the player anyway.
For example, maybe you have modelled the bolts on the side of a tank. If you step back to 10-20 meters those bolts are going to be pretty much impossible to see but they are still rendering and cutting into your performance. So you would then create a 2nd LOD mesh that doesn't have the bolts modelled (maybe they are just on the texture) that the engine will switch to automatically when you get further away from the mesh. As you continue to get further away the model could continue to switch to lower and lower detailed versions till you are rendering only a handful of polygons in the extreme distance.
This is a purely automatic (if you model the LOD meshes) client-side rendering effect that isn't tied to a mission in any way which is why we are confused by your questions. I'm really not even sure what "settings" you were storing since the LOD is totally internal to the .dts/.dif file.
I do want to add one more note: I have been speaking of LOD in terms of distance to the player because that is the most common way of doing it and it makes sense if you walk outside and watch a car drive nearer or further to you. However, Torque does something a little more clever. Instead of the LOD being tied to distance it is tied to the pixel size of the object on the screen. At first this may seem odd since the further away the object is, the smaller it will be and the smaller its pixel size. So isn't that just the same thing as distance-based LOD? If everyone was running your game at the same resolution, then yes, it would be the same as distance based LOD. But some people might be running your game at 320x200 while others might be running at 1024x768 and other might be running at 1600x1200. At higher resolutions you are able to see more detail on the shape at further distances and suddenly your smooth LOD transitions start to "pop" (when you can see the actual transition from model to model) which is visually jarring and displeasing. With Torque tying it to the pixel size on the screen, it will always transition the same no matter what the resolution is. Pretty clever, eh?
Torque Owner Stefan Lundmark
First, why are you keeping LOD settings in the .mis files?
Second, does it matter if you keep it in each .mis file opposed to a database? It will still be the same thing when it's loaded into memory.