Game Development Community

DIF imbeded DTS mesh question

by GI_JOEJK · in Artist Corner · 10/27/2008 (10:38 am) · 12 replies

I would like to know why Dif imbedded DTS meshes, regardless of polycout and textures, kill frame rate. I have a 400 polygon house with four 256x256 textures on it (house duplicated three times) lowering frame rate down to 3/5 frames per second. Again, there are only three meshes on screen, and the frame rate just drops strait through the floor.... Why is this?

I have another level with 40 houses and over 200 other static DTS meshes, running at a very high frame rate. And there are NO lods implemented yet!

Is there a way of getting the DIF imbedded DTS meshes to work without killing the frame rate?????

Btw, these are DTS meshes that were imported into Constructor and then exported as DIFs.

Thanks

#1
10/27/2008 (6:49 pm)
Why dont you try remaking it as a DIF?
Or just Export it as a DTS but place it in with POLYSOUP selected?

There could be so many reasons... Im sure!
I could only image what could be the problem.

Just try it the easy way, importing it as a DTS.
Make sure it has LOD.
Enable Polysoup.
Enable Step Up.

Keep the model Relatively simple and straight forward.
It should work..
#2
10/27/2008 (7:23 pm)
Yeah it could be anything. Depends on how the meshes were made, texture? whatever. Try them standalone and see what they look like as far as fps. How big are their textures? Whats the embedded .dts Lighting shadow size set at? The default in constructor is 1. What is your Light map size? Do the .dts objects have collision, I don't think this translates into constructor simple meshes. Also not sure if setting the mesh to be single sided or double sided matters either.

Could be anything. I'd just remake it as a .dif
#3
10/27/2008 (9:29 pm)
@Surge

Please explain "Enable Step Up".

@ALL

So far I am very disappointed in the lighting model used by TGEA. Yes the DTS meshes have some nifty dynamic capabilities, but ALL I am looking for are some nice cast shadows for statics. And I can not afford to spend another 4 - 6 months rebuilding my statics in Constructor, I do not have the time or $$$ for this. I REALLY need to have cast shadows on my buildings, that's it. And I currently do not have this...

If I am unable to sort this out in the next couple of weeks, I am going to be forced to go with another engine. I hope I didn't spend $300+ for nothing...
#4
10/28/2008 (3:36 am)
Sounds to me like your artpath is FUBAR. You're not using the typical means of creating DIF or DTS models. DIF structures and DTS shapes are mutually exclusive. Yes you can import DTS into Constructor and export a DIF but I believe there are problems with the output using that method and may account for the massive drop in framerate.

Like the other fellows said you can either create DTS shapes in a modeling package and build collision meshes for those models (or use polysoup as an alternative). Or build straight DIF structures in Constructor, Deled Pro, Quark or any other BSP toolkit that exports DIFs.

Torque is not a bad engine. Its actually come a long way and has matured a lot in the past year and a half. Having said that it is true that Torque requires massaging to get a really nice look going. It takes some work but is possible.
#5
10/28/2008 (8:28 am)
If you have to have shadows cast on .dts.. there are plenty of other ways to get there. Baking a shadow map in your 3d app, for one. If you are using TGEA, which I think you are, then you can do this in an efficient way as well. You could easily create a low res shadow map as an overlay texture, assuming your UV maps are set up correctly.

The short answer is, that you will not get baked shadows on .dts objects and performance until you put the effort in to figure out the pipeline to do so. There are many ways to skin this cat, all have pros and cons.

You may want to look into a stencil shadow resource I've seen floating around. It will probably have fps slowdown as well, but with some modification maybe you could get it to work similar to baking shadows. If you are getting the slowdown you say you are with .dts embedded in .dif , then the stencil shadows might give you a slightly better performance.

I do agree it would be great to get lightmaps on .dts files and still retain the .dts advantages and no framerate slowdown, but thats a pretty hefty request for an engine that doesn't cost 100 grand and require new lincensing with each game released.

Just my 2 cents. I had the same angst in the beginning, but I've learned to work around this issue and have learned many ways to optimize the engine in the process.

