<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You can use subdivision field in a sphere node to get a fine mesh in X3DOM.  I think it’s available for other geometry as well.  That’s how I get the flower effect in X3DOM.  I have to use an IFS otherwise (boo).  Then I put the displacement in the vertex shader.   believe the normals may be dependent on displacement, but don’t quote me.<div class=""><br class=""></div><div class="">John<br class=""><div><blockquote type="cite" class=""><div class="">On May 5, 2017, at 5:07 PM, Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" class="">andreasplesch@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, May 1, 2017 at 8:46 AM, Andreas Plesch <span dir="ltr" class=""><<a href="mailto:andreasplesch@gmail.com" target="_blank" class="">andreasplesch@gmail.com</a>></span> wrote:<br class=""><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" class=""><div class=""><div dir="auto" class="">One strategy for standardization may be to follow three's Phong Material:</div><div dir="auto" class=""><br class=""></div><a href="https://github.com/mrdoob/three.js/blob/dev/src/materials/MeshPhongMaterial.js" target="_blank" class="">https://github.com/mrdoob/<wbr class="">three.js/blob/dev/src/<wbr class="">materials/MeshPhongMaterial.js</a><div dir="auto" class=""><br class=""></div><div dir="auto" class="">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 class=""></div></div><div dir="auto" class=""><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 class="">
> On 4/30/2017 10:25 AM, Michalis Kamburelis wrote:<br class="">
>><br class="">
>>    Especially since for now Castle Game Engine expects to find the<br class="">
>> height map in the alpha channel of normal map, so we ignore the<br class="">
>> "displacementMap"...<br class="">
><br class="">
><br class="">
> Perhaps such configuration information should be in some kind of enumeration<br class="">
> field, for portability and reuse?<br class="">
<br class="">
</div>Hm, possibly. I think we'll see where our (Castle Game Engine and<br class="">
X3DOM) implementations will go.<br class="">
<br class="">
- Googling about the displacement support in X3DOM, they admit that<br class="">
it's something they are still "playing with", and their existing<br class="">
specification can change to incorporate new possible features.<br class="">
<br class="">
- It's similar with my "steep parallax bump mapping" --- it's not a<br class="">
standard technique in renderers yet (unlike the class "bump mapping",<br class="">
which is now widely implemented), it is only something cool that I'm<br class="">
playing with :)<br class="">
<div class="gmail-m_1269408132044487994quoted-text"><br class=""></div></blockquote></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">For reference, here is an interesting discussion on displacement texture issues</div><div class=""><br class=""></div><div class=""><a href="https://github.com/mrdoob/three.js/pull/11271" class="">https://github.com/mrdoob/three.js/pull/11271</a><br class=""></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">-Andreas</div></div>-- <br class=""><div class="gmail_signature">Andreas Plesch<br class="">39 Barbara Rd.<br class="">Waltham, MA 02453</div>
</div></div>
_______________________________________________<br class="">x3d-public mailing list<br class=""><a href="mailto:x3d-public@web3d.org" class="">x3d-public@web3d.org</a><br class="">http://web3d.org/mailman/listinfo/x3d-public_web3d.org<br class=""></div></blockquote></div><br class=""></div></body></html>