Scene strip with Alpha over not working as expected #51002

Closed
opened 2017-03-19 12:04:35 +01:00 by Oscar · 18 comments

System Information
Windows 10 x64
I7-6700HQ
GTX960M
system-info-build-bot.txt
system-info-official.txt
Blender Version

Broken: 2.78 BuildBot(3ceb68c) 2017-03-18
Worked: 2.78c Official (e92f235283)

Short description of error

Blending scene strip with alpha over blend type, works ok in opengl preview but the blending in not applied when the image is rendered.
Alpha is set to transparent in render properties

Left Buildbot----------Right Official 2.78c
openGl-preview.png
rendered.png

Exact steps for others to reproduce the error

Just open the blend file and render image or tick/untick "Opengl preview" in the VSE "Scene Preview/Render/OpenGL Preview" and "Refresh Sequencer"
Zip contents:

1 Blend file
1 Png image

VseBug.zip

**System Information** Windows 10 x64 I7-6700HQ GTX960M [system-info-build-bot.txt](https://archive.blender.org/developer/F514707/system-info-build-bot.txt) [system-info-official.txt](https://archive.blender.org/developer/F514708/system-info-official.txt) **Blender Version** Broken: 2.78 BuildBot(3ceb68c) 2017-03-18 Worked: 2.78c Official (e92f235283) **Short description of error** Blending scene strip with alpha over blend type, works ok in opengl preview but the blending in not applied when the image is rendered. Alpha is set to transparent in render properties **Left Buildbot----------Right Official 2.78c** ![openGl-preview.png](https://archive.blender.org/developer/F514711/openGl-preview.png) ![rendered.png](https://archive.blender.org/developer/F514713/rendered.png) **Exact steps for others to reproduce the error** Just open the blend file and render image or tick/untick *"Opengl preview"* in the VSE *"Scene Preview/Render/OpenGL Preview" and "Refresh Sequencer"* Zip contents: 1 Blend file 1 Png image [VseBug.zip](https://archive.blender.org/developer/F514716/VseBug.zip)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @KINjO

Added subscriber: @KINjO

Added subscriber: @FilipMond

Added subscriber: @FilipMond

@Oscar: The same behaviour under OS X 10.11 too in mentioned blender versions.

But I dont see relation or I don't think i mentioned this issue in #51001. Your issue is related to strip alpha in OpenGL preview (version 2.78c as working). My issue is metastrip opacity in final Render (version 2.78c as not working).

@Oscar: The same behaviour under OS X 10.11 too in mentioned blender versions. But I dont see relation or I don't think i mentioned this issue in #51001. Your issue is related to strip **alpha** in OpenGL preview (version 2.78c as working). My issue is metastrip **opacity** in final Render (version 2.78c as not working).
Author

In #51002#423792, @FilipMond wrote:
@Oscar: The same behaviour under OS X 10.11 too in mentioned blender versions.

But I dont see relation or I don't think i mentioned this issue in #51001. Your issue is related to strip alpha in OpenGL preview (version 2.78c as working). My issue is metastrip opacity in final Render (version 2.78c as not working).

Yes, you are right, sorry i misread your bug report.

> In #51002#423792, @FilipMond wrote: > @Oscar: The same behaviour under OS X 10.11 too in mentioned blender versions. > > But I dont see relation or I don't think i mentioned this issue in #51001. Your issue is related to strip **alpha** in OpenGL preview (version 2.78c as working). My issue is metastrip **opacity** in final Render (version 2.78c as not working). Yes, you are right, sorry i misread your bug report.
Member

Added subscribers: @Funkster-3, @Blendify

Added subscribers: @Funkster-3, @Blendify
Olly Funkster was assigned by Aaron Carlisle 2017-04-16 20:12:34 +02:00
Member

Indeed something seems weird here. @Funkster-3 can you take a look?

Indeed something seems weird here. @Funkster-3 can you take a look?

There's something pretty odd going on here. Firstly, I wound my source back to the commit that was tagged as 2.78c, and it still exhibits the problem. Secondly, the problem is nothing to do with the operation of "alpha over", but instead to do with the render result display.

If you render to an image editor window rather than just unticking OpenGL Preview, you should notice that the combo box for choosing the render layer is missing in the problematic build - in the working 2.78c it will appear between the Slot and Pass combo boxes, and will be set to "Composite".

In the broken builds, the box is missing because the scene being rendered has no layers in its renderresult->layers linked list. What you end up seeing is just the default "RenderLayer" layer from the source scene, which is why it seems like the alpha is broken. If you put some more VSE layers on top of the 3D scene, you still just get the 3D scene in the render output.

I'm now digging in the render pipeline to try to figure out where it's going wrong. Why it's build-environment dependent, I have no idea!

There's something pretty odd going on here. Firstly, I wound my source back to the commit that was tagged as 2.78c, and it still exhibits the problem. Secondly, the problem is nothing to do with the operation of "alpha over", but instead to do with the render result display. If you render to an image editor window rather than just unticking OpenGL Preview, you should notice that the combo box for choosing the render layer is missing in the problematic build - in the working 2.78c it will appear between the Slot and Pass combo boxes, and will be set to "Composite". In the broken builds, the box is missing because the scene being rendered has no layers in its renderresult->layers linked list. What you end up seeing is just the default "RenderLayer" layer from the source scene, which is why it seems like the alpha is broken. If you put some more VSE layers on top of the 3D scene, you still just get the 3D scene in the render output. I'm now digging in the render pipeline to try to figure out where it's going wrong. Why it's build-environment dependent, I have no idea!
Author

Hello Funkster! I made another quick test and in my test the combo box appears in both Blender versions. See the attached image, many thanks for looking into this.
2017-04-18 (1).png

Hello Funkster! I made another quick test and in my test the combo box appears in both Blender versions. See the attached image, many thanks for looking into this. ![2017-04-18 (1).png](https://archive.blender.org/developer/F549011/2017-04-18__1_.png)

Ah okay, thanks for the extra info. If you add another sequence strip (anything will do, color strip maybe?) on top of the scene strip, what ends up being displayed?

Ah okay, thanks for the extra info. If you add another sequence strip (anything will do, color strip maybe?) on top of the scene strip, what ends up being displayed?
Author

Hi,color strip added on top, the color strip is rendered.
2017-04-18 (2).png

Hi,color strip added on top, the color strip is rendered. ![2017-04-18 (2).png](https://archive.blender.org/developer/F549018/2017-04-18__2_.png)

Whoops, sorry - I mis-spoke before. I had added a text strip, forgetting that those default to "alpha over". Seems it doesn't matter where they are in the layer stack, if you have any other strips that are supposed to combine with the scene render (Add, Subtract, Multiply, Alpha over / under, Over Drop blend modes) then you either get nothing, or the 3D scene render, as your output (which thus doesn't match the OpenGL preview).

Seems I do get the "Composite" combo box in the buildbot builds, just not in my own builds. Not sure now whether I'm definitely looking in the right place due to the discrepancy between official builds and my own - I'll keep digging.

Whoops, sorry - I mis-spoke before. I had added a text strip, forgetting that those default to "alpha over". Seems it doesn't matter where they are in the layer stack, if you have any other strips that are supposed to combine with the scene render (Add, Subtract, Multiply, Alpha over / under, Over Drop blend modes) then you either get nothing, or the 3D scene render, as your output (which thus doesn't match the OpenGL preview). Seems I do get the "Composite" combo box in the buildbot builds, just not in my own builds. Not sure now whether I'm definitely looking in the right place due to the discrepancy between official builds and my own - I'll keep digging.

Added subscriber: @Sergey

Added subscriber: @Sergey

Okay, probably best to ignore pretty much everything I said above. I think I had my git in a mess (this seems to happen to me quite often now I come to think of it...) resulting in my jumping back to 2.78c still having the issue.

The problem stems from the fact that the rendered scene is in floating point, and the rest of the sequencer data is in 8-bit int. There's a thing that's there to convert the other channels into float and then do all operations from that point on in floating point, but if the colour spaces of the scene and the sequencer are identical (which I think they always are out of the box) then it doesn't bother with the conversion to float, so you just get empty data.

The problem is in colormanagement.c - IMB_colormanagement_transform_from_byte_threaded():

  if (STREQ(from_colorspace, to_colorspace)) {
      /* If source and destination color spaces are identical, skip
     * threading overhead and simply do nothing
     */
      return;
  }

This doesn't make sense, because even if the colour spaces are identical it still needs to translate from byte to float.

This change came in ce629c5d ... @Sergey what would you think of getting rid of this test? I tried it quickly and it fixes the issue.

Okay, probably best to ignore pretty much everything I said above. I think I had my git in a mess (this seems to happen to me quite often now I come to think of it...) resulting in my jumping back to 2.78c still having the issue. The problem stems from the fact that the rendered scene is in floating point, and the rest of the sequencer data is in 8-bit int. There's a thing that's there to convert the other channels into float and then do all operations from that point on in floating point, but if the colour spaces of the scene and the sequencer are identical (which I think they always are out of the box) then it doesn't bother with the conversion to float, so you just get empty data. The problem is in colormanagement.c - IMB_colormanagement_transform_from_byte_threaded(): ``` if (STREQ(from_colorspace, to_colorspace)) { /* If source and destination color spaces are identical, skip ``` * threading overhead and simply do nothing */ ``` return; } ``` This doesn't make sense, because even if the colour spaces are identical it still needs to translate from byte to float. This change came in ce629c5d ... @Sergey what would you think of getting rid of this test? I tried it quickly and it fixes the issue.

@Funkster-3, that check can not be avoided without performance drop. What we can do is to run much simpler byte-to-float conversion (IMB_buffer_float_from_byte) for such cases, which will still be faster that starting all the threading and creating pixel processors.

@Funkster-3, that check can not be avoided without performance drop. What we can do is to run much simpler byte-to-float conversion (`IMB_buffer_float_from_byte`) for such cases, which will still be faster that starting all the threading and creating pixel processors.

@Sergey sorry for the diff spam, uploaded it as you were typing. Sounds much better to use the simple conversion!

@Sergey sorry for the diff spam, uploaded it as you were typing. Sounds much better to use the simple conversion!

This issue was referenced by 06ac6ded66

This issue was referenced by 06ac6ded66fbbbce6d316ff44880897661b8e276

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
6 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#51002
No description provided.