Multiple verts after DMX compilation

Started by Bangfri, June 09, 2016, 09:26:11 AM

Previous topic - Next topic

Bangfri

I try to compile model contained 20 000 verts, but at compilation, the quantity of verts increases approximately by 6 times, and the model is divided into 6 subobjects. It happens to all objects, I tried to compile with different settings, different types of objects (mesh or poly), from difficult having finished with primitives, tried 2 versions 3D of Max (2015 and 2016). But nothing helps :(
Plz help, what reason of this error?


Joris Ceoen

#1
Haha wooow, 180.000 verts  :o wth, I have never even seen this possibility in Hammer. If I was to open a model this expensive in model viewer it would simply crash on the spot. I don't understand what is happening, however you should check whether all your vertices are welded. It is possibly that each and every polygon is detached, resulting in having tons of additional vertices on one and the same spot (kind of like 'co-planar' vertices which aren't always easy to spot).

Just select your model in vertex mode, press CTRL+A and read how many vertices are being selected.

Other than that, maybe there is geometry hidden in your object and you're not seeing it. Anything that is hiddin WITHIN a model STILL gets exported to Source SDK. Select your model in polygon mode, and press unhide to see if there is something popping up.

If all that fails, then only Shawn can help you.

FYI, I would avoid working with editable mesh, it's outdated and editable poly is far better for possibly everything you could imagine.

Bangfri

Quote from: Joris Ceoen on June 09, 2016, 04:43:44 PM
Haha wooow, 180.000 verts  :o wth, I have never even seen this possibility in Hammer. If I was to open a model this expensive in model viewer it would simply crash on the spot. I don't understand what is happening, however you should check whether all your vertices are welded. It is possibly that each and every polygon is detached, resulting in having tons of additional vertices on one and the same spot (kind of like 'co-planar' vertices which aren't always easy to spot).

Just select your model in vertex mode, press CTRL+A and read how many vertices are being selected.

Other than that, maybe there is geometry hidden in your object and you're not seeing it. Anything that is hiddin WITHIN a model STILL gets exported to Source SDK. Select your model in polygon mode, and press unhide to see if there is something popping up.

If all that fails, then only Shawn can help you.

FYI, I would avoid working with editable mesh, it's outdated and editable poly is far better for possibly everything you could imagine.

It is a primitive object: sphere, there not can be unwelded verts and the hidden geometry. The quantity of verts is displayed after the choice of a subobject: vertex and  selected all (Ctrl+A). I work with models in poly, and before compilation or import I convert it into mesh. 

CarbonCopyCat

You don't need to convert to mesh to compile models; editable poly works fine. Maybe that's what's causing problems, dunno.

Bangfri

Quote from: CarbonCopyCat on June 09, 2016, 07:07:11 PM
You don't need to convert to mesh to compile models; editable poly works fine. Maybe that's what's causing problems, dunno.
No, i tried to compile all types of objects :(

wallworm

That is something I've never seen before. Can you explain the steps you are taking, exactly? Is the simple sphere suddenly getting NEW vertices inside the 3ds Max viewport just by hitting export? What are the steps exactly that lead from the first image to the second?

Bangfri

#6
Quote from: wallworm on June 11, 2016, 12:45:29 PM
That is something I've never seen before. Can you explain the steps you are taking, exactly? Is the simple sphere suddenly getting NEW vertices inside the 3ds Max viewport just by hitting export? What are the steps exactly that lead from the first image to the second?
I have recorded short video:
https://www.youtube.com/watch?v=783OskxSLXY
WallWorm settings:
http://imgur.com/a/dmrlS

I tried to use TF2 and SFM, change all settings in WallWorm settings and in WWTM helper.
Also I have noticed that the problem appear in step Max -> DMX, if I import the sphere from dmx to the blender, there she already has 2880 verts.


wallworm

OK, now I see what you are talking about.

This is what you are seeing:

For the DMX to compile properly, the DMX must have an identical number of Texture vertices, Position Vertices, Normal Vertices, etc. Each vertex has as many normal as it has faces using it. What this means is that when exporting, there are as many vertices as there are faces times 3. (Trimesh.numfaces * 3).

Generally, the compiler should optimize a lot of that out. For example, when compiling to CSGO, you won't even see a vertex count inside HLMV. Instead, a 32-segment sphere simply shows the Polycount of 960 (which is the tricount inside Max). To my knowledge, the tricount is all that will ever matter. But I'll ask some of my compadres who know the engine guts better to verify.

Note that some of the engine compilers have changed lately that make some DMX files not compile as expected anymore in CSGO. As for other engines, I'm less familiar. I am waiting on a Valve employee to give me some input on these changes and whether they can be addressed inside WW or must be addressed in studiomdl.exe.

Bangfri

I have continued searches of a problem, tried different compilers:
Source SDK (ep1, orangebox, source2007, source 2009)
Team Fortress 2
Sourse FilmMaker
I tried to substitute different studiomdl.exe in the bin folder but at attempt of compilation gave an error message.
Also I have installed blender and have tried to export model by Artfunkel Blender Source Tools.
And there everything works fine, there is a small increase in quantity of verts, approximately for 4% but not in 6 times!

I have already studied your product and it is very convenient for me, but I can't use it if the model has 20+ verts, it can't just compiled.
I wanted to try CSGO and have bought it, but in his folder there was no own compiler.
Perhaps you will advise me some exit from this situation.
And, whether it is possible to expect fix of this increase in quantity of verts in the near future? If it turn out at a step of export model to dmx.
Perhaps it will help you to find the solution:
There everything works fine.
https://github.com/Artfunkel/Datamodel.NET
https://github.com/Artfunkel/BlenderSourceTools

wallworm

I will give it a look. No promises on a change or ETA as I've got a lot of work right now. But I have an idea of what to explore.

Bangfri

Quote from: wallworm on June 22, 2016, 10:16:16 AM
I will give it a look. No promises on a change or ETA as I've got a lot of work right now. But I have an idea of what to explore.
Please answer when something becomes known...
Thank you

wallworm

I will alert you to any change. It will be at least a week.

Valve broke various features in DMX compiling recently and have told me they will have a fix soon. But until that is released and fixes the issues I know of, I'm not going to touch any DMX code. After that's out, I'll test. For all I know it will magically fix this vertex issue. The issues that WW faces in DMX may or may not affect other DMX files. At this time WW only exports ascii DMX, and it's possible that was the source of the break. Blender may not be making ascii files.

Long story short, it's waiting time for the moment.

wallworm

I became curious about this and have been able to create a test that does indeed bring down the vertex count. I cannot release it yet because it needs to be tested more on complex test scenes. But at least you can expect an update that will alleviate this issue in the next week or two.

SMF spam blocked by CleanTalk