Page 2 of 2

Re: [Guide] Making spritesheets with Blender

Posted: Sun Dec 11, 2016 10:37 pm
by darkfrei
Also, for spritify you can use this tool: Just insert yours sprites and start the .bat-file what you need or make the new one.
Factorio_IMagick.7z
(5.18 MiB) Downloaded 280 times
Make this code, then it's not crop sprite at 128 pixels anymore. And it makes one sprite sheet with 8 columns.

Code: Select all

montage "Sprites/file*.png" -geometry +0+0 -tile 8x -background rgba(0,0,0,0) -quality 100% Sprite_x_8x.png
With 8 raws:

Code: Select all

montage "Sprites/file*.png" -geometry +0+0 -tile x8 -background rgba(0,0,0,0) -quality 100% Sprite_x_x8.png

Re: [Guide] Making spritesheets with Blender

Posted: Wed Jan 17, 2018 9:45 pm
by darkfrei
If your sprites have too big alpha border, it can be cropped with this script:

Code: Select all

magick "Input/*.png" -background none ^
   ( -clone 0--1 -layers merge ^
   -set option:cropper "%%[@]" +delete ) ^
   -crop %%[cropper] +repage ^
   MIFF:- | magick montage MIFF:- -background none ^
   -tile 2x2 -geometry +0+0 Output\best_spritesheet_2x2.png
Examples, code from this forum, a lot of thanks to GeeMack.

Pros: You are cut all alpha from sprites, so your spritesheet will have much tiny dimensions. All sprites have same dimensions, no pixel with graphics will be deleted.
How to use: place your sprites to Input folder and start .bat-file.
Factorio_IMagick_best_spritesheet.7z
Example
(5.03 MiB) Downloaded 247 times
Code for rotating clockwise 90 degree.

Code: Select all

magick "Input/*.png" -background none ^
   -rotate 90 ^
   Input/rotated_90_%%04d.png
Mirroring

Code: Select all

magick "Input/*.png" -background none ^
   -flop ^
   Input/flop_%%04d.pnge

Re: [Guide] Making spritesheets with Blender

Posted: Thu Jul 26, 2018 2:42 am
by JesseDGamer
For people having trouble when trying to generate the sprite sheet, specifically when blender can't find the "montage.exe" file, here's a fix I did.
I replaced line 121 in the spritify.py file with the full path + file name of the montage.exe that ImageMagick installed :

Code: Select all

"C:\Program Files\ImageMagick-7.0.8-Q16\montage.exe",
where it used to be

Code: Select all

"montage",
Idk for sure, but I think it has something to do with environment variables or something.

My problem now is that it's removing transparency from all the output images no matter what color I choose for the background... I've done a little research and found it might be a bug with montage.exe. Idk.

Re: [Guide] Making spritesheets with Blender

Posted: Thu Jul 26, 2018 5:20 am
by darkfrei
JesseDGamer wrote:My problem now is that it's removing transparency from all the output images no matter what color I choose for the background... I've done a little research and found it might be a bug with montage.exe. Idk.
Don't forget this part:

Code: Select all

-background none

Re: [Guide] Making spritesheets with Blender

Posted: Mon Oct 22, 2018 10:59 am
by Oceanel
darkfrei wrote:
Wed Jan 17, 2018 9:45 pm
If your sprites have too big alpha border, it can be cropped with this script:

Code: Select all

magick "Input/*.png" -background none ^
   ( -clone 0--1 -layers merge ^
   -set option:cropper "%%[@]" +delete ) ^
   -crop %%[cropper] +repage ^
   MIFF:- | magick montage MIFF:- -background none ^
   -tile 2x2 -geometry +0+0 Output\best_spritesheet_2x2.png
How to use: place your sprites to Input folder and start .bat-file.
Factorio_IMagick_best_spritesheet.7z
...

Thanks, very helpful!

Add more:
If you want like this
fi-basic-farmland_07_4x.jpg
fi-basic-farmland_07_4x.jpg (209.37 KiB) Viewed 7998 times
Use such code:

Code: Select all

magick "Input/*.png" -background none ^
   ( -clone 0--1 -layers merge ^
   -set option:cropper "481x337+328+315" +delete ) ^
   -crop %%[cropper] +repage ^
   MIFF:- | magick montage MIFF:- -background none ^
   -tile 2x2 -geometry +0+0 Output\best_spritesheet_2x2.png
pause

And, for making icon 128x128 use this:

Code: Select all

magick "Input/*.png" -background none ^
   ( -clone 0--1 -layers merge ^
   -set option:cropper "%%[@]" +delete ) ^
   -crop %%[cropper] +repage ^
   MIFF:- | magick convert MIFF:- -background none ^
   -adaptive-resize 128x128 -gravity center -extent 128x128 best_icon_128b.png
pause
transparent background supported.
best_icon_128b.png
best_icon_128b.png (22.44 KiB) Viewed 7992 times

Re: [Guide] Making spritesheets with Blender

