Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Examples] Stable fluid drawing bug #1000

Closed
PavelBlend opened this issue May 17, 2020 · 7 comments · Fixed by #1005
Closed

[Examples] Stable fluid drawing bug #1000

PavelBlend opened this issue May 17, 2020 · 7 comments · Fixed by #1005
Labels
potential bug Something that looks like a bug but not yet confirmed windows Microsoft Windows platform

Comments

@PavelBlend
Copy link

PavelBlend commented May 17, 2020

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

@PavelBlend PavelBlend added the potential bug Something that looks like a bug but not yet confirmed label May 17, 2020
@archibate
Copy link
Collaborator

archibate commented May 17, 2020

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.

@archibate
Copy link
Collaborator

archibate commented May 17, 2020

Could you also checkout line 167 and try replace it by:

color_buffer[i, j] = ti.Vector([0.5, 1.5, 1.5])

?

@PavelBlend
Copy link
Author

@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

@PavelBlend
Copy link
Author

PavelBlend commented May 17, 2020

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).

@archibate
Copy link
Collaborator

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.

@archibate
Copy link
Collaborator

archibate commented May 17, 2020

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),

@PavelBlend
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
potential bug Something that looks like a bug but not yet confirmed windows Microsoft Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants