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

[Blender Bug] Render Crashes: Discussion, Tips, and Troubleshooting #518

Open
Shayan012 opened this issue Feb 17, 2021 · 3 comments
Open

Comments

@Shayan012
Copy link

System Information

Blender Version (including hash): 2.91.0
FLIP Fluids Version: 1.0.9
Operating System: Windows 10 64bit Version 20H2
CPU: AMD Ryzen 5 1600
GFX: RTX 3070
RAM: 16GB

Describe the bug

I've had this problem in two different projects now. I made a simulation with a high amount of voxels and whitewater particles. When I then try to render said animation in Cycles or Eevee, Blender more often than not just closes after a single frame is rendered (Sometimes it's a couple more than one, but then the same thing happens). When I just go to a frame and render it, it works fine and Blender doesn't close, and I can then manually save that frame. But when rendering it as an animation the problem occurs. This is obviously pretty annoying because it means I can't render a scene over night since I have to keep re-opening Blender every couple of minutes.

Side Note: Rendering Viewport Animations works without problems.

To Reproduce

Try to render an animation of a sim with very high detail in Eevee or Cycles.

Expected Behaviour

See above

Actual Behaviour

See above

@rlguy
Copy link
Owner

rlguy commented Feb 18, 2021

Hi Shayan012,

Thanks for the report! I am sorry to hear that you are experiencing render crashes. Here are some things to try, and some questions that might help narrow down what the problem could be.

The first thing to check is to make sure that the Lock Interface option is enabled. This is a requirement for stable rendering:

lock_interface

Some other things to try:

  • Restarting your system - sometimes a driver issue can persist until a system restart.
  • Updating graphics drivers.
  • Changing render device settings in (Edit > Preferences > System), such as CUDA vs Optix or combinations of CPU/GPU rendering to narrow down what is causing the issue.
  • Creating and testing a new .blend file to see if the issue can be reproduced with a low detail and basic simulation.
  • If you have access to the latest version of the FLIP Fluids addon (v1.0.9a, 03-FEB-2021), updating may help with rendering issues. There have been some changes which could affect render stability.

Here are some questions I have about the issue:

  • Do the crashes occur if you render from the command line? Command line rendering is the most stable way to render large scenes and often uses less system resources. We have a feature that automatically launches a command line windows in our Helper Sidebar Menu:

launch_render_operator

  • If the crashes still happen when rendering from the command line, are you receiving any error messages?
  • How large are the fluid meshes in geometry (triangles/vertices count) and how many whitewater particles are being rendered in a typical frame? These stats can be found in the FLIP Fluid Stats menu under the Frame Info section.

Hope this helps! Let us know if you have any questions or more info about your scene.

- Ryan

@Shayan012
Copy link
Author

Thanks for the detailed answer!
I'll go through everything in the order you mentioned it:

  1. The Interface is Locked
  2. Restarting doesn't help
  3. I already had the newest drivers
  4. Changing to Optix didn't change anything, changing to CPU made Blender crash before it could even render anything.
  5. I don't have the newest version yet, but I will probably get it and try to see if it works.
  6. Rendering from Command Line actually works (I'm so happy) and hasn't even crashed once.
  7. Some of the larger frames have at least 8.2 million verts, 2.8 million tris and 7 million whitewater particles

Thanks a lot for the command line "solution"! I hope my info can help you in getting rid of this issue.

@rlguy
Copy link
Owner

rlguy commented Feb 22, 2021

Thanks for the update! From this info, I the cause of the crashes could be triggered by either of these issues:

Running out of GPU memory

At the large mesh size and number of particles, this could be exceeding 8GB of VRAM on the RTX 3070. Usually at around 6 million particles + large mesh, and a few textures I start to run out of VRAM and get crashes. Rendering fromt he command line can reduce the amount of resources used, but I am not sure by how much.

To test if this is the issue, you could try rendering a lower number of whitewater particles. Rendering particle instances requires a lot of memory in Blender. Reduction of particles for rendering can be done by setting the render display amount to 50% and testing for a crash.

If the render still crashes, this will be related to the next issue:

Crashes due to Blender viewport stability

There is a design issue in Blender where the viewport and render threads do not sync correctly and can cause a crash (Issue T60094). This becomes more troublesome as amount of geometry increases. This issue is the reason why the viewport needs to be locked during render to improve stability. Rendering from the command line will bypass this design issue since the viewport is no longer needed.

Unfortunately this issue is out of our control and will need to be fixed by the Blender developers. There is a comment here in the issue thread where a developer mentions the design issues will need to be handled in regular development:

Currently it's as stable as we can make it. It is indeed true that interface is better be locked, otherwise render thread might cause conflicts with the viewport (due to python handlers possibly modifying data while it's being drawn by the viewport).

There are ways around it, but needs some design changes. Will be handled outside of the bug tracker as a regular development.


Hope this info helps! I'll leave this issue open as a discussion thread since the help info could help others.

@rlguy rlguy changed the title Blender closes after completing a frame when rendering animation with lots of voxels/particles Render Crashes: Discussion, Tips, and Troubleshooting Feb 22, 2021
@rlguy rlguy changed the title Render Crashes: Discussion, Tips, and Troubleshooting [Blender Bug] Render Crashes: Discussion, Tips, and Troubleshooting Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants