Freestyle ignores layer mask in render layers #35290

Closed
opened 2013-05-10 02:37:01 +02:00 by M Z · 9 comments

%%%In attached .blend file there are two objects on separate layers and render layers. Object on freestyle layer (2'nd) is hidden by 'wall' object so it should stay invisible on final render.
Unfortunately freestyle renders that object.

Official Blender 2.67 win x64%%%

%%%In attached .blend file there are two objects on separate layers and render layers. Object on freestyle layer (2'nd) is hidden by 'wall' object so it should stay invisible on final render. Unfortunately freestyle renders that object. Official Blender 2.67 win x64%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%Moved from Patches to Blender 2.6 Bug Tracker%%%

%%%Moved from Patches to Blender 2.6 Bug Tracker%%%

%%%Freestyle does not account for layer masks at the moment. This is a known limitation of the present Freestyle implementation as stated in the Freestyle section of the Blender online manual.

The key issue preventing the support for layer masks from being implemented is that Freestyle strokes are 2D elements that do not have Z depth information. It is noted that layer masks rely on Z depth information.

In Freestyle, feature edges can be connected regardless of objects to which the edges belong. Just as an example, I have attached a Freestyle render showing rough strokes along external contours. The lines are actually three rounds of one stroke (having variable color from red to yellow) constructed by connecting non-occluding contour lines of three cubes. For this kind of strokes, it is not trivial to define Z depth along strokes. An obvious solution is to inherit the Z depth information of the original feature edges (the non-occluding contour lines in this case), but composite results based on such Z depth information are likely unsatisfactory and difficult to tune by users.

Another aspect that makes the problem more complicated is the orientation of stroke faces. At the moment stroke faces are parallel to the 2D image plane, but artists may want to have different stroke face orientations depending on the original mesh geometry, specific artwork objectives, and so on. In this case, just inheriting the Z depth information of the original feature edges would not be sufficient any more and direct user intervention would be necessary.

To me addressing the reported issue looks a major challenge. For this reason I would close the report for now.%%%

%%%Freestyle does not account for layer masks at the moment. This is a known limitation of the present Freestyle implementation as stated in the Freestyle section of the Blender online manual. The key issue preventing the support for layer masks from being implemented is that Freestyle strokes are 2D elements that do not have Z depth information. It is noted that layer masks rely on Z depth information. In Freestyle, feature edges can be connected regardless of objects to which the edges belong. Just as an example, I have attached a Freestyle render showing rough strokes along external contours. The lines are actually three rounds of one stroke (having variable color from red to yellow) constructed by connecting non-occluding contour lines of three cubes. For this kind of strokes, it is not trivial to define Z depth along strokes. An obvious solution is to inherit the Z depth information of the original feature edges (the non-occluding contour lines in this case), but composite results based on such Z depth information are likely unsatisfactory and difficult to tune by users. Another aspect that makes the problem more complicated is the orientation of stroke faces. At the moment stroke faces are parallel to the 2D image plane, but artists may want to have different stroke face orientations depending on the original mesh geometry, specific artwork objectives, and so on. In this case, just inheriting the Z depth information of the original feature edges would not be sufficient any more and direct user intervention would be necessary. To me addressing the reported issue looks a major challenge. For this reason I would close the report for now.%%%

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

%%%When I faced this problem, my solution was to include both layers for the rendering, and filter the needed objects with an object group in the freestyle line set.
On the programming side, implementing layer masks could work the same way: making a union of the layers and mask layers, render it as usual, but filter out all objects not in the render layers just the same way as the object group filtering works.
%%%

%%%When I faced this problem, my solution was to include both layers for the rendering, and filter the needed objects with an object group in the freestyle line set. On the programming side, implementing layer masks could work the same way: making a union of the layers and mask layers, render it as usual, but filter out all objects not in the render layers just the same way as the object group filtering works. %%%

Added subscriber: @AditiaA.Pratama

Added subscriber: @AditiaA.Pratama

Added subscriber: @StephenHamacek

Added subscriber: @StephenHamacek

Would be great if there were an elegant solution to this. Becomes even more difficult with partly occluded objects. I'm trying to hack together compositing solutions with multiple layers, But it's a hacky and imprecise way to go. Good luck!

Would be great if there were an elegant solution to this. Becomes even more difficult with partly occluded objects. I'm trying to hack together compositing solutions with multiple layers, But it's a hacky and imprecise way to go. Good luck!

Added subscriber: @RayMairlot

Added subscriber: @RayMairlot
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
7 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#35290
No description provided.