Posted: Tue Oct 22, 2019 7:24 pm
by Kalshion
I hate bumping up very old threads, but my search through the forums hasn't been very good.

Blender recently had a major update to their UI, and I'm wondering if anything in this thread no longer applies (I noticed in the images it uses Blender Internal which doesn't exist anymore)

Re: [Guide] Making spritesheets with Blender

Posted: Wed Oct 23, 2019 6:46 am
by gabberworld
seems way too complicated, and too much work

but i guess everyone sees this different as there different methods how todo this at blender

Re: [Guide] Making spritesheets with Blender

Posted: Wed Oct 23, 2019 7:14 am
by gabberworld
Kalshion wrote:
Tue Oct 22, 2019 7:24 pm
I hate bumping up very old threads, but my search through the forums hasn't been very good.

Blender recently had a major update to their UI, and I'm wondering if anything in this thread no longer applies (I noticed in the images it uses Blender Internal which doesn't exist anymore)
there is one thing, even if blender have new update, it not meas you must use that new one

im still using the 2.79 and not see why i should use the new one

Re: [Guide] Making spritesheets with Blender

Posted: Tue May 05, 2020 10:15 am
by aerd2
Great! here goes my bookmark. I'm a newbie at 3d modelling, but I will try my best and maybe create something worthwhile.

Re: [Guide] Making spritesheets with Blender

Posted: Sat May 09, 2020 6:36 am
by jmattspartacus
So, Blender has a number of things that are different/not working from this tutorial, but they're easy enough to get around.
Firstly, changing background to transparent in 2.8 has to be done something like
https://blender.stackexchange.com/quest ... d-in-eevee

Secondly, the shadow receiver plane doesn't work with the new default render engine, and I haven't figured that out yet.

Lastly, the spritify tool wasn't working for 2.8, so I updated it
https://github.com/jmattspartacus/blender_spritify

I'll make a separate forum post about updating it.

Re: [Guide] Making spritesheets with Blender

Posted: Sat May 09, 2020 7:57 am
by darkfrei
jmattspartacus wrote:
Sat May 09, 2020 6:36 am
Lastly, the spritify tool wasn't working for 2.8, so I updated it
https://github.com/jmattspartacus/blender_spritify

I'll make a separate forum post about updating it.
Can you adjust it to use this code? Here is a special cropping before the spritesheet.

Code: Select all

magick "Input/*.png" -background none ^
   ( -clone 0--1 -layers merge ^
   -set option:cropper "%%[@]" +delete ) ^
   -crop %%[cropper] +repage ^
   MIFF:- | magick montage MIFF:- -background none ^
   -tile 2x2 -geometry +0+0 Output\best_spritesheet_2x2.png

Re: [Guide] Making spritesheets with Blender

Posted: Sat May 09, 2020 8:57 pm
by jmattspartacus
I'll look into this in a bit, currently working on finishing up texturing some models to render.

Re: [Guide] Making spritesheets with Blender

Posted: Sun Jun 21, 2020 3:54 am
by DeathApocalypse
SkaceKachna wrote:
Tue Aug 12, 2014 9:21 pm
This guide was created for Blender 2.66a, but should apply to any other version (UI might hav....
Thank you so much, SkaceKachna! that was extremely useful guide.
in blender 2.8 with Eevee renderer it was a bit different, but still easy.
btw I've updated the script to work with blender 2.8

Download the updated script here.
Watch this video of how to make shadow-catcher

Re: [Guide] Making spritesheets with Blender

Posted: Mon Jun 29, 2020 4:21 pm
by darkfrei
DeathApocalypse wrote:
Sun Jun 21, 2020 3:54 am
Thank you so much, SkaceKachna! that was extremely useful guide.
in blender 2.8 with Eevee renderer it was a bit different, but still easy.
btw I've updated the script to work with blender 2.8

Download the updated script here.
Watch this video of how to make shadow-catcher
Thanks, it was to easy to make the proper shadowcatcher. I've made very easy model for example.
Blender 2.82a
vehicle_eevee_01_02.blend.7z
(139.43 KiB) Downloaded 148 times
blender_2.82a.png
blender_2.82a.png (244.13 KiB) Viewed 6511 times
pictures

Re: [Guide] Making spritesheets with Blender

Posted: Tue Sep 08, 2020 8:10 am
by Phantom329
What is the scale in Blender compared to the game? I will be importing models from SolidWorks using mm scale.

Re: [Guide] Making spritesheets with Blender

Posted: Tue Sep 08, 2020 10:17 am
by darkfrei
Phantom329 wrote:
Tue Sep 08, 2020 8:10 am
What is the scale in Blender compared to the game? I will be importing models from SolidWorks using mm scale.
1 meter (or 1 unit) is 32 and 64 pixels for low and high resolutions. The tile size.

Set the camera to orthogonal mode, set the output resolution to 512x512 pixels, it will be the area size of 8x8 tiles for hr graphics.