woodsman
1/6/2020 - 7:08 PM

DOP Camera Frustum Cull for Pyro

Use in a gas wrangle to delete any density/temperature/velocity values that are outside of your camera view. Make sure Input 2 on the "INPUTS" tab is set to SOP and pathed to a volume created from your camera frustum. The placement of the gas wrangle is also extremely important. You should have a merg node beneath your sourcevolume in DOPS and make sure that the gas wrangle is the last think merged into it.

// Use in a gas wrangle in dops to cull by camera
float sample;

sample = volumesample(1, "density", @P);
if (sample == 0){
   @density = 0;
   @temperature = 0;
   @vel = 0;
}