Maniphest T48383

Cycles Smoke/Fire render procudes NAN pixels
Closed, Resolved

Assigned To
Lukas Stockner (lukasstockner97)
Authored By
Thomas Dinges (dingto)
May 9 2016, 1:48 AM
Tags
  • BF Blender
  • Cycles
Subscribers
Lukas Stockner (lukasstockner97)
Lukas Tönne (lukastoenne)
Sergey Sharybin (sergey)
Thomas Dinges (dingto)

Description

System Information
Ubuntu Linux 16.04
Geforce 730
Core i5 3570 (so it's the AVX kernel).

Blender Version
Broken: current Master

Short description of error

  • Switch to Cycles, execute "Quick Smoke" (Smoke + Fire).
  • Alt+A to bake some frames
  • Render with F12 (CPU render)

I can see a lot of NAN pixels there. This does not happen when rendering with GPU.


Revisions and Commits

rC Cycles
D2051
rB Blender
D2051

Event Timeline

Thomas Dinges (dingto) created this task.May 9 2016, 1:48 AM
Thomas Dinges (dingto) assigned this task to Sergey Sharybin (sergey).
Thomas Dinges (dingto) raised the priority of this task from to 90.
Thomas Dinges (dingto) updated the task description.
Thomas Dinges (dingto) added a project: BF Blender.
Thomas Dinges (dingto) edited a custom field.
Thomas Dinges (dingto) added a project: Cycles.
Thomas Dinges (dingto) added a subscriber: Thomas Dinges (dingto).
Thomas Dinges (dingto) added a comment.May 9 2016, 9:35 AM

The builds from Buildbot are fine, only happens with my self compiled build.

I did a full clean build, did not fix it. Attaching my system-info here, no idea whats wrong.

Sergey Sharybin (sergey) added a comment.May 9 2016, 9:58 AM

Check if it's a regression since some previous release (checkout to a previous releases, compile them and see). If so you can bisect what revision caused the issue.

I'm on very similar setup to the buildbot and release environment and can't reproduce the issue, so unlikely to help here.

Lukas Tönne (lukastoenne) added a subscriber: Lukas Tönne (lukastoenne).May 9 2016, 10:28 AM

I get kernel_assert failures relating to the emission part of the L_sum here:
https://developer.blender.org/diffusion/B/browse/master/intern/cycles/kernel/kernel_accumulate.h$450

@Sergey Sharybin (sergey): It only happens after enough time into the simulation, presumably when the smoke starts intersecting the domain box.

Sergey Sharybin (sergey) added a comment.May 9 2016, 10:40 AM

@Lukas Tönne (lukastoenne), any particular frame number i am to render to see that? What frame you rendered anyway? :)

Lukas Tönne (lukastoenne) added a comment.May 9 2016, 10:46 AM

Frame 26 for example (after rerunning the sim from the start).

Lukas Stockner (lukasstockner97) added a subscriber: Lukas Stockner (lukasstockner97).May 9 2016, 10:51 PM

I get the non-finite assert as well, but it happens way less often than in @Thomas Dinges (dingto)'s screenshot, so the NaNs I get might actually be unrelated to the bug here.
Anyways, by enabling floating point exceptions (P356), I already found two areas that might cause trouble:

  • intern/cycles/kernel/kernel_volume.h:294 may divide by zero if full_transmittance is one (which I guess is quite common) - mathematically, that makes sense since distance-based sampling is impossible in fully transparent volumes. However, I guess detecting that case and not using MIS in that case would be the more stable solution.
  • intern/cycles/kernel/kernel_volume.h:629 may overflow when ray->t is FLT_MAX and the step size is lower than 1 - generally, the conversion to an integer might overflow here. The more stable approach would be to compare ray->t to global_max_steps*step_size and set max_steps to global_max_steps if it's larger, only doing the divide and cast otherwise.

I can just go ahead and handle these two points, but maybe they're known and actually fine?

Sergey Sharybin (sergey) added a comment.May 9 2016, 11:13 PM

@Lukas Stockner (lukasstockner97), think those two would be safer to address those two points. Please go ahead.

Sergey Sharybin (sergey) reassigned this task from Sergey Sharybin (sergey) to Lukas Stockner (lukasstockner97).May 10 2016, 1:34 PM
Sergey Sharybin (sergey) added a subscriber: Sergey Sharybin (sergey).

Lukas, if you still want to look into please go ahead. Otherwise re-assign back to me.

Sergey Sharybin (sergey) lowered the priority of this task from 90 to Normal.May 10 2016, 1:34 PM
Lukas Stockner (lukasstockner97) added a revision: D2051: Cycles: Fix two numerical issues in the volume code.Jun 6 2016, 4:59 PM
Lukas Stockner (lukasstockner97) changed the task status from Unknown Status to Resolved by committing rB654019fa01c8: Cycles: Fix two numerical issues in the volume code.Jun 8 2016, 3:21 AM
Lukas Stockner (lukasstockner97) added a commit: rB654019fa01c8: Cycles: Fix two numerical issues in the volume code.
Sergey Sharybin (sergey) added a commit: rC6d257d5e305d: Fix two numerical issues in the volume code.Jun 8 2016, 11:20 AM