CGTalk > Software > Autodesk Maya
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 04-09-2013, 01:21 PM   #1
APerez
New Member
portfolio
antoine perez
North London, United Kingdom
 
Join Date: Mar 2007
Posts: 27
Custom LUT lens shader

Hey,

I'm trying to bake a LUT at render time, before the image is written. My goal is to compress the dynamic range in a defined and invertible way, as well as packing the bits in an efficient format. The photographic exposure lens basically does that, but I would like to use an OpenColorIO LUT to ensure an accurate inversion.

I understand that this process would be destructive compared to a linear EXR render, but the goal is to avoid rendering to a floating point format.

My only option right now is to render a calibration target in maya and characterize it's photographic lens node. But I would rather just use an existing LUT.

Has anyone heard of such a node?
 
Old 04-09-2013, 02:25 PM   #2
APerez
New Member
portfolio
antoine perez
North London, United Kingdom
 
Join Date: Mar 2007
Posts: 27
Actually, a simple node to load a LUT onto a texture file would be of great help. For example it would allow linearisation of matte-paintings and photographic backplates in maya.

Does it exist?
 
Old 04-09-2013, 03:57 PM   #3
cgbeige
Expert
 
cgbeige's Avatar
portfolio
Dave Girard
Opinions are mine. You can't have them.
San_Francisrococo, USA
 
Join Date: Jul 2005
Posts: 7,002
I use a shell script for Nuke to bake out a bunch of LUT options for images. That's the only way I could see this working - if you did a post-render command to get the result. Rendering with all baked LUT images probably won't give you the desired result
 
Old 04-09-2013, 04:32 PM   #4
onetime
Frequenter
 
Join Date: Oct 2004
Posts: 188
I don't know how related this is, but we've been wanting the ability to use textures with an embedded AdobeRGB color profile in them and have them render without crunching them to sRGB. Some of our stuff is very color sensitive and if a product texture goes through our pipeline as AdobeRGB, it comes out the other end muddled and desaturated, depending on the hue and value. Reds are usually washed out. We have to convert them to an sRGB profile first in order for our render output to match, but there's a concern that doing so will bite us in the ass later on. I mention this because we were considering trying to use a custom LUT on the texture node, but it seems a bit over my head. Maybe somebody can suggest a better workflow.
 
Old 04-09-2013, 04:37 PM   #5
APerez
New Member
portfolio
antoine perez
North London, United Kingdom
 
Join Date: Mar 2007
Posts: 27
Hey,
Thanks for the reply.

Quote:
if you did a post-render command to get the result.

Post-processing the images is feasible, but I was hoping to make it simpler

Quote:
Rendering with all baked LUT images probably won't give you the desired result

I'm not sure of what you mean, maybe that the LUTs won't behave as expected?
I don't even know how to get a LUT in maya's calculations really.. (except the renderview)
 
Old 04-09-2013, 04:50 PM   #6
APerez
New Member
portfolio
antoine perez
North London, United Kingdom
 
Join Date: Mar 2007
Posts: 27
Quote:
Originally Posted by onetime
I don't know how related this is, but we've been wanting the ability to use textures with an embedded AdobeRGB color profile in them and have them render without crunching them to sRGB. Some of our stuff is very color sensitive and if a product texture goes through our pipeline as AdobeRGB, it comes out the other end muddled and desaturated, depending on the hue and value. Reds are usually washed out. We have to convert them to an sRGB profile first in order for our render output to match, but there's a concern that doing so will bite us in the ass later on. I mention this because we were considering trying to use a custom LUT on the texture node, but it seems a bit over my head. Maybe somebody can suggest a better workflow.


If you are solely using adobeRGB textures in your render, wouldn't you just need to re-interpret (not converting!) the rendered images with an adobeRGB color profile? A problem arises if you are using sRGB textures as well, you might need to convert these to adobeRGB beforehand.
 
Old 04-09-2013, 04:50 PM   #7
Bitter
Also Highly Corrosive
 
Bitter's Avatar
David Fer Real
Fixer of things
USA
 
Join Date: Apr 2003
Posts: 1,721
Colorspace internally is handled by the renderer as linear. Try and avoid having the renderer do most of your color calculations.

Basically: feed linear to the renderer and get linear out (Nuke expects linear) and VIEW with your LUT. Don't bake it or your post options get locked down.

Some renderers have ways to get in and out of certain colorspaces. I don't usually see AdobeRGB as one of those. So I would convert to linear before rendering with them.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
Old 04-09-2013, 05:32 PM   #8
APerez
New Member
portfolio
antoine perez
North London, United Kingdom
 
Join Date: Mar 2007
Posts: 27
Quote:
Originally Posted by Bitter
Colorspace internally is handled by the renderer as linear. Try and avoid having the renderer do most of your color calculations.


I appreciate that rendering to scene-linear is the industry standard for good reason. But in particular workflows, where file sizes are critical (remote work with slow internet) and where EXR functionalities are amputated (After Effects in 16bits..) It would make sense to control the output colorspace.

Being able to linearize a backplate directly into maya is a big deal as well. It can be done by pre-processing the images, but at the cost of convenience and efficiency.

but alas, I suppose if you haven't come here with a solution, I should probably give up..
Thanks for commenting, your opinion is always valued.
 
Old 04-09-2013, 05:46 PM   #9
Bitter
Also Highly Corrosive
 
Bitter's Avatar
David Fer Real
Fixer of things
USA
 
Join Date: Apr 2003
Posts: 1,721
The problem is it sounds like you want to have the renderer auto-correct for textures in a specific colorspace as well as output. Is that correct?

