OpenVDB AX Merge #1580
-
I am trying to merge two level sets that have non-overlapping active areas. There is some documentation here (in the "Linear Blending" section) that seems to suggest this is possible. Here are some things I tried... but so far have been unsuccessful. One of the grids has a rotational transform applied so I can't easily copy active indices from one grid to another (e.g. using python). Any suggestions would be appreciated!
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey so the short answer is that you can't do this solely with theb Some more details - The issue is that when you're dealing with volumes of different transforms, an expression like A somewhat naive but valid approach is to resample volumes to the target volumes transform. In C++ this would look something like:
Obviously if your transforms match then this just becomes:
This is basically what I think I'll add to start with. The reason this behaviour hasn't historically been part of AX (i.e. you need to call resample/topologyUnion methods) is that, should resampling be necessary, it can be very expensive. If we instead resampled on the fly, we would be able to get away without resampling the whole volume and only resample when the expression is evaluated. But it's only mis-matching transforms that are the issue - a topologyUnion with matching transforms is extremely fast and is most likely the more common requirement. |
Beta Was this translation helpful? Give feedback.
Hey so the short answer is that you can't do this solely with theb
vdb_ax
command line binary, but I think I will add an option to allow it because the ideal solution has been proposed for a while but is still not completed. The option will most likely manifest as a--resample-to-match
or--combine
flag.Some more details - The issue is that when you're dealing with volumes of different transforms, an expression like
min(float@surface_a, float@surface_b)
becomes a bit overloaded - attribute accesses should ideally be delegating automatically to more accurate (i.e. trilinear) samplings to accomodate the differences in resolution with respect to the target volume, but at the moment these a…