Intro To Color Correction For Games
Вставка
- Опубліковано 3 бер 2022
- Post processing is a powerful tool that every indie game developer can utilize to level up their game's visuals. In this video we go over the basic math of contrast, brightness, saturation, and gamma correction for use in shaders.
Support me on Patreon!
/ acerola_t
Twitter: / acerola_t
Twitch: / acerola_t
Code: github.com/GarrettGunnell/Grass
Join My Discord Server! / discord
Music:
During The Test - Persona 3 OST
Afternoon Break - Persona 3 OST
Some random royalty free infomercial music idk
Thanks for watching!
This video is dedicated to my friend, Alotryx.
#acerola #gamedev #graphics #unity #unity3d #madewithunity #indiedev #unity2d #tutorial #shader - Наука та технологія
Sorry for the shorter vid, I just started a full time position at Intel as a graphics software engineer and more importantly I've been playing Elden Ring. Expect a video on recreating an effect or two from the game, since there's a lot of cool lookin stuff.
For those that are obsessed with optimizations like myself and want to delve into post processing more before I make more vids on the topic, make sure to read about and be mindful of overdraw.
This video was brought to you by 4:20 yolo
Woah, are you working on something related to Arc?
@@ChrisD__ Unfortunately not. I was on Intel's graphics performance analyzer team so I was helping make their gpu profiling tools. I've since left Intel and have accepted an offer at Sony Studio Bend (studio that made Days Gone) and will be a graphics programmer on their upcoming title. I havent started that job yet though so I havent officially announced it lol
@@Acerola_t congrats!
@@mrcreepypl Thanks! I'm very excited
mmmmmm yes gamma 0 and 1 color numbers math, I think I got it THANKS ACEROLA
One of the things that can help people is knowing if you a going for physically accurate color or not. If so then one thing that I found helpful is labeling color at every phase if is linear or in in gamma space. For example a color from a texture would start in gamma space. Mathematical operations on that color should be done in linear space. The the final output should be in gamma space. Adding post processing, hdr, and tone mapping features to the render pipeline requires you to ensure the dynamic range and gamma space the inputs to the post processing matches the outputs of the shaders. Physically accurate color requires a lot of discipline to get it right.
On a side note, I have a background in color science. I think your video is great.
If you find the topic of color science interesting, there is a wonderful and deep field to explore with many real world applications out side of video games. I encourage those interested to experiment and test your assumptions using the scientific method. You may be surprised on much fun you have.
As far as I'm aware in Unity, if your color space is set to linear then textures will be fed into the gpu in linear space. The documentation is rather confusing on that front.
Physically based rendering has perhaps the most academic resources so I prefer to focus on stylized. I'm going to tackle the concepts of hdr and tonemapping in a future video for sure, gamut clipping is a topic I don't think has much coverage.
Thanks for the comment! I would definitely love to read about color science outside of the context of video games.
I just found your content and i have to say you are one of the few, very few devs on youtube that quite literally show the real process behind gamedev and how hard and complex it can be.
btw you are a pretty good teacher.
Thank you Shaggy, really high quality content and pretty useful!
Oh my god your videos are incredible. I've been getting a bit more into shaders and visual effects and have had a hard time starting out as I often just don't know what terms to google / search. Your videos are so amazingly helpful and they're the perfect length too: They go into enough detail to give me all the terminology and stuff I need to google, but leave enough loose ends for me to figure out implementations and explore myself.
BETWEEN 0 ANNND 1
Thank you I made the entire video for that joke
that make sure to clamp color to 0 and 1 SAVED MY LIFE,
turns out that was whats was causing the weird black squares
if you're doing SDR you clamp to 0 to 1, if you're doing HDR, you clamp to 0 because negative values will ruin your life generally
true I don't need that kinda Negativity in my life ahaha (I'll show myself out)
Incredible content!!! Loving this channel! LETS GO!
I'm still waiting for more on Color Correction for games! My favorite topic.
Great channel. Love your style, man. Please continue.
very informative, thanks a lot!
thank u for talking about the basics : ')
Great video! Loved the dry humor. That's a sub from me my man.
Thank you so much! I really appreciate it.
This man casually mirror flips his living room and thinks we won't notice! Not me, I'm as eagle-eyed as they come. Unfoolable 😎
Thanks that helped a lot
I know a guy who didn't clamp his values between 0 and 1. It worked ok on Windows but the values started to loop on Linux. He had me test it. It was not easy to describe.
you clamp 0 to 1 because a lot of math assumes the value is between 0 to 1, not doing so is often incorrect unless you know what you're doing
This shouldn't have been as funny as it was. Love it.
This is the perfect youtube video.
Hi-hat, i don’t know if you know about this topic, but I’m writing my tesis. For it I had to do a camera calibration for Arducam cameras. The problem is that the linearization seems to be off. I used a color checker and the greyscale values aren’t linear, it looks more like an s… do you have maybe an idea of why? Or what could be done?
As a photoshop nerd, I have to say I have a slight problem with the brightness and contrast part. Ideally, you should't clip your dark or light values like that. You might run into problems later on if you add a new object which outputs colors outside of your range, because then the object loses detail.
In photoshop a contrast slider actually interpolates between a linear relationship and ease-in-out relationship. I think it's a mixture of two logarithms or something, but I have no idea how to describe this mathematically.
Correct me if I misunderstand what you're doing with the brightness and contrast.
You would love the next video in which I explain how to handle rgb clipping
Don't new unity projects use linear as default now?
As far as I'm aware no, but if they do that's great
@@Acerola_t I mostly do VR development, so maybe it's the oculus plugin changing it. Because new OpenXR runtime only allows linear
@@Acerola_t I just checked, they absolutely do. Well, at least the 3D (URP) template does. 2D (URP) still seems to use Gamma, so depends on the template, but it is definitely set as default for some of them.
DUSK just makes you do it yourself
Isn't your Luminance formula outdated? It's (0.2126*R + 0.7152*G + 0.0722*B) these days. Or am I missing something? @2:28
there's like infinite ways to calculate luminance there's no specific formula lol
the fast way to do it is to just use the green channel only, or you can do my formula or one of the 10923810923098 other ones, it's all basically the same.
@@Acerola_t Ah ok :) thanks
moistest dryness i ever came across
you can't just tell me not to do something and expect me not to force it to work.
you're free to do whatever you want, but math works the same for everyone!
I don’t care what anyone else has already said: you’re not getting enough credit for “your games can go from zero to one… … in rgb values.”
unity sucks
unity is alright as long as you don't use any unity tools
@@Acerola_t truuuu lol
@@Acerola_t fair, but I would rather just either use godot/unreal on roll something custom - especially for tutorials on graphis programming I would avoid unity