If that is so, then you don't have an option unless you want to implement part of the renderer in code. That's why I have the above suggestion, it's the 'best' option unless you want to make a plug-in or have a company expose/implement a way to get in and out of an arbitrary LUT automatically.

(Clarify, baking a LUT wouldn't be that hard I don't guess, but transforming the colorspace of textures is different)
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
Old 04-09-2013, 05:56 PM   #10
Bitter
Also Highly Corrosive
 
Bitter's Avatar
David Fer Real
Fixer of things
USA
 
Join Date: Apr 2003
Posts: 1,721
Honestly, rather than change the nature of the renderer, I would press Adobe to make EXRs work in After Effects better.

They did buy Iridas and have the right technology. And it would make AE more powerful.
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
Old 04-09-2013, 06:30 PM   #11
APerez
New Member
portfolio
antoine perez
North London, United Kingdom
 
Join Date: Mar 2007
Posts: 27
I'm not sure about auto-corrections. There exist basic colour correction nodes which let you edit the gamma or HSL values of whatever you plug into them. I'm looking for this kind of functionality, however the colour-correction would be a curve defined by an external 1D LUT file.

Seeing that there is no such node built into maya or mentalray, I was hoping that somebody could point me towards a third-party shader, if it exists.

As for After Effects, It's not bad when working in 32bits. Anything else won't work properly with EXRs, and that's right where I am right now :(
 
Old 04-09-2013, 07:26 PM   #12
Bitter
Also Highly Corrosive
 
Bitter's Avatar
David Fer Real
Fixer of things
USA
 
Join Date: Apr 2003
Posts: 1,721
If you know the gamma, that can be done with gamma nodes, just more work.

However, if the primaries are different etc, then a gamma isn't necessarily enough and you might get some color shift.

I don't know of a publicly available shader or renderer that would take an arbitrary LUT for transforming the textures without programming such a component yourself.

And I'm surprised AE doesn't like 16-half. 32-bit is usually so big it would bog us down. 16-half would be easier, if it supported it. :-\
__________________
My opinions are always my own...and maybe a friend's, but never my employer's.
 
Old 04-09-2013, 08:38 PM   #13
Tobbe
Frequenter
 
Tobbe's Avatar
portfolio
Torbjorn Ahman
3D Artist
Fossinn Graphics AB
Sweden
 
Join Date: Aug 2003
Posts: 296
Quote:
Originally Posted by onetime
I don't know how related this is, but we've been wanting the ability to use textures with an embedded AdobeRGB color profile in them and have them render without crunching them to sRGB. Some of our stuff is very color sensitive and if a product texture goes through our pipeline as AdobeRGB, it comes out the other end muddled and desaturated, depending on the hue and value. Reds are usually washed out. We have to convert them to an sRGB profile first in order for our render output to match, but there's a concern that doing so will bite us in the ass later on. I mention this because we were considering trying to use a custom LUT on the texture node, but it seems a bit over my head. Maybe somebody can suggest a better workflow.


Actually adobeRGB textures are perfect candidates for linear workflow:

Quote:
The inverse color component transfer function defines the conversion from color component values to radiometrically linear values. The inverse color component transfer function shall be a simple power-law function using a gamma value of 2.19921875 (2.2)


From this doc : http://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf

As APerez pointed out, if you use both adobeRGB and sRGB textures you have a problem. Assign adobeRGB to the rendered image.

It's pretty pathetic that color management is so poor in all 3d packages. A working color space should be defined and all input (textures, color swatches etc.) should rely on color profiles. These need to be linearized and feed to the renderer (which actually does not need to be color aware I think) and finally your output color space should be assigned the rendered image.
Did I miss anything? It's pretty simple really. Oh, and the 3d-package should use the monitor profile to display it all correct (in program gfx, swatches etc, render view).

Sorry for the rant...
 
Old 04-10-2013, 11:54 AM   #14
onetime
Frequenter
 
Join Date: Oct 2004
Posts: 188
I hadn't considered converting all textures to adobeRGB and then assigning the profile in post. We do use a lot of sRGB stuff, but it would obviously be better to convert them to a wider gamut, than to crunch the wider gamut stuff down to sRGB.

That being said, in my tests with adobeRGB textures, I still get a color shift where the upper red/pink values become muddy even after the render is opened and assigned an adobeRGB profile.

'A' is the diffuse texture with an adobeRGB color profile. It's what I want to match.
'B' is a render with that same texture and color profile, with adobeRGB assigned to the 32-bit exr.
'C' is the texture converted to sRGB and rendered, with adobeRGB assigned to the exr.

It's not the greatest representation, but hopefully it illustrates what I mean. If somebody wants the flower texture to perform their own tests, just say so.

Quote:
Originally Posted by Tobbe
It's pretty pathetic that color management is so poor in all 3d packages. A working color space should be defined and all input (textures, color swatches etc.) should rely on color profiles. [...]

Absolutely agreed. I just want to see 'adobeRGB' under the file node's Color Profile attribute and have Maya manage that for the render engine.
 
Old 04-10-2013, 12:42 PM   #15
Tobbe
Frequenter
 
Tobbe's Avatar
portfolio
Torbjorn Ahman
3D Artist
Fossinn Graphics AB
Sweden
 
Join Date: Aug 2003
Posts: 296
I could check it out if you don't mind. "B" should be the theoretical correct workflow. "C" is def. wrong. To make "C" work, you would have to assign sRGB and then convert to aRGB.

And you render to 32-bit linear? No color mapping/tonemapping?
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 08:49 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.