Procedural Generated Mesh isn't scaling and is mirrored

Hi All,

I hope this is a simple one for you all. I recently downloaded and started playing with Sebastian Lague’s Procedural Generation tutorials. Specifically Proc Gen E06 which I imported into Unity 2019.4.17f1 (which needed a bit of conversion). Everything seems to be working fine except for 2 things:

  • For some reason the mesh is always mirrored in the x direction. i.e. the mesh is a mirror image of the Colour and Noise Maps.
  • If I want to make the map larger I increase the mapChunkSize in MapGenerator.cs to 1000. For some reason the Mesh ends up being a strip along the edge of the Colour Map and does not cover anywhere else. Anyone have any idea?

Appreciate any help. I am new to unity and this is driving me crazy. I also imported several other versions of the code and they all do the same thing. I am wondering if something has changed in unity between versions that may be causing this.

https://github.com/SebLague/Procedural-Landmass-Generation

  1. Mirrored map when using the tutorial out of the box mapChunkSize =241

Colour Map Plane


Mesh

Colour Map Plane shown is ok. Mesh only at side of map if mapChunkSize =1000

Cheers, Gadz

6663640–762262–MeshGenerator.cs (2.04 KB)
6663640–762265–TextureGenerator.cs (827 Bytes)

Hi, got the same problem as yours. I’m using a pretty fast easy fix, in MapDisplay.cs, change textureRender.transform.localScale = new Vector3(texture.width, 1, texture.height); to textureRender.transform.localScale = new Vector3(-1 * texture.width, 1, texture.height);. This will mirror the plane.

However, this might not fix the root of the problem, it’s more like an illusion that the bug is fixed. I’ll keep updating if I found a way to really solve this problem.

Cheers,
Neville

1 Like