How to make new belt graphics

Tools, that are useful for mod-development.
Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 1481
Joined: Thu Nov 20, 2014 11:11 pm

How to make new belt graphics

Post by darkfrei » Mon Mar 05, 2018 5:02 pm

The result for attract your attention.
2018-03-05 17_04_44-Factorio 0.16.27.jpg
2018-03-05 17_04_44-Factorio 0.16.27.jpg (88.61 KiB) Viewed 1173 times
1. Making with blender some sprites. As example, here is two files for straight and curved belts:
belt_02_05.7z
(232.48 KiB) Downloaded 26 times
2. Making spritesheet. You must make two spitesheets for straight belts and four for curved belts.
Here is a little program for it: viewtopic.php?f=34&t=5336&start=20#p335708
You can make whole spritesheet with only on command:

Code: Select all

magick montage "Input/*.png" -geometry +0+0 -tile 32x32 -background rgba(0,0,0,0) -quality 100% "spritesheet_32x32.png"
The vertical spitesheet is ready!
belts_02f_800024.png
belts_02f_800024.png (4.57 KiB) Viewed 1173 times
Now we are need to make horizontal spritesheet.
Just rotate all sprites to 90 degrees and make new spritesheet.

But curved belts are need be three times rotated and one time mirrored (why?).
So, from this asset we are get sprites for rotation_d.
belts_02r_800024.png
rotation_d
belts_02r_800024.png (4.09 KiB) Viewed 1173 times
But our sprites must be:
rotations.png
rotations.png (18.99 KiB) Viewed 1170 times
So, as you can see, after first 90 degree rotation we are get rotation_c
Now we are rotate two times at 90 degree (ore one time at 180) and we are get rotation_a
And then we are need mirror all sprites and rotate them again and we are get rotation_b

See mod: https://mods.factorio.com/mod/df_belt_graphics
Last edited by darkfrei on Thu Mar 08, 2018 9:25 pm, edited 1 time in total.

User avatar
Deadlock989
Filter Inserter
Filter Inserter
Posts: 556
Joined: Fri Nov 06, 2015 7:41 pm

Re: How to make new belt graphics

Post by Deadlock989 » Mon Mar 05, 2018 6:26 pm

Very nice. Thanks for sharing.

boksiora
Long Handed Inserter
Long Handed Inserter
Posts: 77
Joined: Thu Mar 10, 2016 7:45 pm

Re: How to make new belt graphics

Post by boksiora » Wed Mar 14, 2018 11:21 pm

nice, thanks fr posting

User avatar
Deadlock989
Filter Inserter
Filter Inserter
Posts: 556
Joined: Fri Nov 06, 2015 7:41 pm

Re: How to make new belt graphics

Post by Deadlock989 » Sat Mar 17, 2018 5:54 pm

I tried my hand at this and failed miserably with the curve method - couldn't figure out the distortions or how to get things to get where they need to be exactly 32 frames later. So I did it another way - there's a nice add-on for Blender called ARew0 which lets you make fake "arrays" of objects but with all their keyframes offset in time. Perfect for belts and another things moving in formation. So you just set up one "slat" of the belt and then make an offset array of it 8 frames behind (or however many you want).

There's another nice add-on called Render Border which gives you easier control over which section of the rendered image is automatically masked off, and whether or not you want the output cropped - perfect for things like this (and other stuff like working animations etc.) where holdout masks might get antialiased.

I discovered you can use Blender to render the whole sprite sheet without having to do any rotating/mirroring separately. Just keyframe the camera and rotate to get the different angles. When you get to the weird mirrored curved belt, set one of the camera scale axes to -1, that produces a mirror image effect. Don't forget to set it back when you move on to the next series.

I also managed to figure out the end patches. I don't think I've ever spent so long tearing out my hair over something that is about 4 pixels wide. The end patch is easy, just mask off the last 7/8ths of the tile (it looks like Wube did something much cleverer with the belt actually bending and rolling away underneath itself, but that's beyond my skill and likesay, it's barely visible). But the start patch is, for whatever reason, 4 frames (a quarter tile width) out of phase with the end patch. So you have to mask out all but the 3rd 1/8th of the tile. Nightmare fuel.

Lastly you can make things look more 3D very simply by giving it a dark glow as a kind of directionless shadow (belts aren't orthographic like most other stuff is). In the compositor, get the alpha channel, blur it, multiply it by a small amount, then add it back to the original alpha channel. Simples.

Image

User avatar
fechnert
Inserter
Inserter
Posts: 32
Joined: Fri Jun 30, 2017 12:48 pm

Re: How to make new belt graphics

Post by fechnert » Thu Apr 26, 2018 5:08 pm

That looks mesmerizing
Image[url=steam://friends/add/'.76561198066150999.']Image[/url]

Post Reply

Return to “Development-Tools”