I would like to color a animation dependent on what recipe it's using, kind of like how animations of the chemical plant are changing colors depending on what fluids are contained in the recipe. I already have the seperate animation but from what I saw, I also need a color mask or something like that, which is supposed to be partially transparent and white I think. So the two things I need is to know how to create that color mask and what to add to the code. Thanks in advance.
Kind regards,
Grundox
adaptive colors
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: adaptive colors
This has an infinite number of answers because it is an art question. It depends partly on how you are creating the base animation. For example, I use Blender, and I use a material ID mask, or layers, or both, to split off the mask(s). There are a million alternatives, up to and including throwing glitter at a wall and capturing it on your smartphone.
The mask doesn't absolutely have to be white, but you have the most control over it if it's greyscale. Contrary to what other people will tell you, there are use cases for not having it be entirely white, but stick to white/greyscale unless you have reason otherwise.
First you set the crafting_machine_tint property in the recipes: https://wiki.factorio.com/Prototype/Rec ... chine_tintwhat to add to the code.
Then you need to rig the mask layer(s) in the assembling machine's working visualisation animation(s) to use the corresponding tint channel(s): https://wiki.factorio.com/Types/Working ... ecipe_tint
The best way to learn how to do this is to look at the chemical plant definition in the vanilla game's data.raw.
Last edited by Deadlock989 on Wed Aug 28, 2019 6:55 pm, edited 1 time in total.