hi!I am a student studying on fluid simulation in computer graphics. And I found this framework which has been used as a basis for some papers.
To get better visual effect, I use mantaflow to output the density field for rendering. But I found some strange points.
1. negative value
There are some negative value in the density field which should be impossible because I use the Maccormack method for advection where the "MacCormackClamp()" function should correct the wrong value caused by "MacCormackCorrect()" function.
I wonder that is that a mistake or something?
2. unnatural result in rendering
By the way, I modified the code to save density field as the ".pbrt" format. Then I rendered it with pbrt, and some results look strange.
First I use the ./scene/simpleplume.py for simulation, and the result image looks clear:


high resolution(256) low resolution(64)
Then I use "source.applyToGrid( grid=density , value=1. )" to generate smoke, the result then looks strange:


high resolution (256)(with sphere obs) low resolution (64)
I think that's because of some negative value in density field.
So I wonder how to get the rendering image like the result image in the papers?
I'd hugely appreciate any help! :)