From 43bab84ab37d1267a58e31c6a73d4e98380694c3 Mon Sep 17 00:00:00 2001 From: theisen1337 Date: Thu, 11 Jun 2020 16:02:05 -0400 Subject: [PATCH] Updated pipeline for packing textures. Open source texture packing pipeline from "https://github.com/odrick/free-tex-packer" --- res_pipeline/Windows_buld.bat | 10 ++++++++ res_pipeline/gulpfile.js | 39 +++++++++++++++++++++++++++++++ res_pipeline/shapez.ftpp | 37 +++++++++++++++++++++++++++++ res_pipeline/shapez_size_10.ftpp | 37 +++++++++++++++++++++++++++++ res_pipeline/shapez_size_100.ftpp | 37 +++++++++++++++++++++++++++++ res_pipeline/shapez_size_25.ftpp | 37 +++++++++++++++++++++++++++++ res_pipeline/shapez_size_50.ftpp | 37 +++++++++++++++++++++++++++++ res_pipeline/shapez_size_75.ftpp | 37 +++++++++++++++++++++++++++++ 8 files changed, 271 insertions(+) create mode 100644 res_pipeline/Windows_buld.bat create mode 100644 res_pipeline/gulpfile.js create mode 100644 res_pipeline/shapez.ftpp create mode 100644 res_pipeline/shapez_size_10.ftpp create mode 100644 res_pipeline/shapez_size_100.ftpp create mode 100644 res_pipeline/shapez_size_25.ftpp create mode 100644 res_pipeline/shapez_size_50.ftpp create mode 100644 res_pipeline/shapez_size_75.ftpp diff --git a/res_pipeline/Windows_buld.bat b/res_pipeline/Windows_buld.bat new file mode 100644 index 00000000..4152c8af --- /dev/null +++ b/res_pipeline/Windows_buld.bat @@ -0,0 +1,10 @@ + +call free-tex-packer-cli.cmd --project .\shapez_size_100.ftpp + +call free-tex-packer-cli.cmd --project .\shapez_size_75.ftpp + +call free-tex-packer-cli.cmd --project .\shapez_size_50.ftpp + +call free-tex-packer-cli.cmd --project .\shapez_size_25.ftpp + +call free-tex-packer-cli.cmd --project .\shapez_size_10.ftpp \ No newline at end of file diff --git a/res_pipeline/gulpfile.js b/res_pipeline/gulpfile.js new file mode 100644 index 00000000..0b935127 --- /dev/null +++ b/res_pipeline/gulpfile.js @@ -0,0 +1,39 @@ + + +const gulp = require("gulp"); +let texturePacker = require('gulp-free-tex-packer'); + +gulp.task('default', function() { + gulp.src('../res_raw/**/**/*.png') + .pipe(texturePacker({textureName: "atlas0_100"})) + .pipe(gulp.dest('dest/')); + + gulp.src('../res_raw/**/**/*.png') + .pipe(texturePacker({ + textureName: "atlas0_75", + scale: 0.75, + })) + .pipe(gulp.dest('dest/')); + + gulp.src('../res_raw/**/**/*.png') + .pipe(texturePacker({ + textureName: "atlas0_50", + scale: 0.50, + })) + .pipe(gulp.dest('dest/')); + + gulp.src('../res_raw/**/**/*.png') + .pipe(texturePacker({ + textureName: "atlas0_25", + scale: 0.25, + })) + .pipe(gulp.dest('dest/')); + + gulp.src('../res_raw/**/**/*.png') + .pipe(texturePacker({ + textureName: "atlas0_10", + scale: 0.10, + })) + .pipe(gulp.dest('dest/')); + +}); \ No newline at end of file diff --git a/res_pipeline/shapez.ftpp b/res_pipeline/shapez.ftpp new file mode 100644 index 00000000..8cec83bf --- /dev/null +++ b/res_pipeline/shapez.ftpp @@ -0,0 +1,37 @@ +{ + "meta": { + "version": "0.6.5" + }, + "savePath": "", + "images": [], + "folders": [ + "C:/Users/tnt/Documents/GitHub/shapez_tnt.io/res_raw/sprites" + ], + "packOptions": { + "textureName": "texture", + "textureFormat": "png", + "removeFileExtension": false, + "prependFolderName": true, + "scale": 1, + "filter": "none", + "exporter": "JSON (hash)", + "base64Export": false, + "tinify": false, + "tinifyKey": "", + "fileName": "pack-result", + "savePath": "", + "width": 2048, + "height": 2048, + "fixedSize": false, + "powerOfTwo": false, + "padding": 0, + "extrude": 0, + "allowRotation": true, + "allowTrim": true, + "trimMode": "trim", + "alphaThreshold": 0, + "detectIdentical": true, + "packer": "MaxRectsBin", + "packerMethod": "BestShortSideFit" + } +} \ No newline at end of file diff --git a/res_pipeline/shapez_size_10.ftpp b/res_pipeline/shapez_size_10.ftpp new file mode 100644 index 00000000..403a3731 --- /dev/null +++ b/res_pipeline/shapez_size_10.ftpp @@ -0,0 +1,37 @@ +{ + "meta": { + "version": "0.6.5" + }, + "savePath": "", + "images": [], + "folders": [ + "C:/Users/tnt/Documents/GitHub/shapez_tnt.io/res_raw/sprites" + ], + "packOptions": { + "textureName": "../res_built/atlas/atlas0_10", + "textureFormat": "png", + "removeFileExtension": false, + "prependFolderName": true, + "scale": 0.1, + "filter": "none", + "exporter": "JSON (hash)", + "base64Export": false, + "tinify": false, + "tinifyKey": "", + "fileName": "pack-resultxx", + "savePath": "", + "width": 2048, + "height": 2048, + "fixedSize": false, + "powerOfTwo": false, + "padding": 0, + "extrude": 0, + "allowRotation": true, + "allowTrim": true, + "trimMode": "trim", + "alphaThreshold": 0, + "detectIdentical": true, + "packer": "MaxRectsBin", + "packerMethod": "BestShortSideFit" + } +} \ No newline at end of file diff --git a/res_pipeline/shapez_size_100.ftpp b/res_pipeline/shapez_size_100.ftpp new file mode 100644 index 00000000..293424ec --- /dev/null +++ b/res_pipeline/shapez_size_100.ftpp @@ -0,0 +1,37 @@ +{ + "meta": { + "version": "0.6.5" + }, + "savePath": "", + "images": [], + "folders": [ + "C:/Users/tnt/Documents/GitHub/shapez_tnt.io/res_raw/sprites" + ], + "packOptions": { + "textureName": "../res_built/atlas/atlas0_100", + "textureFormat": "png", + "removeFileExtension": false, + "prependFolderName": true, + "scale": 1, + "filter": "none", + "exporter": "JSON (hash)", + "base64Export": false, + "tinify": false, + "tinifyKey": "", + "fileName": "pack-resultxx", + "savePath": "", + "width": 2048, + "height": 2048, + "fixedSize": false, + "powerOfTwo": false, + "padding": 0, + "extrude": 0, + "allowRotation": true, + "allowTrim": true, + "trimMode": "trim", + "alphaThreshold": 0, + "detectIdentical": true, + "packer": "MaxRectsBin", + "packerMethod": "BestShortSideFit" + } +} \ No newline at end of file diff --git a/res_pipeline/shapez_size_25.ftpp b/res_pipeline/shapez_size_25.ftpp new file mode 100644 index 00000000..a55dfdfe --- /dev/null +++ b/res_pipeline/shapez_size_25.ftpp @@ -0,0 +1,37 @@ +{ + "meta": { + "version": "0.6.5" + }, + "savePath": "", + "images": [], + "folders": [ + "C:/Users/tnt/Documents/GitHub/shapez_tnt.io/res_raw/sprites" + ], + "packOptions": { + "textureName": "../res_built/atlas/atlas0_25", + "textureFormat": "png", + "removeFileExtension": false, + "prependFolderName": true, + "scale": 0.25, + "filter": "none", + "exporter": "JSON (hash)", + "base64Export": false, + "tinify": false, + "tinifyKey": "", + "fileName": "pack-resultxx", + "savePath": "", + "width": 2048, + "height": 2048, + "fixedSize": false, + "powerOfTwo": false, + "padding": 0, + "extrude": 0, + "allowRotation": true, + "allowTrim": true, + "trimMode": "trim", + "alphaThreshold": 0, + "detectIdentical": true, + "packer": "MaxRectsBin", + "packerMethod": "BestShortSideFit" + } +} \ No newline at end of file diff --git a/res_pipeline/shapez_size_50.ftpp b/res_pipeline/shapez_size_50.ftpp new file mode 100644 index 00000000..0c1b357b --- /dev/null +++ b/res_pipeline/shapez_size_50.ftpp @@ -0,0 +1,37 @@ +{ + "meta": { + "version": "0.6.5" + }, + "savePath": "", + "images": [], + "folders": [ + "C:/Users/tnt/Documents/GitHub/shapez_tnt.io/res_raw/sprites" + ], + "packOptions": { + "textureName": "../res_built/atlas/atlas0_50", + "textureFormat": "png", + "removeFileExtension": false, + "prependFolderName": true, + "scale": 0.5, + "filter": "none", + "exporter": "JSON (hash)", + "base64Export": false, + "tinify": false, + "tinifyKey": "", + "fileName": "pack-resultxx", + "savePath": "", + "width": 2048, + "height": 2048, + "fixedSize": false, + "powerOfTwo": false, + "padding": 0, + "extrude": 0, + "allowRotation": true, + "allowTrim": true, + "trimMode": "trim", + "alphaThreshold": 0, + "detectIdentical": true, + "packer": "MaxRectsBin", + "packerMethod": "BestShortSideFit" + } +} \ No newline at end of file diff --git a/res_pipeline/shapez_size_75.ftpp b/res_pipeline/shapez_size_75.ftpp new file mode 100644 index 00000000..f55f69df --- /dev/null +++ b/res_pipeline/shapez_size_75.ftpp @@ -0,0 +1,37 @@ +{ + "meta": { + "version": "0.6.5" + }, + "savePath": "", + "images": [], + "folders": [ + "C:/Users/tnt/Documents/GitHub/shapez_tnt.io/res_raw/sprites" + ], + "packOptions": { + "textureName": "../res_built/atlas/atlas0_75", + "textureFormat": "png", + "removeFileExtension": false, + "prependFolderName": true, + "scale": 0.75, + "filter": "none", + "exporter": "JSON (hash)", + "base64Export": false, + "tinify": false, + "tinifyKey": "", + "fileName": "pack-resultxx", + "savePath": "", + "width": 2048, + "height": 2048, + "fixedSize": false, + "powerOfTwo": false, + "padding": 0, + "extrude": 0, + "allowRotation": true, + "allowTrim": true, + "trimMode": "trim", + "alphaThreshold": 0, + "detectIdentical": true, + "packer": "MaxRectsBin", + "packerMethod": "BestShortSideFit" + } +} \ No newline at end of file