You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add options to the ImageWriter node for use when writing tx files.
User story
Recently at IE we've run into a couple of cases where we've wanted to write tx files but the default behaviour of the Image Writer doesn't produce what we want, so we subprocess a call to oiiomaketx ourselves. It would be useful to have some flags exposed on the ImageWriter in the same way that options appear when writing exrs.
What
The flags we tend to use are:
--format FILEFORMAT Specify output file format (default: guess from extension)
-u Update mode
--nchannels N Specify the number of output image channels.
-d TYPE Set the output data format to one of: uint8, sint8, uint16, sint16, half, float
--wrap WRAP Specify wrap mode (black, clamp, periodic, mirror)
--colorconvert IN OUT Apply a color space conversion to the image.
--resize Resize textures to power of 2 (default: no)
--fixnan STRATEGY Attempt to fix NaN/Inf values in the image (options: none, black, box3)
--constant-color-detect Create 1-tile textures from constant color inputs
--monochrome-detect Create 1-channel textures from monochrome inputs
--opaque-detect Drop alpha channel that is always 1.0
--oiio Use OIIO-optimized settings for tile size, planarconfig, metadata.
with format being the most important.
Why
We want to be able to specify the format of the tx file in specific situations.
The text was updated successfully, but these errors were encountered:
I think there is a big enough difference in internal implementation that this might be better implemented as a separate TextureWriter node than as additional complexity in the ImageWriter node. If it were presented that way, would that cause any problems for your intended usage?
I suspect the most expedient implementation might also be to use an internal network with an ImageWriter/SystemCommand/LocalDispatcher combo rather than write more C++. So not all that far from what you're currently doing - just wrapped up nicely with a UI.
The other thing that occurs to me is that it might also be nice to provide a node which can create textures for files which already exist on disk - then you could use Gaffer to do batch texture conversion with any supported Dispatcher. If we had that, then the TextureWriter could use that internally.
A TextureWriter node would certainly do the trick, there's no specific need for it to be an ImageWriter update. Thanks for the info! We can add this in IEGafferExtensions, as I imagine it's not the highest priority for you all.
Summary
Add options to the ImageWriter node for use when writing
tx
files.User story
Recently at IE we've run into a couple of cases where we've wanted to write tx files but the default behaviour of the Image Writer doesn't produce what we want, so we subprocess a call to
oiiomaketx
ourselves. It would be useful to have some flags exposed on theImageWriter
in the same way that options appear when writing exrs.What
The flags we tend to use are:
with
format
being the most important.Why
We want to be able to specify the format of the tx file in specific situations.
The text was updated successfully, but these errors were encountered: