Rendering per-shot grades with ocioconvert


Blake Sloan <bsl...@...>
 

Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented. 

Nag, nag nag.

Thanks again, 

-blake

--
--transcribed from fMRI data using Google Thought Engine


dbr/Ben <dbr....@...>
 

It would be easy to add an "ocioconvert --look blah" argument. Made a ticket for that:


I think ocioconvert is mainly intended as an example of how to use the OCIO API (as is ociodisplay), and facilities would tend to have their own comperable tool.. so it's not necessarily updated with new features (unless they are requested, as you have done!)

That is also one of the reasons there's quite so little documentation on it (along with the usual reasons for lack of documentation!). Ticket for that:


As for a workaround, you could define a colorspace which applies your look, something like:

colorspaces:
  - !<ColorSpace>
    name: lookworkaround
    to_reference: !<GroupTransform>
      children:
        - !<LookTransform> {src: lnf, dst: lnf, looks: "maingradelook,secondlook"}
        - !<FileTransform> {src: blah.spi3d, interpolation: linear}
        - !<ColorSpaceTransform> {src: lnf, dst: lg10}

Then do:
$ ocioconvert in.exr lnf out.exr lookworkaround

(haven't tested the above ColorSpace, and it's been months since I've written a config, but that should give you the general idea..)


On 05/12/2012, at 9:29 AM, Blake Sloan wrote:

Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented. 

Nag, nag nag.

Thanks again, 

-blake

--
--transcribed from fMRI data using Google Thought Engine

--
 
 


Brendan Bolles <bre...@...>
 

On Dec 4, 2012, at 2:59 PM, Blake Sloan wrote:

Is it possible to apply a look as well? Would that require adding a colorspace to ocio.config? Or is it even possible?

If you look at the spi-vfx configuration, the srgb8 and p3dci8 color spaces incorporate a film look using a 3D LUT. That's why you can use them as an output space but not an input space (the 3D LUT can't be inverted). To do different 3D LUTs for different shots with the software as it currently is, you could create a whole bunch of output color spaces (srgb8-shot1, srgb8-shot2, etc.) as Ben is suggesting.

OCIO has the ability to add a separate "looks" parameter via DisplayTransform.setLooksOverride() and other mechanisms, but none of the current software is using it and none of the sample configs have looks. I'm kind of surprised by that actually - does Sony not use per-shot color corrections and looks?


Brendan


bsloan <bsl...@...>
 

Thanks all. Yes, I was able to get the desired result by add a colorspace to the config that applies the grade and the display LUT.

We're trying ocioconvert as a way to make LUT-baked jpeg proxies of EDR renders. Nuke, burdened with our facility customizations is too slow to launch per-frame and rvio is too expensive. For a shop that has an OCIO config dir and per-shot grades for every show, ocioconvert looks more like a free, off-the-shelf tool than an API tutorial.

:)



On Tuesday, December 4, 2012 2:59:08 PM UTC-8, bsloan wrote:
Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented. 

Nag, nag nag.

Thanks again, 

-blake

--
--transcribed from fMRI data using Google Thought Engine


bsloan <bsl...@...>
 

*Adding*


On Tuesday, December 4, 2012 2:59:08 PM UTC-8, bsloan wrote:
Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented. 

Nag, nag nag.

Thanks again, 

-blake

--
--transcribed from fMRI data using Google Thought Engine


Jeremy Selan <jeremy...@...>
 

i'd recommend also looking at oiio-tool (part of openimageio) as a
command-line image utility.

ocioconvert is super bare bones, and i'm actually consider moving into
the oiio project itself. (I dont like how oiio depends on ocio, but
the ocio utils depend on ocio. we can break this circular dependency
by moving ocio utilities that need oiio into oiio itself).

-- Jeremy

On Wed, Dec 5, 2012 at 2:55 PM, bsloan <bsl...@gmail.com> wrote:
*Adding*


On Tuesday, December 4, 2012 2:59:08 PM UTC-8, bsloan wrote:

Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current
ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a
colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented.

Nag, nag nag.

Thanks again,

-blake