C
#6
10/28/2008 (9:18 am)
@William Freeman: Do you have a good example of how to do this with just one UV channel?
I'm under the impression that the DTS format only supports one channel, and therefore the lowres lightmap can just be baked into the higher res. texture...or is there another/better way of lightmapping DTS's
#7
10/28/2008 (10:27 am)
Are portals set up and correctly working on your .dif? Did you properly build your .dif? BSP style models have a completely differently design process and structure than 3d models made in a modeling application. Embedding .dts in an interior is a great way of adding that extra detail to BSP modelling and I've used it extensively with very little slowdown. My only complaint is the lack of dynamic lighting and shadowing on these embedded objects which seperate static meshes will have.
#8
10/28/2008 (1:36 pm)
@N R Bharathae

"Sounds to me like your art path is FUBAR."

Yes, currently my art pipeline is kind of FUBAR, but that's because my game was not designed for TGEA, and is just a "port". In fact my game pipeline was perfect for the original engine, but unfortunately I had to change engines for various reasons. If you look at it in that light, then my game pipeline is not so bad. TGEA's art pipeline is a lot different from other game engine's art pipeline....

Any ways, I have made some positive progress regarding the self shadowing issue, we'll see...
#9
10/28/2008 (1:40 pm)
@GI JOEJK:

Later on I'd love to hear what you come up with regarding creative ways to tackle the light/shadow issues in TGEA.
#10
10/28/2008 (1:43 pm)
@William Freeman

In order to keep the texture budget low, I could not use custom textures for every static. Instead I created a collection of generic 256x256 (and smaller) textures from which to use on all of the statics. Unfortunately this will not allow me to bake in shadow maps onto the static in the 3D app. Also the UVs are not in the 0-1 UV space, instead they tile all over the place... So without a 2nd UV channel (which I can not believe GG didn't include for DTS meshes) you suggestion will not work.

But I will search for the "stencil shadow" term...
#11
10/28/2008 (1:49 pm)
@Tobias Niva

It looks like the solution to my problem is like this;

1. I will have to rebuild about 30 simple statics as DIFs, such as walls, street and sidewalk sections.

2. Regarding the houses and buildings, I'm still looking into that...
#12
10/29/2008 (10:08 pm)
Ok.. heres how I'd approach it even on a low texture budget.

In TGEA of course...

ok. I get the tiled texture UV map comment.. I feel your pain. But maybe its still possible.

A. You could use a slightly scaled duplicate object with a different UV map and tranparent baked shadow? Painful but possible, the problem of course is the z fighting which depending on how close you'll get could be taken care of.

B. Theoretically you could modify the .dts format to have that second UV channel, and then use the .material file to apply the shadow map to that. It seems like all it would take is a duplication of the code that deals with UV maps in .dts and that extra channel, its all there just needs that little extra slot. Most likely that would be equal to the option above, where you get a duplication of the render pass to compensate for the extra UVs, but I think this happens with multiple textures per UV map now anyway (or at least I was told it did) and I havn't noticed a huge slowdown in FPS.

What is your target machine? I've done some pretty crazy texture loads and poly counts and not seen much of a performance hit on any of the machines I test for?

"@William Freeman: Do you have a good example of how to do this with just one UV channel?
I'm under the impression that the DTS format only supports one channel, and therefore the lowres lightmap can just be baked into the higher res. texture...or is there another/better way of lightmapping DTS's"

If you use 0 to 1 UV maps, then its simple. Just create an extra channel with the baked Light map in the material.cs file. If its a .png or .dds with transparency, you are good to go. Of course you have to guestimate the lighting in world to pull this off. Lame I know, but a really smart dev could take the lightmapping code that exists for .difs or .dts files in .difs and create a version that could spit out those maps for the .dts similar to what happens with the normal maps created for all .difs in the Modernization Kit.

Not trivial, I know but again I think a large chunk of that code is already there, perhaps not the UV map stuff for the lightmapper, not sure.

I wonder also if you could get away with tiled UV maps that still had layouts to them and then just apply a channel in the Material.cs file with some sort of UV scale modification. That seems to me like the best of both worlds, and again just a few lines of code to pull off? I'm totally talking out of my butt here, but it seems like the answer is within our grasp.

C