Talk:Working with Gamma
From VFXPedia
Rather than convert the gamma back and forth for each tool, why not just set a gamma for the viewers? In the LUT's, you can apply hardware accelerated gamma correction that is both faster and easier to use than cluttering up your flow with tools that convert gamma back and forth. It's also a bit more accurate since it only gets applied once, and not through many iterations. Additionally, you can have each computer use a LUT appropriate to their monitor. --Chad
The problem is that creators and masks in Fusion are initially gamma-corrected. That's why I asked for an option to adjust default gamma of BG, FastNoise, masks ans so on... --Gringo
- Actually, they're not. BG's linear ramps, mask anti-aliasing, Text+ AA, FastNoise etc all create linear values, i.e. gamma 1.0. You can easily verify this by examining pixel values, e.g. a 256-wide black-to-white ramp from a BG will give each pixel a sequential value from 0..255. There's no internal code to apply a gamma anywhere except in the tools designed to do that, such as BC and the View LUT (which can be adjusted and disabled). Any applied gamma you're seeing must be happening later in the view chain, such as your monitor or possibly your gfx card. --Daniel
- Daniel, sorry, but I still don't understand how can true-linear ramp in BG look linear being displayed on non-linear monitors. Especially, when sRGB (gamma-corrected) images do look linear on the the monitors due to gamma compensation... Non-linearity of our visual perception doesn't explain that because the world around us is true-linear and it looks OK while true-linear images look dark on sRGB devices. Discussion on the PigsFly --Gringo
- But it CAN look linear by simply displaying it on a linear monitor (like I have) or by using a gamma-correcting LUT (which must be set for each monitor). Having tools incorrectly render to compensate for your monitor would produce results that would be bad on my monitor. Reminds me of a web page that Rob Nederhorst posted showing how his renders in Vray needed to be gamma corrected. It was very confusing because his images looked perfectly fine on my computer. My monitor IS linear, so all his corrections, which looked good on HIS monitor looked awful on mine. The tools in Fusion (like the BG ramp) ARE linear. And they LOOK linear to me. And if you have a properly calibrated monitor or LUT, they will look linear to you too. --Chad
- Chad, how does Windows and Fusion interfaces look on your linear monitor? And what about sRGB images (JPEG, TGA etc.)? All these things look linear on my sRGB monitor. And you should see them too light. Actually, gradients from the BG tool and soft masks have visually linear interpolation on all monitors I displayed Fusion on. So, if you work on a true-linear monitor, they should look lighter for you. --Gringo
- Both Windows and Fusion look fine. I actually find the Fusion interface more pleasant when it's on a linear monitor. Some people might not like it so bright. You might want to get a darker lookpack. Gradients from the BG tool look linear. sRGB images DO appear overly bright on my monitor (the whites are fine, just the midtones seem washed out). We don't use sRGB in our pipeline, so it's only an issue when we are pulling in images, in which case we convert them; or exporting them, and in those cases, we use a output gamut suitable for the media we are sending to. --Chad
- Fusion interface is initially designed to be displayed on sRGB monitors, but maybe, you really like white text on light-gray background, washed out color wheels and strained gradients on buttons - I don't know. Maybe you like the way soft masks are interpolated, though it's harder to believe. Try to create a BG gradient from black to white in Fusion, then create the same gradient in Photoshop. Save the picture from Photoshop to TGA and import it to Fusion as it is without any conversions. Compare these two pictures. They look almost the same. Will you say that Photoshop creates perfectly-linear gradient and saves it to linear TGA? What is the model name of your monitor? --Gringo
- It's not that bad. Fusion's UI looks fine to me. It's white on medium grey, not light grey. And I'm not clipping at either end, so there's no impairment of values. As for the soft masks, they DO interpolate linearly, no matter what my display shows. Not sure why I would want it to be any different, though I CAN change the matte gamma if I need to. As to the BG gradient, the one from Photoshop looks MUCH different than the one from the BG. It's histogram is a valley, not a block. So there's something horribly wrong on the Photoshop side, and it looks nothing like what Fusion is making. --Chad
- Well, the ramp from Photoshop has subtle ease in/out effect and it's generated with dithering by default. But in general, the two gradients look similar and the difference is not as obvious as between a sRGB and a true-linear ramp. So, we should conclude that either both softwares create pretty much linear or both create sRGB images. What is the model name of your monitor? And what setting or software do you use to make it perfectly-linear? That's what I see comparing the two images on my sRGB monitor:
BG_vs_Photoshop_Ramp.rar--Gringo
- Well, the ramp from Photoshop has subtle ease in/out effect and it's generated with dithering by default. But in general, the two gradients look similar and the difference is not as obvious as between a sRGB and a true-linear ramp. So, we should conclude that either both softwares create pretty much linear or both create sRGB images. What is the model name of your monitor? And what setting or software do you use to make it perfectly-linear? That's what I see comparing the two images on my sRGB monitor:
- The ease in/out effect is bad, just plain old wrong, I have no idea why that is there, but you don't want it. And if you eyedropper the middle of the gradient, you get .5. That's not sRGB if the middle grey = .5. It should be closer to .2 or so, depending on the blackpoint. So you have a "nearly" linear image except for the oddball ease in/out. So in this case both softwares are trying to make linear (gamma 1.0) images, but Fusion does it correctly. --Chad
- Seems pretty clear to me. Photoshop is trying to be perceptually linear on sRGB monitors (your screenshot makes that clear), while Fusion is mathematically linear and leaves it to the user to adjust final gamma for the desired output device. That's appropriate behaviour for each app, given their target market. --Daniel
- One of our divisions designs and publishes our own line of books. [http://www.amazon.com/exec/obidos/search-handle-url?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Alexander%20Tsiaras (Amazon link)} There's no way we would touch sRGB with a ten foot pole. The "target market" of publishing doesn't like the wee little gamut you get from sRGB. It seems to be something cooked up for consumer use, not professionals, and while it makes easy to reproduce web pages, it does nothing for other media like print or film (or even modern TV's). --Chad
- Seems pretty clear to me. Photoshop is trying to be perceptually linear on sRGB monitors (your screenshot makes that clear), while Fusion is mathematically linear and leaves it to the user to adjust final gamma for the desired output device. That's appropriate behaviour for each app, given their target market. --Daniel
- Chad, so you assume that Photoshop creates and saves to TGA nearly linear images? OK, read some color spaces basics (just what google search shows)
- www.microsoft.com
- www.w3.org
- wikipedia.org
- P.S. You forget to mention your monitor model name.
- If any unlucky owner of a standard PC monitor is interested, this picture helps to realize what Fusion could look like if it was displayed on a perfectly linear monitor.
- Daniel, a picture can be either perceptually linear or mathematically linear, but it can't be both in the same time being displayed on a sRGB device. As we can see, the ramp from Fusion looks linear, so it can't be mathematically linear. I believe there is a part of code 20 years old deep in Fusion core that recalculates numerical output of the color values just like Photoshop does. This screenshot shows the difference between original sRGB ramp from Photoshop (on the left) and the ramp with linear gamma (on the right). --Gringo
- >Chad, so you assume that Photoshop creates and saves to TGA nearly linear images? OK, read some color spaces basics (just what google search shows)
- >www.microsoft.com
- >www.w3.org
- >wikipedia.org
- I'm not following what those links have to do with TGA's or Photoshop. The TGA file doesn't encode anything that forces a color space. And I'm only "assuming" that Photoshop makes this nearly linear gradient because I saved a TGA from Photoshop and opened up and checked the resulting values. --Chad
- >P.S. You forget to mention your monitor model name.
- It's a Lacie Electron Blue 4 (22), and the video card is a QuadroFX 4000. Analog signal. --Chad
- >P.S. You forget to mention your monitor model name.
- >If any unlucky owner of a standard PC monitor is interested, this picture helps to realize what Fusion could look like if it was displayed on a perfectly linear monitor.
- >Daniel, a picture can be either perceptually linear or mathematically linear, but it can't be both in the same time being displayed on a sRGB device. As we can see, the ramp from Fusion looks linear, so it can't be mathematically linear. I believe there is a part of code 20 years old deep in Fusion core that recalculates numerical output of the color values just like Photoshop does. This screenshot shows the difference between original sRGB ramp from Photoshop (on the left) and the ramp with linear gamma (on the right).
- It looks linear because it IS linear. The histogram shows a solid block of values and in your example the inverse of the Y coordinate (0-1) will exactly match your RGB values (0-1). It's perfectly mathematically linear. As to Your screenshot, the ramp on the right (the one coming out of the gamut, LOOKS linear to me on my computer. --Chad
- Chad, sorry, but your arguments come out of logic. I hope, someone else will explain what I mean for you. Anyway, thank you for comments. Cheers! --Gringo
- The arguments for or against working in sRGB space are not so significant as compared to making sure that you are clear on the concept that the tools inside Fusion are nearly all based on linear color, making it the most efficient color space for compositing in Fusion. There's no bizarre 20 year old code in there to emulate Photoshop; Daniel pretty authoritatively knows which tools are in fact operating in linear color space. I just want to make sure that that is explained well enough in your article. --Chad
- Chad, sorry, but your arguments come out of logic. I hope, someone else will explain what I mean for you. Anyway, thank you for comments. Cheers! --Gringo
- Without getting into what Photoshop does or the exact specifics of sRGB, I'm afraid you'll have to accept that Fusion creates and works with linear data internally. BG ramps, anti-aliasing, double-polys, pixel sampling etc - all linear (not blurs & Soft Edge, which are Gaussian). Light Trim is the only tool designed to work with non-linear data. If you won't take my word on what the code is actually doing then check the histogram, or examine the pixels individually. Save the output to a .tga and examine the values in other tools if you want. Since Fusion creates and expects linear data, no pre/post gamma should generally be necessary during processing, only in view LUTs, loaded footage and final output.
- There's plenty of room to argue about how to make things look linear - it's a complex subject, and humans are involved. But the numbers don't lie. If you have other "true-linear" images that look more or less linear than Fusion's BG ramp on your monitor, then I can only think that either they're not true-linear after all (check their numbers), or something else in the display chain is different. --Daniel