--
--transcribed from fMRI data using Google Thought Engine
--


bsloan <bsl...@...>
 

This is veering from the original thread a bit but for various reasons, oiiotool seems not to be able to do the proper combination of things that we require.

Our own Andrew Wood has made what he describes as a 20 line modification to ocioconvert that does the trick (by snarfing some DNA from oiiotool). I've added the help text below to give an idea of the added functionality.

What is your feeling about rolling this change into the next iteration of OCIO? We can provide the modified source file (or create a fork in GIT). Your answer will influence our decision whether to fork and rename ocioconvert as a new internal tool or to continue to regard it as a 3rd party tool.

Once again, big acknowledgement to the community of OCIO developers (and Jeremy). Sincere thanks.

these are the new options:

    --croptofull           name=Crop or pad to make pixel data region match the "full" region
    --keepchannels %d      name=keep first n channels

here's the new full help:
OpenImageIO options
    --float-attribute %L   name=float pair defining OIIO float attribute
    --int-attribute %L     name=int pair defining OIIO int attribute
    --string-attribute %L  name=string pair defining OIIO string attribute
    --croptofull           name=Crop or pad to make pixel data region match the "full" region
    --keepchannels %d      name=keep first n channels


On Tuesday, December 4, 2012 2:59:08 PM UTC-8, bsloan wrote:
Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented. 

Nag, nag nag.

Thanks again, 

-blake

--
--transcribed from fMRI data using Google Thought Engine


Jeremy Selan <jeremy...@...>
 

I'm happy to roll your changes into public ocioconvert.

My only concern would be to confirm the new additions do not modify
any prior existing behaviors. (There are other facilities who have
rolled out pipelines based on ocioconvert, and I'd like to make it
compatible if possible).

This should be easy to confirm; by all means submit a pull request.

-- Jeremy

On Wed, Dec 12, 2012 at 10:43 AM, bsloan <bsl...@gmail.com> wrote:
This is veering from the original thread a bit but for various reasons,
oiiotool seems not to be able to do the proper combination of things that we
require.

Our own Andrew Wood has made what he describes as a 20 line modification to
ocioconvert that does the trick (by snarfing some DNA from oiiotool). I've
added the help text below to give an idea of the added functionality.

What is your feeling about rolling this change into the next iteration of
OCIO? We can provide the modified source file (or create a fork in GIT).
Your answer will influence our decision whether to fork and rename
ocioconvert as a new internal tool or to continue to regard it as a 3rd
party tool.

Once again, big acknowledgement to the community of OCIO developers (and
Jeremy). Sincere thanks.

these are the new options:

--croptofull name=Crop or pad to make pixel data region match
the "full" region
--keepchannels %d name=keep first n channels

here's the new full help:
OpenImageIO options
--float-attribute %L name=float pair defining OIIO float attribute
--int-attribute %L name=int pair defining OIIO int attribute
--string-attribute %L name=string pair defining OIIO string attribute
--croptofull name=Crop or pad to make pixel data region match
the "full" region
--keepchannels %d name=keep first n channels


On Tuesday, December 4, 2012 2:59:08 PM UTC-8, bsloan wrote:

Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current
ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a
colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented.

Nag, nag nag.

Thanks again,

-blake

--
--transcribed from fMRI data using Google Thought Engine
--


Larry Gritz <l...@...>
 

I'd appreciate a list of specifically which things are lacking in oiiotool to make this practical.

-- lg


On Dec 12, 2012, at 10:43 AM, bsloan wrote:

This is veering from the original thread a bit but for various reasons, oiiotool seems not to be able to do the proper combination of things that we require.

Our own Andrew Wood has made what he describes as a 20 line modification to ocioconvert that does the trick (by snarfing some DNA from oiiotool). I've added the help text below to give an idea of the added functionality.

What is your feeling about rolling this change into the next iteration of OCIO? We can provide the modified source file (or create a fork in GIT). Your answer will influence our decision whether to fork and rename ocioconvert as a new internal tool or to continue to regard it as a 3rd party tool.

Once again, big acknowledgement to the community of OCIO developers (and Jeremy). Sincere thanks.

these are the new options:

    --croptofull           name=Crop or pad to make pixel data region match the "full" region
    --keepchannels %d      name=keep first n channels

here's the new full help:
OpenImageIO options
    --float-attribute %L   name=float pair defining OIIO float attribute
    --int-attribute %L     name=int pair defining OIIO int attribute
    --string-attribute %L  name=string pair defining OIIO string attribute
    --croptofull           name=Crop or pad to make pixel data region match the "full" region
    --keepchannels %d      name=keep first n channels


On Tuesday, December 4, 2012 2:59:08 PM UTC-8, bsloan wrote:
Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented. 

Nag, nag nag.

Thanks again, 

-blake

--
--transcribed from fMRI data using Google Thought Engine

--
 
 

--
Larry Gritz
l...@...



Larry Gritz <l...@...>
 

Sorry for the delay -- when people who are not subscribers post to oiio-dev (or when subscribers post from a different mail account), it awaits moderator approval.  Sometimes there are delays either in delivering the approval alert, or in my ability to go to the web site and approve the message (though unless I'm traveling, it's rare that it gets delayed more than several hours).

I posted a follow-up to oiio-dev, but the bottom line is that -- at least according to your oiio-dev post -- you were specifying the arguments to oiiotool in the wrong order, attempting to write the output *before* stripping it down to 3 channels, which quite correctly complained that it wasn't allowed to write a 5-channel file to JPEG format.

-- lg


On Dec 12, 2012, at 11:52 AM, andre...@... wrote:

Hey Larry (nice to meet you!),

I sent something to oiio-dev this morning, it's waiting for moderator approval.  Is this the correct way to ask questions/submit bugs?


(the response I got was)
Your mail to 'Oiio-dev' with the subject
    oiiotool --ch problems
Is being held until the list moderator can review it for approval.
The reason it is being held:
    Post by non-member to a members-only list



I'll submit a pull request shortly.  The code is backwards compatible and fairly harmless, so might not hurt to have anyway.


On Wednesday, December 12, 2012 11:29:21 AM UTC-8, Larry Gritz wrote:
I'd appreciate a list of specifically which things are lacking in oiiotool to make this practical.

-- lg


On Dec 12, 2012, at 10:43 AM, bsloan wrote:

This is veering from the original thread a bit but for various reasons, oiiotool seems not to be able to do the proper combination of things that we require.

Our own Andrew Wood has made what he describes as a 20 line modification to ocioconvert that does the trick (by snarfing some DNA from oiiotool). I've added the help text below to give an idea of the added functionality.

What is your feeling about rolling this change into the next iteration of OCIO? We can provide the modified source file (or create a fork in GIT). Your answer will influence our decision whether to fork and rename ocioconvert as a new internal tool or to continue to regard it as a 3rd party tool.

Once again, big acknowledgement to the community of OCIO developers (and Jeremy). Sincere thanks.

these are the new options:

    --croptofull           name=Crop or pad to make pixel data region match the "full" region
    --keepchannels %d      name=keep first n channels

here's the new full help:
OpenImageIO options
    --float-attribute %L   name=float pair defining OIIO float attribute
    --int-attribute %L     name=int pair defining OIIO int attribute
    --string-attribute %L  name=string pair defining OIIO string attribute
    --croptofull           name=Crop or pad to make pixel data region match the "full" region
    --keepchannels %d      name=keep first n channels


On Tuesday, December 4, 2012 2:59:08 PM UTC-8, bsloan wrote:
Apologies if this is a repeat question:

Ocioconvert takes an input and output colorspace from the current ocio.config and applies a transform to an input image.

Is it possible to apply a look as well? Would that require adding a colorspace to ocio.config? Or is it even possible?

Also, ocioconvert in ocio 1.0.7 appears to be not very well documented. 

Nag, nag nag.

Thanks again, 

-blake

--
--transcribed from fMRI data using Google Thought Engine

--
 
 

--
Larry Gritz
l....@...



--
 
 

--
Larry Gritz
l...@...