TokisanGames/Terrain3D

Rendering issue / black terrain

lulasz opened this issue · 10 comments

Terrain3D version

v0.9.1-beta

System information

Godot v4.2.1, Forward+
GPU: integrated and dedicated

Is the issue reproducable in the demo?

Yes, no settings changed

Issue description

After properly opening the demo, without any changes - far terrain is painted as black.

Not reproducable on previous version.

image

Logs

No errors shown in the console

Also seeing this, with Godot v4.3.dev.custom_build [2e7fc8131] and v0.9.1-beta:
image

I tried changing many engine rendering parameters, and also the exposed shader parameters, the only thing that seems to affect it are UV scales, specifically the texture UV scales, for example, here's changing the demo's textures UV scale from 0.1 (default) to 0.01:
image

And here are both textures UV scale set to 2.0:
image

I tried overriding the shader and tinkering with it and cross-referecing with commit history but couldn't find the regression. Hope this helps. Thanks.

4.3 is a moving target, broken, and not supported until it stabilizes. Your issue is about 4.1 and 0.9.1?

What card? Copy the info the ticket requested.
What renderer?

4.1.2 with 0.9.0 renders fine with both cards?

I tried overriding the shader and tinkering with it and cross-referecing with commit history but couldn't find the regression.

Git has a utility to do this called git bisect. It can help you narrow 100 commits down to 7 tests. If you can use it on your system we can get to the exact commit quickly.

I'm not the OP.
Windows 10 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 970

v4.1.2.stable.official does not open v0.9.0-beta due to:
Cannot load a GDExtension built for Godot 4.1.3 using an older version of Godot (4.1.2).;

v4.1.3.stable.official opens and works fine with v0.9.0-beta - no dark rendering issue;

v4.1.3.stable.official opens and works fine with v0.9.1-beta - no dark rendering issue;

I thought after the GPU sync fixes to Godot 4.3+master it would be more stable. There are some fixes I require, so I suppose I'll wait more and check on it periodically. My apologies. Thanks.

git bisect

I'm not building from source.

I'm not the OP.
I thought after the GPU sync fixes to Godot 4.3+master it would be more stable.

@Lippanon Thanks for the report from your testing. I've marked your comment as off topic. Problems with 4.3 is an entirely different issue, unrelated to this one. The core devs have made breaking changes to the renderer and are still making changes. I won't even look at it until it hits rc1-3.

v4.1.2.stable.official does not open v0.9.0-beta due to:
Cannot load a GDExtension built for Godot 4.1.3 using an older version of Godot (4.1.2).;

As it states, 0.9.0 supports 4.1.3-4.2.1. 4.1.2 can be used by building from source using the godot-cpp used for 4.1.2 as stated in the build from source and using previous engine versions docs. Though there's little reason to not upgrade from 4.1.2 to 4.1.3.

v4.1.3.stable.official opens and works fine with v0.9.0-beta - no dark rendering issue;
v4.1.3.stable.official opens and works fine with v0.9.1-beta - no dark rendering issue;

This is also my experience. We also use 4.2.1 just fine. Op will have to provide more details and testing.

git bisect
I'm not building from source.

This is for Op or anyone experiencing the issue to bisect between the 0.9.0 and 0.9.1 tags using Godot 4.1.2( 4.1.3 is better) and/or 4.2.1.

This happens also on LTS 4.2.1.stable.mono with v0.9.1-beta on Forward+

As previously - no errors in the console.

Hardware:
i7-11800H
Nvidia RTX 3060 Mobile and Intel UHD
Windows 11

@lulasz I can't reproduce this, and haven't heard about it from anyone else. So you alone can troubleshoot it.

Let's disregard 4.1.2 and only look at 4.2.1.

You didn't confirm if it works fine with 0.9-beta and 4.2.1.

How does it look with the autoshader and/or dual scaling disabled? (it's probably dual scaling looking at the pattern).

Do any of the debug views work?

You only showed a small slice of the terrain. Does the rock texture show on the near terrain?

Building the plugin from source and using git bisect between the 0.9.0 tag and 0.9.1 tag will tell us the exact commit that created the problem for your system. It's the fastest way to fix this.

As a workaround, you can try extracting the generated shader from 0.9.0 and using that in 0.9.1.

@TokisanGames The problem occurs only when using Noise in World Background setting and it is only visible on the generated background mesh.

I tested it with all settings and everything works on the manually painted terrain, but not on the generated World Background when set to Noise.

No settings, debug views or anything fixes the black "paint". Only setting the World background to Flat or None.

The issue occurs ONLY in the 0.9.1-beta, 0.9.0 works fine.

I am currently just testing the Terrain, not using it in production so a workaround is not needed, but I think this is something I need to report.

Here is a video:

https://github.com/TokisanGames/Terrain3D/assets/4968455/21e18ac1-5e46-4c39-a09c-f0e72ba82db2
(sorry for audio)

Thanks for more info. Does disabling dual scaling with world background set to noise change anything?

Do changing the dual scaling parameters, and/or the world noise parameters change the look at all?

As mentioned before, all the settings change only the look of painted tiles, not the World Background Tiles.

So no, no setting is making any change to the output of the black tiles. They stay exactly the same all the time.

The world noise parameters change the height of the terrain and the how the hills blend into the visible edges. So it's surprising that those parameters don't at least change the shape and edge of the visible terrain.

In any case your system apparently doesn't like the new noise algorithm. The world background noise is just an expensive gimmick anyway that won't be useful for many projects. Your options then are to use another world background mode, or use the noise algorithm from 0.9.