Page MenuHome

Freestyle seed in noise modifier can be zero (leading to crash)
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: AMD Radeon(TM) R4 Graphics ATI Technologies Inc. 4.5.13558 Core Profile Context 26.20.11016.1

Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: rB84da05a8b806

Short description of error
Issue is that seed on the freestyle noise modifier can be zero (leading to division by zero)

Exact steps for others to reproduce the error

  • Open file
  • F12 to render
  • crash
Python: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/build_linux/bin/3.0/scripts/freestyle/modules/parameter_editor.py", line 1558, in process
    shaders_list.append(ThicknessNoiseShader(
  File "/build_linux/bin/3.0/scripts/freestyle/modules/parameter_editor.py", line 616, in __init__
    NoiseShader.__init__(self, amplitude, period, seed)
  File "/build_linux/bin/3.0/scripts/freestyle/modules/parameter_editor.py", line 595, in __init__
    self.scale = 1 / period / seed
ZeroDivisionError: float division by zero

Original report:

  1. Duplicate scene into "CompositingSet" and "LineSet" each.
  1. For "LineSet", set render engine to 'cycles', sampling of render to '1', in the film check the transparent box, freestyle check. In view layer properties > filter > include > UNcheck all EXCEPT 'Volumes'.
  1. For "CompositingSet". in the compositing workspace, connect nodes as follow: [1] texture > [2X] multiply (connect in one of the value input) > displace ( x and y scale) > viewer AND [2] Render layer "CompositingSet" +Render layer "LineSet" > Alpha Over > displace (image) > viewer
  1. In graph editor, apply noise modifier to: 1) "LineSet" scene > View Layer properties > FreeStyle Line Style > Thickness > Add modifier >Seed :: 2) "CompositingSet" scene > Node of 'texture' > Offset: Z
  1. In graph editor, for channel 'Seed' and 'Offset: Z', add keyframe at time '0' and '25'. Then, go to tab key > sample keyframes. Next, disable noise modifiers on both channel 'Seed' and 'Offset Z'.
  1. Render Animation [F12] and CRASH!

Hope the team stay healthy and safe. If you guys fixed this, it'll be a game changer in NPR rendering (like Beastars).
Thank you!

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Sep 9 2021, 4:44 PM

Can confirm.

Issue is that seed on the noise modifier can be zero (leading to division by zero) and can be seen in much simpler file, see

Python: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/build_linux/bin/3.0/scripts/freestyle/modules/parameter_editor.py", line 1558, in process
    shaders_list.append(ThicknessNoiseShader(
  File "/build_linux/bin/3.0/scripts/freestyle/modules/parameter_editor.py", line 616, in __init__
    NoiseShader.__init__(self, amplitude, period, seed)
  File "/build_linux/bin/3.0/scripts/freestyle/modules/parameter_editor.py", line 595, in __init__
    self.scale = 1 / period / seed
ZeroDivisionError: float division by zero
Philipp Oeser (lichtwerk) renamed this task from [CRASH] Unable to render after compositing and freestyle to Freestyle seed in noise modifier can be zero (leading to crash).Sep 9 2021, 4:46 PM
Philipp Oeser (lichtwerk) updated the task description. (Show Details)

Should just be forced to positive / non-zero.
Not sure if it mandatory to have a version patch in do_versions for this, but will check on these.