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

Add Configuration Warnings #542

Closed
Giwayume opened this issue Nov 4, 2024 · 4 comments · Fixed by #591
Closed

Add Configuration Warnings #542

Giwayume opened this issue Nov 4, 2024 · 4 comments · Fixed by #591
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers important High priority
Milestone

Comments

@Giwayume
Copy link

Giwayume commented Nov 4, 2024

Admin edit:
Add configuration warnings for:

  • No mipmaps
  • Mismatched texture size
  • Mismatched texture format
  • Compatibility mode && albedo/normal is compressed (and log error)

Terrain3D version

v0.9.3

System information

Godot 4.3 - Steam Deck

Is the issue reproducable in the demo?

Not applicable

Issue description

I was testing on steam deck and ran into a performance issue that basically boiled down to the fact that the texture didn't have mipmaps enabled. It was really bad, from like 60 fps down to 20 fps.

There might be an export type to tell the editor the texture is used for 3d, but if not, would be nice to have a configuration warning somewhere, because adding textures to the terrain doesn't automatically "prepare" them for 3D use like Godot does when you add them to a material.

Logs

No response

@TokisanGames
Copy link
Owner

You can't mix and match texture configuration, so all textures would have to have mipmaps disabled, which means the user didn't go through the texture preparation documentation. It should be obvious when mipmaps are disabled as the whole screen is a pixelated mess.

{2F536890-34C1-4EF7-9662-3BF40F15FDEA}

@Giwayume
Copy link
Author

Giwayume commented Nov 5, 2024

If the texture is only used for Terrain3D, Godot doesn't auto-enable mipmaps. Also, not obvious on a 4K monitor when the texture that Godot didn't import with mipmaps enabled is a normal map.

@TokisanGames TokisanGames changed the title Warn if mipmaps are not enabled on texture Configuration Warning if no mipmaps, or mismatched size, format Nov 22, 2024
@TokisanGames TokisanGames added this to the 1.0 milestone Nov 22, 2024
@TokisanGames TokisanGames added the enhancement New feature or request label Nov 22, 2024
@TokisanGames TokisanGames added the good first issue Good for newcomers label Nov 22, 2024
@TokisanGames TokisanGames changed the title Configuration Warning if no mipmaps, or mismatched size, format Add Configuration Warnings Nov 28, 2024
@TokisanGames
Copy link
Owner

TokisanGames commented Nov 28, 2024

Also add warnings and logs for compatibility mode and textures compressed.

Where generating texturearrays, and checking if dirty.

// DEPRECATED
if (texture_set->albedo_texture->is_compressed() && terrain->is_compatibility()) {
  LOG(ERROR, "Cannot add Compressed Albedo Texture to Texture2DArray in compatibility render mode.")
  continue;
}

@TokisanGames
Copy link
Owner

#591 addresses this.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Terrain3D Roadmap Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers important High priority
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants