Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

ShaderGlobals/AiTextureHandleAccess in Custom Camera

1 ANTWORT 1
Antworten
Nachricht 1 von 2
Anonymous
295 Aufrufe, 1 Antwort

ShaderGlobals/AiTextureHandleAccess in Custom Camera

We're writing a custom camera for Arnold, and running into a simple texture access issue.

Trying to call;

AtRGBA lensmapSample = AiTextureHandleAccess(sg, data->texturehandle, *(data->textureparams));

....results in a segfault if used on multiple cores (works fine on a single core).

Unlike shader_evaluate(), sg isn't defined for camera_create_ray, so we're having to declare & init it with;

AtShaderGlobals* sg = AiShaderGlobals();

... and then pass that along to AiTextureHandleAccess, but my guess is that it's not getting initialized per thread or something like that because any number of threads beyond 1 causes a crash (with 1 thread, it works as expected).

Anyone know how this is supposed to be invoked? Is there an alternate texture access method that should be used at the camera_create_ray step?

Oh, two of the more common errors that appear in the segfault are:

/home/thiago/oiio-arnold/src/libtexture/imagecache.cpp:1449: failed assertion 'memsize() == 0 && size > OIIO_SIMD_MAX_SIZE_BYTES'

and

* signal caught: SIGSEGV -- Invalid memory reference (address not mapped to object)

My guess is that the first error is likely just another version of the second.

Tags (2)
Beschriftungen (2)
1 ANTWORT 1
Nachricht 2 von 2
Stephen.Blair
als Antwort auf: Anonymous

It's a problem with the sg returned by AiShaderGlobals. Fix in next update.



// Stephen Blair
// Arnold Renderer Support

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report