DIF question
by GI_JOEJK · in Artist Corner · 10/22/2008 (12:56 am) · 10 replies
I took some of my 3D buildings, exported them as DTS files. Then imported them into Constructor and exported them as DIFs. http://www.dpl-media.com/images/boarding_school.jpg
It all worked out well, and they now have very nice shadows in game. But.... One of the buildings is 1k polygons, and when ever I import that DIF into the editor, it slows down the frame rate to a crawl...
Would it help if I cut that building into three parts of around 300 polygons each, instead of having it as one big structure?
Btw, I'm not using Polysoup but rather simple boxes as collision.
Thanks
It all worked out well, and they now have very nice shadows in game. But.... One of the buildings is 1k polygons, and when ever I import that DIF into the editor, it slows down the frame rate to a crawl...
Would it help if I cut that building into three parts of around 300 polygons each, instead of having it as one big structure?
Btw, I'm not using Polysoup but rather simple boxes as collision.
Thanks
About the author
#2
Question:
1. Dose Constructor automatically add new collision to an imported DTS mesh (doubling the collision)?
2. How does a Dif embedded DTS impact frame rate compared to a Polysoup model?
3. Can Dif models have LODs?
4. Is there a way of getting the baked shadow info off of a DIF and applying that "shadow map" to a DTS mesh? Note; I know that the DTS "apply custom shadow map" option exists.
So far, I am not able to get good shadows (or self shadows) off of a Polysoup mesh, not to mention regular DTS meshes...
Thanks
10/22/2008 (12:09 pm)
I thought that it would not be wise to use Polysoup for all of the DTS static models, that it would seriously impact the game's frame rate?Question:
1. Dose Constructor automatically add new collision to an imported DTS mesh (doubling the collision)?
2. How does a Dif embedded DTS impact frame rate compared to a Polysoup model?
3. Can Dif models have LODs?
4. Is there a way of getting the baked shadow info off of a DIF and applying that "shadow map" to a DTS mesh? Note; I know that the DTS "apply custom shadow map" option exists.
So far, I am not able to get good shadows (or self shadows) off of a Polysoup mesh, not to mention regular DTS meshes...
Thanks
#3
2. I have never tested that out. But I found well done polysoup with LOD works really well.
3. Yes DIF must have LOD's, You can find out how on tdn. You basically create multiple versions
of your constructor file, with the extension _x after it, and when you export the top layered
DIF it will bring all the other files together into one file.
4. Not that I know of.
10/22/2008 (12:29 pm)
1. Not that I know of. My gut is telling me to just say No, but im not positive.2. I have never tested that out. But I found well done polysoup with LOD works really well.
3. Yes DIF must have LOD's, You can find out how on tdn. You basically create multiple versions
of your constructor file, with the extension _x after it, and when you export the top layered
DIF it will bring all the other files together into one file.
4. Not that I know of.
#4
2. I havn't seen an issue with Polysoup at all. Obviously they don't light map like Difs do, but they will cast shadows in world and you might be able to simulate the light mapping by duplicating the object and baking lighting into it with transparency and somehow offsetting the shadow object so it will show up. Complicated I know, but probably the only non code solution for a similar look. What I've done with some success is to make shadow and Highlite planes with transparency that I lay in areas to simulate ambient shadows, cast shadows and highlites. This can help allot but can be tedious as well depending on the complexity of your shape.
In the end I've figured out how to model diffs and just gone with it since the baked lighting looks so nice. And everything else is just a workaround for this engine until the lighting works the same for polysoup objects.
That said I find polysoup to work very well. I've done tests in which I've had 250,000 polys going with 60 fps on an nvidia 8800, not to shabby for that kind of collision.
You can see that stuff here...
www.youtube.com/watch?v=rM93s_HOmMk
I actually pushed it much further as well, taking those cargo crates and duplicating them about 100 times to the point that it looked like an ocean of cargo crates, I think the frame rate dropped to something like 40fps which for that kind of super dense soup speaks volumes about what can be done with some actual thought and careful consideration.
3. Dif LODs are easy enough , but you don't have to have them, I find them less advantageous than .dts LODs since its harder to creat lower LOD DIFs in the first place and much harder to do the traditional 100/75/50/25 kind of split that you would try to do for a .dts. I have done it for some objects, but its not as handy or "clean/smooth" as it is for a .dts. Try it out, your mileage may vary of course. I'd rather spend my time getting the darned things to portal correctly ( a major pain in most cases) than worry about taking the resolution down. More bang for the buck sort of thing.
4. Supposedly, you should be able to code the same functionality for the .dts, assuming you have that kind of coding skill ;-) You can see some insite to this at this thread. Admittedly I havn't tried it but if you get it done, I'll send 100 bucks your way for the effort ;-)
www.garagegames.com/mg/forums/result.thread.php?qt=74778
see Jaimi McEntire's comments for some insite to the possibilities.
10/22/2008 (3:37 pm)
1. Nope, all you are doing is taking that mesh into constructor and it turns it into a tristrip simple polygon object, no optimizations are possible at that point, ie no LOD etc You must creat "Nul" textured surfaces for the collisions around the object at that point. (not sure if these might cast shadows, I doubt it)2. I havn't seen an issue with Polysoup at all. Obviously they don't light map like Difs do, but they will cast shadows in world and you might be able to simulate the light mapping by duplicating the object and baking lighting into it with transparency and somehow offsetting the shadow object so it will show up. Complicated I know, but probably the only non code solution for a similar look. What I've done with some success is to make shadow and Highlite planes with transparency that I lay in areas to simulate ambient shadows, cast shadows and highlites. This can help allot but can be tedious as well depending on the complexity of your shape.
In the end I've figured out how to model diffs and just gone with it since the baked lighting looks so nice. And everything else is just a workaround for this engine until the lighting works the same for polysoup objects.
That said I find polysoup to work very well. I've done tests in which I've had 250,000 polys going with 60 fps on an nvidia 8800, not to shabby for that kind of collision.
You can see that stuff here...
www.youtube.com/watch?v=rM93s_HOmMk
I actually pushed it much further as well, taking those cargo crates and duplicating them about 100 times to the point that it looked like an ocean of cargo crates, I think the frame rate dropped to something like 40fps which for that kind of super dense soup speaks volumes about what can be done with some actual thought and careful consideration.
3. Dif LODs are easy enough , but you don't have to have them, I find them less advantageous than .dts LODs since its harder to creat lower LOD DIFs in the first place and much harder to do the traditional 100/75/50/25 kind of split that you would try to do for a .dts. I have done it for some objects, but its not as handy or "clean/smooth" as it is for a .dts. Try it out, your mileage may vary of course. I'd rather spend my time getting the darned things to portal correctly ( a major pain in most cases) than worry about taking the resolution down. More bang for the buck sort of thing.
4. Supposedly, you should be able to code the same functionality for the .dts, assuming you have that kind of coding skill ;-) You can see some insite to this at this thread. Admittedly I havn't tried it but if you get it done, I'll send 100 bucks your way for the effort ;-)
www.garagegames.com/mg/forums/result.thread.php?qt=74778
see Jaimi McEntire's comments for some insite to the possibilities.
#5
1. Is there some kind of setting for the converted DIF in code, that might help in the frame rate issue?
2. Does the physical size of the DIF make have an impact? For instance if I had four large buildings vrs. a bunch of small parts that composed these buildings?
Thanks
10/24/2008 (12:56 am)
Well, I have found that using DTS converted (into Dif) meshes is a no-go. When I see more then two objects on screen my game looses major frame rate. Its not because of the poly count or original DTS collision (basic boxes), but probably due to the DIF. I have noticed that in the process of converting the mesh, constructor does in deed modify the collision... As a test I converted a tower that had an open road section (tunnel - yes I know about the convex shapes issue), and constructor closed it off with new collision.1. Is there some kind of setting for the converted DIF in code, that might help in the frame rate issue?
2. Does the physical size of the DIF make have an impact? For instance if I had four large buildings vrs. a bunch of small parts that composed these buildings?
Thanks
#6
Have you tried exporting the DTS file with valid collision boxes and then loading both the DIF (street, I'm assuming) and DTS into Torque and placing them within the world builder to see if there is a difference. I'm assuming that there would be. Not as convenient, but it also might make your life less worrisome.
10/24/2008 (6:23 am)
I believe it creates a simple bounding box around the embedded dts object rather than trying to automagically create various collision meshes around the object.Have you tried exporting the DTS file with valid collision boxes and then loading both the DIF (street, I'm assuming) and DTS into Torque and placing them within the world builder to see if there is a difference. I'm assuming that there would be. Not as convenient, but it also might make your life less worrisome.
#7
I would seriously advise against doing this i do not think constructor is ready to be fully compatible with souping and statics,
yes it can be done with great difficulty but i do not think doing this will create a playable game.
not while the engine is how it is,
however anything you can do in .dts format that will bake correctly in .dif can be made in constructor the possibilties are far greater than you would imagine.
I know it may seem your .dts modelling has gone to waste if you learn .dif modelling to an advanced level but trust me it will not have.
anything that must be well detailed and curved can be made in dts and added to the model in world builder eg flags for a castle tower, this way your flags can blow in the wind with animations and will dissapear completely when the player cannot see them which in turn increases engine performance,
textures can be used to add really fine detail like concrete inbetween bricks there is no need to try repeating brick models in .dts to build a wall then import it to constructor to try bake a really detailed wall.
The end result will be a pretty wall and a lot of lag.
thats if it exports properly..
As for large models with 1k polys (brushes) i would reccomend breaking it down into around 200 brushes per model and joining them the best you can and portalling any doors or windows.
make sure you practice with lod as it will be difficult to get it to perform correctly if the models are close together or almost touching.
im sorry to say this torque is a good game engine no doubt and truly unbeatable for the price.
But if your looking for awesome graphics never seen your going to need an awful lot more than Garage Games can offer.
And quite probably a few million dollars.
Anyway heres some brief scribbles and notes of mine your welcome to take a look if you wish they may help.
http://sites.google.com/a/visionsdev.com/billbops-brain/
Good luck with the hard work keep it up ;)
Billbop_Visions.
10/28/2008 (7:14 pm)
Hi,I would seriously advise against doing this i do not think constructor is ready to be fully compatible with souping and statics,
yes it can be done with great difficulty but i do not think doing this will create a playable game.
not while the engine is how it is,
however anything you can do in .dts format that will bake correctly in .dif can be made in constructor the possibilties are far greater than you would imagine.
I know it may seem your .dts modelling has gone to waste if you learn .dif modelling to an advanced level but trust me it will not have.
anything that must be well detailed and curved can be made in dts and added to the model in world builder eg flags for a castle tower, this way your flags can blow in the wind with animations and will dissapear completely when the player cannot see them which in turn increases engine performance,
textures can be used to add really fine detail like concrete inbetween bricks there is no need to try repeating brick models in .dts to build a wall then import it to constructor to try bake a really detailed wall.
The end result will be a pretty wall and a lot of lag.
thats if it exports properly..
As for large models with 1k polys (brushes) i would reccomend breaking it down into around 200 brushes per model and joining them the best you can and portalling any doors or windows.
make sure you practice with lod as it will be difficult to get it to perform correctly if the models are close together or almost touching.
im sorry to say this torque is a good game engine no doubt and truly unbeatable for the price.
But if your looking for awesome graphics never seen your going to need an awful lot more than Garage Games can offer.
And quite probably a few million dollars.
Anyway heres some brief scribbles and notes of mine your welcome to take a look if you wish they may help.
http://sites.google.com/a/visionsdev.com/billbops-brain/
Good luck with the hard work keep it up ;)
Billbop_Visions.
#8
10/29/2008 (7:43 am)
Quote:But if your looking for awesome graphics never seen your going to need an awful lot more than Garage Games can offer.I'm still of the opinion that it has more to do with the art team than the engine since there are a number of great artists doing amazing work with free engines, low-cost engines, and multi-million dollar engines. I've seen some great stuff come out of the community over the years, and a ton of amazing artwork being utilized.
#9
And i do think this will run better in the game.
It may be wise to try that as an alternative.
10/31/2008 (3:02 pm)
I spoke to a friend of mine and he reccomends using dts buildings if you want them highly detailed.And i do think this will run better in the game.
It may be wise to try that as an alternative.
#10
10/31/2008 (3:04 pm)
I think you may need a programmer or animator to help with the shadows or maybe even both but i think he is right.
Torque Owner Surge
MDNAMEDIA
If you are importing a DTS model into Constructor, and hitting the export button,
what you are doing is baking the DTS into a DIF file.
A True dif is built in constructor, and uses convex shapes only!
Or 3dsmax for example with the DIF exporter by Ryan Mounts.
You would be better of importing your model in pieces with LOD as
DTS and polysoup collision enabled.
Or to construct or import the pieces as convex shapes into constructor
also with LOD.