# Finalizing displaced vertices using displacement map

**URL:** <https://discourse.threejs.org/t/finalizing-displaced-vertices-using-displacement-map/45547>\
**Category:** Questions\
**Tags:** displacement-map, textures, geometry\
**Created:** [December 7, 2022, 5:18pm UTC](https://discourse.threejs.org/t/finalizing-displaced-vertices-using-displacement-map/45547 "2022-12-07T17:18:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bugsbun1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/bugsbun1/32/6523_2.png) [@bugsbun1](https://discourse.threejs.org/u/bugsbun1)\
**Post date:** [December 7, 2022, 5:18pm UTC](https://discourse.threejs.org/t/finalizing-displaced-vertices-using-displacement-map/45547/1 "2022-12-07T17:18:34Z")

</div>

I am trying to finalize the position of the vertices that are displaced by the displacement map. When I finalize the position , there are holes in the geometry. I am doing this by displacing the vertices along the(normals) y axis of the model. I am not using a normalmap I am not doing this inside the shader since I want the final values of the vertex positions to be saved, but the result has holes in it.  
I am doing this by displacing the vertices along the(normals) y axis of the model.

How can I fix this ?

It takes a few seconds for the processing to take place :

[https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/0/f/0f6d7f976c8ece12e6256681a6a74d55c73cf866.mp4](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/0/f/0f6d7f976c8ece12e6256681a6a74d55c73cf866.mp4)

Here is a js fiddle : [Edit fiddle - JSFiddle - Code Playground](https://jsfiddle.net/sb2a1wgo/2/)  
but the url for displacement map is not working properly  
This related issue does not tell a fix : [displacementMap does not update normals · Issue #19677 · mrdoob/three.js · GitHub](https://github.com/mrdoob/three.js/issues/19677)

---

<div class="post-metadata">

**Author:** ![bugsbun1](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/bugsbun1/32/6523_2.png) [@bugsbun1](https://discourse.threejs.org/u/bugsbun1)\
**Post date:** [December 22, 2022, 7:48am UTC](https://discourse.threejs.org/t/finalizing-displaced-vertices-using-displacement-map/45547/2 "2022-12-22T07:48:47Z")

</div>

@Mugen87 any hints on this ?
