mohsenph69 / Godot-MTerrain-plugin

A GDExtension plugin which give godot the ability to produce highly optimized Terrain for Open world games
MIT License
427 stars 23 forks source link

LOD and texture streaming #13

Closed Koalamana9 closed 9 months ago

Koalamana9 commented 11 months ago

While looking through your plugin, I came across a mention that it uses texture streaming, is it implemented via GDExtension and works faster than just loading texture through GDscript load()? Is it possible to use only texture streaming functionality without terrain on my own mesh? I’m also interested in the LOD system, how flexible is this system and can it be used separately from the terrain? If so, could you help change GDExtension code, leaving only LOD and texture streaming? Because this functionality is much more useful than another terrain plugin. Thanks!

Koalamana9 commented 9 months ago

Why is this closed? This is still a valid question, can your plugin be used for texture streaming without terrain?

mohsenph69 commented 9 months ago

Hello dear, Sorry I thought I already answered you I might answered someone with similar question in youtube or somewhere else and I confuse with here

So the answer is no, and the main reason for that is the terrain heightmap data is on RAM memory and because of that we can stream that and resize that to GPU memory as fast as possible, Also we calculate the LOD level on terrain and we use that information to how much the texture on GPU should be resized!

But the story for texture streaming for normal objects is different, Their LOD level should be calculated differently (It is possible that we have a lot of objects, and we have a object that is really far and we have another object with the same texture which is really close to us, they should consider all of this), and I think the LOD calculation is much more complex than terrain, in terrain the chunk which is far away you can certainly bring down its, heightmap resolution with worrying about anything.

And other thing is that you should read all the texture from hard-drive and you should do it in other thread.

So I think the texture streaming for other object is competently different, and I think it would be more complex, Not too much, I think a good programmer can write a good code for that, And I think the best way to implement that is to do that inside Godot Core.