SpiderPig Posted February 17, 2023 Share Posted February 17, 2023 Is it possible to spread a single texture over the entire terrain? I want to draw my erosion texture across the terrain surface... Quote Link to comment Share on other sites More sharing options...
Josh Posted February 17, 2023 Share Posted February 17, 2023 How would you suggest blending it? Quote 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 More sharing options...
Solution SpiderPig Posted February 17, 2023 Author Solution Share Posted February 17, 2023 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); } } } Quote Link to comment Share on other sites More sharing options...
Josh Posted February 17, 2023 Share Posted February 17, 2023 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. 1 Quote 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 More sharing options...
SpiderPig Posted February 17, 2023 Author Share Posted February 17, 2023 The above way looks pretty good and it's pretty straight forward to setup. 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 17, 2023 Share Posted February 17, 2023 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. 1 Quote 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 More sharing options...
Recommended Posts
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.