Eyeon:Script/Reference/Applications/Fuse/Classes/Image/Attributes
From VFXPedia
< Eyeon:Script | Reference | Applications | Fuse | Classes | Image
Contents |
Attributes
The following attributes can be used when creating a new Image using the Constructor function.
IMG_Like | Set the IMG_Like attribute to an already existing image to copy that images attributes to the new image. |
IMG_CopyChannels | Set this to false to create an Image with different channels than the IMG_Like Image. Use IMG_Channel to then specify the channels the new Image should contain. If no channels are specified, a 4 channel (RGBA) Image will be created. |
IMG_Width | Set the IMG_Width attribute to an integer value representing the actual width of the image in pixels. |
IMG_Height | Set the IMG_Height attribute to an integer value representing the actual height of the image in pixels. |
IMG_XScale | Set the IMG_XScale to an numeric value representing the X aspect of the image. For an NTSC D1 format image the value would be 0.9, for example. |
IMG_YScale | Set the IMG_YScale to an numeric value representing the Y aspect of the image. For an NTSC D1 format image the value would be 1.0, for example. |
IMAT_OriginalWidth | Set the IMAT_OriginalWidth to the original width of the image in pixels. When a composition is in Proxy mode, it is possible that IMG_Width and IMG_Height will differ from the IMAT_OriginalWidth and IMAT_OriginalHeight values. |
IMAT_OriginalHeight | Set the IMAT_OriginalHeight to the original height of the image in pixels. When a composition is in Proxy mode, it is possible that IMG_Width and IMG_Height will differ from the IMAT_OriginalWidth and IMAT_OriginalHeight values. |
IMG_Depth | Set the IMG_Depth attribute to match the image depth desired for the image. This will be an integer value, using the following table :
|
IMG_Quality | The IMG_Quality attribute is a boolean value which specifies whether the image is High Quality (true) or Interactive Quality (false). The IMG_Quality will be true duringa final render, or if the HiQ button in the Time Ruler of the composition is selected. It is usually set by calling the Request:IsQuick function. |
IMG_ProxyScale | The IMG_ProxyScale is an integer value representing the current Proxy scale of the image. For example if the current proxy is 2/1, then this should be set to 2. |
IMG_MotionBlurQuality | The IMG_MotionBlurQuality attribute is a boolean value which specifies whether Motion Blur is currently enabled for this image. It is usually set by calling the Request:IsNoMotionBlur function. |
IMG_Channel | Specify the channels which should be included in the image using the IMG_Channel table values. This is different from all the ones table values above. It should be specified as shown in the following example,
local imgattrs = { IMG_Document = self.Comp, { IMG_Channel = "Red", }, { IMG_Channel = "Green", }, { IMG_Channel = "Blue", }, { IMG_Channel = "Alpha", }, IMG_Width = 720, IMG_Height = 486, IMG_XScale = 0.9, IMG_YScale = 1.0, IMG_Quality = not req:IsQuick(), IMG_MotionBlurQuality = not req:IsNoMotionBlur(), } Valid channel names include :
|
Tips for Attributes (edit)
- As of Fusion 6.31, additional channels can be created using these parameters:
- BackVectorX, BackVectorY
- PositionX, PositionY, PositionZ
- DisparityX, DisparityY
- The possible values for IMG_Channel are named slightly different than the channels in ChannelOpOf or the Pixel object.
- Fusion 6.31 also adds the attribute IMG_CopyChannelsAux which, if set to false in, allows you to use IMG_Like but discard the aux channel configuration.
- If you create a temporary image, make sure not to omit IMG_Quality! It defaults to "false" which means that scaling and merging it over another image will use nearest-neighbor filtering (resulting in jagged edges). Either set it according to what the Request object returns or set it to true to always use smooth filtering even when the comp is in low quality mode.
- Alternatively, use IMG_Like to copy the attributes of an incoming image. This will match the filtering quality to that of the incoming image and the comp as a whole, giving full quality for final renders and more speed when HiQ is off.
- Take care: It's called IMAT_OriginalWidth, not IMG_OriginalWidth. If your Fuse modifies the image size, you have to set this correctly or you will experience funky results when you turn proxy mode on and off... You can also set OriginalWidth and OriginalHeight after you have created the image using img.OriginalWidth and img.OriginalHeight respectively. It's just a guide for Fusion, it doesn't change the actual size or memory usage of your image.
- The depth tags from the C++ API's Image.h are also supported for IMG_Depth:
mono | RGBA |
---|---|
IMDP_8bitInt | IMDP_32bitInt |
IMDP_16bitInt | IMDP_64bitInt |
IMDP_16bitFloat | IMDP_64bitFloat |
IMDP_32bitFloat | IMDP_128bitFloat |
- IMG_DataWindow and IMG_ValidWindow are used to define the DoD of an image. Refer to the tips section of the Image class or the clMerge and clBC example fuses for more information.
- IMG_NoData has to be set to true during a precalc request and will create an image object with all its attributes but without allocating memory for the pixel data. If you assign it the result of request:IsPreCalc() this will work for both precalc and process requests. For details, see this page.