# Getting accurate BufferGeometry position attributes after displacementMap applied to MeshStandardMaterial

**URL:** <https://discourse.threejs.org/t/getting-accurate-buffergeometry-position-attributes-after-displacementmap-applied-to-meshstandardmaterial/32928>\
**Category:** Questions\
**Tags:** displacement-map, buffergeometry, bufferattributes\
**Created:** [December 22, 2021, 9:56pm UTC](https://discourse.threejs.org/t/getting-accurate-buffergeometry-position-attributes-after-displacementmap-applied-to-meshstandardmaterial/32928 "2021-12-22T21:56:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamT](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@JamT](https://discourse.threejs.org/u/JamT)\
**Post date:** [December 22, 2021, 9:56pm UTC](https://discourse.threejs.org/t/getting-accurate-buffergeometry-position-attributes-after-displacementmap-applied-to-meshstandardmaterial/32928/1 "2021-12-22T21:56:17Z")

</div>

Hi all. I’m applying a displacementMap to a material which is applied to a glb model of type BufferGeometry. I’d like to add other objects to the vertices positions of the model, but I can only seem to get pre-displaced data from the geometry attributes position via Vector3.fromBufferGeometry.

I’ve tried updating matrix world after applying the displacementMap. I’m not collecting the geometry attributes position until after the texture has loaded and been applied, and still I’m only able to get pre-displaced vertices positions.

I have searched here and SO, but can’t seem to find any pointers. Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![repalash](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/repalash/32/18241_2.png) [@repalash](https://discourse.threejs.org/u/repalash)\
**Post date:** [December 24, 2021, 2:16pm UTC](https://discourse.threejs.org/t/getting-accurate-buffergeometry-position-attributes-after-displacementmap-applied-to-meshstandardmaterial/32928/2 "2021-12-24T14:16:50Z")

</div>

displacementMap displaces the vertices in the vertex shader when rendering, so accessing in js will always give the raw value.  
You can displace the vertices manually by getting the normal and UV coordinate for the vertex, then the value in displacement map for that UV and adding it to the vertex position along the normal like  
`position += normal * ( displacementSample * displacementScale + displacementBias );`
