The logo competition for the 2025 4chan Winter Cup is now taking submissions.
The deadline is January 6th, 23:59 UTC. Logos will be placed in this gallery to facilitate discussion. This will be followed by a polling period to determine which logo will be used.

Please send all submissions to Potatotron. You must supply a high-res PNG file (5000x5000 limit) and the original multi-layer source file.

Cloverleaf logo: .png .svg

Cloverball logo: .ai .png .svg

Difference between revisions of "Setting up .model files"

From Rigged Wiki
Jump to navigation Jump to search
m
(A start to a shader section.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In PES (14, 15 and 16) .xml files are some of the most important files in the game. It has the data of which .model file and which .mtl file to load. The .mtl file is actually a sort of .xml file that assigns textures, shader settings and other material settings to .model files. Almost every single .model file requires a .mtl and texture to work correctly. This page has been written to supplement the [[RigEx]] page for self-made .model files.
{{Template:Pes2017 TOC}}
In PES 14, 15, 16 & 17 .xml files are some of the most important files in the game. It has the data of which .model file and which .mtl file to load. The .mtl file is actually a sort of .xml file that assigns textures, shader settings and other material settings to .model files. Almost every single .model file requires a .mtl and texture to work correctly. This page has been written to supplement the [[RigEx]] page for self-made .model files.


== .xml file ==
= .xml file =
The most important file is usually the .xml file. As explained above it contains the most important info for PES to correctly load a .model and texture it. Although not every .model file has one, for example boots and balls do not have a .xml file, but gloves do. '''It is advised to copy an existing .xml file and edit it to your needs instead of making one from scratch yourself in most situations.''' If you want a decent .xml editor, download Notepad++ with the XML plugin.
The most important file is usually the .xml file. As explained above it contains the most important info for PES to correctly load a .model and texture it. Although not every .model file has one, for example boots and balls do not have a .xml file, but gloves do. '''It is advised to copy an existing .xml file and edit it to your needs instead of making one from scratch yourself in most situations.''' If you want a decent .xml editor, download Notepad++ with the XML plugin.


Line 23: Line 24:
Because there are so many different .xml files with different settings the example above cannot be used for any situation. So again, please copy an existing file and edit that instead of writing one from scratch yourself.
Because there are so many different .xml files with different settings the example above cannot be used for any situation. So again, please copy an existing file and edit that instead of writing one from scratch yourself.


=== There is no .xml file ===
== There is no .xml file ==
If a .model has no .xml file in standard PES, there is a very big chance that all/some files are named in a very specific way. So it is advised to name your files the same way PES has named them.
If a .model has no .xml file in standard PES, there is a very big chance that all/some files are named in a very specific way. So it is advised to name your files the same way PES has named them.


== .mtl file ==
= .mtl file =
As stated above, the .mtl assigns the shader and texture settings to .model files in PES. For this example we'll use the ''glove_l.mtl'' file as mentioned in the .xml example above. It also advised for these files to open them with Notepad++. Keep in mind that some .mtl files might still be [[Pro Evolution Soccer 2016/zlib|zlibbed]], so unzlib them first if necessary. '''Also here it is advised to copy an existing .mtll file and edit it to your needs instead of making one from scratch yourself in most situations.'''
As stated above, the .mtl assigns the shader and texture settings to .model files in PES. For this example we'll use the ''glove_l.mtl'' file as mentioned in the .xml example above. It also advised for these files to open them with Notepad++. Keep in mind that some .mtl files might still be [[Pro Evolution Soccer 2016/zlib|zlibbed]], so unzlib them first if necessary. '''Also here it is advised to copy an existing .mtl file and edit it to your needs instead of making one from scratch yourself in most situations.'''


  <materialset>
  <materialset>
Line 59: Line 60:
* The ''<material> </material>'' note the end and start of a single entry for a single mesh in the .model file.
* The ''<material> </material>'' note the end and start of a single entry for a single mesh in the .model file.
* The ''name'' is the name of the mesh in the .model file the next material settings will be applied to. If you use [[RigEx]], it is the name you gave to the mesh, also shown in the ''Object:'' box.
* The ''name'' is the name of the mesh in the .model file the next material settings will be applied to. If you use [[RigEx]], it is the name you gave to the mesh, also shown in the ''Object:'' box.
* The ''shader'' is the shader (or rather, a shader config file) that will be used for the mesh. There are a lot of different shaders in PES, almost all of them can be found in ''dt15.cpk\common\render\shader\surfaceShaders''. If you have no idea what shader to use, use the one that came with the .mtl file or a very similar one in the same file. If you have a shader that does not fit, you will notice it very quickly because the object will turn red or just look weird in general.
* The ''shader'' is the shader (or rather, a shader config file) that will be used for the mesh. There are a lot of different shaders in PES, almost all of them can be found in ''dt15.cpk\common\render\shader\surfaceShaders''. If you have no idea what shader to use, use the one that came with the .mtl file or a very similar one in the same file. If you have a shader that does not fit, you will notice it very quickly because the object will turn red, black, white or just look weird in general.
* The ''sampler'' is a texture entry for the .model
* The ''sampler'' is a texture entry for the .model
* The ''name'' of the sampler is the type of the texture that will be used. If you have no idea what a specific Map is, just google it. A mesh can only have the samplers that the shaders allows it to have. So open the .xml of the shader in the dt15.cpk folder and you'll see what samplers the shader has.
* The ''name'' of the sampler is the type of the texture that will be used. If you have no idea what a specific Map is, just google it. A mesh can only have the samplers that the shaders allows it to have. So open the .xml of the shader in the dt15.cpk folder and you'll see what samplers the shader has.
Line 77: Line 78:
=== The .mtl file lacks specific settings ===
=== The .mtl file lacks specific settings ===
For some situations, like kits, the game does not use a specific DiffuseMap for a .model and will only list a few settings. You can still add the DiffuseMap sampler yourself, but it might not always work as the game will overwrite this setting. This is usually very dependent on the type in the .xml files. Sometimes states are missing because they are not needed, but they can still work if you add them yourself.
For some situations, like kits, the game does not use a specific DiffuseMap for a .model and will only list a few settings. You can still add the DiffuseMap sampler yourself, but it might not always work as the game will overwrite this setting. This is usually very dependent on the type in the .xml files. Sometimes states are missing because they are not needed, but they can still work if you add them yourself.
= Shaders =
{{incomplete}}
To change a shader, edit the '''bolded''' part in your .mtl file. Note that shader names are case-sensitive.
  <material name="(material name)" shader="'''(shader name)'''">
== Basic_C ==
A very basic shader, as the name implies. Similar to the blin shader from FOX PES.
=== Texture entries ===
{| class="wikitable"
|-
! Role !! Filename !! Description
|-
| sampler name="DiffuseMap" || *.dds || This is the sampler for the main texture you'll use on your model.
|}
== Basic_CNSR ==
A reflective shader, mostly used for metallic models. Similar to the metallic shader from FOX PES.
=== Texture entries ===
{| class="wikitable"
|-
! Role !! Filename !! Description
|-
| sampler name="DiffuseMap" || *.dds || This is the sampler for the main texture you'll use on your model.
|-
| sampler name="SpecularMap" || *.dds || This is the sampler for the reflectivity of your model.<br>[[wikipedia:Specularity]]
|-
| sampler name="RoughnessMap" || *.dds ||
|-
| sampler name="EnvironmentMap" || *.dds || This is the sampler for the reflection. Uses a cubemap.<br>[[wikipedia:Reflection_mapping]]
|}
=== Other entries ===
Other entries that effect the reflectivity of your model. The effects of each variable haven't been fully figured out yet, but the values below should work fine.
<vector name="Reflection" x="1" y="1" z="1" w="0" />
<vector name="Shininess" x="0.9" y="0" z="0" w="1.0" />
== Shadeless ==
Also known as "Anime Shader", "Cartoon Shader" or "Shadeless shader". A model with this shader will ignore lighting.
=== Texture entries ===
{| class="wikitable"
|-
! Role !! Filename !! Description
|-
| sampler name="DiffuseMap" || *.dds || This is the sampler for the main texture you'll use on your model.
|}

Latest revision as of 19:41, 17 November 2024

2017 4chanlogo.png
Pro Evolution Soccer 2017
Game
Rules
Info
Tools
Modding

In PES 14, 15, 16 & 17 .xml files are some of the most important files in the game. It has the data of which .model file and which .mtl file to load. The .mtl file is actually a sort of .xml file that assigns textures, shader settings and other material settings to .model files. Almost every single .model file requires a .mtl and texture to work correctly. This page has been written to supplement the RigEx page for self-made .model files.

.xml file

The most important file is usually the .xml file. As explained above it contains the most important info for PES to correctly load a .model and texture it. Although not every .model file has one, for example boots and balls do not have a .xml file, but gloves do. It is advised to copy an existing .xml file and edit it to your needs instead of making one from scratch yourself in most situations. If you want a decent .xml editor, download Notepad++ with the XML plugin.

For this guide we'll use the glove.xml of an existing GK glove in PES as example. Keep in mind that some .xml files might still be zlibbed, so unzlib them first if necessary.

<?xml version="1.0" encoding="UTF-8"?>
<config>
	<model level="0" type="gloveL" material="./glove_l.mtl" path="./glove_l.model"/>
	<model level="0" type="gloveR" material="./glove_r.mtl" path="./glove_r.model"/>
</config>
  • <?xml version="1.0" encoding="UTF-8"?> is the header of the .xml file, don't do anything with this.
  • Everything between he <config> </config> tags determine what is loaded, everything outside these tags is not.
  • The level determines the detail level. In PES 0 is used for closeup, 1 for LOD.
  • The type determines several settings in PES, there are some types that will make the .model automatically attach to a specific bone or use a specific texture regardless of the material.
  • The material is the .mtl file with all the shader and texture settings. The ./ implies it will use the specified file in the same folder the .xml is in.
  • The path is the .model file that will be used.

Watch out with using spaces in file names, the .xml file treats spaces as separators. So it is advised to use underscores for filenames.

Because there are so many different .xml files with different settings the example above cannot be used for any situation. So again, please copy an existing file and edit that instead of writing one from scratch yourself.

There is no .xml file

If a .model has no .xml file in standard PES, there is a very big chance that all/some files are named in a very specific way. So it is advised to name your files the same way PES has named them.

.mtl file

As stated above, the .mtl assigns the shader and texture settings to .model files in PES. For this example we'll use the glove_l.mtl file as mentioned in the .xml example above. It also advised for these files to open them with Notepad++. Keep in mind that some .mtl files might still be zlibbed, so unzlib them first if necessary. Also here it is advised to copy an existing .mtl file and edit it to your needs instead of making one from scratch yourself in most situations.

<materialset>
    <material name="Boots_Game_mat" shader="Boots">
        <sampler name="DiffuseMap" path="./g001_c.dds" srgb="1" minfilter="linear" magfilter="linear" mipfilter="linear" uaddr="wrap" vaddr="wrap" waddr="wrap" maxaniso="2" />
        <sampler name="NormalMap" path="./g001_n.dds" srgb="0" minfilter="linear" magfilter="linear" mipfilter="linear" uaddr="wrap" vaddr="wrap" waddr="wrap" maxaniso="2" />
        <sampler name="SpecularMap" path="./g001_sr.dds" srgb="1" minfilter="linear" magfilter="linear" mipfilter="linear" uaddr="wrap" vaddr="wrap" waddr="wrap" maxaniso="2" />
        <state name="alpharef" value="0" />
        <state name="blendmode" value="0" />
        <state name="alphablend" value="0" />
        <state name="alphatest" value="0" />
        <state name="twosided" value="0" />
        <state name="ztest" value="1" />
        <state name="zwrite" value="1" />
    </material>
    <material name="Boots_Game_Alpha_mat" shader="Boots">
        <sampler name="DiffuseMap" path="./g001_c.dds" srgb="1" minfilter="linear" magfilter="linear" mipfilter="linear" uaddr="wrap" vaddr="wrap" waddr="wrap" maxaniso="2" />
        <sampler name="NormalMap" path="./g001_n.dds" srgb="0" minfilter="linear" magfilter="linear" mipfilter="linear" uaddr="wrap" vaddr="wrap" waddr="wrap" maxaniso="2" />
        <sampler name="SpecularMap" path="./g001_sr.dds" srgb="1" minfilter="linear" magfilter="linear" mipfilter="linear" uaddr="wrap" vaddr="wrap" waddr="wrap" maxaniso="2" />
        <state name="alpharef" value="0" />
        <state name="blendmode" value="0" />
        <state name="alphablend" value="1" />
        <state name="alphatest" value="0" />
        <state name="twosided" value="1" />
        <state name="ztest" value="1" />
        <state name="zwrite" value="0" />
    </material>
</materialset>
  • The <materialset> </materialset> note the start and the end of the .mtl files, everything outside these tags will not be read.
  • The <material> </material> note the end and start of a single entry for a single mesh in the .model file.
  • The name is the name of the mesh in the .model file the next material settings will be applied to. If you use RigEx, it is the name you gave to the mesh, also shown in the Object: box.
  • The shader is the shader (or rather, a shader config file) that will be used for the mesh. There are a lot of different shaders in PES, almost all of them can be found in dt15.cpk\common\render\shader\surfaceShaders. If you have no idea what shader to use, use the one that came with the .mtl file or a very similar one in the same file. If you have a shader that does not fit, you will notice it very quickly because the object will turn red, black, white or just look weird in general.
  • The sampler is a texture entry for the .model
  • The name of the sampler is the type of the texture that will be used. If you have no idea what a specific Map is, just google it. A mesh can only have the samplers that the shaders allows it to have. So open the .xml of the shader in the dt15.cpk folder and you'll see what samplers the shader has.
  • The path of the sampler is the texture that will be used for that specific sampler.
  • All the other sampler settings should be left alone in most cases. Only change them if you really know what you are doing.
  • The alpharef is used when the alphatest is enabled. This is a 0-255 scale, every pixel that has a transparency of and below the alpharef view will not be rendered.
  • The blendmode determines how the mesh is blended into the meshes below it.
  • The alphablend will render the .model with the transparency of the DiffuseMap if this is 1.
  • The alphatest will render the .model with transparency of the DiffuseMap, but it depends on the alpharef whether a pixel is rendered or not.
  • The twosided will make the .model visible from both sides. If you have set up the normals correctly in Blender it can be left at 0 as it required extra CPU and GPU power when enabled.
  • The ztest and zwrite are better left at their default values.

Keep in mind that not all shaders allow all the state settings, for example kit shaders will always ignore the alpha settings. And again watch out with using spaces in file names, the .mtl file treats spaces as separators. So it is advised to use underscores for filenames.

Because there are so many different .mtl files with different settings the example above cannot be used for any situation. So again, please copy an existing file and edit that instead of writing one from scratch yourself.

The .mtl file lacks specific settings

For some situations, like kits, the game does not use a specific DiffuseMap for a .model and will only list a few settings. You can still add the DiffuseMap sampler yourself, but it might not always work as the game will overwrite this setting. This is usually very dependent on the type in the .xml files. Sometimes states are missing because they are not needed, but they can still work if you add them yourself.

Shaders

Incomplete.svg The content of this page or section is incomplete because we're a bunch of lazy fucks. Feel free to help out.

To change a shader, edit the bolded part in your .mtl file. Note that shader names are case-sensitive.

 <material name="(material name)" shader="(shader name)">

Basic_C

A very basic shader, as the name implies. Similar to the blin shader from FOX PES.

Texture entries

Role Filename Description
sampler name="DiffuseMap" *.dds This is the sampler for the main texture you'll use on your model.

Basic_CNSR

A reflective shader, mostly used for metallic models. Similar to the metallic shader from FOX PES.

Texture entries

Role Filename Description
sampler name="DiffuseMap" *.dds This is the sampler for the main texture you'll use on your model.
sampler name="SpecularMap" *.dds This is the sampler for the reflectivity of your model.
wikipedia:Specularity
sampler name="RoughnessMap" *.dds
sampler name="EnvironmentMap" *.dds This is the sampler for the reflection. Uses a cubemap.
wikipedia:Reflection_mapping

Other entries

Other entries that effect the reflectivity of your model. The effects of each variable haven't been fully figured out yet, but the values below should work fine.

<vector name="Reflection" 	x="1" 	y="1" z="1" w="0" />
<vector name="Shininess" 	x="0.9" y="0" z="0" w="1.0" />

Shadeless

Also known as "Anime Shader", "Cartoon Shader" or "Shadeless shader". A model with this shader will ignore lighting.

Texture entries

Role Filename Description
sampler name="DiffuseMap" *.dds This is the sampler for the main texture you'll use on your model.