mtr_addon:nte:objschem
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
mtr_addon:nte:objschem [2023/06/27 13:52] – 创建 jonathanqwq | mtr_addon:nte:objschem [2024/02/05 02:43] (current) – jonathanqwq | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | **This page is not fully translated.** | + | < |
- | < | + | |
- | # OBJ model related adaptation | + | |
+ | # OBJ Importation Guide | ||
NTE makes adding trains based on OBJ models through resource packs come true. | NTE makes adding trains based on OBJ models through resource packs come true. | ||
Line 9: | Line 10: | ||
# # Basic Format | # # Basic Format | ||
- | When importing the OBJ train model via NTE, it is written in the mtr_custom_resources.json | + | When importing the OBJ train model via NTE, the writing in ```mtr_custom_resources.json``` has no different in using BBMODEL |
```json | ```json | ||
Line 26: | Line 27: | ||
- `model`: Fill in the location of the OBJ file. Remember to use `mtrsteamloco: | - `model`: Fill in the location of the OBJ file. Remember to use `mtrsteamloco: | ||
- | - `model_properties`: | + | - `model_properties`: |
- | - `texture_id`: | + | - `texture_id`: |
- | The OBJ file you use should meet the following requirements: | + | The OBJ file you use should meet the following requirements: |
- | </ | ||
- | <WRAP center round tip 60%> | ||
- | Tip: All file names need to be all lowercase. File names can only be a-z, 0-9, `-`, `_`. | + | Tip: All file names need to be all lowercase. File names can only include |
- | </ | ||
- | < | + | # # Sample File |
- | ## Sample File | + | |
- | A sample resource | + | A sample resource |
- | ## Components | + | # # Components |
- | There can be ** group ** information in OBJ files. For example,the train door and body are in different groups, | + | There' |
- | Groups in the OBJ model will be automatically parsed and can then be used in the model properties file. This is the same as the use of components | + | Groups in the OBJ model will be automatically parsed and can then be used in the model properties file. This is the same as the use of groups |
- | </ | + | |
- | <WRAP center round tip 60%> | + | Tip: Only OBJ grouping (`g`) instructions are supported, object (`o`) instructions are not supported. If the model exported by your modeling software has a line beginning with "o " (with a space after o), please replace it with "g " (with a space after g). |
- | Tip: Only OBJ grouping (`g`) instructions are supported, not object (`o`) instructions. If the model exported by your modeling software has a line beginning with "o " (a space after o), please replace it with "g " (a space after g). | ||
- | </WRAP> | + | |
+ | |||
+ | |||
+ | # # Model Properties | ||
+ | |||
+ | MTR has a ** model properties ** JSON file, in which you can specify which parts are to be moved when the door is opened, which parts are only displayed in some number of cars, and which parts are only displayed when the door is opened, so as to realize the functions like door opening/ | ||
+ | |||
+ | You can edit the model properties file using the ** Resource Pack Creator ** in MTR mod. In the options of the resource bundle creator, click " | ||
+ | |||
+ | You can see the OBJ model you uploaded and the parts it contains. You can select any part to create animated doors, and so on. You may find that your OBJ model is white without any maps. This is normal. NTE does not load texture in the Resource Pac Creator. | ||
+ | |||
+ | ** Please merge the parts in advance, such as merging all the immovable parts into one. The more parts, the worse the performance. ** | ||
+ | |||
+ | After editing, please select any image as the texture file in the options, and then click " | ||
+ | |||
+ | Tip: The resource bundle exported here can only be used to obtain the model properties file. It is incomplete and cannot be used in Minecraft. | ||
+ | |||
+ | </markdown> | ||
<WRAP center round important 60%> | <WRAP center round important 60%> | ||
Line 61: | Line 73: | ||
</ | </ | ||
+ | |||
< | < | ||
- | # # Model Properties | ||
- | MTR has a * * model attribute * * JSON file, in which you can specify which parts are to be moved when the door is opened, which parts are only displayed in the number of cars, and which parts are only displayed when the door is opened, so as to realize the functions of door opening animation, door lights, head and tail cars displaying head parts, middle cars not displaying head parts, and so on. | ||
- | You can edit the model properties file using the Resource Bundle Creator that comes with MTR. In the options of the resource bundle creator, click " | ||
- | You can see the OBJ model you uploaded and the parts it contains. You can select subassemblies, | ||
- | * * Please merge the parts in advance, such as merging all the immovable parts into one. The more parts, the worse the performance. ** | + | # # Maps |
+ | |||
+ | Due to historical problems, the OBJ model is divided into several parts. The `.obj` file stores the correspondence between the geometry of the object, each ** part **, and the face to be displayed and the ** material **, and the `.mtl` file stores the correspondence between each ** material ** and the ** map ** path information. The `.png` file (hereinafter referred to as the map) is the ** map ** to be used. Also distinguish between a material name for each face and a map file name and a color attribute for each material. | ||
+ | |||
+ | MTL files can also be opened with using any text editing software. Where, `newmtl` creates a material, `Kd` sets the materials' | ||
+ | |||
+ | If there is an `mtllib` instruction in OBJ model (most modeling software will automatically add it when exporting MTL), the corresponding MTL file will be automatically parsed. The relative path will be resolved automatically. Writing a complete `mtr:..` at `mtllib` in OBJ model is not required and not supported. | ||
+ | |||
+ | Unlike BBMODEL, which can only use one map, the MTL file itself has the ability to set the map. NTE uses the following methods to map a model: | ||
+ | |||
+ | - If there is ** no ** `mtllib` instruction in the OBJ model, NTE will use the name of the material as the map file name. In this case, a material named `mat1` will automatically use `mat1.png` in the same directory as OBJ as a map. Specially, the material named `_` will be set to all white. | ||
+ | |||
+ | This feature allows you to avoid MTL files. | ||
+ | |||
+ | </ | ||
+ | |||
+ | < | ||
+ | |||
- | After editing, please select any image as the texture file in the options, and then click " | ||
- | Note: The resource bundle exported here can only be used to obtain the model properties file. It is incomplete and cannot be used in Minecraft. | ||
- | # # Mapping | ||
- | Due to historical problems, the OBJ model is divided into several parts. The `.obj` file stores the correspondence between the geometry of the object, each * * component * *, and the face to be displayed and the * * material * *, and the `.mtl` file stores the correspondence between each * * material * * and the * * mapping * * path information. The `.png 'file (hereinafter referred to as the map) is the * * map * * to be used. Also distinguish between a material name for each face and a map file name and a color attribute for each material. | ||
- | MTL files can also be opened using any text editing software. Where, `newmtl` creates a material, `Kd` sets the material color, `d` sets the material transparency, | ||
- | If there is an' | ||
- | Unlike BBMODEL, which can only use one map, the MTL file itself has the ability to set the map. NTE uses the following methods to map a model: | ||
- | -If there is no `mtllib` directive in the OBJ model, NTE will use the name of the material as the map file name. In this case, a material named' | ||
- | This feature allows you to avoid MTL files if you feel that multiple files are a hindrance. | ||
- | -If there is an " | + | - If there ** is ** an " |
-You may notice that the map files in OBJ/MTL are all written to death, making it inconvenient to change the paint. For this purpose, NTE specifies that if a map with the file name of default. PNG is used in the above way, it will be replaced with the setting value of texture _ ID in MTR _ custom _ resources. JSON so as to change the paint. | -You may notice that the map files in OBJ/MTL are all written to death, making it inconvenient to change the paint. For this purpose, NTE specifies that if a map with the file name of default. PNG is used in the above way, it will be replaced with the setting value of texture _ ID in MTR _ custom _ resources. JSON so as to change the paint. |
mtr_addon/nte/objschem.1687873934.txt.gz · Last modified: 2023/06/27 13:52 by jonathanqwq