Suggested Engine support for a color layer on items.

Kazimir3701

New Member
Contributor
Instead of wasting space with dozens of palette swaps of the same potion, I'd like to be able to define an optional color when choosing the texture of an item.

Possible ways to implement it:

• A particular set of "reserved" colors that are replaced with the chosen colors (Easiest to implement. This would be 2 arrays of colors, one is the default image colors, and the other is the replacement colors.)
• Require the use of a file format that supports layers (tough...)
 
Last edited:

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
The engine has color look-up tables (LUTs) for grass and fooliage tinting based on the biome they are located in. This functionality should be made available to modules in general, for blocks and items.

Places to look at:
  • DefaultColorSource.java
  • grasscolor.png / foliagecolor.png
 

Josharias

Conjurer of Grimoires
Contributor
World
SpecOps
Hey Kazimir3701, I have done this fairly successfully already to make buckets that are filled with various fluids. In fact, I am presently in the process of adding drinkable fluids (see WoodenCup.prefab) which could work out well for drinkable potions. The key color changing thing is the addition of a component to the fluid definition for water (see the delta for Water.prefab). Ill have a video demo of the drinkable water soon.
 

Kazimir3701

New Member
Contributor
I'm planning on using this for plenty of things that are non-liquids, but the system should work the same for everything I suppose.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Speaking of, the aforementioned video :D

 
Top