DIF and engine performance
by Tom Petrus · in Artist Corner · 02/28/2006 (7:56 am) · 22 replies
I have a few questions on what the "best practices" would be for creating DIF files for the Torque engine.
I am assuming, as with any other 3d file type, you would want to keep the number of faces as low as possible while still having a visually acceptable DIF.
-> In a situation where you could use several bushes or a more complicated brush, does it make a difference in the way it compiles or with game performance?
For instance: You would like to split a 'wall' into 3 sections for texturing, If you use 3 cube primitives to make the wall you'd have your 3 sections. There would be 4 faces that would be connected and hidden. -> not used in comipile?
________ ________ _______
[_______][________][_______]
You could also use a cylinder primitive with the proper number of sides and vertex edit that into a 3 section wall.
______.________.______
[_____.________.______]
Or you may even be able to use 1 cube primitive and create a large single texture with the art for all 3 wall sections. (Provided you can make it look good stretching the texture.)(I didn't like this idea but it was sugested so I'm tossing it out there.)
Does the method make a difference when the DIF is compiled or when it is read and displayed by the engine?
What's best on performance? Multiple simple brushes, 1 complicated brush, Single simple brush with huge texture when possible?
-> Un-seen faces: If you have a face on a DIF that will never be seen, can you remove that face to save the engine some work. (I have tried but haven't been able to get the file to export.)
For Instance: The bottom of a strutcture will always be under or equal to the terain height and never be seen ingame.
Is there a way to remove that face and compile a DIF. Would it make a difference in the engine if you can?
-> LoD - Level of Detail: When making multiple levels of detail for a DIF does it make sense to change the textures as well as the geometry?
For Instance: You use a 512x512 detailed texture when you are up close - when you are too far away and the engine changes DIF LoD the detail on the texture isn't seen. (Too far away - DIF is tiny on screen.) It would probably look fine with a 128x128 texture.
Does it effect rendering performance to change the texture to a smaller resource or since the 512 texture is already in memory does it make more since to just leave it and save some memory.
-> Detail Brushes: Is a detail brush more complicated from the engines point of view. Should detail brushes be used only when absolutley needed? How is performance effected with a detail brush - if any?
-> Object thickness...: This may sound wierd but I read somewhere (and I forget what engine was being discussed) that thicker walls were easier on engine performance. No explanation and it didn't make sense to me... Any info on that statement
?
--------------
I hope the post made sense. I'm trying to make 'smart' decisions in the construction phase so hopefully I don't need an overly complicated re-construction phase. hehehe
I am assuming, as with any other 3d file type, you would want to keep the number of faces as low as possible while still having a visually acceptable DIF.
-> In a situation where you could use several bushes or a more complicated brush, does it make a difference in the way it compiles or with game performance?
For instance: You would like to split a 'wall' into 3 sections for texturing, If you use 3 cube primitives to make the wall you'd have your 3 sections. There would be 4 faces that would be connected and hidden. -> not used in comipile?
________ ________ _______
[_______][________][_______]
You could also use a cylinder primitive with the proper number of sides and vertex edit that into a 3 section wall.
______.________.______
[_____.________.______]
Or you may even be able to use 1 cube primitive and create a large single texture with the art for all 3 wall sections. (Provided you can make it look good stretching the texture.)(I didn't like this idea but it was sugested so I'm tossing it out there.)
Does the method make a difference when the DIF is compiled or when it is read and displayed by the engine?
What's best on performance? Multiple simple brushes, 1 complicated brush, Single simple brush with huge texture when possible?
-> Un-seen faces: If you have a face on a DIF that will never be seen, can you remove that face to save the engine some work. (I have tried but haven't been able to get the file to export.)
For Instance: The bottom of a strutcture will always be under or equal to the terain height and never be seen ingame.
Is there a way to remove that face and compile a DIF. Would it make a difference in the engine if you can?
-> LoD - Level of Detail: When making multiple levels of detail for a DIF does it make sense to change the textures as well as the geometry?
For Instance: You use a 512x512 detailed texture when you are up close - when you are too far away and the engine changes DIF LoD the detail on the texture isn't seen. (Too far away - DIF is tiny on screen.) It would probably look fine with a 128x128 texture.
Does it effect rendering performance to change the texture to a smaller resource or since the 512 texture is already in memory does it make more since to just leave it and save some memory.
-> Detail Brushes: Is a detail brush more complicated from the engines point of view. Should detail brushes be used only when absolutley needed? How is performance effected with a detail brush - if any?
-> Object thickness...: This may sound wierd but I read somewhere (and I forget what engine was being discussed) that thicker walls were easier on engine performance. No explanation and it didn't make sense to me... Any info on that statement
?
--------------
I hope the post made sense. I'm trying to make 'smart' decisions in the construction phase so hopefully I don't need an overly complicated re-construction phase. hehehe
About the author
#22
I have a question, I have a game I want to make, it is an outdoor maze, by that I mean its the same as any bsp diff structure, only that it doesn't have a ceiling, this seems to me that it will cause problems zoning, ie it will have massive leaks, how should one handle a game like this, I don't want to add ceilings, it doesn't have them, what should I do, what is the best way to create this. Should it be a diff, or perhaps a dts if it has no roof, also dts has self shadowing, so wont it look loads better, what should I do here.
04/12/2007 (11:44 am)
Doesn't one also have to remember that dts is instanced, diff brushes are not, so if one had a lot of brushes the file size will get large, that in itself will slow a level.I have a question, I have a game I want to make, it is an outdoor maze, by that I mean its the same as any bsp diff structure, only that it doesn't have a ceiling, this seems to me that it will cause problems zoning, ie it will have massive leaks, how should one handle a game like this, I don't want to add ceilings, it doesn't have them, what should I do, what is the best way to create this. Should it be a diff, or perhaps a dts if it has no roof, also dts has self shadowing, so wont it look loads better, what should I do here.
Torque Owner Scott Doerrfeld