I'm working exclusively with C++ API, no .ASS or kick or Third-party application.
I'm trying to develop a driver as showed in the arnoldpedia/SimpleDriver
First, AiDriverGetLocalData in driver_close and AiDriverDestroy in node_finish are not valid keywords anymore.
Any way, in my application I specified the following driver specification:
// assign the driver and filter to the main (beauty) AOV, // which is called "RGBA" and is of type RGBA // assign the SimpleDriver driver with the corresponding filters // and pixel types AtArray *outputs_array = AiArrayAllocate(2, 1, AI_TYPE_STRING); AiArraySetStr(outputs_array, 0, "RGBA RGBA myfilter mydriver"); AiArraySetStr(outputs_array, 1, "RGBA RGBA myfilter ptrdriver"); AiNodeSetArray(options, "outputs", outputs_array);
First the beauty output, then my SimpleDriver output.
The DLL is well loaded by Arnold, rendering did occur. However the application sent a warning:
00:00:00 60MB WARNING | [aov] driver "ptrdriver" does not support RGBA pixels
and lead to crash.
Which is consistent with the code of ptrDriver itself:
driver_supports_pixel_type { // this driver will only support pointer formats return pixel_type == AI_TYPE_POINTER || pixel_type == AI_TYPE_NODE; }
My question is: which filter and pixel type do I have to use in the following call?
AiArraySetStr(outputs_array, 1, "? ? ? ptrdriver");
Many thanks for your answers!
I think you want to see this in the resulting ass file:
my_aov POINTER somefilter ptrdriver
Thanks Stephen.
I tried:
AiArraySetStr(outputs_array, 2, "RGBA POINTER myfilter ptrdriver");
obtained:
00:00:00 60MB WARNING | [aov] type mismatch for "RGBA" (expected POINTER, found RGBA)
00:00:00 60MB WARNING | [aov] filter "myfilter" does not support POINTER inputs
which is not logical because POINTER should be for ptrdriver and RGBA should be for myfilter. It's as if the parser want me to swap RGBA and POINTER... which logically leads to:
00:00:00 60MB WARNING | [aov] driver "ptrdriver" does not support RGBA pixels
Funny I tried 'NODE' instead of 'POINTER' before asking help: same warning messages and same behavior.
BTW: in any case, app crashes when Arnold says 'releasing resources' at end of rendering phase.