# Combine Math node

Combines grids using scalar operations.

**Combination type**- The different math operators that can be brought to bear:**Copy A**- Use A , ignore B**Copy B**- Use B, ignore A**Invert**- Use 1 minus A**Add**- Add the values of A and B (Using Add for fog volumes, which have density values between 0 and 1, will push densities over 1 and cause a bright interface between the input volumes when rendered. To avoid this problem, try using the**Blend 2**option)**Subtract**- Subtract the values of B from the values of A**Multiply**- Multiply the values of A and B**Divide**- Divide the values of A by B**Maximum**- Use the maximum of each corresponding value from A and B (Using this for fog volumes, which have density values between 0 and 1, can produce a dark interface between the inputs when rendered, due to the binary nature of choosing a value from either from A or B. To avoid this problem use**Blend 1**instead)**Minimum**- Use the minimum of each corresponding value from A and B**Blend 1**- (1 - A) * B. This is similar to SDF Difference, except for fog volumes, and can also be viewed as a "soft cutout" operation It is typically used to clear out an area around characters in a dust simulation or some other environmental volume**Blend 2**- A + (1 - A) * B. This is similar to SDF Union, except for fog volumes, and can also be viewed as a "soft union" or "merge" operation. Consider using this over the Maximum or Add operations for fog volumes

**A Multiplier**- Multiply voxel values in the A VDB by a scalar before combining the A VDB with the B VDB**B Multiplier**- Multiply voxel values in the B VDB by a scalar before combining the A VDB with the B VDB**Resample**- Multiple options here. If the A and B VDBs have different transforms, one VDB should be resampled to match the other before the two are combined. Also, level set VDBs should have matching background values (i.e., matching narrow band widths):**Off**- No resampling**B to Match A**- Resample B so that the narrow band width is the same as A**A to Match B**- Resample A so that the narrow band width is the same as B**Higher-res to Match Lower-res**- Resample the higher resolution data so that the resolutions match**Lower-res to Match Higher-res**- Resample the lower resolution data so that the resolutions match

**Interpolation**- When you choose a resampling option other than Off, the Interpolation choices become available. There are three to choose between:**Nearest**- Nearest Neighbor interpolation is fast but can introduce noticeable sampling artifacts**Linear**- Linear is the middle ground of speed and quality**Quadratic**- Quadratic interpolation is slow but high-quality

**Deactivate**- Toggle to deactivate active output voxels whose values equal the output VDB's background value. When this option is checked, the field below becomes active:**Deactivate Tolerance**- When deactivation of background voxels is enabled, voxel values are considered equal to the background if they differ by less than this tolerance

**Prune**- Reduce the memory footprint of output VDBs that have (sufficiently large) regions of voxels with the same valuePruning affects only the memory usage of a VDB. It does not remove voxels, apart from inactive voxels whose value is equal to the background

**Prune Tolerance**- When pruning is enabled, voxel values are considered equal if they differ by less than the specified tolerance

**Flood Fill**- Reclassify inactive voxels of level set VDBs as either inside or outside. This option will test inactive voxels to determine if they are inside or outside of an SDF and hence whether they should have negative or positive sign