Jump to content

Terrain Overlay Texture


Go to solution Solved by SpiderPig,

Recommended Posts

  • Solution
Posted

I've just realised there's probably no way to blend it seeing as Ultra can use so many different terrain materials.  I guess though you could assign a material per channel and do something like what I think I just got working...

for (int y = 0; y < 512; y++) {
    for (int x = 0; x < 512; x++) {
        auto value = terrain_gen->GetErrosion(x, y);

        if (value != 0.0f) {
            terrain->SetMaterial(x, y, rocks, value);
        }
    }
}

 

Posted

Well, we could multiply the final output of the terrain system by the overlay color. It might be a good idea. However, you might also want to consider using the the overlay color to control which material appears at which point, and its strength, as you did above.

I am not sure which will work out better. I feel like an assigned material would be better...if it looks good. I expect to be trying this fairly soon with my lunar visualization stuff.

  • Like 1

Let's build cool stuff and have fun. :)

Posted
1 hour ago, SpiderPig said:

Also, I wonder if bending between materials can be done like this : https://habr.com/en/post/442924/

I don't know much about it but I'm going to try it for my voxel terrain and see what works.

Yes, Leadwerks does this. It just requires a displacement map.

I have not implemented this in Ultra yet because I want to have an exact definition of how it works.

  • Like 1

Let's build cool stuff and have fun. :)

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.

×
×
  • Create New...