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

Per Bucket Data

7 ANTWORTEN 7
GELÖST
Antworten
Nachricht 1 von 8
Anonymous
480 Aufrufe, 7 Antworten

Per Bucket Data

Hi,

I'd like to be able to create some data for each bucket that renders and to clean it up when it's done. I'd prefer it to be at that level of granularity rather than per thread (though if there's an option for that, it'd be better than nothing) as I know it won't be needed within other buckets and each bucket is single threaded with a shorter lifetime. (Though, of course, just clearing and reusing would be even nicer if it's made per thread, but reset at the start of each bucket).

It's in a camera shader, if that's relevant. Are there APIs around that would facilitate this? I've not managed to find anything obvious. Couldn't find documentation on how calls to node_initialize etc relate to threads. Do any of those happen to be done per thread?

As a worst case, even been able to get the number of threads and bucket size would be enough for me to use. Perhaps just number of threads would be enough, but for that I would need to know if pixels are completed one at a time (i.e. whether all samples within a given pixel are made sequentially or if all samples within a bucket are randomly processed within a thread)

EDIT: Now, I've gotten to the point where querying bucket size would be enough for me to get what I want. So, turns out it's in options, but only when it's non-default of 64. So I can access that, combined with using thread_local, I can get something that'll do the trick for me here.

EDIT2: Hmmm, okay, I've noticed that a single thread can have more than one bucket going at once. Is that hard coded? (if so how many) Or is it variable, if so, how can I access it?

EDIT3: the best thing for my particular case would be if I can get an index per sample within a pixel. Is that available anywhere? That's all I'm trying to generate with all this.

Cheers,

Alan.

Tags (1)
Beschriftungen (1)
7 ANTWORTEN 7
Nachricht 2 von 8
maxtarpini
als Antwort auf: Anonymous

Guess what ? That's called 'subpixel sample index' in AtShaderGlobals :leicht_lächelndes_Gesicht:

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

An answer to the original question, before the three edits:


You could write a dummy driver. You'll get callbacks for each bucket at different stages, and from 6.1 you can connect the driver to the next one using something like this

custom_driver
{
 name my_custom_driver
}
driver_exr # or any other
{
 input my_custom_driver
 ...
}


// Stephen Blair
// Arnold Renderer Support
Nachricht 4 von 8
Anonymous
als Antwort auf: maxtarpini

Thanks, Max. I don't have AtShaderGlobals because this is in a camera node and create_camera_ray has no shader globals. Is there a way to access a shader globals in a camera shader I've missed somewhere? That would be awesome news.

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

Thanks, Stephen. This would need to be added in manually to each render pass, correct? There's no mtoa callbacks or (even better, at Arnold level) for it to register itself for all of them?

Nachricht 6 von 8
Anonymous
als Antwort auf: Anonymous

Not sure if notifications for replies to comments go out, so just writing here, hoping it'll trigger notifications.

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

It would have to be manual.

This is actually how the new imager nodes are hooked up. The user adds imagers, and we set the input parameters to chain them together.



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

Thanks :leicht_lächelndes_Gesicht: most appreciated.

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