Grease pencil frames not rendered in background mode #85035

Closed
opened 2021-01-25 11:40:37 +01:00 by Damien Picard · 11 comments
Member

System Information
Operating system: Kubuntu 20.04, Windows 10
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 450.102.04

Blender Version
Broken: version: 2.91.2, branch: master, commit date: 2021-01-19 16:15, hash: 5be9ef4177
Broken: version: 2.93.0 Alpha, branch: master (modified), commit date: 2021-01-25 09:32, hash: 5f55022276
Worked: version: 2.83.9, branch: master, commit date: 2020-11-11 06:30, hash: 4abfc0bcd5

Short description of error
In a very specific configuration, some grease pencil frames are only rendered in graphical mode, but not in background mode. It apparently involves saving the file with the current frame before the first animation frame.

Exact steps for others to reproduce the error
grease_pencil_render_bug.blend

  • Open the attached file, and press CTRL + F12 to render the animation
    • In the resulting file, all frames are correctly rendered
  • Render the same file in the background by using the following command:
`blender --factory-startup -b grease_pencil_render_bug.blend -a`
  • Keyframe 103 is skipped, and keyframe 105 appears only at frame 106.

OR

  • Create new 2D animation file
  • Set first frame to 101, last frame to 110
  • Draw something at frames 101, 103, 105, 107, 110
  • Delete existing frame 1
  • Set the current frame to before the first frame (e.g. 60)
  • Save file
  • Press CTRL + F12 to render the animation
    • In the resulting file, all frames are correctly rendered
  • Render the same file in the background by using the following command:
`blender --factory-startup -b grease_pencil_render_bug.blend -a`
  • Frames 103-105 are skipped.

Here are the resulting animations
Rendered in the foreground, expected: fg.gif

Rendered in the background, frames 103-105 skipped: bg.gif

**System Information** Operating system: Kubuntu 20.04, Windows 10 Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 450.102.04 **Blender Version** Broken: version: 2.91.2, branch: master, commit date: 2021-01-19 16:15, hash: `5be9ef4177` Broken: version: 2.93.0 Alpha, branch: master (modified), commit date: 2021-01-25 09:32, hash: `5f55022276` Worked: version: 2.83.9, branch: master, commit date: 2020-11-11 06:30, hash: `4abfc0bcd5` **Short description of error** In a very specific configuration, some grease pencil frames are only rendered in graphical mode, but not in background mode. It apparently involves saving the file with the current frame before the first animation frame. **Exact steps for others to reproduce the error** [grease_pencil_render_bug.blend](https://archive.blender.org/developer/F9596830/grease_pencil_render_bug.blend) * Open the attached file, and press CTRL + F12 to render the animation * In the resulting file, all frames are correctly rendered * Render the same file in the background by using the following command: ``` `blender --factory-startup -b grease_pencil_render_bug.blend -a` ``` * Keyframe 103 is skipped, and keyframe 105 appears only at frame 106. **OR** * Create new 2D animation file * Set first frame to 101, last frame to 110 * Draw something at frames 101, 103, 105, 107, 110 * Delete existing frame 1 * Set the current frame to before the first frame (e.g. 60) * Save file * Press CTRL + F12 to render the animation * In the resulting file, all frames are correctly rendered * Render the same file in the background by using the following command: ``` `blender --factory-startup -b grease_pencil_render_bug.blend -a` ``` * Frames 103-105 are skipped. **Here are the resulting animations** Rendered in the foreground, expected: ![fg.gif](https://archive.blender.org/developer/F9596835/fg.gif) Rendered in the background, frames 103-105 skipped: ![bg.gif](https://archive.blender.org/developer/F9596838/bg.gif)
Author
Member

Added subscriber: @pioverfour

Added subscriber: @pioverfour
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

I can reproduce this on 2.92.0 Beta, branch: master, commit date: 2021-01-25 06:40, hash: 7f9ed0178a. If the file is saved with the play-head inside the start and end frame it renders as expected in background mode. But when I save the file with the play-head before the start frame, the first 5 images are all the same.

I can reproduce this on 2.92.0 Beta, branch: master, commit date: 2021-01-25 06:40, hash: `7f9ed0178a`. If the file is saved with the play-head inside the start and end frame it renders as expected in background mode. But when I save the file with the play-head before the start frame, the first 5 images are all the same.
Author
Member

For anyone encountering this bug, a workaround is to set the current frame to the first frame prior to rendering:

blender -b grease_pencil_render_bug.blend --python-expr "import bpy \
bpy.context.scene.frame_set(bpy.context.scene.frame_start)" -a
For anyone encountering this bug, a workaround is to set the current frame to the first frame prior to rendering: ``` blender -b grease_pencil_render_bug.blend --python-expr "import bpy \ bpy.context.scene.frame_set(bpy.context.scene.frame_start)" -a ```
Author
Member

Added subscriber: @antoniov

Added subscriber: @antoniov
Author
Member

@antoniov, I bisected this to 11ba9eec70.

@antoniov, I bisected this to 11ba9eec70.

@pioverfour This commit cannot be the reason of the error because this limits the first frame to draw, so if you are in frame 60, nothing of frame 101 is displayed as it was before.

I have just recompile 2.92 master and running this command line blender.exe --factory-startup -b grease_pencil_render_bug.blend -a and I get the right result in .mp4 and .png format.

Edit: I run again and now get wrong frames.

@pioverfour This commit cannot be the reason of the error because this limits the first frame to draw, so if you are in frame 60, nothing of frame 101 is displayed as it was before. I have just recompile 2.92 master and running this command line `blender.exe --factory-startup -b grease_pencil_render_bug.blend -a` and I get the right result in `.mp4` and `.png` format. Edit: I run again and now get wrong frames.

This issue was referenced by 1e55d28a4e

This issue was referenced by 1e55d28a4e244cd501d9b53f56d535a04ce5eef1

This issue was referenced by b379f626ce

This issue was referenced by b379f626ce3ec965984a6758ae4e52b7c0dbcc2a

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Antonio Vazquez self-assigned this 2021-01-28 10:37:49 +01:00
Sign in to join this conversation.
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#85035
No description provided.