48place
1 vote Vote

Terrain is applied flat on Vulkan with "Texture to heightmap"

Terrain is generated flat on Vulkan. Steps to reproduce:

Method 1 (in Editor)

* add mapmagic object and choose any graph
* leave default settings for Apply type: "Texture to heightmap"
* check that everything is ok
* switch backend from OpenGL to Vulkan
* press regenerate button in a graph
* all points of a graph are at 0 height but height-based texturing is ok (cliff edges, polar poles), so it's the problem not with internal MM2 calculation, but on how it applies a height to terrain
* check that trees and objects are floating in air (as terrain height hasn't applied)

Method 2:

* check that everything is OK in editor with pinned tiles in OpenGL
* build a player (doesn't matter mono or IL2CPP)
* start a with -force-vulkan
* see that everything is normal for pinned pregenerated terains
* go to the end of generated tile
* observe that newly generated tiles have the same problem
* observe that previously generated with OpenGL (in editor) pinned tiles have right terrain height

Setting apply type to either "Set Heights" or "Set Heights Delay LOD" solves it, but it's slower.

More info: Unity 2020.2.5f1, builtin-rip, no MicroSplat, RTX 2070, Linux (so I have to choose between old OpenGL 4.5 and noticeably faster Vulkan)

pure_luck, 22.02.2021, 22:22
Idea status: under consideration

Comments

Wraith, 28.02.2021, 11:13
"Texture to heightmap" uses the render texture to transfer terrain data. It assigns active render texture, copies terrain texture to it, and sends it to terrain. The procedure is the same for any graphics API, there are no @defines in code for that. Seems that Unity supports all of the steps for OpenGL, but doesn't support something for Vulkan. I will try to look what exactly is wrong and try to find a hack or at least report a bug to Unity.
pure_luck, 28.02.2021, 13:46
Thank you very much!

Please keep me informed, as I cannot use Crest now as it only supports Vulkan on Linux. At least I should know if need to seek for another water asset.
Wraith, 02.07.2021, 22:09
Does this issue still persist in Unity 2021?

Leave a comment