linear workflow

The monitors we look at for years are lying to us about light, color and tone. In the past (and even now, even in some cases) we've been putting extra lights or increasing the number of samples to light up dark areas when rendering a scene. We have continued to work for years without care even though the light / dark balance is always strange or wrong. We have not made a sound as to how wrong the distribution of the light is, and in short, that all of our renders appear unnatural. We have repeated the same mistake for years. One day we were confronted with the concept of "Linear Workflow". That's when we figured out the wrong thing. Now what if we tell you that all these efforts we've been doing for years are unnecessary? And what if we say that the only resposible of these unnecessary efforts is Gamma?

Those who know the topic immediately understand what we mean. But let's briefly explain what this is for. We will keep our explanations at a simple level so that they are not confusing. But the subject is actually quite technical. If you want technical explanation, there are very detailed resources on the web.


What is the problem?

If the color, tone and light distribution do not look natural at the output of a render, it is the monitors and Gamma that are responsible. In the ideal world or theory, monitors or other imaging devices are expected to produce a linear output as they translate energy into the image.





But in the real world things do not happen this way. According to the law of electrical power, the difference between input and output is not linear but it is logarithmic as seen in the graph below.



In such a case you will not see any pictures or videos as they are. So black, white and grays are not in their true state; as a result, blacks become darker and lighter colors become brighter. To see them correctly, the device applies a correction. This correction is called "Gamma". Thanks to this gamma curve, the black / white balance is corrected a bit more.



What does 3D software have to do with it?

All the pictures you see on the computer screen or all the textures you use for rendering are mostly 8-bit jpg, png-like formats. These are embedded with gamma information, and when you look at the computer screen, gamma correction is automatically applied and appears on the screen. Most monitors have sRGB 2.2. Most 3D software we use today, including Cinema 4D, works as Linear and assumes that the assets you load from the outside are also Linear (Floating Point). However, the texture we use most of the time is 2.2. If gamma correction is not done in 3D software, gamma correction will be made at final render output, so gamma will be made twice in final render image. In this case the result is far from natural and wrong. Lights, shadows, and black / white balance will not seem entirely natural due to gamma.

The right thing to do is to translate and work all the assets in 3D software as Linear. We will explain this in more detail later. In short, as you can see in the graphic below, a workflow is called a "linear workflow".




BENEFITS

Above all, the distribution of light during 3D work is more natural. With low sampling settings you can get better looking renderings. Moreover, during shorter render times. For this reason it may not be necessary to make extra light setup or use more sampling for dark areas in sRGB. Reflections and refractions in this workflow also appear more natural.

On the Compositing side there are more improvements. For example, you are working with a wider color and tone range, so you have more control over the image. Blending Modes (such as screen / overlay / add) get more natural and accurate results. The difference is especially great when it comes to DOF and Blur effect. The brilliance of background bokehs becomes realistic. Also all gradients give much more accurate results. And finally, you can intervene more easily in areas that are extremely glowing and extremely dark.


disadvantages

File sizes. The file sizes are quite large because they contain so much data. In addition to beauty renders, you also need to get Render Passes in Linear, so the size of the entire project can be quite high. But now that the storage problem is solved, this may not seem to be a disadvantage. The real disadvantage is that a serious computer power is required to work in this workflow. As the CPU and RAM usage increases, a good computer is essential for flawless working. Of course, you can also work on a low-configuration computer, but operations are slow.


matter of choice

Of course, it is not necessary to work in this workflow. sRGB or Linear is a working tool. They will suit you according to your purpose. If your sRGB outputs are pleasing to you, there is no problem. So you have to make your choice completely according to your purpose. Often it is a professional way to work with Linear in 3D software, ending it in composition software as a linear result and finally outputting to the target platform (computer or movie screen?). It is up to you to. So, working in sRGB does not make you an amateur.


Working linear workflow in OCTANE

You can work with linear workflow in Octane. Then you can render with render passes, beauty and then finalizing within the composition software. Let's take a look at the following 2 pictures before stepping through all of them:

The first image is a render that is the sRGB result. The scene taken from the Cinema 4D's content browser which is a classic indoor scene. Only the floor and the carpet are covered with octane material/texture. Octane Daylight was used as light source. If you select the "Linear" response curve in the Camera Imager, the result will be the opposite. Because our monitors can not show Linear and eventually we are faced with a classic sRGB result. This is the expected image of all 3D renderers not working with Linear workflows (sRGB 2.2) on our monitors.



The second picture is rendered using Linear Workflow. The scene is the same. The floor and carpet texture gamma is set to "1" (you can adjust the image gamma in the image texture settings). Render Buffer is set as "Linear". If you open it in Photoshop, After effects or any compositing program that works with linear workflow, you will see an image like this.



