Blender 2.8 Beta: Freestyle Lineset drawing order breaks when using textures #62196

Open
opened 2019-03-05 01:13:44 +01:00 by Ilari Männistö · 16 comments

System Information
Operating system: Win10 Home
Graphics card: Nvidia GTX 1080

Blender Version
Broken:
Date: 2019-02-10 23:55
Hash: 69b2f52681
Branch: blender2.7

Short description of error
Using textures to only one linestyle makes it always show on the bottom, no matter what the order for drawing linesets is. Tested with 2 linestyles and sets. I don't know how more linesets or styles will affect this bug.

Exact steps for others to reproduce the error

If I create two linesets in Freestyle and switch their order in the Lineset layers menu, I can choose in which order the linesets are drawn (topmost is drawn last). I think this is how it's supposed to work.

image.png this is the setup. "Lineset 2" is drawn first, and then "Lineset" on top of it. So it looks like this:
image.png
And I can change the order and it looks like this (red is drawn on top):
image.png

But if I then go to line style options on either one of the line sets and set it to "use nodes" in the texture tab, then the system breaks. Now I cannot switch the line set order by switching what the topmost lineset is. The one with the texture is always shown on bottom.

Here I've set the red lines (lineset 2) to have a texture. It's just black but as we can see, it's suddenly behind the green lines even though I didn't change the layer order.
image.png
And even if I change the layers to be the other way around, green is still on top. The system starts working again, if I use a texture on both of the linesets. Here I've created a texture to the green lines also (but I disconnected it and the default purple is shown).
image.png
If I now go and change the layer order, I can get the black lines to be drawn on top.
image.png

So there is a workaround, but this is still a bit of a nuisance.

Also (another bug): The freestyle lines probably have the wrong alpha blending mode (premultiplied vs straight) when using Eevee, since they leave a noticeable white rim on the borders of the lines. This is just a hunch though, and many people have probably already reported this. In Cycles it works.

(Edit: It also works in Workbench if you set up freestyle in Eevee and then change the render engine. I presume this is accidental but it would be nice to have freestyle in Workbench also)

