Re: Context/per-shot grades
Jeremy Selan <jeremy...@...>
Unfortunately we dont have support yet for environment-driven
toggle quoted message
Show quoted text
numerical parameters. It's something I'd like to add eventually, but there are few hotter API issues I need to tackle first. To summarize the current system... You can reference any envvars in the specification of FilmTransform's src parameter, either using relative or absolute paths: Examples: * <FileTransform>: {src: grade_$SHOT.spi1d} * !<FileTransform>: {src: /shots/$SHOW/$SHOT/grade.spi3d} Relative paths are resolved using the config.getSearchPath, which a colon-delimited list of directory names. These directory are relative or absolute (relative dirs being relative to the config's local 'working' dir), and both can also contain envvars. The OCIO::Context is an implementation detail. Unless your application will want to switch the values during runtime, you dont have to worry about using the Context class. (When your application is launched, the environment will be obeyed). So in the meantime you'll need to write out your color correction to a fileformat that OCIO obeys. Note that this doesnt have to be a baked lut though. If your color correction can be represented in the language of an ASC 'primary grade', I'd recommend just saving out the ASC xml ColorCorrection element to its own file, and give it a .cc extension. Or, you could put these all in a single .ccc and specify which element to load using the envvars. This functionality isnt in the master branch yet, I'll try to roll these into the master branch very soon if you'd like it. Example .cc file: (Note that the asc does not specify a way to store a single color-correction alone in it's own file, they only define a collection of transforms. So i've stolen their xml syntax, put it as the root of a document, and labelled it 'cc'). <ColorCorrection id="di_look"> <SOPNode> <Description> Created by jeremys at 2011-01-03 05:45pm </Description> <Slope> 1.000000 1.000000 1.000000 </Slope> <Offset> 0.000000 0.000000 0.000000 </Offset> <Power> 1.095000 1.130000 1.385000 </Power> </SOPNode> <SatNode> <Saturation> 1.000000 </Saturation> </SatNode> </ColorCorrection> -- Jeremy On Sun, Jan 16, 2011 at 6:13 AM, dbr/Ben <b...@...> wrote:
If I understand correctly, the Context allows you to set a search path including env-variables (e.g $SEQ/$SHOT), so you can define a FileTransform, and it'll look in the shot's directory before the "default" directory? (just figured this out after writing the remainder of this email, so it might right slightly oddly..) |
|