Diffuse material colour not assigned to stroke when rendering to SVG using Freestyle #43082

Closed
opened 2014-12-31 16:23:58 +01:00 by Florian Bonte · 9 comments

System Information
Windows 7 64 bit
NVidia GeForce GT 425M

Blender Version
Broken: 2.73-rc

When trying to render to svg, the resulting strokes always have the Base Color as set in Freestyle Line Style under Color instead of the colour resulting from modifiers, like Along Stroke or Material.

Exact steps for others to reproduce the error
Create a scene with a few objects which have a Diffuse colour
Enable Freestyle and Freestyle SVG Export
In Freestyle Line Style (in the Render Layers tab), click Color and add the modifier Material
Set to Mix and Diffuse Color (if you used a diffuse colour on that material, the bug appears with either Specular or Freestyle Line)
Change the Base Color so it's not black
Render
View the resulting svg file in your favorite svg editor: the strokes all have the Base Color instead of the diffuse material colour as expected
When selecting Fill Contours in Freestyle SVG Export, the filled areas do have the correct material colour but the strokes are still in base colour

I don't know if this is really a bug since filled areas (when that option is selected) have the correct colour so that the outlines of the shapes are visible. But I have an application where only the strokes are used (and their colour). In that case consider this a feature request where you can apply a custom (preferrably material) colour to strokes.

SvgRenderTest.blend

**System Information** Windows 7 64 bit NVidia GeForce GT 425M **Blender Version** Broken: 2.73-rc When trying to render to svg, the resulting strokes always have the Base Color as set in Freestyle Line Style under Color instead of the colour resulting from modifiers, like Along Stroke or Material. **Exact steps for others to reproduce the error** Create a scene with a few objects which have a Diffuse colour Enable Freestyle and Freestyle SVG Export In Freestyle Line Style (in the Render Layers tab), click Color and add the modifier Material Set to Mix and Diffuse Color (if you used a diffuse colour on that material, the bug appears with either Specular or Freestyle Line) Change the Base Color so it's not black Render View the resulting svg file in your favorite svg editor: the strokes all have the Base Color instead of the diffuse material colour as expected When selecting Fill Contours in Freestyle SVG Export, the filled areas do have the correct material colour but the strokes are still in base colour I don't know if this is really a bug since filled areas (when that option is selected) have the correct colour so that the outlines of the shapes are visible. But I have an application where only the strokes are used (and their colour). In that case consider this a feature request where you can apply a custom (preferrably material) colour to strokes. [SvgRenderTest.blend](https://archive.blender.org/developer/F134430/SvgRenderTest.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @colouredmirrorball

Added subscriber: @colouredmirrorball
Author

I guess it could be generalised to all color modifiers in Freestyle Line Style instead of only material. None of them appear to have an effect on the svg (they do affect the produced bitmap image tough).

I guess it could be generalised to all color modifiers in Freestyle Line Style instead of only material. None of them appear to have an effect on the svg (they do affect the produced bitmap image tough).
Tamito Kajiyama was assigned by Bastien Montagne 2015-01-01 22:27:54 +01:00

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

The reported behaviour of the SVG exporter is a feature and not a bug. The rationale is that individual lines in an exported figure are SVG paths, each of which can have a fixed color, transparency, and line width. Hence only the base line color, alpha and thickness specified in a line style are applied to SVG lines. All modifiers for these line properties are simply ignored. On the other hand geometry modifiers are taken into account.

The reported behaviour of the SVG exporter is a feature and not a bug. The rationale is that individual lines in an exported figure are SVG paths, each of which can have a fixed color, transparency, and line width. Hence only the base line color, alpha and thickness specified in a line style are applied to SVG lines. All modifiers for these line properties are simply ignored. On the other hand geometry modifiers are taken into account.

Added subscriber: @flokkievids

Added subscriber: @flokkievids

Just revised the Freestyle section of the Blender 2.73 release logs to better highlight the fact that only the base line color, transparency and thickness take effects and no modifiers are applied.

Just revised the Freestyle section of the Blender 2.73 release logs to better highlight the fact that only the base line color, transparency and thickness take effects and no modifiers are applied.

To elaborate a little further:

SVG doesn't support per-vertex style, where Freestyle does. this makes an exact conversion impossible. We decided that the best solution would be to export the base stroke color.
If you do need to export a specific style, please send me a message and we'll have a look at the possibilities.

To elaborate a little further: SVG doesn't support per-vertex style, where Freestyle does. this makes an exact conversion impossible. We decided that the best solution would be to export the base stroke color. If you do need to export a specific style, please send me a message and we'll have a look at the possibilities.
Author

I apologise for being new to this website and not having figured out how to send messages, I hope a comment is also acceptable.

Even though per-vertex colouring is not possible, I do believe per-stroke colouring is. Maybe this can be an option as the next best thing?

I'm not in a hurry for this as I currently can output to dxf using Freestyle and a custom plugin, which works fine with material colour. But I expect it won't keep on working as Blender progresses so I got very excited when learning Blender could generate proper 2D vector art natively.

I apologise for being new to this website and not having figured out how to send messages, I hope a comment is also acceptable. Even though per-vertex colouring is not possible, I do believe per-stroke colouring is. Maybe this can be an option as the next best thing? I'm not in a hurry for this as I currently can output to dxf using Freestyle and a custom plugin, which works fine with material colour. But I expect it won't keep on working as Blender progresses so I got very excited when learning Blender could generate proper 2D vector art natively.
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
3 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#43082
No description provided.