Skip to content

Blender VTFLib GUI that aims to streamline the process of exporting materials and converting them to VTF/VMT formats

License

Notifications You must be signed in to change notification settings

wenchien/blender-material-to-vtf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Versions Blender Versions

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License

About The Project

Blender Source Tools allows Blender to import and export Studiomdl Data and DMX model files. However, in order to streamline the process of material exporting, .QC compilation and HLMV previewing, it's not exactly convenient especially the material exporting part.

I don't want to click through VTFEdit or any other VTF editing software anymore. I want an add-on with simple GUI that quickly export materials in batch. This is my first blender add-on that tackles this problem. You can say this is pretty much a Blender GUI for VTFLib

(back to top)

Built With

  • Python Versions
  • Blender Versions

(back to top)

Getting Started

To get started, download the .zip file from the release page

  • Latest Release

Prerequisites

  • Blender v2.93+
  • Blender v2.80 may or may not work
  • Blender v2.79 or any version below will NOT work

Installation

  1. Open up Blender (See prerequisites) and go to Edit > Preferences > Add-ons > Install...
  2. Select the downloaded .zip
  3. Enable it. You should have something similar to the following:

  1. Now, go to your side panel "Scene" and scroll to "VTFLibConverter" section. You should have something like the following:

  1. Under VTFCmd Path, enter the path to VTFCmd.exe. Note: This textfield cannot be empty
  2. Under Material Output Path, enter the path to your materials folder (i.e game-full-name\ game-folder\ materials). Note: it must be materials folder and this textfield cannot be empty

(back to top)

Usage

  1. Follow the installation and setup guide from the previous section
  2. Make sure all your materials have the following node setup: As of right now, only "Principled BSDF" is supported

  1. When you're ready to export your materials, click on the Refresh Material List first. By default, all materials will be selected for exporting (indicated by highlight). You may manually deselect the materials that you wish to ignore for exporting. The example below will only export the material Material.001

  1. After that, choose your format, alpha format and vtf version by using the dropdown menus
  2. If the Resize? checkbox is ticked, values in the following dropdown menus will be used for exporting:

  1. If you wish to generate corresponding .VMT file, tick the Generate .VMT checkbox and select your desired shader. Note: the VMT will be generated and placed under your materials folder that you've selected earlier

(back to top)

Roadmap

  • Version 1.0.0 code clean-ups
  • Minor code clean-ups
  • GUI label alignment and adjustments
  • Capture STDOUT and STDERR
  • Support for relative path for both VTFCMD Path and Material Output Path
  • Support for custom resize resolution (i.e. w=256 & l=512) instead of fixed values
  • Support for different types of shaders
    • Diffuse BSDF
    • Mix Shader
  • Automatic exporting Normal maps
  • Automatic baking if a material has a shader but without TEX_IMAGE (Pure color) and export it
  • Allow .VMT parameters (More to come!)
  • Allow custom .VMT parameters
  • Additional supports for different formats and alpha formats

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)