PDA

View Full Version : DirectX export "Export Textures" option and Performance Hit


pdq
02-02-2007, 11:11 PM
I exported a model in directX format. With "Export Textures" enabled the file size
is twice that if I export the model with "Export Textures" disabled.

Not only that, I take a major performance hit in my application (Dark Basic) when this option is enabled. (From 250 FPS down to 50 FPS)

What exactly does "Export Textures" really do?
I am assuming I take a performance hit because of the file size... so why does the file size double?

THX
PDQ

pdq
02-03-2007, 10:39 PM
OK, I exported a simple model with "Export Textures" both enabled and disabled in directX "text" format to see if I can find out what is going on. Here is what I discovered:


When "Export Textures" is disabled I found the following:

Mesh Part_obj{
91

(followed by a list of values)

}

I am assuming the 91 corresponds to the number of points that make up the mesh.

When "Export Textures" is enabled I found the following:

Mesh Part_obj{
456

(followed by a list of values)

}

Now where did all those additional points come from?

In addition I also found:

MeshTextureCoords{
456

(followed by a list of values)

}

Again where did those extra points come from. I am assuming these are UV values, but should I not have UV values for only 91 points not 456.

This seems to be why the file size is so much larger. And I quess when this is rendered in Dark Basic its rendering 456 points not 91 slowing down performance. Is there redundancy?

Any ideas?

PDQ

Don Pedro
02-04-2007, 06:14 PM
I tried with a couple of models but no difference (problem) whatsoever.


Have you triangulated your model before exporting it?

On thing that I have found out that I just cannot "trust" for the .X exporter in XSI. A couple of examples what has and is happening:

1) If I dont triangulate before exporting the exporter sometimes freezes. There is the triangulate in the exporter but I dont get 100% out of it.
2) Mesh is always mirrored in X export - I use Ultimate Unwrap to correct this.
3) Sometimes the X exporter just freezes the whole XSI. Ctrl+Alt+Del -> end process
4) There are some options in the exporter that I don't dare using any more -> Exported mesh is corrupted.
5) With DDS textures - always problems -> Error message about copying them into target...

Basically, I only unchek animations (don't do those). Other options I leave as they are to optimize the procedure - and get less errors/problems. It means a lot of manual work with textures but no other option...

pdq
02-05-2007, 09:27 PM
I tried to triangulate but that does not correct the issue.

Here is another model, hopefully with a clearer explanation:

In XSI, under "Info Scene" there are 2670 points.

The file size in directX text format with "Export Textures" ENABLED = 2115 KB
The file size in directX text format with "Export Textures" DISABLED = 931 KB

Big Difference!!

Now in the SMALL file under the "Mesh" node there are 2670 nVertices, which is what I expect. There is no "MeshTextureCoords" node. Apparently the UVs were not saved. If they were, there should be 2670 nVertices.

Now in the LARGE file under the "Mesh" node there are 13347 nVertices. WOW!!!
And under "MeshTextureCoords" node there are 13347 nTextureCoords. DOUBLE WOW!!
And under "SkinWeights" the max number of vertexIndices is 13347. TRIPLE WOW!!

Is it me or is something wrong here? Am I missing something? Why is there so much redundancy? Do I need weld vertices?

If I import the LARGE file into Ultimate Unwrap3D, it tells me that there are of course 13347 vertices. Now I can weld the vertices and get back 2670 vertices. But UU does not save skin weights.

I think what I have to do is some how in XSI, weld the VERTICES not the POINTS. But does XSI make a distinction between the two?

Any other suggestions?

THX

pdq
02-06-2007, 09:11 PM
I found a solution, but you need Ultimate Unwrap3D.

1) Export the model from XSI as either *.X or *.xsi format.
2) Import the model into UU3D.
3) Weld the model.
4) Now you can export the model as *.X or anything else.

You will notice that if you originally exported your model as *.X using XSI, the file size
is a lot LARGER than when you weld and export the model as *.X using UU3D. The rendering performance in Dark Basic jumped from 192 fps to 595 fps.

You'll need the latest version of UU3D as well as the *.xsi and *.X plugins.

I guess I dont see why this cant be done in XSI.

I like to thank Brad from Bolthouse software, creator of Ultimate Unwrap3D for a great piece of software.

OH! Yes! UU3D does save skin weights, but again you need the latest version and plugins.

Don Pedro
02-07-2007, 12:27 PM
Great,



very happy for you! I do agree that UUW is a gem - every modeller shoud have that in their toolbox. I use it to correct every kind of problems from different high end tools.

It only costs about 5-10% of the price of XSI F.

CGTalk Moderation
02-07-2007, 12:27 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.