The OBJ VN FIXXER script is for enhancing .obj files with vertex normals, the MTL generator script is for creating .mtl files, and the TGA to PNG converter script is for converting texture files. Here’s how you can use them in a workflow:
-> Visit the vg-resource thread: Visit Here for more info. <-
-
Python Environment: Ensure Python 3.x is installed on your system.
-
Required Libraries: -> pip install numpy pyfiglet PyQt5 Pillow
-
Download C3Dit -> Moddb Page
- OBJ VN FIXXER: Enhances
.objfiles with vertex normals. - MTL Generator: Creates
.mtlfiles with predefined material properties. - TGA to PNG Converter: Converts TGA texture files to PNG format.
- Make New Folder
project
(Since every skin should be named Skin.png this will keep things from breaking.)
-
Convert
.carto.objUsing C3Dit:-
Use C3Dit or any other tool to convert
.carfiles to.obj. -
Ensure associated
.tgatexture files are exported as well (for MTL generation).
-
-
MTL Generation (Using MTL Generator Script):
-
Run the MTL Generator script to create
.mtlfiles with specified material properties. -
Follow the prompts to select the
.objfile. The script will generate a corresponding.mtlfile in the same directory.
-
-
TGA to PNG Conversion (Using TGA to PNG Converter Script):
-
Run the TGA to PNG Converter script to convert a folder and sub folders with TGA texture files to PNG format.
-
Enter the path to the directory containing TGA files. The script will recursively convert all TGA files found to PNG format.
-
-
Enhance
.objFiles with Vertex Normals (Using OBJ VN FIXXER Script):-
After generating the
.mtlfiles and converting TGA textures to PNG, run the OBJ VN FIXXER script to add vertex normals to your.objfile. -
Enter the path to the
.objfile when prompted (just file path with no .obj). The script will create a new.objfile with_with_normalsappended to the filename, containing vertex normals.
-
project/
├── models/
│ └── example_model.obj (Input: .obj file)
│
└── mtl_generator.py (Script: MTL Generator)
- Start with:
example_model.obj(Wavefront OBJ file) - End up with:
example_model.mtl(Material Template Library file)
- Input:
example_model.obj - Action: Run
mtl_generator.py - Output:
example_model.mtl(Generated MTL file with predefined material properties)
project/
├── models/
│ ├── example_model.obj (Input: .obj file)
│ ├── example_model.mtl (Generated: .mtl file)
│ ├── texture1.tga (Input: TGA texture file)
│ └── texture2.tga (Input: TGA texture file)
│
└── convert_tga_to_png.py (Script: TGA to PNG Converter)
- Start with:
texture1.tga,texture2.tga(TGA texture files) - End up with:
texture1.png,texture2.png(Converted PNG texture files)
- Input:
/path/to/your/project/models/(Contains TGA texture files) - Action: Run
convert_tga_to_png.py - Output:
texture1.png,texture2.png(Converted PNG files in the same directory)
project/
├── models/
│ ├── example_model.obj (Input: .obj file)
│ ├── example_model.mtl (Generated: .mtl file)
│ ├── texture1.tga (Converted: PNG texture file)
│ ├── texture2.tga (Converted: PNG texture file)
│ └── example_model_with_normals.obj (Output: .obj file with vertex normals)
│
└── obj_vn_fixer.py (Script: OBJ VN FIXXER)
- Start with:
example_model.obj(Wavefront OBJ file) - End up with:
example_model_with_normals.obj(OBJ file with vertex normals)
- Input:
/path/to/your/project/models/example_model.obj(Original .obj file) - Action: Run
obj_vn_fixer.py - Output:
example_model_with_normals.obj(Enhanced .obj file with vertex normals)
- MTL Generator: Generates
.mtlfiles from.objfiles with predefined material properties. - TGA to PNG Converter: Converts TGA texture files to PNG format.
- OBJ VN FIXXER: Enhances
.objfiles with vertex normals.
This tree map and example illustrate the workflow and outputs of each script, providing clarity on what you start with and what you achieve after running each script in your project directory. Adjust paths and script inputs based on your specific file structure and project needs.
- Ensure scripts are executed in the correct order: MTL generation, TGA to PNG conversion, and OBJ enhancement.
- Customize scripts as needed for specific material properties, file paths, or additional features.
- Monitor script outputs for errors or prompts during execution to ensure each step completes successfully.
- ! The model needs to be flipped this can be done through Blender or another 3d editor.
By following this workflow, you can effectively prepare your .obj models with vertex normals and associated .mtl and texture files in PNG format, ready for use in 3D rendering applications or games that support Wavefront OBJ format with material definitions. Adjust values in the mtl file if needed or import into blender.


