Page MenuHome

Grease Pencil looks different rendered then in viewport with opaque materials
Open, Confirmed, MediumPublic

Description

System Information
Operating system: Win 10
Graphics card: 1080 Ti

Blender Version

blender2.8, 2019-01-14

Worked: (optional)

Grease Pencil looks very different rendered when using semi-transparent materials, tested using both Filmic and Default Color profiles. Only way to fix is by adding an additional layer and making it completely white.

Exact steps for others to reproduce the error
Draw in Grease Pencil with semi-transparent pink filled material. And compare rendered result to viewport.

Details

Type
Bug

Event Timeline

Jacques Lucke (JacquesLucke) triaged this task as Needs Information from User priority.

Could you provide an example .blend file, please?

Just simply render and compare to the rendered viewport.

Jacques Lucke (JacquesLucke) raised the priority of this task from Needs Information from User to Confirmed, Medium.

I have been looking at your file and there are some parameters that need to be chnaged.

The first is you are using a world color taht is different of the viewport, so as the background is different, the transparent looks different.

The second issue is that you need to change the color manamegement.

Attached the file fixed. I have added a white background to test with the same background.

Hey Antonio!

Changing the color management and making the world color for the view-port background white doesn't fix the transparent issues.

The only thing that has fixed the transparent issues that I've found (and like you have done in the example.) Is adding a new completely white plane to the background.

This seems like a work-around though? and shouldn't be the default as it would be confusing for beginners to have their renders looking much different then the view-port right?

Hi,

With the viewport set to Rendered, the output still gives different results:

It looks like the viewport is doing an unassociated alpha blend with the background but the final render is associated/premultiplied.

Manually filling a background GP layer is a workaround but not all that ideal. The second .blend also shows issues along the rectangle edges:

The rectangle could be expanded beyond the edges of the frame of course. But the user has to know to do it.

Could an unassociated->premultiplied transform be inserted for the final render out? My brain can't work out the details, but I'm thinking that should be possible?

I know that adding a white background is not the perfect solution, but manage the background color will be part of the Eevee integration with Grease Pencil, but this integration is not ready (not in 2.80) and will be implemented in future versions.

It’s Blender’s broken alpha handling. Has been this way forever, and the “fixes” that were added broke it at least as bad. And the viewer is broken.

It’s give up until a developer decides to fix the entire pipeline to associated alpha.

To see the proper result, broken viewer notwithstanding, paint in float. The reason that it works in float is because the float path didn’t decide to break the entire pipeline by supporting unassociated alpha.

Yes, this needs a fix, but it's not only in grease pencil, so it needs developers in other areas the Blender and currently there aren't resources to do it.

Brecht Van Lommel (brecht) closed this task as Resolved.

This appears to be fixed now.

There's now quite a hue error for semi-transparent objects:

Tested with today's (2019-06-07) buildbot release: aa003c73245f-linux-glibc224-x86_64

Same results with a build from Feb 21st, so not a recent change.

Stroke:
[0.999828, 0.315918, 0.000000, 1.000000]

Fill:
[0.999828, 0.522433, 0.000000, 0.253246]

Color Management: defaults

Just to add; if as before, a solid fill object is added to a background layer - the hue is normalised.

White rectangle added to the left side: