# World Position Offset bugs with terrain

**URL:** <https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776>\
**Category:** Rendering\
**Tags:** Terrain, world-position-offse, unreal-engine, Landscape, question\
**Created:** [June 23, 2015, 3:44pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776 "2015-06-23T15:44:28Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davision](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Davision](https://forums.unrealengine.com/u/Davision)\
**Post date:** [June 23, 2015, 3:44pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/1 "2015-06-23T15:44:28Z")

</div>

When using world offset in a terrain material that offset can only be masked by layers and not by texture masks or by normal. Making snow that is only on top facing surfaces through normal and making it offset so it appears to have thickness does not work because of this bug.

Another bug is that making offset with VertexNormalWS does not work, it is like vertex normals of terrain does always point up. So it is impossible to do any push World Position Offset since the offset is just always going up.

I tested my terrain material on a sphere mesh and those things worked there.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [June 23, 2015, 7:56pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/2 "2015-06-23T19:56:18Z")

</div>

Hey Davision,

Would you mind providing me with some reproducible steps as well as some images as a reference for testing on my end for both issues you are reporting?

Thank you,

---

<div class="post-metadata">

**Author:** ![Davision](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Davision](https://forums.unrealengine.com/u/Davision)\
**Post date:** [June 26, 2015, 1:01pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/3 "2015-06-26T13:01:20Z")

</div>

Here you go:

World Position Offset push (by vertex normal) applied to spheres, the top is masked by top normal.

 ![47992-wpoa.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/d/22d16e408a530ce5bcf9d1c6a53a9954be21b0e9.jpeg)

Here the same is applied to a terrain, because of the 2 bugs nothing happens there:

 ![47993-wpob.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/d/abd3f647a0aac505c7eaf41223d13569be3073e7.jpeg)

Here is the same but with without the top mask:

 ![47995-wpo3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/a/efa09d2fe1cc50fd5ebcff95939c2af04f365021.jpeg)

It works but only up and down and that very extreme.

Here it is with the amount reduced a lot:

 ![47996-wpod.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/3/0/3305a5a550bc868d74302b9319020224959a3a33.jpeg)

Only up and down, like vertex normal is only showing up.

Here is the material setup:

 ![47997-weqeasd.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/b/92b6d75469fd429aafe4824e2fde668724f6d3fb.jpeg)

The texture is just world aligned there so it has a proper uv on a terrain slope. On the bottom is the masking of the top.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [June 29, 2015, 8:00pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/4 "2015-06-29T20:00:02Z")

</div>

Hey Davision,

Would you mind providing me with a small test project where this issue occurs so I can verify on my end?

I did attempt to recreate the material in the image you provided, there are also other settings and variables that might be specific to your project that could be affecting this issue. This is why I requested a small test project with the repro-case inherited.

---

<div class="post-metadata">

**Author:** ![Traggey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Traggey](https://forums.unrealengine.com/u/Traggey)\
**Post date:** [June 13, 2016, 11:50am UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/5 "2016-06-13T11:50:25Z")

</div>

I am having this EXACT same issue, trying to displace a cliffmaterial on my terrain to give it some more depth and using the VertexNormalWS method of displacing is displacing everything as if every single normal of the terrain was facing upwards.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [June 14, 2016, 8:36pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/6 "2016-06-14T20:36:04Z")

</div>

I will need some screenshots or an example set up to get this issue to occur on my end.

---

<div class="post-metadata">

**Author:** ![Traggey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Traggey](https://forums.unrealengine.com/u/Traggey)\
**Post date:** [June 14, 2016, 8:52pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/7 "2016-06-14T20:52:18Z")

</div>

![94654-unrealterrain.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/8/ea8577d021ae6922cc681f39f01427de223823e6.jpeg)

Alright so the material is a landscape material, obviously, taking texture information from a material function I’ve created, the material function uses worldspace textures in order to actually project properly onto the sides of the terrain and that all goes into the WPO. Hope that helps, if you need a project I could take some time and isolate the materials.  
I should also mentioned that I’m aware I’m displacing by not by WSnormals in that pic, but I’ve tried both!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [June 15, 2016, 2:14pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/8 "2016-06-15T14:14:05Z")

</div>

Yeah, I think a project with the simplified materials that clearly shows the bug using a minimal material functions and assets is going to be the best approach. I cannot gather enough relevant information from the picture you provided.

**Update** Haven’t heard from you in a few days, so I am going to mark this post as resolved until I can get the necessary information to reproduce the issue on my end.

Thanks,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [June 20, 2016, 2:01pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/9 "2016-06-20T14:01:05Z")

</div>

Haven’t heard from you in a few days, so I am going to mark this post as resolved until I can get the necessary information to reproduce the issue on my end.

---

<div class="post-metadata">

**Author:** ![Traggey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Traggey](https://forums.unrealengine.com/u/Traggey)\
**Post date:** [July 6, 2016, 5:41pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/10 "2016-07-06T17:41:59Z")

</div>

I’ve been away, is there anywhere in private I could send you my package? It’s not very big yet so sending it over to you should be of no issue. I have attempted time and time again to find a fix for this myself but it seems to simply be a bug.

Should also mention that the shader works perfectly fine when applied to a mesh, it only does this on landscapes.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [July 6, 2016, 5:50pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/11 "2016-07-06T17:50:46Z")

</div>

You can send me a private message via the Forums using a link from which I can download and test the issue.

Thanks,

---

<div class="post-metadata">

**Author:** ![Traggey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Traggey](https://forums.unrealengine.com/u/Traggey)\
**Post date:** [July 6, 2016, 6:18pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/12 "2016-07-06T18:18:55Z")

</div>

PM has been sent.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6e7b421a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6e7b421a](https://forums.unrealengine.com/u/anonymous_user_6e7b421a)\
**Post date:** [July 6, 2016, 9:11pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/13 "2016-07-06T21:11:49Z")

</div>

Hey all,

I appreciate your patience while I tested this issue and determined the bugs validity. I have entered a bug, UE-32867, to have this issue investigated. I was indeed able to see the issue on my end and was also puzzled as to the landscapes behavior when manipulated the vertices using the VertexNormalWS.

Once the issue has been addressed by our engineers, the fix will be added to the release notes for fixed issues within an upcoming full engine or hotfix release.

Let me know if you have further questions or need additional assistance.

Thank you,

---

<div class="post-metadata">

**Author:** ![Traggey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Traggey](https://forums.unrealengine.com/u/Traggey)\
**Post date:** [July 6, 2016, 9:14pm UTC](https://forums.unrealengine.com/t/world-position-offset-bugs-with-terrain/322776/14 "2016-07-06T21:14:54Z")

</div>

Thanks for your help Andrew, glad I wasn’t doing something stupid. Will keep my eyes open for the fix to this!
