Jump to content

Terrain Texture Artifacting


StOneDOes
 Share

Go to solution Solved by Josh,

Recommended Posts

 

I'm playing around with some of the example code, starting with Terrain. I've taken and run the exact sample code from the following page:
https://www.ultraengine.com/learn/CreateTerrain?lang=cpp

There appears to be some visual artifacting with the multiple textures. Removing the displacement map from the texture did not solve it. However it does not occur if I just apply a single texture.
I took a short video sample to demonstrate this.

My PC Information : Windows 10
CPU    - AMD Ryzen 9 3900X 12 Core @3.8GHz
GFX    - AMD Radeon RX 6600 XT (with latest driver installed from https://www.amd.com/en/support/graphics/amd-radeon-6000-series/amd-radeon-6600-series/amd-radeon-rx-6600-xt)
RAM    - Corsair Vengeance RGB PRO 16GB DDR4 @3200MHz

Thank you

 

Link to comment
Share on other sites

Confirmed with an RX480, no validation errors. 

image.thumb.png.0dece820d78cbd16dd1f54ab4be89aa5.png

Loading shader family "Shaders/PBR.json"
Loading shader family "Shaders/Terrain.json"
Loading pixmap "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Terrain/512.r16"
Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_4k.dds"
Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_4k.dds"
Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds"
Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds"
Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds"
Loading shader family "Shaders/Sky.json"
Loading posteffect "Shaders/PostEffects/Refraction.json"
UNASSIGNED-khronos-validation-createinstance-status-message(INFO / SPEC): msgNum: -671457468 - Validation Information: [ UNASSIGNED-khronos-validation-createinstance-status-message ] Object 0: handle = 0x15f12652f00, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xd7fa5f44 | Khronos Validation Layer Active:
    Settings File: Found at C:\Users\reepb\AppData\Local\LunarG\vkconfig\override\vk_layer_settings.txt specified by VkConfig application override.
    Current Enables: None.
    Current Disables: VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT.

    Objects: 1
        [0] 0x15f12652f00, type: 1, name: NULL
UNASSIGNED-cache-file-error(INFO / SPEC): msgNum: -256165483 - Validation Information: [ UNASSIGNED-cache-file-error ] Object 0: handle = 0x15f16dd36f0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf0bb3995 | Cannot open shader validation cache at C:\Users\reepb\AppData\Local\Temp/shader_validation_cache.bin for reading (it may not exist yet)
    Objects: 1
        [0] 0x15f16dd36f0, type: 3, name: NULL
Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_4k.dds"
Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_4k.dds"
Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds"
Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds"
Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds"
Deleting shader family "Shaders/Terrain.json"
Deleting shader family "Shaders/Sky.json"

C:\Users\reepb\Documents\Ultra Engine\Projects\AMDTest\AMDTest_d.exe (process 9236) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

 

  • Thanks 1

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

41 minutes ago, St0neD0es said:

How did you get all of the extra debug information output?

Also, it looks like you have indeed also got the same issue on your AMD card?

I enabled the Console in the compile options for Debug. 

And yes, I see artificing with the terrain, so this is something on AMD. 

  • Like 1

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

  • 2 weeks later...
8 hours ago, reepblue said:

@St0neD0esSince Josh fixed that problem now, would not hurt to update your project and report back. 

When you say to update my project, is this an additional step to updating the software under the updates tab? Something interesting that I did notice that under the Projects tab, is that my project has a green tick on it, but then I clicked Update in the Updates tab (which oddly enough took only like 3 seconds), and now it shows a little yellow triangle on my project where the tick was. Does this mean anything?

This is why I think it would be idea to display the exact version that the software is running eg. v1.01.123

Link to comment
Share on other sites

Okay, it will probably take a while for AMD to look at this. If I can avoid buying another expensive GPU I would like to. Please hold tight and trust me that this will get fixed before your game is finished.

  • Like 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 2 weeks later...
  • 8 months later...

Here is an update of the example:
 

#include "UltraEngine.h"
#include "Components/Player/CameraControls.hpp"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    //Get the display list
    auto displays = GetDisplays();

    //Create a window
    auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);

    //Create a world
    auto world = CreateWorld();
    world->SetAmbientLight(0);

    //Create a framebuffer
    auto framebuffer = CreateFramebuffer(window);

    //Create a camera
    auto camera = CreateCamera(world);
    camera->SetFov(70);
    camera->SetPosition(0, 50, 0);
    camera->SetRotation(45, 0, 0);
    camera->SetClearColor(0.125);

    //Sunlight
    auto light = CreateDirectionalLight(world);
    light->SetRotation(45, 35, 0);
    light->SetColor(2);

    //Create terrain
    auto terrain = CreateTerrain(world, 512);
    terrain->LoadHeightmap("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Terrain/512.r16");
    terrain->SetScale(1, 100, 1);

    //Create base material
    auto ground = CreateMaterial();
    auto diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_4k.dds");
    auto normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_4k.dds");
    ground->SetTexture(diffusemap, TEXTURE_BASE);
    ground->SetTexture(normalmap, TEXTURE_NORMAL);
    auto groundlayer = terrain->AddLayer(ground);
    terrain->Fill(groundlayer);

    //Create paint material
    auto rocks = CreateMaterial();
    diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds");
    normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds");
    auto dispmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds");
    rocks->SetTexture(diffusemap, TEXTURE_BASE);
    rocks->SetTexture(normalmap, TEXTURE_NORMAL);
    rocks->SetTexture(dispmap, TEXTURE_DISPLACEMENT);
    auto rocklayer = terrain->AddLayer(rocks);

    //Apply material based on terrain slope
    for (int x = 0; x < terrain->resolution.x; ++x)
    {
        for (int y = 0; y < terrain->resolution.y; ++y)
        {
            float slope = terrain->GetSlope(x, y);
            if (slope > 15.0f)
            {
                float wt = Min((slope - 15.0f) / 10.0f, 1.0f);
                terrain->SetLayerWeight(rocklayer, x, y, wt);
            }
        }
    }

    //Camera controls
    camera->AddComponent<CameraControls>();

    //Main loop
    while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
    {
        world->Update();
        world->Render(framebuffer);
    }
    return 0;
}

 

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...