Adam, I have watched every one of your videos now, and I can't join your live streams since I am in the states, so I get so excited every time a new video comes out, and watch through some of your Twitch vods. You are so inspiring and fun to watch. - Alex
OMG It probably sounds like I'm exaggerating when I say this but I've actually spent three whole days trying to figure out how to do what you did in the first minute of this video. Thank you for posting these videos you have no idea how much you helped me!!
Heyo! Nice vid, but you could use a texture as a mask to determine which parts to re-color, basically sample the mask, and use a lerp node to switch between the original colors and the new colors, you could even have like half-way re-colored stuff aswell :D (Would be way cheaper computationally)
I love this technique with colorise some textures with gradients. So, its posible to use unity gradient with custom inspector script to convert gradient to texture, and use color range to colorise tones of secondary texture in shader or even from blue chanel (red- gren for build normals). Its realy intresting to use in indie games!
Wow! I just spent 5 hours the other night trying to figure out how to do exactly this for creating color customizable clothing options in my game. Of course I didn't even know about shaders and was trying to do the color replacing programmatically. Thank you so much for this tutorial! Question though, it looks like it is possible to use the Deer Material on other sprites, is that true? If so I could apply the same material to any sprite I have which has customizable color options.
How do you get Shader Graph to show up? I don't have that option, but once I figure it out I will be following along. Strike that, how can I change preview to quad, I figured out the rest but I seem to be stuck in the circle preview which seems to break the sprite in game. Strike that again, apparently maintex is useful. How can I edit in code?
Would this method be more useful for normal mapping right? Because you can apply the normal map to just the base tileset and it would work in every sprite?
This is very computationally expensive for a simple palette swap. Conditionals and branching are murder for performance. Check out the video on the topic by Makin' Stuff Look Good. I'm sure you can convert it to shadergraph wihtout too much trouble.
I'm definitely no expert on shader performance, so I appreciate the suggestion, I'll check it out. As far as I understand though, a single fork that will be consistent across the 32x32 pixel texture won't ever be an issue. If I come across a more sophisticated way of dealing with dynamic hue shifting across the spectrum based on the starting value, it likely won't use Boolean logic.
I wish Unity would just support palette images. Nowadays it justs imports 8-bit PNGs as true color, throwing away the palette :(. While modern GPUs no longer support palettes in textures directly, you could still import the color indexes as a single channel of non-color data and use a uniform array for the palette itself (or even a small texture for old device compatibility). The cost of that second texture read is negligible (even Quake 1 had two texture reads per pixel), and the result would be faster and more flexible compared to any kind of color replacement. Not to mention it would reduce the game's assets size by 75%. Palette swaps >>>> Color replacing. I also want palette color cycling effects back!
This is incredible! :D But I do have a few questions if you wouldn't mind trying to help me out. So firstly the two vectors for the Branch, is there a default value you could put the XYZ/RGB at to get some nice results, as I don't fully understand the relevance/significance of each number x') Also. Would your sprite have to be a default white colour to start with? My sprite is a mix of mainly blue, and I don't see many issues until when picking the replacement colour you go from pink to red, there is a really visual swap in colour that doesn't fit in. The H value if that helps is from 359 - 0 the swap is really obvious :) Hopefully they make sense
First of all: the video is great, as well as all of yours, thanks a lot! But i think this shader is not very applicable in development, because each of your unique art will require unique shader to might be "colored" as this deer. I'm not very familiar with shading and coloring, but why just not multiply initial BW art to some color you want?
Wow this is great. I was looking for something like this a couple weeks ago! Any tips / thoughts on expanding this to be able to take multiple color inputs to replace? Like if you could shift the deer's body color and antlers seperately? Also, would this strategy work on sprites with more color gradients (like non pixel art / a sprite that has been anti aliased)?
Dude, this was legendary stuff, especially the color explanation, keep doing what you are doing, you are making a beautiful difference in this world
Adam, I have watched every one of your videos now, and I can't join your live streams since I am in the states, so I get so excited every time a new video comes out, and watch through some of your Twitch vods. You are so inspiring and fun to watch. - Alex
OMG It probably sounds like I'm exaggerating when I say this but I've actually spent three whole days trying to figure out how to do what you did in the first minute of this video. Thank you for posting these videos you have no idea how much you helped me!!
Very informative as always adam, i learned so much from you. Keep up the good work!
Now I kinda want to see an invincible rainbow-deer in the game.
I second that one :D
2:30 - Kratos deer
Heyo! Nice vid, but you could use a texture as a mask to determine which parts to re-color, basically sample the mask, and use a lerp node to switch between the original colors and the new colors, you could even have like half-way re-colored stuff aswell :D (Would be way cheaper computationally)
this was a great entry point into shader graph for me
Finally, found a good shader tutorial for pixel art
You are such on a high level in everything you do, awesome!
Very cool you could use this shader on multiple things if every thing was colored in that same colors.
That was awesome!
I love this technique with colorise some textures with gradients. So, its posible to use unity gradient with custom inspector script to convert gradient to texture, and use color range to colorise tones of secondary texture in shader or even from blue chanel (red- gren for build normals). Its realy intresting to use in indie games!
Wow! I just spent 5 hours the other night trying to figure out how to do exactly this for creating color customizable clothing options in my game. Of course I didn't even know about shaders and was trying to do the color replacing programmatically.
Thank you so much for this tutorial!
Question though, it looks like it is possible to use the Deer Material on other sprites, is that true? If so I could apply the same material to any sprite I have which has customizable color options.
I lov your study of colors
Brilliant video, thanks
Yea, in my opinion, if we draw a character but the color is simple, we can use this tool to improve it ❤️, btw Keep it up & have a nice day, Adam 🙏🙋
cool way to get a variety out of a single crature design
How do you get Shader Graph to show up?
I don't have that option, but once I figure it out I will be following along.
Strike that, how can I change preview to quad, I figured out the rest but I seem to be stuck in the circle preview which seems to break the sprite in game.
Strike that again, apparently maintex is useful. How can I edit in code?
Would this method be more useful for normal mapping right? Because you can apply the normal map to just the base tileset and it would work in every sprite?
You just got a new subscriber. This is awesome stuff
I really appreciate you for the video. I searched tutorial for this shader multiple days ago...
This is very computationally expensive for a simple palette swap. Conditionals and branching are murder for performance. Check out the video on the topic by Makin' Stuff Look Good. I'm sure you can convert it to shadergraph wihtout too much trouble.
I'm definitely no expert on shader performance, so I appreciate the suggestion, I'll check it out. As far as I understand though, a single fork that will be consistent across the 32x32 pixel texture won't ever be an issue. If I come across a more sophisticated way of dealing with dynamic hue shifting across the spectrum based on the starting value, it likely won't use Boolean logic.
I wish Unity would just support palette images. Nowadays it justs imports 8-bit PNGs as true color, throwing away the palette :(. While modern GPUs no longer support palettes in textures directly, you could still import the color indexes as a single channel of non-color data and use a uniform array for the palette itself (or even a small texture for old device compatibility). The cost of that second texture read is negligible (even Quake 1 had two texture reads per pixel), and the result would be faster and more flexible compared to any kind of color replacement. Not to mention it would reduce the game's assets size by 75%.
Palette swaps >>>> Color replacing. I also want palette color cycling effects back!
I haven't tried it, but I feel like it would be easier to use the blend node to blend the input color with a dark blue color by different amounts?
This is incredible! :D But I do have a few questions if you wouldn't mind trying to help me out.
So firstly the two vectors for the Branch, is there a default value you could put the XYZ/RGB at to get some nice results, as I don't fully understand the relevance/significance of each number x')
Also. Would your sprite have to be a default white colour to start with? My sprite is a mix of mainly blue, and I don't see many issues until when picking the replacement colour you go from pink to red, there is a really visual swap in colour that doesn't fit in.
The H value if that helps is from 359 - 0 the swap is really obvious :)
Hopefully they make sense
Is it works for 3d model voxel style?
Does this need to run on a URP or HDRP project?
First of all: the video is great, as well as all of yours, thanks a lot!
But i think this shader is not very applicable in development, because each of your unique art will require unique shader to might be "colored" as this deer. I'm not very familiar with shading and coloring, but why just not multiply initial BW art to some color you want?
do you use this tchnique for scenery and stuff too?
I'm not sure about using this technique for scenery. That might be a better job for lighting, rather rather than colour replacement shaders.
is it possible to have multiple deer of different colors on the screen at the same time using this method?
Apparently "material property blocks" is what you'd want to look into, but i don't know for sure either way
Naisu
what program is this
Unity
i learned something
hey I see me in chat!
Wow this is great. I was looking for something like this a couple weeks ago! Any tips / thoughts on expanding this to be able to take multiple color inputs to replace? Like if you could shift the deer's body color and antlers seperately? Also, would this strategy work on sprites with more color gradients (like non pixel art / a sprite that has been anti aliased)?
I think you can use the same method and make another color variable :p
Me: Ok, now where tf shadergraphs come from.
(a year later)
WHAT DO YOU MEAN ITS A SEPERATE PACKAGE?
niice
"That's nice"
^_^
Muito obrigado
Hola
Never been so early