34#define AI_WRAP_PERIODIC 0
35#define AI_WRAP_BLACK 1
36#define AI_WRAP_CLAMP 2
37#define AI_WRAP_MIRROR 3
47#define AI_TEXTURE_CLOSEST 0
48#define AI_TEXTURE_BILINEAR 1
49#define AI_TEXTURE_BICUBIC 2
50#define AI_TEXTURE_SMART_BICUBIC 3
59#define AI_TEXTURE_MIPMODE_DEFAULT 0
60#define AI_TEXTURE_MIPMODE_NONE 1
61#define AI_TEXTURE_MIPMODE_ONE 2
62#define AI_TEXTURE_MIPMODE_TRILINEAR 3
63#define AI_TEXTURE_MIPMODE_ANISOTROPIC 4
130AI_API
bool AiTextureLoad(
const AtString filename,
const bool use_float,
const unsigned int miplevel,
void* image);
142AI_API
bool AiReadImage(
const char* filename,
const uint8_t format,
AtImage& image, AtParamValueMap* params =
nullptr);
143AI_API
bool AiWriteImage(
const char* filename,
const AtImage& image, AtParamValueMap* params =
nullptr);
145inline AI_DEPRECATED
bool AiLoadImage(
const char* filename,
const uint8_t format,
AtImage& image)
147 return AiReadImage(filename, format, image,
nullptr);
153enum AtMakeTxStatus { AiTxPending, AiTxError, AiTxUpdated, AiTxUpdate_unneeded, AiTxAborted };
155AI_API
void AiMakeTx(
const char* filename,
const char* flags,
const AtUniverse* universe = NULL);
Memory allocation routines.
DLL export prefix for API functions (necessary for multi-platform development)
Color types and utilities.
Shader globals struct, methods and macros.
Arnold String allows for fast string comparisons.
Definition: ai_string.h:46
AI_API void AiFree(void *addr)
Arnold free() wrapper.
Definition: ai_memory.cpp:109
int channels
number of channels per pixel
Definition: ai_texture.h:115
int8_t mipmap_bias
mipmap level bias
Definition: ai_texture.h:73
bool flip_s
flip S coordinate
Definition: ai_texture.h:76
uint8_t format
data type of pixels AI_TYPE_(BYTE, USHORT, HALF, UINT, FLOAT)
Definition: ai_texture.h:116
int full_width
width of the full display window in pixels
Definition: ai_texture.h:111
AI_API bool AiTextureGetNumChannels(const char *filename, unsigned int *num_channels)
Query the number of channels in the specified image.
Definition: ai_texture.cpp:475
float scale_t
scale T coordinate
Definition: ai_texture.h:80
AI_API bool AiWriteImage(const char *filename, const AtImage &image, AtParamValueMap *params=nullptr)
Write the image in image out to the file specified by filename.
Definition: ai_texture.cpp:1427
AI_API bool AiResizeImage(const AtImage &inImage, AtImage &outImage, AtParamValueMap *params=nullptr)
Resize the image in inImage into outImage , overwrites the buffer of outImage.
Definition: ai_texture.cpp:1464
AI_API void AiMakeTxAbort(AtMakeTxStatus *&statuses, const char **&source_files, unsigned int &num_submitted_textures)
Abort pending maketx jobs.
Definition: ai_maketx.cpp:189
AI_API bool AiReadImage(const char *filename, const uint8_t format, AtImage &image, AtParamValueMap *params=nullptr)
Read in the image at filename into image .
Definition: ai_texture.cpp:1372
float width_t
multiplicative widening of look-ups on the T axis
Definition: ai_texture.h:82
AI_API AtTextureHandle * AiTextureHandleCreate(const char *filename, AtString color_space=AtString())
Create a handle for a given texture filename.
Definition: ai_texture.cpp:701
uint8_t wrap_s
wrap mode for S coordinate
Definition: ai_texture.h:70
bool flip_t
flip T coordinate
Definition: ai_texture.h:77
float scale_s
scale S coordinate
Definition: ai_texture.h:79
AI_API AtRGBA AiTextureHandleAccess(const AtShaderGlobals *sg, AtTextureHandle *handle, const AtTextureParams ¶ms, bool *success=NULL)
Perform a texture look-up through a handle.
Definition: ai_texture.cpp:764
AI_API void AiTextureHandleDestroy(AtTextureHandle *handle)
Destroy an existing texture handle and its associated resources.
Definition: ai_texture.cpp:711
AI_API void AiMakeTx(const char *filename, const char *flags, const AtUniverse *universe=NULL)
Asynchronously runs a maketx job in the background.
Definition: ai_maketx.cpp:35
AI_API bool AiTextureGetMatrices(const char *filename, AtMatrix &world_to_screen, AtMatrix &world_to_camera)
Query the matrices associated with the specified texture.
Definition: ai_texture.cpp:628
void * buffer
pixel values
Definition: ai_texture.h:108
AI_API void AiTextureInvalidate(const char *filename)
Invalidate a specific texture from the cache.
Definition: ai_texture.cpp:1029
bool swap_st
enable swapping of S and T coordinates
Definition: ai_texture.h:78
uint8_t start_channel
starting channel index to read from
Definition: ai_texture.h:72
AI_API bool AiTextureGetBitDepth(const char *filename, unsigned int *bit_depth)
Query the bit depth of the specified image.
Definition: ai_texture.cpp:583
bool single_channel
treat image as single channel
Definition: ai_texture.h:75
float fill
value for nonexistent channels (e.g.
Definition: ai_texture.h:68
AI_API void AiTextureParamsSetDefaults(AtTextureParams ¶ms)
Initialize an AtTextureParams object with default values.
Definition: ai_texture.cpp:252
AI_API AtString AiTextureGetTxFileName(const char *filename, AtString texture_color_space, AtString render_color_space, const AtUniverse *universe)
Return the name of the TX filename that would be generated from the source texture by auto TX.
Definition: ai_texture.cpp:1071
uint8_t mipmap_mode
mode for mipmap blending and filtering
Definition: ai_texture.h:74
AtMakeTxStatus
Status of AiMakeTx jobs.
Definition: ai_texture.h:153
uint8_t wrap_t
wrap mode for T coordinate
Definition: ai_texture.h:71
int x
origin (upper left corner) of pixel data
Definition: ai_texture.h:113
AI_API AtString AiTextureAutoTxFlags(const char *texture_file, AtString texture_color_space, const AtUniverse *universe)
Return the flags passed to the "maketx" command during auto TX generation.
Definition: ai_texture.cpp:1101
float blur_s
additive blur in look-ups along the S axis
Definition: ai_texture.h:83
AtArray * aov_names
AtArray of AtStrings of aov names
Definition: ai_texture.h:117
AI_API bool AiTextureGetFormat(const char *filename, unsigned int *format)
Query the format of the specified image.
Definition: ai_texture.cpp:543
int y
origin (upper left corner) of pixel data
Definition: ai_texture.h:114
int width
width of the image in pixels
Definition: ai_texture.h:109
AI_API bool AiTextureLoad(const AtString filename, const bool use_float, const unsigned int miplevel, void *image)
This is currently an EXPERIMENTAL function and might be modified in future Arnold releases.
Definition: ai_texture.cpp:388
AI_API bool AiTextureGetResolution(const char *filename, unsigned int *width, unsigned int *height)
Query resolution info about a texture.
Definition: ai_texture.cpp:440
AI_API unsigned AiMakeTxWaitJob(AtMakeTxStatus *&statuses, const char **&source_files, unsigned int &num_submitted_textures)
This function will block until at least one job has been finished.
Definition: ai_maketx.cpp:139
float width_s
multiplicative widening of look-ups on the S axis
Definition: ai_texture.h:81
AI_API AtRGBA AiTextureAccess(const AtShaderGlobals *sg, AtString filename, AtString color_space, const AtTextureParams ¶ms, bool *success=NULL)
Perform a texture look-up through a filename string.
Definition: ai_texture.cpp:347
float blur_t
additive blur in look-ups along the T axis
Definition: ai_texture.h:84
AI_API AI_PURE const char * AiTextureGetChannelName(const char *filename, unsigned int channel_index)
Query the name of a channel in the specified image.
Definition: ai_texture.cpp:507
int full_height
height of the full display window in pixels
Definition: ai_texture.h:112
uint8_t filter
texture look-up mode
Definition: ai_texture.h:69
int height
height of the image in pixels
Definition: ai_texture.h:110
Structure that holds infromation for reading, writing and resizing images.
Definition: ai_texture.h:107
Definition: ai_matrix.h:30
RGB color + alpha.
Definition: ai_color.h:267
Shader globals data structure.
Definition: ai_shaderglobals.h:45
Structure that holds a handle for a given texture.
Structure that holds all of the available texture map look-up options.
Definition: ai_texture.h:67
This represents a universe in Arnold.