Created
March 12, 2020 18:29
-
-
Save xDShot/a0bd745d0702dcf90516d2a562cc54f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ffmpeg -y -i $1_bump.dds $1_bump.png | |
gmic $1_bump.png f "[A,B,G,R]" o $1_normal.png | |
#multiply red channel's each pixels by 0.707 | |
gmic $1_normal.png f "[R*0.707,G,B,A]" o $1_normal.png | |
#Value invert output’s green channel | |
gmic $1_normal.png f "[R,255-G,B,A]" o $1_normal.png | |
#Curve level output’s blue channel with input 0 and output 128 (basically, need to make pixels values scaled to 128-255 range) | |
gmic $1_normal.png f "[R,G,B/2+128,A]" o $1_normal.png | |
ffmpeg -y -i $1_normal.png $1_normal.tga | |
rm $1_normal.png | |
rm $1_bump.png | |
vtex $1_normal.tga | |
rm $1_normal.tga |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment