New shader, threading, and critical section APIs.
ParallelFor API: A new AiParallelFor function allows API users to easily implement multithreading of work over an array without having to use a dedicated multi-threading library such as TBB. (ARNOLD-14966)
// simple example that squares all the elements in an array
void square(size_t array_index, void* data, void* payload)
{
float& value = *static_cast<float*>(data);
value = value * value;
}
std::array<float, 7> values = {1, 2, 3, 5, 8, 13, 21};
AiParallelFor(values.data(), sizeof(values[0]), values.size(), nullptr, square);
ParallelJobs API: A new AtParallelJobs class allows programs to run jobs in parallel through a parallel job scheduler. This has more overhead than AiParallelFor(), but is more flexible as it allows for dispatching jobs without needing to place all the jobs in an array. (ARNOLD-15091)
AtParallelJobs jobs;
for (size_t i = 0; i < job_count; ++i)
{
payload = create_your_payload_data();
jobs.add(payload, &callback);
}
jobs.wait();
OpenVDB preview in AiProceduralViewport: The procedural viewport preview API can now return a boundary mesh for a volume when called on a procedural containing OpenVDB volumes nodes. This is useful to render a preview of a procedural with volumes in a DCC viewport. (ARNOLD-14382)
![]() |
Shader API: A new function to query whether an object is opaque or not. (ARNOLD-4919)
const char *enum_myparam[] = { "2d_space", "3d_space", NULL };
AiParameterEnum("myparam", 0, enum_myparam);
Critical Section API: Added compile guards around native_handle() references in ai_critsec.h because it no longer exists in the STL shipped with Visual Studio v17.8+ (MSVC v14.38+). (ARNOLD-14779)
Node API: Added new API to declare an update dependency between two nodes (a dependency is when a node uses data from another node during its update). (ARNOLD-15211)
AI_API void AiNodeAddDependency(AtNode* node, const AtNode* dependency);
7.3.3.0
24 July 2024