Hi guys! :)
Found this one on artstation: https://www.artstation.com/artwork/o2Wgam
I know there was some gradient palette mapping technique back in the days for pixel art games.
That video explain that a bit: https://www.youtube.com/watch?v=Cx9Xu_54GOU
But im not sure how it was maded by Pawel Kostecki.
Maybe some one can show some more examples and explain this?
Replies
Hi!
The example from artstation looks like a linear interpolation, blending two inputs by grayscale mask. Check outLerp/UE documentation.On a second look, I was mistaken, seems to involve gradient mapping, not just a simple lerp, oops :POnly watched a snipped of the video. In Unreal Engine you can do this by creating a gradient (curve asset), assign it to a curve atlas, to then use it inside a material to color a grayscale input by the gradient. Check out Curve Atlases in UE. You could then lerp the gradient mapped result with the original texture based on a grayscale mask?
You don't lerp. You index into the array using the grayscale value of the pixel.
If the pixel has a value of 0.4 it uses the color 40% along the array
You can take this sort of thing quite a long way if you move out of RGB space.
Eg. In hsv space you can remap or replace just the hue component of a color image .
I've built systems based on this idea to support player customisation a couple of times now - when arranged right it's pretty efficient and as a bonus is low effort in terms of authoring.
Yeah that's my guess aswell. You can have a look a this video, he's setting indexes for a normal maps array instead of colors but it's the same principle
https://youtu.be/avZ26yW2KBw?list=PL78XDi0TS4lEBWa2Hpzg2SRC5njCcKydl&t=1047
Another good example, nicely explained
https://polycount.com/discussion/174377/witcher-3-blood-and-wine-architectural-material/p1
that's quite neat - I mucked around with something similar that made use of texture arrays a little while back but abandoned it because there simply wasn't time to go back and add vertex color/textures to the meshes involved.
Should work brilliantly if you plan your work out ahead of time though
Thank you guys :) Im basically was a bit confused about lerp which was mentioned on artstation, and was trying to figured out where and how the lerp might help.