You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to import voxels from CnC Tiberian Sun into Goxel, by way of PNG slices. Currently there is no import support for them.
I used ImageMagick and bash to convert the slices to Goxel text files. It's a bit of a hassle, but it works. Would be nice to have import support though.
Here's the bash script for anyone also wanting to do this:
$folder=slices_go_here
images=$(find "$folder" -type f -name "*.png"| sort)
index=0
txt=$folder".txt"echo"Processing $txt"
rm $txt
touch $txtforimagein$images;doecho"$image"# Output of `convert` looks like:# 5,2: (0,0,0,0) #00000000 none# 6,2: (36,16,4,255) #241004FF srgba(36,16,4,1)
convert $image txt: | tail -n +2 | awk -v idx="$index"'{print $1 " " idx " " $3 " " $4}'>>$txt((index++))done
sed -i '''s/,/ /g'$txt
sed -i '''s/#//g'$txt
sed -i '''s/://g'$txt# Remove alpha info and srgba
sed -i '''s/FF srgba.*//g'$txt# Remove transparent pixels, $4 above
sed -i '''/none/d'$txt# Lowercase
tr '[:upper:]''[:lower:]'<$txt>temp_file && mv temp_file $txt
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to import voxels from CnC Tiberian Sun into Goxel, by way of PNG slices. Currently there is no import support for them.
I used ImageMagick and bash to convert the slices to Goxel text files. It's a bit of a hassle, but it works. Would be nice to have import support though.
Here's the bash script for anyone also wanting to do this:
The text was updated successfully, but these errors were encountered: