<div dir="ltr"><p dir="ltr">Regarding the Unreal compatibility, I believe the main thing there is the PBR material node that I mentioned earlier. This would use the Disney principled BRDF, which is an easy to use BSDF model combining diffuse and glossy (typically GGX microfacet as implemented in Cycles). This is sometimes called the &quot;PBR shader&quot; in the realtime world.</p>
<p dir="ltr">This BSDF goes along with more advanced realtime light integration methods. There&#39;s multiple variations and extensions, but I believe the main things for creating game assets in Blender would be:</p>
<p dir="ltr">Direct light is computed more or less the same as it is now, looping over lights in the shader and using shadow maps for shadowing. Some kind of support for area lights could be added, though generally it&#39;s not really accurate, using tricks like blurring the shadow maps or increasing the glossy roughness to approximate them.</p>
<p dir="ltr">For indirect light the basic method is to use an environment map, with ambient occlusion for shadowing. To handle BSDFs with varying roughness, you make a kind &quot;mipmap&quot; of the environment map, with multiple levels from sharp to blurry. For a sharp BSDF you do a lookup in the sharp levels, for a diffuse or rough glossy you do a lookup in the blurry levels. For accurate results the filtering to create these levels should take into account the BSDF shape.</p>
<p dir="ltr">This is of course a rough approximation to full indirect light, but generally it works well enough for rendering individual assets. You can do more advanced things like light probes, VXGI, SSS, deferred lighting, but I won&#39;t go into these things.</p><p dir="ltr">A lot of infrastructure is already there. There is direct light and shadow map code (though it&#39;s coupled tightly to the old material system). We have a GGX microfacet BSDF in Cycles, screen space ambient occlusion in the viewport and code to render the world environment into a texture. But actually implementing it will require some tricky decisions about how things fit together and how to handle compatibility issues.</p>
<p dir="ltr">On Sun, Jan 10, 2016 at 5:23 PM, Alberto Torres &lt;<a href="mailto:kungfoobar@gmail.com" target="_blank">kungfoobar@gmail.com</a>&gt; wrote:<br>
&gt; Ton,<br>
&gt;<br>
&gt; I forgot to mention: yes, I&#39;ll publish it as open source as soon as<br>
&gt; something works.<br>
&gt;<br>
&gt; Cheers.<br>
&gt;<br>
&gt; On Sun, Jan 10, 2016 at 12:16 PM, Ton Roosendaal &lt;<a href="mailto:ton@blender.org" target="_blank">ton@blender.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Alberto,<br>
&gt;&gt;<br>
&gt;&gt; It&#39;s very nice that people develop own engines to use with Blender. But if<br>
&gt;&gt; you don&#39;t have that as a public project, then it&#39;s not relevant here.<br>
&gt;&gt;<br>
&gt;&gt; Here - on this mailing list - we target at working on Blender itself;<br>
&gt;&gt; which is a complete free/open source suite for artists to make compelling 3D<br>
&gt;&gt; content, including games or content for games. That is the main and first<br>
&gt;&gt; goal.<br>
&gt;&gt;<br>
&gt;&gt; For people who want to use their own engines with Blender, they can help<br>
&gt;&gt; by making sure we use designs that work in general - specifically also for<br>
&gt;&gt; others who would develop external engines - and in a way our own goals can<br>
&gt;&gt; be achieved as well.<br>
&gt;&gt;<br>
&gt;&gt; Within that context, feel welcome to share design proposals or code.<br>
&gt;&gt;<br>
&gt;&gt; -Ton-<br>
&gt;&gt;<br>
&gt;&gt; --------------------------------------------------------<br>
&gt;&gt; Ton Roosendaal - <a href="mailto:ton@blender.org" target="_blank">ton@blender.org</a> - <a href="http://www.blender.org" target="_blank">www.blender.org</a><br>
&gt;&gt; Chairman Blender Foundation - Producer Blender Institute<br>
&gt;&gt; Entrepotdok 57A - 1018AD Amsterdam - The Netherlands<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt; On 9 Jan, 2016, at 19:21, Alberto Torres &lt;<a href="mailto:kungfoobar@gmail.com" target="_blank">kungfoobar@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hello Ton, Brecht,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I&#39;ve used Blender GLSL shaders extensively and I&#39;ve been planning in<br>
&gt;&gt; &gt; making my own material architecture that can do many things the current GLSL<br>
&gt;&gt; &gt; nodes can&#39;t. For now it&#39;s a side project but once done it will be useful on<br>
&gt;&gt; &gt; my day work, too.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; So far I&#39;ve &quot;reverse engineered&quot; the Material node, which does too many<br>
&gt;&gt; &gt; things, and I finally understand in detail what it does (and its warts). A<br>
&gt;&gt; &gt; great first step will be separating it in two stages: textures and lights.<br>
&gt;&gt; &gt; (In fact my current shader trees have two types of Material nodes, shadeless<br>
&gt;&gt; &gt; textures and textureless lighting). This would allow to add &quot;stages&quot; or<br>
&gt;&gt; &gt; &quot;buffered channels&quot; for deferred rendering and other advanced rendering<br>
&gt;&gt; &gt; techniques.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Another step is having energy-conserving BRDF(s); I&#39;m not sure whether<br>
&gt;&gt; &gt; we have this already in the GLSL library but it should be clear to the user,<br>
&gt;&gt; &gt; and set by default, to have FBR or FBR-like setups that are believable and<br>
&gt;&gt; &gt; easy to tweak.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Another important feature is having object-controlled parameters instead<br>
&gt;&gt; &gt; of being per-material. To some degree, this is already possible for<br>
&gt;&gt; &gt; numerical values (obcolor, UV, VCol), but there&#39;s no way to say &quot;this object<br>
&gt;&gt; &gt; will have material X but with textures A and B&quot;.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Also, many existing features of Blender Render are technically feasible<br>
&gt;&gt; &gt; in GLSL but are absent, such as having some other object for texture<br>
&gt;&gt; &gt; coordinates, or &quot;blend&quot; textures (having to use a color ramp node instead).<br>
&gt;&gt; &gt; Although in general this point is not important if we&#39;re planning an<br>
&gt;&gt; &gt; overhaul.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Bottom line, I&#39;m planning in developing a stand-alone GLSL-based (or<br>
&gt;&gt; &gt; SPIR-V or some abstraction for both) graphics engine which can be<br>
&gt;&gt; &gt; potentially integrated into Blender both as render engine and as viewport<br>
&gt;&gt; &gt; renderer.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Cheers.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Sat, Jan 9, 2016 at 2:49 PM, Ton Roosendaal &lt;<a href="mailto:ton@blender.org" target="_blank">ton@blender.org</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi Brecht,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &quot;Vision&quot; is a big word, it can mean a lot. Currently there&#39;s nobody with<br>
&gt;&gt; &gt; sufficient time to tackle the design, that&#39;s true. But such problems could<br>
&gt;&gt; &gt; be solved by active recruitment and/or funding.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; What I miss is a mention of using the Unreal shader design. It was<br>
&gt;&gt; &gt; suggested to align as close as possible to Unreal shaders for our 2.8<br>
&gt;&gt; &gt; viewport, and use that to make viewport previz possible for Cycles or other<br>
&gt;&gt; &gt; engines.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I also miss active contributors giving feedback. It&#39;s not so much about<br>
&gt;&gt; &gt; ideas or visions, I want to hear what people would suggest to work on,<br>
&gt;&gt; &gt; however small it is.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Alexander: there&#39;s a whole lot of open patches from you indeed. I think<br>
&gt;&gt; &gt; we should more seriously look into that with high priority. For as long<br>
&gt;&gt; &gt; things stay compatible (old files render same), we can be quite flexible<br>
&gt;&gt; &gt; here. Provided you&#39;re around to maintain the issues a chance causes of<br>
&gt;&gt; &gt; course.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Laters,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; -Ton-<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --------------------------------------------------------<br>
&gt;&gt; &gt; Ton Roosendaal - <a href="mailto:ton@blender.org" target="_blank">ton@blender.org</a> - <a href="http://www.blender.org" target="_blank">www.blender.org</a><br>
&gt;&gt; &gt; Chairman Blender Foundation - Producer Blender Institute<br>
&gt;&gt; &gt; Entrepotdok 57A - 1018AD Amsterdam - The Netherlands<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; On 8 Jan, 2016, at 19:26, Brecht Van Lommel<br>
&gt;&gt; &gt; &gt; &lt;<a href="mailto:brechtvanlommel@pandora.be" target="_blank">brechtvanlommel@pandora.be</a>&gt; wrote:<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; Ok, so it seems that currently there isn&#39;t really a vision for a<br>
&gt;&gt; &gt; &gt; better realtime shading system. At least not from people reading the<br>
&gt;&gt; &gt; &gt; bf-viewport and bf-gamedev mailing lists.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; I&#39;ll review the patches that seem reasonable to me and don&#39;t really<br>
&gt;&gt; &gt; &gt; break compatibility, and those can go into Blender 2.77. For bigger<br>
&gt;&gt; &gt; &gt; changes someone else would need to take the responsibility.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; On Fri, Jan 8, 2016 at 1:48 PM, &lt;<a href="mailto:a.romanov@blend4web.com" target="_blank">a.romanov@blend4web.com</a>&gt; wrote:<br>
&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt;&gt; Adding these Cycles node features to BI seems all reasonable to me,<br>
&gt;&gt; &gt; &gt;&gt;&gt; particularly if the target would be to unify things more with Cycles<br>
&gt;&gt; &gt; &gt;&gt;&gt; material nodes instead of adding a completely new system<br>
&gt;&gt; &gt; &gt;&gt;&gt; specifically<br>
&gt;&gt; &gt; &gt;&gt;&gt; for the viewport.<br>
&gt;&gt; &gt; &gt;&gt; It&#39;s very good, because we are primarily interested in such things.<br>
&gt;&gt; &gt; &gt;&gt; And patches with support for BI and GLSL could even go into the 2.7<br>
&gt;&gt; &gt; &gt;&gt; branch as it does not break backward compatibility, isn&#39;t it?<br>
&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt;&gt; The issue with incremental changes is that you&#39;re also pretty much<br>
&gt;&gt; &gt; &gt;&gt;&gt; forced to incrementally break compatibility over many Blender<br>
&gt;&gt; &gt; &gt;&gt;&gt; versions, which is annoying for users. If it was mostly about<br>
&gt;&gt; &gt; &gt;&gt;&gt; parameters, just adding a new PBR material node would be a good<br>
&gt;&gt; &gt; &gt;&gt;&gt; solution for compatibility.<br>
&gt;&gt; &gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt; Primarily we are interested in the stable branch of viewport<br>
&gt;&gt; &gt; &gt;&gt; corresponding to current state of BI. So it could be 2.7 branch with<br>
&gt;&gt; &gt; &gt;&gt; simplified material workflow, that could be done by adding a new PBR<br>
&gt;&gt; &gt; &gt;&gt; material node.<br>
&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt;&gt; But there&#39;s issues with the way lights and materials interact, how<br>
&gt;&gt; &gt; &gt;&gt;&gt; transparency and ray tracing are wrong in subtle ways, distinctions<br>
&gt;&gt; &gt; &gt;&gt;&gt; between specular/reflection and diffuse/environment light, and more.<br>
&gt;&gt; &gt; &gt;&gt;&gt; In my experience keeping those exceptions while also adding a new<br>
&gt;&gt; &gt; &gt;&gt;&gt; PBR<br>
&gt;&gt; &gt; &gt;&gt;&gt; mode makes the code extremely complicated.<br>
&gt;&gt; &gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt;&gt; I don&#39;t want to go into too much detail here, but here&#39;s some old<br>
&gt;&gt; &gt; &gt;&gt;&gt; notes about design issues if you&#39;re interested:<br>
&gt;&gt; &gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt;&gt; <a href="http://wiki.blender.org/index.php/Dev:2.5/Source/ShadingSystem/Implementation" target="_blank">http://wiki.blender.org/index.php/Dev:2.5/Source/ShadingSystem/Implementation</a><br>
&gt;&gt; &gt; &gt;&gt;&gt; <a href="http://wiki.blender.org/index.php/User:Brecht/RenderIdeas" target="_blank">http://wiki.blender.org/index.php/User:Brecht/RenderIdeas</a><br>
&gt;&gt; &gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt; Thanks for the tip. I need more deeply to learn.<br>
&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt;&gt; Anyway, maybe it is fine to incrementally break compatibility during<br>
&gt;&gt; &gt; &gt;&gt;&gt; the Blender 2.8 release cycle and users will just have to accept<br>
&gt;&gt; &gt; &gt;&gt;&gt; that?<br>
&gt;&gt; &gt; &gt;&gt;&gt; Whatever way we do this, it would still be good to have some kind of<br>
&gt;&gt; &gt; &gt;&gt;&gt; vision for what the end result should be.<br>
&gt;&gt; &gt; &gt;&gt; In Blend4Web we keep deprecated features in 3-5 releases and our<br>
&gt;&gt; &gt; &gt;&gt; users<br>
&gt;&gt; &gt; &gt;&gt; have time to adjust. But we have releases per month.<br>
&gt;&gt; &gt; &gt;&gt; It&#39;s important to understand exactly what is the aim of the first<br>
&gt;&gt; &gt; &gt;&gt; release of 2.8. I&#39;m also not sure I understand. But, from the<br>
&gt;&gt; &gt; &gt;&gt; conversation it seems to me that BI should stay.<br>
&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt;<br>
&gt;&gt; &gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt; &gt;&gt; Bf-viewport mailing list<br>
&gt;&gt; &gt; &gt;&gt; <a href="mailto:Bf-viewport@blender.org" target="_blank">Bf-viewport@blender.org</a><br>
&gt;&gt; &gt; &gt;&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-viewport" target="_blank">http://lists.blender.org/mailman/listinfo/bf-viewport</a><br>
&gt;&gt; &gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; &gt; Bf-gamedev mailing list<br>
&gt;&gt; &gt; &gt; <a href="mailto:Bf-gamedev@blender.org" target="_blank">Bf-gamedev@blender.org</a><br>
&gt;&gt; &gt; &gt; <a href="http://lists.blender.org/mailman/listinfo/bf-gamedev" target="_blank">http://lists.blender.org/mailman/listinfo/bf-gamedev</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Bf-gamedev mailing list<br>
&gt;&gt; &gt; <a href="mailto:Bf-gamedev@blender.org" target="_blank">Bf-gamedev@blender.org</a><br>
&gt;&gt; &gt; <a href="http://lists.blender.org/mailman/listinfo/bf-gamedev" target="_blank">http://lists.blender.org/mailman/listinfo/bf-gamedev</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Bf-gamedev mailing list<br>
&gt;&gt; &gt; <a href="mailto:Bf-gamedev@blender.org" target="_blank">Bf-gamedev@blender.org</a><br>
&gt;&gt; &gt; <a href="http://lists.blender.org/mailman/listinfo/bf-gamedev" target="_blank">http://lists.blender.org/mailman/listinfo/bf-gamedev</a><br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Bf-gamedev mailing list<br>
&gt;&gt; <a href="mailto:Bf-gamedev@blender.org" target="_blank">Bf-gamedev@blender.org</a><br>
&gt;&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-gamedev" target="_blank">http://lists.blender.org/mailman/listinfo/bf-gamedev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Bf-gamedev mailing list<br>
&gt; <a href="mailto:Bf-gamedev@blender.org" target="_blank">Bf-gamedev@blender.org</a><br>
&gt; <a href="http://lists.blender.org/mailman/listinfo/bf-gamedev" target="_blank">http://lists.blender.org/mailman/listinfo/bf-gamedev</a><br>
&gt;</p>
</div>