<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 1, 2017 at 8:46 AM, Andreas Plesch <span dir="ltr"><<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><div dir="auto">One strategy for standardization may be to follow three's Phong Material:</div><div dir="auto"><br></div><a href="https://github.com/mrdoob/three.js/blob/dev/src/materials/MeshPhongMaterial.js" target="_blank">https://github.com/mrdoob/<wbr>three.js/blob/dev/src/<wbr>materials/MeshPhongMaterial.js</a><div dir="auto"><br></div><div dir="auto">It defines mostly the same maps, and would have an example shader implementation for each which perhaps could be used as a reference.</div><div class="gmail_extra"><br></div></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail-m_1269408132044487994quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-m_1269408132044487994quoted-text"><br>
> On 4/30/2017 10:25 AM, Michalis Kamburelis wrote:<br>
>><br>
>>    Especially since for now Castle Game Engine expects to find the<br>
>> height map in the alpha channel of normal map, so we ignore the<br>
>> "displacementMap"...<br>
><br>
><br>
> Perhaps such configuration information should be in some kind of enumeration<br>
> field, for portability and reuse?<br>
<br>
</div>Hm, possibly. I think we'll see where our (Castle Game Engine and<br>
X3DOM) implementations will go.<br>
<br>
- Googling about the displacement support in X3DOM, they admit that<br>
it's something they are still "playing with", and their existing<br>
specification can change to incorporate new possible features.<br>
<br>
- It's similar with my "steep parallax bump mapping" --- it's not a<br>
standard technique in renderers yet (unlike the class "bump mapping",<br>
which is now widely implemented), it is only something cool that I'm<br>
playing with :)<br>
<div class="gmail-m_1269408132044487994quoted-text"><br></div></blockquote></div></div></div></div></blockquote><div><br></div><div>For reference, here is an interesting discussion on displacement texture issues</div><div><br></div><div><a href="https://github.com/mrdoob/three.js/pull/11271">https://github.com/mrdoob/three.js/pull/11271</a><br></div><div><br></div><div>There is agreement that only the vertex shader is affected and that the vertices are actually displaced. This makes the effect's usefulness limited in webgl since you will need a fine mesh. There is lot of discussion on when the displacement is applied, eg. to which normal, if there is skinning and morphing. The consensus appears to be that the displacement is applied last.</div><div><br></div><div>-Andreas</div></div>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div>