https://github.com/jonaswischeropp/unity-materials-from-textures
Unity editor tool to automatically create materials from folders of textures.
https://github.com/jonaswischeropp/unity-materials-from-textures
material textures unity3d-package
Last synced: 12 months ago
JSON representation
Unity editor tool to automatically create materials from folders of textures.
- Host: GitHub
- URL: https://github.com/jonaswischeropp/unity-materials-from-textures
- Owner: JonasWischeropp
- License: mit
- Created: 2024-10-17T10:46:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-17T14:23:02.000Z (over 1 year ago)
- Last Synced: 2024-10-19T14:33:45.034Z (over 1 year ago)
- Topics: material, textures, unity3d-package
- Language: C#
- Homepage:
- Size: 920 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Materials from Textures
This small editor tool makes it simple to create materials from folders of textures.
The tool assumes that one folder contains all the textures for one material.
Custom rules can be defined to match file names and shader properties using [regular expressions](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference) (not case-sensitive).
## How to use
1. Select the folders that should be converted into materials
2. Right-click on the selection
3. Click `Create > Material(s) from Textures`
4. Specify the shader
5. If required adjust settings
6. Click `Create Material(s)`
## Setup
Installation using the Package Manager:
1. Click on the `+` in the `Package Manager` window
2. Chose `Add package from git URL...`
3. Insert the following URL `https://github.com/JonasWischeropp/unity-materials-from-textures.git`
A specific [release](https://github.com/JonasWischeropp/unity-materials-from-textures/releases) version can be specified by appending `#` (e.g. `...xtures.git#1.0.3`).
4. Press the `Add`-Button
## Example folder structure
```
├── desert_ground_01_2k
│ ├── desert_ground_01_ambientOcclusion_2k.png
│ ├── desert_ground_01_baseColor_2k.png
│ ├── desert_ground_01_height_2k.png
│ ├── desert_ground_01_m_ao_h_r_2k.png
│ ├── desert_ground_01_metallic_2k.png
│ ├── desert_ground_01_normal_dx_2k.png
│ ├── desert_ground_01_normal_gl_2k.png
│ ├── desert_ground_01_roughness_2k.png
│ └── license.txt
├── stone_bricks_wall_07_2k
│ ├── license.txt
│ ├── stone_bricks_wall_07_ambientOcclusion_2k.png
│ ├── stone_bricks_wall_07_baseColor_2k.png
│ ├── stone_bricks_wall_07_height_2k.png
│ ├── stone_bricks_wall_07_m_ao_h_s_2k.png
│ ├── stone_bricks_wall_07_metallic_2k.png
│ ├── stone_bricks_wall_07_normal_dx_2k.png
│ ├── stone_bricks_wall_07_normal_gl_2k.png
│ └── stone_bricks_wall_07_roughness_2k.png
```
## Additional information
- The settings file can be found under `/ProjectSettings/Packages/wischeropp.jonas.materials-from-textures/Settings.asset`
- `Shader Property Name Regex` matches with the description name (e.g. `Albedo`) not the name used in the shader (e.g. `_MainTex`)
- Due to the use of `MultiColumnListView` Unity 2022.1 or higher is required