Git Product home page Git Product logo

Comments (22)

rlguy avatar rlguy commented on May 12, 2024

Hey RevDr,

I have encountered crashes like these too, and more often when whitewater particles are being rendered. I am not sure if it is caused by something I am doing incorrectly with the Blender Python API, or if it caused by instabilities within Blender's viewport. The crashes seem to be proportional to how large the scene is, and whitewater rendering can create many millions of triangles.

Here are some things I do to prevent crashes:

Close the viewport while rendering

I find that if I close all viewport windows by switching to different editors, rendering becomes more stable. Crashes still sometimes occur.

Render through the command line

For larger scenes I usually render through the command line and have very rarely experienced a crash. For example, I use the following command which begins rendering the scene as if pressing the 'Animation' button:

/path/to/blender.exe -b /path/to/blend_file.blend -a

Let me know if any of these tips end up helping.

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

OK - will give it a go tomorrow. Running a 400 test over night.

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

OK. I was rendering in a 'New Window' when I render in the main window in my my editing pane it seems to be rendering ok at the moment.

Is it at all possible that the fluid sim data is being refreshed when a screen draw refresh happens and is therefore trying to draw corrupt data?

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

The bug is definitely to do with the drawing dupli objects - it always crashes there.

FYI - another work around I have just discovered is to not show bubble foam or spray objects in the viewport (but leave them still rendering). Can now render in another window ok.

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

Hmmm - turns out that work around didn't work.

Still getting crashes when particles not displayed and when no viewport displayed.

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

OK - tried something else which worked (or at least I got 100 frames to render without a crash).

I changed the preview display settings to 100%.

Could there be something going on where it allocates space for 25% (old value) but requires 100%?

from blender-flip-fluids.

dafassi avatar dafassi commented on May 12, 2024

What you could also try it to use billboards as whitewater-particles inplace of the standard icospheres.
To do this:
1- add a plane
2- make sure it is on layer 1 of your scene
3- constrain it to the camera (track to) so it will always facing to it
4- Then in the display settings choose this plane for whitewater-foam/bubbles/spray.
5- Disable "icosphere"
This trick will reduce the amound of vertex drasticaly and will help with rendering your scene.
planesetup_1
planesetup_2
planesetup_3

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

That's a neat idea. Thanks

Unfortunately it hasn't helped in my case - am still getting crashes using my workaround v2 and using this but will definitely use that trick in the future!

I get a bit more stability in render when I render with less particles - I think that is another crash point though - according to my debugger.

from blender-flip-fluids.

rlguy avatar rlguy commented on May 12, 2024

Hey RevDr,

Have you been able to test if rendering through the command line fixes stability issues for you? If you do test this, let me know if it works.

I am going to create a minimal script to see if I can reproduce this issue without the addon, which I'll be able to send to the Blender developers. Hopefully I'll be able to get an answer for why this may be happening and if I am doing anything wrong with the Blender Python API.

from blender-flip-fluids.

Mitsuma avatar Mitsuma commented on May 12, 2024

I'm actually also currently experiencing crashes during rendering, interestingly I get a crash always exactly after I rendered a single frame. (150/450 as a starting point.)
Uses whitewater particles as well and it is simulated with 400 res.

I actually read about your solution to close the viewport and that fixed it. It is actually the same scene as in #123 just with a fixed inflow object which I toggled, so nothing special going on.
Problematic is just that I don't even get a crash log from Blender, nothing turns up in the tmp folder, so I can not give additional information besides the viewport being the culprit so far. Problem seems to be when Blender goes one frame forward in the scene and I suppose something in the viewport causes a conflict, I have no clue of the coding behind it, so it is just a guess based on observation.
Will render my first own test out over night and see if something crashed or so, you mentioned it can still be more unstable then doing full cmd line rendering.

from blender-flip-fluids.

dafassi avatar dafassi commented on May 12, 2024

In my tests i found out, that crashs also are happening when rendering without viewport.
And it seems its not because the particles only, but the combination with the fluid-surface.
When disabling the fluid-surface, rendering whitewaterparticles will not crash (that often).

Do you get a black screen when rendering, too? Sometimes my screen becomes black for 2 seconds while rendering.

In the next test ill try to run blender from an other harddrive. It might be an issue with SSD´s - but im not sure actualy.

from blender-flip-fluids.

Mitsuma avatar Mitsuma commented on May 12, 2024

Everything runs fine with just hidden viewport during the past 6h rendering.
It is all sitting on a HDD, doubt its a problem there though or SSDs.

In my case it would show the first rendered frame, then try to go to the next and crash if I had the viewporr up. No black screens.

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

I hide all FLIP objects (and disable selection) before rendering. That works for me.

In my tests the surface and particles would crash with and independent of each other. Since hiding them I have not had any.

from blender-flip-fluids.

rlguy avatar rlguy commented on May 12, 2024

I made some small changes to the render loading script and have been rendering successfully for a couple hours with all objects unhidden and with the viewport open. I have been testing on a scene with 4 million whitewater particles. Before the change, Blender was often crashing after a single frame. And now I'm not experiencing any crashes.

I'm not entirely sure about the reason for the crashes. My hypothesis is that Blender didn't like the addon creating/deleting large meshes in the post render, pre render, render cancelled, or render complete callbacks. I have moved that code to be executed in a scene update post callback instead which Blender seems okay with.

I have attached the following files (__init__.py, render.py) to 'patch' and test this issue fix:

bl_flip_fluids.zip

You will need to replace the two files that are located in your addon install directory with the files in the zip archive. For example, my __init__.py and render.py files are located in this directory:

C:\Users\Ryan\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\bl_flip_fluids\

Please try this out and let me know if this improves the render crashing situation. I have tried many fixes that seemed to work, but then began crashing again consistently, so I cannot guarantee that this is a complete issue fix without further testing.

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

Great will try something in a bit.

Quick question - I noticed the render.py file is the same - have you sent the correct version?

Ta

from blender-flip-fluids.

rlguy avatar rlguy commented on May 12, 2024

Ahh, you are correct! I uploaded the wrong version. I have updated the attachment!

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

Sorry to be the bringer of bad news - I managed to crash it first time.

Just right clicked a few times in the viewport during rendering and bang.

from blender-flip-fluids.

rlguy avatar rlguy commented on May 12, 2024

Aww too bad! I was wondering if it seems more stable overall? I've been rendering for about 30 hours now without a crash.

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

OK. I am running a 'hybrid' fix. Mostly your new version but with a disable selection before render.

from blender-flip-fluids.

RevDr avatar RevDr commented on May 12, 2024

Hi,
Just to say - got a crash today - was not playing with selection - although I was using another app when it crashed so I guess some different GL calls could have happened in the background.

from blender-flip-fluids.

Blaast avatar Blaast commented on May 12, 2024

Just saying, but blender (and blender cycles) seems to have an issue rendering high number count of instances, and works better at rendering lower counts but higher density.
I used this workaround for rendering grass : 500 grass patches of 2000 grass strands ( 1 000 000 polys ) Total 500M is better than 1 000 000 instances of 1 grass strand ( 500 polys ) Total 500M. I'm not sure why.

from blender-flip-fluids.

rlguy avatar rlguy commented on May 12, 2024

Seems like this situation has been improved in the latest version (0.1.3b). I will be closing this issue.

from blender-flip-fluids.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.