Bug 436721 - Flattening an animated layer with layer effects gives artifacts
Summary: Flattening an animated layer with layer effects gives artifacts
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Animation (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-07 06:56 UTC by Ahab Greybeard
Modified: 2021-05-18 20:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Animated layers with layer styles (621.53 KB, application/x-krita)
2021-05-07 06:56 UTC, Ahab Greybeard
Details
Anim-Fx after Flattening each layer (2.82 MB, application/x-krita)
2021-05-07 06:56 UTC, Ahab Greybeard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahab Greybeard 2021-05-07 06:56:02 UTC
Created attachment 138208 [details]
Animated layers with layer styles

SUMMARY
If an animated layer has layer effects on it, then for some effects there are artifacts created when the layer is flattened. Attached example .kra files are provided.
This is seen with the May 06 5.0.0-prealpha (git cb99b9e) appimage and also the 4.4.3 appimage

STEPS TO REPRODUCE
1. Create a simple short animation and apply the layer effects Bevel or Drop Shadow to it (or use the attached Anim-FX.kra file which has Bevel, Drop Shadow and Satin layer effects on separate animated layers).
2. Flatten each layer.

OBSERVED RESULT
2. Artifacts are created when each layer is flattened.
(The file Anim-FX-Flattened, produced with the May 06 5.0.0 appimage is attached.)

See Additional Information for more details of the observations.

EXPECTED RESULT
2. There should be no artifacts created.

ADDITIONAL INFORMATION
a) For the attached example, the flattening was done when frame-4 was selected and it seems that this frame has the least number of artifacts.
b) When the Drop Shadow Fx layer was flattened (before the Satin Fx layer was flattened), a temporary artifact was created over the Satin Fx layer image on frame-4. 
Then when the Satin Fx layer was flattened, only frame-3 of the Satin Fx layer had artifacts on it.
c) For an animation with a single layer that has Satin Fx on it, flattening gives no artifacts but the frame that was selected when flattening was done has no Satin effects on it.
d) If a layer style is changed to another effect, any selected frame will show the new effect but when the animation is played then the previous effect is shown. This has been observed for changing from Satin to Bevel.
e) In some cases (but not repeatable) flattening a layer with effects gives one or more Held frames instead of painted keyframes on the timeline.


SOFTWARE/OS VERSIONS
Krita

 Version: 5.0.0-prealpha (git cb99b9e)
 Languages: en_GB, en, en, en_GB, en
 Hidpi: false

Qt

  Version (compiled): 5.12.9
  Version (loaded): 5.12.9

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-16-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10
  Desktop: MATE

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 750 Ti/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 460.67" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 16039 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 0
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: true
  Use Zip64: false


Display Information
Number of screens: 2
	Screen: 0
		Name: DVI-D-1
		Depth: 24
		Scale: 1
		Resolution in pixels: 1280x1024
		Manufacturer: Dell Inc.
		Model: DELL 1704FPV-
		Refresh Rate: 60
	Screen: 1
		Name: DVI-D-0
		Depth: 24
		Scale: 1
		Resolution in pixels: 1280x1024
		Manufacturer: Dell Inc.
		Model: DELL 1704FPV-
	Krita

 Version: 5.0.0-prealpha (git cb99b9e)
 Languages: en_GB, en, en, en_GB, en
 Hidpi: false

Qt

  Version (compiled): 5.12.9
  Version (loaded): 5.12.9

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-16-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10
  Desktop: MATE

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 750 Ti/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 460.67" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 16039 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 30
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Use AMD Vectorization Workaround: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 0
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: true
  Use Zip64: false


Display Information
Number of screens: 2
	Screen: 0
		Name: DVI-D-1
		Depth: 24
		Scale: 1
		Resolution in pixels: 1280x1024
		Manufacturer: Dell Inc.
		Model: DELL 1704FPV-
		Refresh Rate: 60
	Screen: 1
		Name: DVI-D-0
		Depth: 24
		Scale: 1
		Resolution in pixels: 1280x1024
		Manufacturer: Dell Inc.
		Model: DELL 1704FPV-
		Refresh Rate: 60

	Refresh Rate: 60
Comment 1 Ahab Greybeard 2021-05-07 06:56:48 UTC
Created attachment 138209 [details]
Anim-Fx after Flattening each layer
Comment 2 Eoin O'Neill 2021-05-18 20:32:06 UTC
Git commit 96a88bf6152bc251a89fbeb7301be31282496098 by Eoin O'Neill.
Committed on 18/05/2021 at 20:29.
Pushed by eoinoneill into branch 'master'.

Fixed additional artifacts on certain animated LayerFX.

Ghosting would occur because the previous "need rect" wasn't also
taken into account.

M  +5    -2    libs/image/kis_layer_utils.cpp

https://invent.kde.org/graphics/krita/commit/96a88bf6152bc251a89fbeb7301be31282496098