**System Information** Operating system: Win10 Home Graphics card: Nvidia GTX 1080 **Blender Version** Broken: Date: 2019-02-10 23:55 Hash: 69b2f5268114 Branch: blender2.7 **Short description of error** Using textures to only one linestyle makes it always show on the bottom, no matter what the order for drawing linesets is. Tested with 2 linestyles and sets. I don't know how more linesets or styles will affect this bug. **Exact steps for others to reproduce the error** If I create two linesets in Freestyle and switch their order in the Lineset layers menu, I can choose in which order the linesets are drawn (topmost is drawn last). I think this is how it's supposed to work. ![image.png](https://archive.blender.org/developer/F6762570/image.png) this is the setup. "Lineset 2" is drawn first, and then "Lineset" on top of it. So it looks like this: ![image.png](https://archive.blender.org/developer/F6762574/image.png) And I can change the order and it looks like this (red is drawn on top): ![image.png](https://archive.blender.org/developer/F6762582/image.png) But if I then go to line style options on either one of the line sets and set it to "use nodes" in the texture tab, then the system breaks. Now I cannot switch the line set order by switching what the topmost lineset is. The one with the texture is always shown on bottom. Here I've set the red lines (lineset 2) to have a texture. It's just black but as we can see, it's suddenly behind the green lines even though I didn't change the layer order. ![image.png](https://archive.blender.org/developer/F6762589/image.png) And even if I change the layers to be the other way around, green is still on top. The system starts working again, if I use a texture on both of the linesets. Here I've created a texture to the green lines also (but I disconnected it and the default purple is shown). ![image.png](https://archive.blender.org/developer/F6762598/image.png) If I now go and change the layer order, I can get the black lines to be drawn on top. ![image.png](https://archive.blender.org/developer/F6762602/image.png) So there is a workaround, but this is still a bit of a nuisance. Also (another bug): The freestyle lines probably have the wrong alpha blending mode (premultiplied vs straight) when using Eevee, since they leave a noticeable white rim on the borders of the lines. This is just a hunch though, and many people have probably already reported this. In Cycles it works. (Edit: It also works in Workbench if you set up freestyle in Eevee and then change the render engine. I presume this is accidental but it would be nice to have freestyle in Workbench also)

Added subscriber: @Lattapotta

Added subscriber: @Lattapotta

Added subscriber: @ZedDB

Added subscriber: @ZedDB

Can you attach a sample .blend file?

Can you attach a sample .blend file?

Added subscriber: @zeauro

Added subscriber: @zeauro

I confirm the issue on linux.
Freestyle_textured_linesets.blend

It also happens in 2.79b.

At introduction of textured linestyles, Freestyle was using Blender Internal UI.
Use of nodes was forced for use of Freestyle with Cycles, but many Freestyle users continued to use Blender Internal with Freestyle until 2.8.

Now, user is forced to use nodes to texture Freestyle Strokes.
The "Go to Linestyles Texture properties button" does not make sense anymore in 2.8.

The ordering of linesets is crucial. There is no access to them in compositor. In 2.8, there is no Freestyle pass as in 2.79b.

It looks like alpha is not correctly supported by Output node, too.

I confirm the issue on linux. [Freestyle_textured_linesets.blend](https://archive.blender.org/developer/F6801491/Freestyle_textured_linesets.blend) It also happens in 2.79b. At introduction of textured linestyles, Freestyle was using Blender Internal UI. Use of nodes was forced for use of Freestyle with Cycles, but many Freestyle users continued to use Blender Internal with Freestyle until 2.8. Now, user is forced to use nodes to texture Freestyle Strokes. The "Go to Linestyles Texture properties button" does not make sense anymore in 2.8. The ordering of linesets is crucial. There is no access to them in compositor. In 2.8, there is no Freestyle pass as in 2.79b. It looks like alpha is not correctly supported by Output node, too.
Tamito Kajiyama was assigned by Sebastian Parborg 2019-03-11 18:31:39 +01:00

freestylebug.blend
Thanks to Ronan for a quick reply. Here's a 2.8 blend file for reference in case you need it. Switching which freestyle line set is topmost doesn't alter the drawing order.
(I've never uploaded a .blend file here before, hopefully I did it correctly.)

:)

[freestylebug.blend](https://archive.blender.org/developer/F6805271/freestylebug.blend) Thanks to Ronan for a quick reply. Here's a 2.8 blend file for reference in case you need it. Switching which freestyle line set is topmost doesn't alter the drawing order. (I've never uploaded a .blend file here before, hopefully I did it correctly.) :)
Tamito Kajiyama was unassigned by Dalai Felinto 2019-12-23 16:34:58 +01:00

Added subscriber: @kjym3

Added subscriber: @kjym3

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

I can not see any textures in files that were uploaded here, so I can't re-triage.

Can you please check if this is still an issue in latest build?
https://builder.blender.org/download/

I can not see any textures in files that were uploaded here, so I can't re-triage. Can you please check if this is still an issue in latest build? https://builder.blender.org/download/

@iss
Hello and sorry for a late reply.

I'll reupload a new file with some texture on it - although it doesn't matter because whether the other lineset is purple/textureless or it has a texture, it will always be drawn below the other lineset.
lineset_drawing_order.blend
My newest Blender (daily build, Git-fc1f5bded46a) crashed once when I tried to recreate the bug, but I finally succesfully recreated the bug on it.

Just to reiterate: the bug is that you break the drawing order of the different freestyle linesets, if you give a lineset a texture. Then, the lineset menu doesn't care which lineset is above or below. It just draws the textured lineset below at all times. (I tested this with just 2 linesets). Normally, it seems, the lineset that is listed above gets drawn last (ergo, on top of the other lineset). See the difference in the pictures.
image.png
image.png
image.png
This is the lineset menu where you can list from top to bottom the drawing order of the linesets. (top draws last, except when a texture is used and the system breaks)

(edit: posted a wrong picture, so i replaced it)

@iss Hello and sorry for a late reply. I'll reupload a new file with some texture on it - although it doesn't matter because whether the other lineset is purple/textureless or it has a texture, it will always be drawn below the other lineset. [lineset_drawing_order.blend](https://archive.blender.org/developer/F8304040/lineset_drawing_order.blend) My newest Blender (daily build, Git-fc1f5bded46a) crashed once when I tried to recreate the bug, but I finally succesfully recreated the bug on it. Just to reiterate: the bug is that you break the drawing order of the different freestyle linesets, if you give a lineset a texture. Then, the lineset menu doesn't care which lineset is above or below. It just draws the textured lineset below at all times. (I tested this with just 2 linesets). Normally, it seems, the lineset that is listed above gets drawn last (ergo, on top of the other lineset). See the difference in the pictures. ![image.png](https://archive.blender.org/developer/F8304046/image.png) ![image.png](https://archive.blender.org/developer/F8304051/image.png) ![image.png](https://archive.blender.org/developer/F8304049/image.png) This is the lineset menu where you can list from top to bottom the drawing order of the linesets. (top draws last, except when a texture is used and the system breaks) (edit: posted a wrong picture, so i replaced it)

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

Thanks for additional information.

I am still a bit confused about "except when a texture is used". I am not exatcly sure what you mean by that, but I am not very familiar with freestyle settings.

Thanks for additional information. I am still a bit confused about "except when a texture is used". I am not exatcly sure what you mean by that, but I am not very familiar with freestyle settings.

It's this setting here:
image.png
You can create a texture that runs along each stroke. It can be a image texture like I've set here. It is going to replace the colored freestyle lines with stretched versions of the image. In my case, it looks like this:
image.png
The texture is pretty awful but I hope it explains what freestyle lines with textures are.

It's this setting here: ![image.png](https://archive.blender.org/developer/F8304869/image.png) You can create a texture that runs along each stroke. It can be a image texture like I've set here. It is going to replace the colored freestyle lines with stretched versions of the image. In my case, it looks like this: ![image.png](https://archive.blender.org/developer/F8304872/image.png) The texture is pretty awful but I hope it explains what freestyle lines with textures are.

Thanks for explanation.

I was asking about that texture usage, because in file you provided Lineset is always drawn on top regardless of order and no texture is used to draw line.

So I am not sure if using texture is cause of this bug.

Thanks for explanation. I was asking about that texture usage, because in file you provided `Lineset` is always drawn on top regardless of order and no texture is used to draw line. So I am not sure if using texture is cause of this bug.

I think I already used the texture in that file but I'm not sure. If I did, sorry :( Then the lineset drawing order is already broken. It should be tested with a completely new file, maybe.

  1. So first you'd toggle the Freestyle on (in the Render Settings)
  2. Then you'd create 2 linesets. First one could be named "Red" for example, and set to "Visible" lines. Second lineset, "Green" could be set to "Hidden" like I've done, so the linesets draw different lines, but they can of course also both be drawing "Visible" lines. Then you'll only see the topmost color (Red) though, because Green gets drawn first and then Red over it.
  3. Now rerender the image but switch the listing so that Green is above and Red is below. Green should appear on top in the render.
  4. Now place a texture to either of the linesets and rerender. Its lines will appear below the other lineset lines.

But it's also possible that the textures are not the correct cause for the bug and I've been guessing wrong. I'm sorry I'm so poor at helping. Freestyle is not really a vital part of my daily work, so I don't think this bug needs a high priority, but I wanted to report it since I feel someone might stumble upon it.

I think I already used the texture in that file but I'm not sure. If I did, sorry :( Then the lineset drawing order is already broken. It should be tested with a completely new file, maybe. 1. So first you'd toggle the Freestyle on (in the Render Settings) 2. Then you'd create 2 linesets. First one could be named "Red" for example, and set to "Visible" lines. Second lineset, "Green" could be set to "Hidden" like I've done, so the linesets draw different lines, but they can of course also both be drawing "Visible" lines. Then you'll only see the topmost color (Red) though, because Green gets drawn first and then Red over it. 3. Now rerender the image but switch the listing so that Green is above and Red is below. Green should appear on top in the render. 4. Now place a texture to either of the linesets and rerender. Its lines will appear below the other lineset lines. But it's also possible that the textures are not the correct cause for the bug and I've been guessing wrong. I'm sorry I'm so poor at helping. Freestyle is not really a vital part of my daily work, so I don't think this bug needs a high priority, but I wanted to report it since I feel someone might stumble upon it.
Philipp Oeser added the
Interest
VFX & Video
label 2023-02-10 11:36:39 +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
5 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#62196
No description provided.