Linear workflow in Octane

Forums: Linear workflow in Octane
Post, discuss and share handy resources like textures, models and HDRI maps in this forum.
Forum rules
Please do not post any material that is copyrighted or restricted from public use in any way. OTOY NZ LTD and it's forum members are not liable for any copyright infringements on material in this forum. Please contact us if this is the case and we will remove the material in question.

Linear workflow in Octane

Postby roeland » Mon Jun 10, 2013 4:41 am

roeland Mon Jun 10, 2013 4:41 am
Octane assumes you are using a linear workflow. Not doing so may introduce errors in your rendered image, like too much contrast or washed out colors.

Here is an example using Octane: the left image was rendered using proper linear workflow, the right image was rendered assuming any RGB colors can be fed directly into the renderer, and the rendered colors can be directly sent to the screen. Note how harsh the lighting looks on the right.

gamma demo.png


The key issue is that a display doesn't normally have a linear response. (100, 100, 100) is not twice as bright as (50, 50, 50), in fact it is usually more than four times as bright. And images and RGB colors are usually given as values to be sent to the display.

The good news is that most settings in Octane are by default correctly set up. The most problematic part is inputting RGB values. The tone mapper by default is set up with gamma = 1.0 but the selected film curve does some gamma correction.

To avoid errors you need to get two parts right:

Getting data into Octane:

