[Blender 2.8] Evee Baking Indirect Lighitng causes scene to crash #63969
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#63969
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Baking Indirect Light with dimension 8x8x8 and few Area lights causes the application to freeze up with progress at 0% . I waited for an hour or so. But no progress. The RAM memory usage was at 90% and CPU of around 50%.
Workarounds I tried.
Initially I had around 12 spotlights and 4 area lights. Since the problem started to occur. I deleted the spot lights and tried again. But invain .
I have attached the blend file also for reference
Scene.blend
Do check
Thanks
Added subscriber: @deltamish
Added subscriber: @nacioss
I confirm, even at 4x4x4 it is suuuper slow (1% after 1 minute), but you also have a lot of extra unnecessary geometry in the scene.
Added subscriber: @lichtwerk
Can confirm it is pretty slow [I have a comparable interior scene around 4M tris that bakes a lot quicker and also eats a lot less RAM -- ]
Needs some more checking which components are actually slowing it down that much...
Added subscriber: @Smjert
I've debugged it a bit for fun (because I don't know the code, it's the first time I see it), but the part that is taking most of the time is the rendering of the Irradiance grid.
The part of the code is in evee_lightcache.c:1198, there's a loop there and the highest loop count to do is the grid_sample_len which is 1200 (which seems calculated from the current LightProbe grid_resolution_x, y, z).
I tried to understand why 1200 and where that resolution is taken/calculated but I couldn't understand how it was related to the UI values.
If the grid_sample_len number seems fine, what I've also seen is that the lightbake_do_sample() call inside that loop takes obviously all the time, and inside, passing through a callback, it calls render_cubemap (in evee_lightprobes), which takes from 10 to 15s each call.
In the render_cubemap it loops all the 6 faces, calling lightbake_render_scene_face, and there you could say that the majority of time is spent by EEVEE_draw_shadows().
EDIT:
Forgot to say, I did the test with a Release build with Debug Info
OS: ArchLinux
CPU: Intel i7 6700K
GPU: NVIDIA GTX 1080
I don't know how much is related but loading the scene in blender shows these on the terminal:
GPU failed to find function node_bsdf_hair
GPUShader: compile error:
0(12226) : error C0000: syntax error, unexpected ',', expecting "::" at token ","
I've continued to have a look at it (mind, I have no hope of having a fix, I don't have enough knowledge) and I've noticed some things:
Since
EEVEE_draw_shadows
is the one taking the majority of time (like 80% of the time) and specifically the update of the cascaded shadows, I've noticed that after ~30min a cascade was never deemed as not visible. Maybe it's just a case, but probably it has to do with the fact that the visibility test is done with a plane at local Z = 0 (as the comment on the code states...)?. Sorry if I'm saying a stupid thing but, basically if I understand it right and that the plane for instance is representing the floor, there's no limit of distance on the visibility?By putting some profiling code around
lightbake_do_sample
basically I noticed that on my hardware it takes ~10-15 seconds to do one grid sample, and eachEEVEE_draw_shadows
call is ~1.5s (and there are 6 of them per sample). I've tried to force cascaded shadows to be always invisible, so basically to avoid them to be rendered, and each sample now is down to ~3s, which though at the current resolution (which I eventually found to be taken from the Irradiance Volume object added in the scene) it's still 1200 samples x 3 light bounces x 2 lights aka a lot. Also half of the time for each sample is spent ineevee_lightbake_cache_create
This is more a (noob) question than a discovery, but I was wondering why the entire shadow cubemap is rendered every face of the irradiance cubemap. Namely, EEVEE_draw_shadows is called 6 times and as far as I understand, 6 shadow map cubes are created. Shouldn't those be created once per grid sample? (Also here https://docs.blender.org/manual/en/dev/render/eevee/lightprobes/irradiance_volumes.html#visibility it says that each sample, creates a VSM, which isn't true?).
Added subscriber: @Jeroen-Bakker
This is as the shader tree uses Pricipled Hair Shader that is only supported by Cycles.
This is due to an error in the shadergraph of
Designedwall1
material, where BSDF socket are linked directly to color socket. This is not supported.Added subscriber: @iss
Changed status from 'Needs Triage' to: 'Confirmed'
Baking still freezes (unable to stop it) in 2.82
56ef761381
Added subscriber: @dfelinto
Changed status from 'Confirmed' to: 'Archived'
Thanks for the report. Unfortunately the sample file is too complex (>600MB) which is too time consuming for us to track down, we require the bug reporter to narrow down the problem.
Normally .blend files can be simplified by removing most objects and disabling settings, until the problem reveals itself more clearly.
If you can reproduce this issue with a simple file feel free to report it as a new issue (you can mention this report).