Short conversion out of range: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
 
Line 7: Line 7:
== Solution ==
== Solution ==


The problem is that <code>studiomdl.exe</code> is trying to write out a triangle strip with more than 32767 vertices, which is more than Source supports (and also more than any model should ever need). You have run into engine limitation and you need to reduce the complexity of a portion of the model.
The problem is that <code>studiomdl.exe</code> is trying to write out a triangle strip with more than 32767 vertices, which is more than Source supports (and also more than any model should ever need). You have run into an engine limitation and you need to reduce the complexity of a portion of the model.


As an example, Valve's highest [[LOD]] .SMD for dog is only 1.72 MB and contains 17,433 vertices. Which then divides down to a little less than 6,000 polygons. 10,000 polygons is kind of an informal maximum for the Source engine, hence the maximum vertices being roughly 10,000 x 3 (32767).
As an example, Valve's highest [[LOD]] .SMD for dog is only 1.72 MB and contains 17,433 vertices. Which then divides down to a little less than 6,000 polygons. 10,000 polygons is kind of an informal maximum for the Source engine, hence the maximum vertices being roughly 10,000 x 3 (32767).

Latest revision as of 13:01, 23 April 2017

Studiomdl reports this error:

Generating optimized mesh "c:\steam\steamapps\SourceMods\mod\models/your/model.sw.vtx":
ERROR: short conversion out of range XXXXX
ERROR: Aborted Processing on 'your/model.mdl'

Solution

The problem is that studiomdl.exe is trying to write out a triangle strip with more than 32767 vertices, which is more than Source supports (and also more than any model should ever need). You have run into an engine limitation and you need to reduce the complexity of a portion of the model.

As an example, Valve's highest LOD .SMD for dog is only 1.72 MB and contains 17,433 vertices. Which then divides down to a little less than 6,000 polygons. 10,000 polygons is kind of an informal maximum for the Source engine, hence the maximum vertices being roughly 10,000 x 3 (32767).