OverviewThis 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.0Downloadhttps://mega.nz/file/uIA3Ha6Y#W0SDmjAh2Qws1dMgu64kILluxdD9maz746cbc37clXwInput texture examplehttps://mega.nz/file/XRYFUarJ#wyA8-oC2Pfg38QgLNNvZ8o1mO9l4JPIoAncnSnQ_uOwYou can put these textures in the input folder to quickly test the converter.
How to use1. Put the pbr textures in the input folder. For example, for a color texture called aaaa_00.png, the new textures should be named with suffixes as follows:
- aaaa_00_n.png: normal texture
- aaaa_00_r.png : roughness texture. You can alternatively provide a aaaa_s.png smoothness texture. The script will automatically convert smoothness to roughness.
- aaaa_00_m.png : metallic texture. If no metallic texture is provided, a texture with constant value of 0.0 will be created automatically.
- aaaa_00_sp.png: Specular texture. If no specular texture is provided, a texture with constant value of 0.5 will be created automatically.
- aaaa_00_ao.png: Ambient Occlusion (AO) texture.
See image bellow for reference.
2. 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
outputInside the
output folder you will have png and dds versions. I recommend using dds versions because it will have better quality and a smaller file size.
There will be two output texture.
- aaaa_00_nml.png/dds: this is the normal map, it just changes its filename to with the required _nml suffix.
- aaaa_00_pbr.png/dds: this one combines the input textures where the R channels is roughness. the G channel is metallic. the blue channel is specular and the alpha channel is AO.
Where to place the pbr texturesFor characters textures: Final Fantasy VII\mods\textures\char
For battle textures: Final Fantasy VII\mods\textures\battle
Be careful with the filenames. It seems that it is expected to have "_00" at the end of the filename for it to work correctly.
For example cloud textures it should be aaaa_00_nml.dds and aaaa_00_pbr.dds (if you replace the color texture too then add also aaaa_00.dds)
For the first battle arena textures it should be STAGE09_T00_00_nml.dds and STAGE09_T00_00_pbr.dds (if you replace the color texture too then add also STAGE09_T00_00.dds)
CreditsSatsuki Yatoshi for helping me setting the portable imagemagick exe and the dds converter