Describe the bug
The fluid is not rendered correctly in the stable_fluid.py example.
Taichi Version
0.6.4
Log/Screenshots
Video:
taichi_stable_fluid_drawing_bug.zip
To Reproduce
Run the example examples\stable_fluid.py
System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: AMD Radeon HD 7560D ATI Technologies Inc. 4.5.13399 Core Profile Context 15.201.1151.1008
Failed to reproduce on a Linux machine.
It seems to be a problem only related to coloring.
Could you checkout line 191-193, and try:
# fill_color_v3(dyes_pair.cur)
fill_color_s(velocity_divs)
# fill_color_v2(velocities_pair.cur)
and
# fill_color_v3(dyes_pair.cur)
# fill_color_s(velocity_divs)
fill_color_v2(velocities_pair.cur)
?
If you have time, may also run TI_LOG_LEVEL=debug python example/stable_fluid.py and post the full log? If it's too long you may put it into a zip.
Could you also checkout line 167 and try replace it by:
color_buffer[i, j] = ti.Vector([0.5, 1.5, 1.5])
?
@archibate Here's a videos:
velocity_divs.zip
velocities_pair-cur.zip
I cannot start taichi in debug mode. And where should the log file be located?
I tried running like this:
TI_LOG_LEVEL=debug python examples/stable_fluid.py
python examples/stable_fluid.py TI_LOG_LEVEL=debug
This error occurs only while the program is running. But if you save the result in the form of png files, then this error will not be on the result.
Perhaps the program does not work correctly only on my video card (it is old, 2011, built into the processor).
Intresting, does ti.init(arch=ti.cpu) solve the problem?
TI_LOG_LEVEL=debug
Sorry! Didn't notice that you're on win, please add ti.set_logging_level(ti.debug) in the python file instead.
I reproduced the same issue on win, arch=x64, v0.5.12.
The issue gone if I use color_buffer[i, j] = ti.min(ti.Vector([abs(v[0]), abs(v[1]), abs(v[2])]), 0),
The issue gone if I use
color_buffer[i, j] = ti.min(ti.Vector([abs(v[0]), abs(v[1]), abs(v[2])]), 0),
changing line 167 to this code helped me. Only in the end is not zero, but one.