Open apradhana opened 9 months ago
Hi Dan. Thanks for looking at this PR and for all your comments. I'm trying to answer your questions here:
Can half-grid types be level sets or just fog volumes? Yes, I think level sets can also be half-grid types.
Thanks for pointing out how to do the HalfGrid registration on the RealGridTypes
. I pushed an update on the PR that does the registration this way, but I'm leaving some money on the table. I did not test how grid.apply
would work with RealGridTypes
as you pointed out. Based on our conversation with Ken and Jeff, there can be cases where we want to do arithmetic using float
when modifying a HalfGrid
. So I need to double-check that there is a way for grid.apply
to work when we 'specialize' an operator for HalfGrid
type to use a promoted type. Do you agree with this?
Still TODO for me:
FloatGrid
and DoubleGrid
, but not HalfGrid
.grid.apply
for HalfGrid
.Great to see this PR in progress! This is functionality that is essential for Arnold renderer, to reduce the peak memory usage of scenes with large volumes.
Just to note, we also need the facility to load from full-float grids on disk into half-float grids in memory, without needing to construct an intermediary float grid and convert to half. This needs to work when demand-loading also, i.e. have a full-float grid on disk be loaded/queried incrementally as a half-float grid in memory, on a per leaf-buffer basis as values are accessed. Is that something that is easy to add on top of this PR?
A draft PR on supporting Half Grid in OpenVDB. The tools we are targeting are: