<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif; font-size: 12pt;">
<h1 style="margin: 1em 0px 0.5em; color: rgb(51, 51, 51); line-height: 1.2; font-family: Lato, "Helvetica Neue", Helvetica, sans-serif; font-size: 2.82rem; font-weight: 900; box-sizing: border-box; break-after: avoid-page; break-inside: avoid;">
<span style="box-sizing: border-box;">GSoC Week7 Status</span></h1>
<div tabindex="-1" style="color: rgb(51, 51, 51); line-height: 1.5rem; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: normal; box-sizing: border-box;">
<hr style="border-width: 1px 0px 0px; height: 0px; margin-top: 20px; margin-bottom: 20px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box;">
</div>
<p style="color: rgb(51, 51, 51); line-height: 1.5; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Hello everyone, here's YimingWu's week 7 report!</span></span></p>
<p style="color: rgb(51, 51, 51); line-height: 1.5; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">(Is wiki stable now? If so I can move the post there. Anywhay here's the link to my own host:
<strong><strong>IMAGE INCLUDED! </strong></strong><span style="box-sizing: border-box;" spellcheck="false"><a style="color: rgb(70, 63, 92); text-decoration: underline; cursor: pointer; box-sizing: border-box;" href="http://www.wellobserve.com/#!NPR/2018Summer/logs/Week7.md">http://www.wellobserve.com/#!NPR/2018Summer/logs/Week7.md</a></span><span style="box-sizing: border-box;">)</span></span></span></p>
<h2 style="margin: 1em 0px 0.5em; color: rgb(51, 51, 51); line-height: 1.2; font-family: Lato, "Helvetica Neue", Helvetica, sans-serif; font-size: 1.99rem; font-weight: 900; box-sizing: border-box; break-after: avoid-page; break-inside: avoid;">
<span style="box-sizing: border-box;">Things have done</span></h2>
<ol style="color: rgb(51, 51, 51); line-height: 1.5rem; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: normal; box-sizing: border-box;" start="1">
<li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Software rendering now working! (Still have some bugs, and it does not produce the exact same result as my standalone program. Need inspection)</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Intersection line calculation is also OK. the calculation result can then be displayed using DPIX realtime method.</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Removed old line style data in struct SceneLANPR. DPIX now uses the first line layer for style reference.</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Added support structure for object/material/collection-based line selection, function not implenented yet. (artists demand this)</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Dealed with many small bugs in software rendering, mainly:</span></span></p>
<ul style="box-sizing: border-box;">
<li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Depth value incorrect due to inconsistent log->linear process
</span><span style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="box-sizing: border-box;">0065c90</span></strong></span><span style="box-sizing: border-box;">(now ok)</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Earcut triangulate produce strange result.
</span><span style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="box-sizing: border-box;">b612938</span></strong></span><span style="box-sizing: border-box;">(now use default BEAUTY method, seems ok)</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">normal matrix error
</span><span style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="box-sizing: border-box;">a63777b</span></strong></span><span style="box-sizing: border-box;">(now fixed)</span></span></p>
</li></ul>
</li></ol>
<p style="color: rgb(51, 51, 51); line-height: 1.5; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Actually I could consider all the basic functions in LANPR (both CPU and GPU side) are working now. What I need to do next should be making it more compatible with existing
 render pipeline, and of course doucument most of the main usages. </span></span></p>
<p style="color: rgb(51, 51, 51); line-height: 1.5; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="width: 698.4px; text-align: center; font-family: monospace; display: inline-block; min-height: 10px; min-width: 10px; box-sizing: border-box;"></span></span></p>
<span style="display: block; box-sizing: border-box;"><br>
</span>
<p style="color: rgb(51, 51, 51); line-height: 1.5; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: 300; box-sizing: border-box; orphans: 4;">
</p>
<p></p>
<h2 style="margin: 1em 0px 0.5em; color: rgb(51, 51, 51); line-height: 1.2; font-family: Lato, "Helvetica Neue", Helvetica, sans-serif; font-size: 1.99rem; font-weight: 900; box-sizing: border-box; break-after: avoid-page; break-inside: avoid;">
<span style="box-sizing: border-box;">Next week</span></h2>
<ol style="color: rgb(51, 51, 51); line-height: 1.5rem; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: normal; box-sizing: border-box;" start="1">
<li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Add multithread support for software side (which already has thread-safe structures so would be easy.)</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Make LANPR work more stable:</span></span></p>
<ul style="box-sizing: border-box;">
<li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Try to solve the occlusion test bugs.</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">LANPR internally uses 64bit float format, but the obmat is converted directly from 32bit ob->obmat so this could have some pricision problem, I'll see what I can do.
 (and it may be the cause of current occlusion bugs)</span></span></p>
</li></ul>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Document LANPR usage. Also modify the ui to be more easily understood.</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">If I had more time, add object/material/collection-based line selection functions.</span></span></p>
</li></ol>
<h2 style="margin: 1em 0px 0.5em; color: rgb(51, 51, 51); line-height: 1.2; font-family: Lato, "Helvetica Neue", Helvetica, sans-serif; font-size: 1.99rem; font-weight: 900; box-sizing: border-box; break-after: avoid-page; break-inside: avoid;">
<span style="box-sizing: border-box;">Questions</span></h2>
<p style="color: rgb(51, 51, 51); line-height: 1.5; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Hey, I got some more questions, and most of them I can't seem to find a existing solution. And if I want to make LANPR into a useful thing then I will have to solve
 these.</span></span></p>
<ol style="color: rgb(51, 51, 51); line-height: 1.5rem; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: normal; box-sizing: border-box;" start="1">
<li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">About BMesh: I want to access each face's material infomation
</span><span style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="box-sizing: border-box;"><strong>after</strong></span></strong></span><span style="box-sizing: border-box;"> triangulation. I can't find anything that achieve
 this in BMHead. And since the geometry has changed, I can't access the material info in Mesh using the new index in BMesh. How do I achieve this?</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">About render to image:
</span><span style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="box-sizing: border-box;"><strong>Still can't get render_to_image to draw anything</strong></span></strong></span><span style="box-sizing: border-box;">. I tried
 using multisample buffer and normal texture buffer, the init and drawing code is exactly the same as what I've done for the viewport. (and viewport actually draw them perfectly). One strange thing that happens is that in commit
</span><span style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="box-sizing: border-box;">3ea9277</span></strong></span><span style="box-sizing: border-box;"> file lanpr_engine.c line 456 and 458, When I run this code, it seems
 that it uses the shader program and matrix from line 458 (which is for calculated line result) to render the content in line 456 (which contains a default cube batch). How could this even happen? (And this is the only time I got any dispaly on render_to_image)
 If any developer happend to have some time to check this ikt would be great. I don't know if I missed anything but from eevee's render_to_image I can't see any special treatments either.</span></span></p>
</li><li style="margin: 0px; box-sizing: border-box;">
<p style="margin: 0px 0px 0.5rem; line-height: 1.5; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Read Collection RNA property from blend file gives invalid pointer (very likely the last run time memory address instead of the newly created one). Any thing could cause
 this to happen? </span></span></p>
</li></ol>
<p style="color: rgb(51, 51, 51); line-height: 1.5; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">Thanks and have a great weekend!</span></span></p>
<p style="color: rgb(51, 51, 51); line-height: 1.5; font-family: Merriweather, "PT Serif", Georgia, "Times New Roman", STSong, serif; font-size: 1.12rem; font-weight: 300; box-sizing: border-box; orphans: 4;">
<span style="display: block; box-sizing: border-box;"><span style="box-sizing: border-box;">YimingWu</span></span></p>
<br>
</div>
</body>
</html>