Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying custom visual shader to the planet? #8

Open
Valinakova opened this issue Apr 14, 2021 · 5 comments
Open

Applying custom visual shader to the planet? #8

Valinakova opened this issue Apr 14, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@Valinakova
Copy link

Valinakova commented Apr 14, 2021

An idea: A feature which allows users to apply their custom shader to the planet, and allow height map based on that shader. Is something like this possible? I tried changing the material but it doesn't override what was there before as seen in the test below.

image

Below is example of a texture I may try to apply:
image

@Hoimar
Copy link
Owner

Hoimar commented Apr 14, 2021

That should be possible actually. Did you click "Do Generate" in the inspector after you set the new material? Do you get errors in the output?
You can create a heightmap shader, but currently the actual geometry is generated on the CPU frome the noise generators. The generator only stores UV values in the mesh which are then usable on the GPU (e.g. shader).

@Valinakova
Copy link
Author

Ok, it works now!
As for heightmaps,

Ability to mix height map geometry with the noise generated ones. Is this something that you are/will work on? It could be quite useful. I could probably adjust the height map based on the ocean moon above so even when zoomed out and the "water" sphere fades out, the oceans are still visible and remain the same shape. The benefit of the noise generated texture is the LOD effect which, if combined with a height map adds more detail.

@Hoimar
Copy link
Owner

Hoimar commented Apr 14, 2021

So you're talking about a heightmap that would be usead either instead or together with the procedural noise? The former is on the roadmap but could be a bit complex to implement. Can't promise anything yet but I'm committed to improving the addon :)
You may want to try the new changes I pushed, I fixed some terrain seam issues (but the water sphere is still off, it will need replacement as well).
But yeah, it's all in an early state, I didn't dare to introduce versioning yet 😄

@Valinakova
Copy link
Author

Valinakova commented Apr 16, 2021

I'm quite excited to see the future of this addon. I tested it out, yeah the frame rates are noticeably higher. Getting consistently 20 FPS w/ RX 550 and its consistent. I also don't see seams issues so far. I do notice, though that for some of the smaller details, they can take a while to load. Like I would glide down to the planet, hang around for 10-20 seconds before the higher levels of detail pop up. Are you experiencing that?

As for height maps, I do wonder if it's possible to also get those small details on the vertexes in addition to a height map. It be cool to be able to have a height map that is many KM wide while being able to produce vertex features < meter in size.

@Hoimar
Copy link
Owner

Hoimar commented Apr 16, 2021

Nice, so am I 😉
Your performance still seems to be quite low, I'm consistently getting 60 FPS even if cruising around planets at surface level with max. speed (using an RX 580). This is a basic "benchmark" because it queues lots of terrain jobs, and indeed, all 12 cores of my Ryzen 5 1600X (12) @ 3.600GHz are pretty busy with the latest optimizations (some of which are not upstream yet, I'll push them soon).

Let's see if we can fix that, please run a few tests.

  • First of all, what CPU do you have? How are your CPU cores utilized when flying towards a planet (which is slow on your machine)? You should be able to see this in a task manager.
  • it may GPU dependent, did you disable the atmosphere shader? It's pretty expensive.
  • did you disable antialiasing (MSAA, FXAA) in the project settings?
  • did you decrease vertex count (resolution) of your planet?

You can also use the Godot Profiler and the Monitors tab to gain more insights.

That would for sure be nice to have, heightmaps combined with procedural noise. I'll see if I come up with something.

Edit: Your general performance issue actually looks like the GPU bottlenecks it, consistent 20FPS say that the GPU is under heavy load. And I tried gliding down to the planet very quickly and it takes about 2 seconds until I have full detail. What does the little HUD in the upper left say for queue size in these 10-20 seconds? Is it busy?

@Hoimar Hoimar added the enhancement New feature or request label Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants