﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AKjym3%2FDevFundProject%2FInterimReport2</id>
	<title>利用者:Kjym3/DevFundProject/InterimReport2 - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AKjym3%2FDevFundProject%2FInterimReport2"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kjym3/DevFundProject/InterimReport2&amp;action=history"/>
	<updated>2026-05-19T21:32:48Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kjym3/DevFundProject/InterimReport2&amp;diff=148597&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kjym3/DevFundProject/InterimReport2&amp;diff=148597&amp;oldid=prev"/>
		<updated>2018-06-28T21:11:33Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 21:11時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kjym3/DevFundProject/InterimReport2&amp;diff=148596&amp;oldid=prev</id>
		<title>2014年10月21日 (火) 03:06にwiki&gt;Kjym3による</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kjym3/DevFundProject/InterimReport2&amp;diff=148596&amp;oldid=prev"/>
		<updated>2014-10-21T03:06:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Development of Blender's Non-Photorealistic Rendering Capabilities: Interim Report #2=&lt;br /&gt;
&lt;br /&gt;
;Author:&lt;br /&gt;
: [[User:Kjym3|Tamito Kajiyama]]&lt;br /&gt;
;Date:&lt;br /&gt;
:6 August 2014&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The present document is an interim report of work progresses by the project granted to the Author thanks to financial support by the [http://www.blender.org/foundation/development-fund/ Blender Foundation (BF) development fund].  The initial three-month contract of the project from April 2014 has been extended by another three months up to the end of September.  Hence this report covers project outcomes since the [[User:Kjym3/DevFundProject/InterimReport|previous interim report (6 June 2014)]] instead of intending to serve as a final report of the initial contract.  Recalling the main project components below as planned in the [[User:Kjym3/DevFundProject/Proposal|project proposal]], the subsequent sections summarize major results and deliverables of the work done during the last two months.&lt;br /&gt;
&lt;br /&gt;
# Freestyle performance improvements in terms of rendering time and memory consumption.&lt;br /&gt;
# Better artists experience during interactive line stylization exercises.&lt;br /&gt;
# Technical support for the development of Blender NPR rendering features.&lt;br /&gt;
&lt;br /&gt;
The report is then concluded with future plans for the rest of the project duration.&lt;br /&gt;
&lt;br /&gt;
==Results and deliverables==&lt;br /&gt;
&lt;br /&gt;
===Freestyle performance improvements===&lt;br /&gt;
&lt;br /&gt;
During the last two weeks of July, development focus was put on Freestyle performance optimization for reduced memory consumption.  It is recalled that the Freestyle rendering process consists of modular steps as listed below, which allows for step-by-step performance optimization for space:&lt;br /&gt;
&lt;br /&gt;
# '''Mesh loading:''' Input scene data is received from Blender and cleaned up.&lt;br /&gt;
# '''Winged edge building:''' A graph data structure (called winged edges) for bidirectional traversing of edges is created.&lt;br /&gt;
# '''Silhouette detection:''' Silhouette lines and other feature edges are identified based on winged edges.&lt;br /&gt;
# '''View map building:''' A 2D representation of the input scene (called a view map) is created from winged edges.&lt;br /&gt;
# '''Stroke drawing:''' A set of stylization options is applied to identified feature lines by Python scripting.&lt;br /&gt;
# '''Stroke rendering:''' A raster image of stylized lines is rendered.&lt;br /&gt;
&lt;br /&gt;
A concern related to the optimization efforts is to keep visual consistency between the pre- and post-optimization versions of the code.  If code revisions for improved memory consumption are found “guilty” for major visual changes, then the code updates have to be either revised to address the differences or submitted for review by artists.  For this reason, selected test cases (Figure 1) were used to evaluate performance improvements (in terms of peak memory consumption in Freestyle) and double-check if visual consistency is maintained.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
|[[File:Kjym3_BF2014_InterimReport2_test_case_ichiotsu.png|center|200px]]&lt;br /&gt;
|ID: ichiotsu&lt;br /&gt;
74641 vertices, 120592 faces&lt;br /&gt;
|- &lt;br /&gt;
|[[File:Kjym3_BF2014_InterimReport2_test_case_ramskull.png|center|350px]]&lt;br /&gt;
|ID: ramskull&lt;br /&gt;
370252 vertices, 740656 faces&lt;br /&gt;
|- &lt;br /&gt;
|[[File:Kjym3_BF2014_InterimReport2_test_case_lily.png|center|500px]]&lt;br /&gt;
|ID: lily&lt;br /&gt;
460330 vertices, 748683 faces&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;center&amp;gt;'''Figure 1.''' Test cases.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Memory optimization attempts so far have been made in the first four steps from mesh importing to view map building.   Experimental results (Table 1) showed that performance gains were within the range from 6% to 9% with respect to the peak memory consumption in the non-optimized baseline version of the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+'''Table 1.''' Freestyle peak memory consumption in megabytes [M].&lt;br /&gt;
|-&lt;br /&gt;
! Test case&lt;br /&gt;
! Baseline&lt;br /&gt;
! Optimized&lt;br /&gt;
|- &lt;br /&gt;
| ichiotsu&lt;br /&gt;
| 320.33M (100%)&lt;br /&gt;
| 296.75M (92.6%)&lt;br /&gt;
|- &lt;br /&gt;
| ramskull&lt;br /&gt;
| 1616.94M (100%)&lt;br /&gt;
| 1520.49M (90.8%)&lt;br /&gt;
|- &lt;br /&gt;
| lily&lt;br /&gt;
| 1550.79M (100%)&lt;br /&gt;
| 1408.10M (94.0%)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An idea of code tuning for space was further applied to a grid data structure used for view map building.  Early test results of the code revisions including this idea indicated a memory consumption of 279.08M (87.1%) in the “ichiotsu” test case, namely a reduction of 12.9% from the baseline version.  Experiments with the other two test cases are foreseen in a short time.&lt;br /&gt;
&lt;br /&gt;
Code revisions have been made in a local branch.  The optimized code will be proposed for inclusion in Blender 2.73 release.&lt;br /&gt;
&lt;br /&gt;
===Improved artists experience with Freestyle===&lt;br /&gt;
&lt;br /&gt;
In response to frequent requests from Blender artists, the Freestyle line renderer was made available in Cycles in addition to the Blender Internal (BI).  Unlike BI, materials and textures in Cycles are configured only by means of shader nodes.  This implies two issues that had to be properly addressed by the design and implementation of Freestyle for Cycles:&lt;br /&gt;
&lt;br /&gt;
* There are no material color properties commonly used by both Cycles and BI (except for the diffuse color of BI materials, which is also used by Cycles when shader nodes are disabled). &lt;br /&gt;
* The conventional texture mapping and influence panels of the Textures properties window are not used for Cycles, while Freestyle for BI has been relying on these UI panels to set up textures.&lt;br /&gt;
&lt;br /&gt;
To resolve the issue of material colors, a new Freestyle-specific color property named “Freestyle line” was introduced in material ID data blocks (Figure 2).  This property provides users with a reliable way to specify line colors on a per-material basis, no matter what rendering engine is used for Freestyle renders.  Another property named “line color priority” (shown next to the line color in the UI) was also introduced in order to specify the ordering of competing line colors at material boundaries.  A use case of the line color priority is detailed in the following Freestyle development blog article.&lt;br /&gt;
&lt;br /&gt;
[http://freestyleintegration.wordpress.com/2014/07/07/line-color-priority/ http://freestyleintegration.wordpress.com/2014/07/07/line-color-priority/]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Blender_272_freestyle_line_color_ui.png|thumb|center|200px|'''Figure 2.''' Freestyle Line properties.]]&lt;br /&gt;
&lt;br /&gt;
The texture issue was instead addressed by two new shader nodes named “Line Style Output” and “UV Along Stroke” specifically designed for Freestyle line texturing (Figure 3).  The Line Style Ouput node specifies how to map the colors and alpha transparency of textures on to the base color and base alpha transparency of line styles.  The UV Along Stroke input node gives access to UV maps (with and without stroke tips) defined along strokes.  These UV maps become available only during the Freestyle rendering process.  Hence the UV Along Stroke node cannot be replaced by the conventional UV Map input node which takes an existing UV map already defined as part of mesh data.&lt;br /&gt;
&lt;br /&gt;
It is noted that before the new support for Freestyle in Cycles was added, artists willing to use Freestyle together with Cycles had to rely on a complicated workflow outlined as follows.  First a 3D scene is set up and rendered with Cycles.  Second a full copy of the scene is created in order to render Freestyle lines using BI.  Finally the Cycles and Freestyle renders are combined using the compositor.  The availability of Freestyle in Cycles will greatly simplify NPR workflows of this kind, without having to create a copied scene for Freestyle.&lt;br /&gt;
&lt;br /&gt;
The code revisions for Freestyle line rendering in Cycles ([https://developer.blender.org/D632 patch D632]) have been under code review with a view to inclusion in the next Blender 2.72 release. &lt;br /&gt;
&lt;br /&gt;
[[File:Blender_272_textured_strokes_in_cycles_ui.png|thumb|center|500px|'''Figure 3.''' An example of textured Freestyle lines in Cycles.]]&lt;br /&gt;
&lt;br /&gt;
===General Blender NPR development===&lt;br /&gt;
&lt;br /&gt;
In addition to the big development targets documented above, important code updates were made during the reported period of time with the aim of improved Blender NPR capabilities in general.&lt;br /&gt;
&lt;br /&gt;
First, Freestyle line rendering in the 3D viewport was fixed so that changes in Freestyle settings will immediately take effect in the viewport preview ([https://developer.blender.org/rB269b14f184bc rB269b14f184bc]).  Freestyle preview rendering is likely to serve as an intuitive tool for artists to define a set of line stylization parameters in a shorter turn-around time.&lt;br /&gt;
&lt;br /&gt;
Second, incoming reports of crashes in Freestyle were duly addressed, which contributed to improved Freestyle run-time stability:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.blender.org/T40833 T40833]: Crash when rendering with freestyle.&lt;br /&gt;
* [https://developer.blender.org/T41180 T41180]: Crash when using motion blur with Freestyle.&lt;br /&gt;
* [https://developer.blender.org/T40307 T40307]: Crash with freestyle and particle hair.&lt;br /&gt;
* Freestyle: Fix for a potential infinite loop in stroke resampling by vertex count ([https://developer.blender.org/rB812515b623be rB812515b623be]).&lt;br /&gt;
&lt;br /&gt;
Finally, last but not least, the implementation of the Freestyle Python API was significantly improved in close collaboration with flokkievids (Folkert de Vries).  Freestyle comes with a number of predefined style modules written in Python that are intended to provide coder-artists with examples of Freestyle Python scripting.  Hence the code readability of the existing Python scripts has been a major concern of Freestyle development.  It is also shown that applying more Python-like coding practices to Freestyle style modules may lead to performance improvements in terms of rendering speed.  These work elements were addressed by the following patch sets, each of which is a result of repeated code reviews and careful patch revisions:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.blender.org/D319 D319]: Freestyle Python scripts update.&lt;br /&gt;
* [https://developer.blender.org/D545 D545]: Freestyle Python API: new methods for Stroke and StrokeVertexIterator.&lt;br /&gt;
* [https://developer.blender.org/D623 D623]: Freestyle Python API: Updates and speedups for the parameter editor.&lt;br /&gt;
&lt;br /&gt;
Although not related to NPR stuff, several Windows and/or internationalization issues were also resolved through patch submissions by the Author:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.blender.org/D594 D594]: Fix T40065: Pressing Esc in separate render result window does not focus main window.&lt;br /&gt;
* [https://developer.blender.org/D595 D595]: Additional fix for T35176: Python failure with .blend files loaded from paths including non-ASCII characters.&lt;br /&gt;
* [https://developer.blender.org/D605 D605]: Fixes for proper handling of wchar_t paths in MinGW.&lt;br /&gt;
&lt;br /&gt;
==Plans for the rest of the project duration==&lt;br /&gt;
&lt;br /&gt;
The general development targets listed in the Introduction section will keep serving as guidelines of the project during the remaining two months.  Among the three project targets, a strong emphasis is put on Freestyle performance improvements.  Specifically, tuning efforts for reduced memory consumption will be continued, while improved rendering speed will also be pursued as much as time permits.&lt;br /&gt;
&lt;br /&gt;
A final report is planned at the end of the extended project duration.  If the project contract is further extended for additional months from October, then another interim report will instead be delivered at that time.&lt;/div&gt;</summary>
		<author><name>wiki&gt;Kjym3</name></author>
		
	</entry>
</feed>