Author Topic: [FF7PC] Script to batch convert PBR textures for the new lighting engine  (Read 548 times)

Cosmos

  • *
  • Posts: 18
    • View Profile
Overview

This is a script to automatically batch convert an entire folder of PBR textures to be used with Cosmos Lighting, the new lighting engine integrated into FFNx.
For more details see link below:
http://forums.qhimm.com/index.php?topic=20612.0

Download
https://mega.nz/file/jUQTxYpQ#9Xn3EEZNkhw-AtSs9Ju7O0MVK0eoIpUYZG_kbIL2BKE

How to use
1. Install ImageMagick from the link below

https://imagemagick.org/script/download.php#windows

Make sure you select the "Install legacy utilities (e.g. convert)" option during installation.



2. Put the "pbrCombine.bat" script into a the folder containing the PBR textures.
For example, for a color texture called aaaa.png, the textures should be named as follows:
- aaaa.png : color (albedo) texture
- aaaa_n.png: normal texture
- aaaa_r.png : roughness texture. You can alternatively provide a aaaa_s.png smoothness texture. The script will automatically convert smoothness to roughness.
- aaaa_m.png : metalness texture. If no metalness texture is provided, a texture with constant value of 0.3 will be created automatically
- aaaa_ao.png: Ambient Occlusion (AO) texture

See image bellow for reference.


*ignore the _h.png image, that is a height map and is not being used right now. I did not provide a metalness texture here so it defaults to value of 0.3.

3. Execute the "pbrCombine.bat" script by double-clicking it
A console window will appear showing the progress of the texture conversion.


The converted textures will appear in a new folder called output



The output PBR textures should look as follows.


« Last Edit: 2021-05-28 11:58:59 by Cosmos »