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

Attaching data to a ray in a camera node

7 ANTWORTEN 7
Antworten
Nachricht 1 von 8
Anonymous
450 Aufrufe, 7 Antworten

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)
Beschriftungen (1)
7 ANTWORTEN 7
Nachricht 2 von 8
Stephen.Blair
als Antwort auf: Anonymous

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
Nachricht 3 von 8
Anonymous
als Antwort auf: 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.

Nachricht 4 von 8
Stephen.Blair
als Antwort auf: Anonymous

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

let me check with the dev team...



// Stephen Blair
// Arnold Renderer Support
Nachricht 5 von 8
Anonymous
als Antwort auf: Stephen.Blair

Awesome, thank you very much :leicht_lächelndes_Gesicht:

Nachricht 6 von 8
Stephen.Blair
als Antwort auf: Anonymous

@

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
Nachricht 7 von 8
Anonymous
als Antwort auf: 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?

Nachricht 8 von 8
Anonymous
als Antwort auf: Anonymous

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.

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