Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Attaching data to a ray in a camera node

7 REPLIES 7
Reply
Message 1 of 8
alan-LFL
249 Views, 7 Replies

Attaching data to a ray in a camera node

Hi all,

I'm trying to figure out if there's some way I could attach, during camera_create_ray, an additional piece of data to that ray/sample that results. I'd want to retrieve this data in a custom filter, to give an idea where I'd like it at the other end of the pipe.

I can't find any API that's obviously the right place (or even possible to do this).

Cheers,

Alan.

Tags (1)
Labels (1)
7 REPLIES 7
Message 2 of 8
Stephen.Blair
in reply to: alan-LFL

Maybe the message passing api?

https://docs.arnoldrenderer.com/api/arnold-6.0.3.1/group__ai__shader__message.html



// Stephen Blair
// Arnold Renderer Support
Message 3 of 8
alan-LFL
in reply to: Stephen.Blair

Hi Stephen,

Going from the docs on lifetime there, it seems that the message would be long gone by the time we got to the filter. Lifetime ends with that ray and filtering doesn't occur until the rays have been fired.

Have I interpreted that correctly?

Cheers,

Alan.

Message 4 of 8
Stephen.Blair
in reply to: alan-LFL

ah, a custom filter, not a custom light filter.

let me check with the dev team...



// Stephen Blair
// Arnold Renderer Support
Message 5 of 8
alan-LFL
in reply to: Stephen.Blair

Awesome, thank you very much 🙂

Message 6 of 8
Stephen.Blair
in reply to: alan-LFL

@

Right, so you won't be able to attach data to a ray. It won't make it all the way to the driver.

Let me know if you want more details...this is what I got from the team:

It might be possible to do this by writing a custom AOV with a persp_camera.uv_remap shader. In theory, this would have a long enough lifetime to reach the filters
But there isn't a lot of data passed to uv_remap shaders though.
The camera space UV coordinates of the current sample and that's about it. It would be very non-standard (if it even works)
A custom camera could flesh this out with a more complete shading context or message passing, or maybe even directly write out to the AOVs in question


// Stephen Blair
// Arnold Renderer Support
Message 7 of 8
alan-LFL
in reply to: Stephen.Blair

Thanks. I need it per sample, as it will effect samples individually in the filter.

Is uv_remap used to modify the coordinates prior to create_camera_ray? Would the information I set there be available withing create_camera_ray as per sample data? I'm looking at using this information to decide the ray direction as well as how it's filtered, so I need to be able to know this value during ray creation, whether it's set there or elsewhere.

Is the custom camera mentioned something different from the CameraNode, which just has a ray creation function? A type with more explicit control?

Message 8 of 8
alan-LFL
in reply to: alan-LFL

Actually, it looks like I may have found another way to get what I'm after. Though I'd still be interested to hear what options are available.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report