This article's documentation is for anything that uses the Source engine. Click here for more information.

$maxverts: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Add and fix more information about this command)
Line 1: Line 1:
{{stub}}
{{LanguageBar}}
{{LanguageBar}}
{{this is a|QC command|name=$maxverts|game=Source Filmmaker}} It defines the maximum number of vertices allowed in each of the model's meshes. Due to 32 [[$bodygroup]] / [[$model]] hard coded limit and [[SMD]] limit of 17433 verts per file, it allows to extend default 63828 vertices per [[MDL]] limit to at most 557856 vertices in one model.
{{this is a|QC command|name=$maxverts|since=as}} It defines when to split and the maximum amount of vertices allowed in each model.


It allows to compile bigger model without use of cracked compilers and not having to deal with "shattered" model in game.
It allows to compile bigger model without use of cracked compilers and not having to deal with "shattered" model in game.


{{note|[[Garry's Mod]] and [[Half-Life 2]] while compiling throws out error, as this command does not exists. But when compiled with [[Source Filmmaker]] [[StudioMDL (Source)]], model works well in all enviorments.}}
== Syntax ==
{{todo|Which games' [[StudioMDL (Source)]] allow to use it?}}
 
$maxverts <Limit: int> [Clamp: int]
 
: Both Limit and Clamp default to 21,845 if the command is not used


== Syntax ==
; <code>Limit</code>
: This specifies the number of vertices if the model goes over to split the model.
: The value passed in is clamped between 1,024 and 65,536.


$maxverts <int>
; <code>Clamp</code>
: When the model is being split this is the amount each split model can have.
: If a value is passed in, its clamped between 1,024 and 65,536.
: If value not passed in it defaults to Limit clamped to 32,768.


== Example ==
== Example ==


  $maxverts 65530
  $maxverts 65536 65536
 
: This sets it so all models use the max amount amount of vertices possible.
== See also ==


* [[$maxconvexpieces]]
$maxverts 20000 10000
: This makes it if a model has over 20k vertices then each split model has a max of 10k vertices.


[[Category:QC Commands|m]]
[[Category:QC Commands|m]]

Revision as of 07:02, 28 November 2024

English (en)Translate (Translate)

$maxverts is a QC command available in all Source Source games since Alien Swarm Alien Swarm. It defines when to split and the maximum amount of vertices allowed in each model.

It allows to compile bigger model without use of cracked compilers and not having to deal with "shattered" model in game.

Syntax

$maxverts <Limit: int> [Clamp: int]
Both Limit and Clamp default to 21,845 if the command is not used
Limit
This specifies the number of vertices if the model goes over to split the model.
The value passed in is clamped between 1,024 and 65,536.
Clamp
When the model is being split this is the amount each split model can have.
If a value is passed in, its clamped between 1,024 and 65,536.
If value not passed in it defaults to Limit clamped to 32,768.

Example

$maxverts 65536 65536
This sets it so all models use the max amount amount of vertices possible.
$maxverts 20000 10000
This makes it if a model has over 20k vertices then each split model has a max of 10k vertices.