Now the difference between these 2 pictures is totally technical. The first image (sRGB) is technically incorrect and the second image (Linear) is technically correct. Whether the result picture is aesthetically beautiful or ugly depends entirely on your purpose or your artistic point of view. If you remain in the sRGB state in the first image and try to create brightness / darkness balance like in Linear picture, you would have been to do a lot of light setups and also a render setup. These setups would cost extra effort and render time. However, there is no extra setup in the Linear Workflow option. Now the decision is yours. If the Linear workflow result has taken your interest, you can continue reading the rest of the article.


LINEAR WORKFLOW SETUP WITH OCTANE

Open any scene. If you want, you can also open and use the classic Cinema 4D indoor scene shown in the pictures above. Let's continue with the assumption that you are using this scene and that you have prepared the light / camera setups. In this scene, only the floor and carpet is covered textures for testing purposes. These textures are found on the web and their gamma's are 2.2. You can follow the same path.


1- First create two separate Octane Glossy materials for the floor and carpet (with a very high rougness like float/0,7-0,75). Define the textures you find on the web as image texture on the diffuse channel of the glossy material (you know how to use the image texture). In the Image texture options, the default Gamma is 2.2. You have to change that so make Gamma "1" for each texture. If you use very high quality and high resolution "EXR" format textures, you do not need to do this setting because the Gamma of EXR or HDR image formats is default 1.



2- Now go to the Octane Camera Imager settings and make the setup as you see in the picture below. The picture you see is the Linear output of LV. Do not confused that you set the  Response curve to sRGB. The reason is the monitor we used. Cinema 4D assumed that all operations are Linear until the rendering result in Lv. But the end of the chain, our Monitors, does not have the capacity to display it. So, according to the above diagram, it is necessary to do sRGB again after all this linear workflow is over. This is the result of what you see in LV. If you want to be sure, change response curve back to Linear. That's when the image of LV will be sRGB and the whole picture will be dark. But if you select Render Buffer Type as Linear in the PV render (Picture Viewer), the image will be rendered linearly as original. The only responsibility for this confusing process is the gamma setting of the monitors we use. Now use this setup, because in the following article we will explain the difference between LV and true Linear Workflow in more detail.



3- Now let's do the Render Setup: Press CTRL + B when you have finished everything. The Render Settings window will be opened. First, go to the Octane Renderer and select "Float (Linear)" from the Render Buffer Type, then set the desired output and save settings as Open EXR 32 bit.


4 - If you want a Render Pass, select the desired pass from the Render Passes section. Prepare a setup as you see in the picture below.



5- And final render. When Beauty and render passes are ready, open After Effects (or other compositing software). Import your Beauty and Render Passes into After Effects. If you check your files infos after importing, you will see that all of them are Linear.



6- Now press the "8 bpc" icon in the Project window. The Project settings window will open. From this window, do the setup you see in the picture below.



7- Now you are ready to work with fully Linear Workflow. You can enjoy the quality of Linear work using beauty and render Passes. You are now out of the dark and restricted area of sRGB and stepped into the comfortable and beautiful area of Linear Workflow. When you see how good the gradients, colors, tonalities and all other comp operations are, you will get a better understanding of what we are saying "Monitors we look at for years lied about light, color and tone".

In the picture below you can see the final result with raw Linear render. You can get output according to the media to be used when you are done. For example, if you look at the monitor you're using again, you can record classic Jpg or Png.




I want to see the same result as LV while I'm working in Linear.

Let's make a statement about this request that emerged at various times in the forum. First of all, the render result in LV is always "Tonemapped", whether it has a Camera Imager setting or not, unless you changed the response curve to "sRGB" or "Linear". And this tonemapped is actually quite good. If you are satisfied with this quality, there is no point in working with Linear Workflow anyway. Linear workflow is not a law. It is a matter of choice as we have stated in the beginning.

Let's say you have your final setup in the Camera Imager as shown in the picture below. And you want to get Linear output and work as a linear workflow. Suppose you also get your Render Passes are all linear.



Working with Linear Workflow for such a scenario may not be the right thing. Because there is already a picture of response curve applied from Octane Camera. So the picture is quite different from the raw linear output. In this case, when the render passes are linear, they will never match. If you want to work linear, you should never choose any color, exposure, gamma and especially "RESPONSE" from the camera imager. Because all these operations are actually some kind of compositing operations. Once you have a linear output, you will already be doing these operations in compositing software according to your desire and artistic outlook. Linear work is also a working way with the thought of "Color Grade". Here, if you already render in color graded picture and render passes in linear, it will be a little difficult to process in the compositing program. Therefore, if you want to work on a linear workflow, just select the SRG response curve from the camera imager and Gamma should be always 1.


Finally, do not force yourself to work with Linear. As we mentioned, Tonemap is very good at final outputs and there is a lot to do with the camera imager from Octane. That's why we call the "Mini Compositing tool" for the camera imager and post effects.