This image shows you the difference between (1.0, 0.5, 0.0) in linear space, and (255, 128, 0) in most color pickers (Photoshop, MS Paint, or #ff8000 on a web page):
gamma error.png


  • RGB colors: If you have 8-bit colors given these are usually in sRGB, they need to be converted to linear space for Octane.
    • Versions prior to 1.17: If you get a hex value (like ff0807) you can paste it into the hex input at the bottom. Otherwise you may have to convert it to [0-1] range and use the sliders just above the hex input. In preferences » Application make sure the color picker space is set to sRGB. The sliders in the node inspector are linear, only use those if you know the RGB values are in linear space.
    • In version 1.17 and newer you can paste either the hex value (ff0807) or the decimal numbers (255 8 7) into the HEX field. These will then be converted to linear space, independent of the color picker space preference.
  • If you use an integrated plugin it may let you pick a color in screen space, and then feed these RGB values directly into octane. This will give a wrong (lighter and less saturated) color in the renderer. You may be able to enable linear workflow in the application to correct this problem.
  • Images are always encoded for a certain display gamma. You need to set the gamma slider of images to this value.

    • For most low dynamic range images (PNG, JPG, etc.) this is 2.2.
    • For most alpha images this is 1.0.
    • HDR images typically have linear encoding → 1.0.

    If you have a known gamma value less than 1.0, this is the encoder gamma, which is the inverse of the display gamma.
  • RGB colors in exported MTL files may or may not be specified in linear space. Some apps export linear values, others don't. Octane currently assumes the values are linear, which may cause wrong colors to be imported into Octane. Future versions may introduce a setting in the import preferences to correct this.

Getting the rendered image:
  • If you want a linear HDR image choose openEXR Untonemapped as format when saving.
  • To save a LDR image set the gamma slider in the tone mapping to 2.2. This is the standard value used on the web.
  • For viewing on your monitor you are currently limited to sRGB—Octane doesn't have display color management yet. The gamma slider in the tone mapping settings is the intended display gamma, which should match your screen, most commonly 2.2, although macs may use 1.8.

The film response curve doesn't have any effect if you save as untonemapped openEXR. For the other cases you may have to use different gamma values if you enable one, some film curves have gamma correction built-in.

So, what happened in our render above?

The most visible effect is that the falloff of the lighting is wrong. If you move away from a light source, the irradiance from this light source decreases with the square of the distance to the light source. If the distance from the light source doubles, the irradiance decreases by a factor 4.

Now our image is displayed on the screen, which usually applies a gamma curve with an exponent of 2.2. Suppose two points in the image have (80, 80, 80) and (20, 20, 20) as color values, a factor of four difference. Due to gamma correction this is displayed as 0.37% and 7.81% brightness. Our factor four difference according to the renderer turned into a difference of a factor 21 on the screen!

Another thing that you may note is that the green and red tints are approximately right. Here the error of feeding RGB values directly into the renderer is canceled out by the error of not correcting the rendered image before displaying it.

Some other notes:

  • This post assumes your monitor is calibrated for sRGB, and that any RGB colors are specified using the sRGB primary colors as well. Octane currently doesn't support other color spaces like Adobe RGB.
  • Photo editing applications usually don't do any corrections, but usually the errors are subtle enough to go unnoticed. Resize or blur this test pattern in Photoshop or GIMP, or just zoom the page in your browser, and see what happens. Note that the value of the solid grey patch is 186 and not 128.
    gamma test.png
    gamma test.png (375 Bytes) Viewed 108068 times

  • About comparing colors using LCD monitors: TN monitors have very narrow vertical viewing angles, in the order of a few degrees. Observe the brightness of the grey patch compared to the stripes if it you scroll it up or down. On IPS monitors the brightness of the patch is much more consistent.

More reading here: GPU Gems 3 - Chapter 24. The Importance of Being Linear

--
Roeland
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1808
Joined: Wed Mar 09, 2011 10:09 pm

Re: Linear workflow in Octane

Postby DennisK4 » Wed Jun 12, 2013 10:28 am

DennisK4 Wed Jun 12, 2013 10:28 am
Thanks a lot for this
Win 7 x64 | 2 x GTX580 3GB | i7-2600K 3.4GHz | 16GB | Cinema 4D R14 | Nvidia 320.18
DennisK4
Licensed Customer
Licensed Customer
 
Posts: 26
Joined: Sun Aug 21, 2011 10:46 am

Re: Linear workflow in Octane

Postby gordonrobb » Wed Jun 12, 2013 11:07 am

gordonrobb Wed Jun 12, 2013 11:07 am
Can I just clarify something then..

For an image map that has been painted by me in my PC in, for example Photoshop, and saved as a JPG or a PNG. Assuming it looks the way I want it to when I view the actual texture in Photoshop, I should set the gamma on the texture node to 2.2.

When I'm inputting a colour into a node, I need to do this, pasting the hex value thing, rather than relying on what it looks like in the picker?
Windows 8 Pro | i7 3770 OC | 32 GB Ram | Single Titan (plus Black Edition on Order) | Octane Lightwave |
gordonrobb
Licensed Customer
Licensed Customer
 
Posts: 1247
Joined: Sat Mar 16, 2013 9:08 am

Re: Linear workflow in Octane

Postby roeland » Thu Jun 13, 2013 3:02 am

roeland Thu Jun 13, 2013 3:02 am
It is a bit more tricky. In Photoshop you can assign arbitrary color profiles to your image. Octane doesn't support reading color profiles and will always interpret the colors in sRGB (you can only override the gamma value). The save for web option always saves the image as sRGB.

The color shown in the color picker is correct, but using the hex value may be quicker if you can copy it from another application.

--
Roeland
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1808
Joined: Wed Mar 09, 2011 10:09 pm

Re: Linear workflow in Octane

Postby gordonrobb » Thu Jun 13, 2013 10:03 am

gordonrobb Thu Jun 13, 2013 10:03 am
OK, now I'm even more confused. :)

Take this ship....

Bell1.jpg


If I have all of the textures for this ship saved in as low a format as possilbe while reataining the detail. Think they are a mixture of 8 bit png and Index Colour limited to 256. When I look at them in PS (which I don't think I have set to use colour profiles but should I use sRGB for example), or on the web, or in preview from right clicking on them, they are as I want them to look. How do I then use them in Octane so that it is applying them to my model the way it should. I am just making them 2.2 gama for colour ones, and 1.0 for black and white (for spec, and bump etc).

Is that the right thing to do?

I then adjust either the gamma on the imager, or use one of the colour profiles, to get the output to look the way I want it to.
Windows 8 Pro | i7 3770 OC | 32 GB Ram | Single Titan (plus Black Edition on Order) | Octane Lightwave |
gordonrobb
Licensed Customer
Licensed Customer
 
Posts: 1247
Joined: Sat Mar 16, 2013 9:08 am

Re: Linear workflow in Octane

Postby roeland » Fri Jun 14, 2013 8:04 am

roeland Fri Jun 14, 2013 8:04 am
For the color maps this is probably right. I am not sure about the bump and specular maps, it really depends on the program that created those maps.

--
Roeland
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1808
Joined: Wed Mar 09, 2011 10:09 pm

Re: Linear workflow in Octane

Postby mbetke » Fri Jun 14, 2013 8:17 am

mbetke Fri Jun 14, 2013 8:17 am
Really tricky topic. I use 3dsmax 2014 and it has a gamme estimator built in while loading bitmaps.

Since a few months I use Gamma 2.2 in Tonemapper and set camera to linear. I adjust with ISO and so on to just make it look good. This gives me better raw rendered images with less saturated hotspots.
In Photoshop I apply the look I want. Don't know if its the way to work but for me the images look more natural.
I think in 3dsmax itself I also set the gamma to 2.2 if I remember right.
PURE3D Visualisierungen
Sys: Intel Core i9-12900K, 128GB RAM, 2x 4090 RTX, Windows 11 Pro x64, 3ds Max 2024.2
User avatar
mbetke
Licensed Customer
Licensed Customer
 
Posts: 1284
Joined: Fri Jun 04, 2010 9:12 am
Location: Germany

Re: Linear workflow in Octane

Postby Dionisio » Wed Nov 26, 2014 4:40 pm

Dionisio Wed Nov 26, 2014 4:40 pm
Hi guys, just a a couple of questions:

- Why all the color values in 3ds Max use the traditional 0-255 method and not the linear one?!?
- Which is the correct Gamma workflow to use in 3ds Max + Octane plugin? I use the Gamma value in camera settings to 2.2 but the image looks too washed out.

Thanks in advance,

Dionisio -
Dionisio
Licensed Customer
Licensed Customer
 
Posts: 16
Joined: Sat Jan 30, 2010 10:13 pm
Location: Italy

Re: Linear workflow in Octane

Postby J.C » Tue Apr 30, 2019 8:44 am

J.C Tue Apr 30, 2019 8:44 am
roeland wrote:... The gamma slider in the tone mapping settings is the intended display gamma, which should match your screen, most commonly 2.2, although macs may use 1.8.[/list]


Current Apple OS X systems also use gamma 2.2. It's been used since 10.6 version of their operating system.
CPU – i9 13900KF, 128GB RAM, GPU – RTX 4090
System – Windows 11
My Behance portfolio, Blender plugin FB support group
J.C
Licensed Customer
Licensed Customer
 
Posts: 1712
Joined: Thu May 13, 2010 6:35 pm
Location: Wrocław

Re: Linear workflow in Octane

Postby franchais » Wed Oct 23, 2019 4:01 am

franchais Wed Oct 23, 2019 4:01 am
Thanks for the tips, but are you able to do a video of this process? still having a hard time understanding the complete workflow.
I7 2600k | EVGA gtx 680 FTW 4gb | Win 7 x64 | 16gb RAM
franchais
Licensed Customer
Licensed Customer
 
Posts: 104
Joined: Fri Mar 02, 2012 2:44 pm
Next

Return to Resources and Sharing


Who is online

Users browsing this forum: No registered users and 4 guests

Tue Mar 19, 2024 6:00 am [ UTC ]