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

Adding new texture to new surface crashes Godot #147

Closed
GeneralProtectionFault opened this issue Jul 22, 2023 · 6 comments
Closed

Adding new texture to new surface crashes Godot #147

GeneralProtectionFault opened this issue Jul 22, 2023 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@GeneralProtectionFault
Copy link

Obligatory info:
Godot 4.1.1 mono/C# version
Terrain3D v0.8.1-alpha_gd4.1.1
Windows x64
Nvidia 3060 12 GB VRAM

Created a new project, followed the instructions to incorporate the addon. New 3D scene & terrain, saved with .res extension. I tried to add a new surface, and was planning to add an image texture to paint with, but adding an image (and apparently others as well) texture crashes Godot:

image

@TokisanGames TokisanGames added the bug Something isn't working label Jul 22, 2023
@TokisanGames TokisanGames added this to the Beta milestone Jul 22, 2023
@TokisanGames
Copy link
Owner

TokisanGames commented Jul 22, 2023

Thanks for the detailed report. It shouldn't crash. But also images must be a specific format as defined in the wiki docs. Maybe we need to filter that field to limit the options.

If you have the right format, you should be able to use the quick/ load option or drag the texture in. The other options shouldn't be there or at least shouldn't work and not crash.

@GeneralProtectionFault
Copy link
Author

Ah ok, I definitely need to check the Wiki, but the crash happened just selecting the new [whatever] texture option from the menu, before even dragging the actual image in.

@TokisanGames
Copy link
Owner

You don't need to select anything from that menu. Just drag the texture into the slot and it will work if it's the right format. If not you'll get an error saying it's not the right format. The wiki describes the format and how to make it.

@Saul2022
Copy link

To further confirm it happens woth other formats of the image tab, maybe there could be some way to hide and just have the fast load or load.

@TokisanGames
Copy link
Owner

Fixed.

@TokisanGames
Copy link
Owner

TokisanGames commented Jul 22, 2023

I had to adjust this fix. Previously, I reduced the list of possible options by requiring the format be an ImageTexture. However that only works for DDS files and refuses PNGs. I tried CompressedTexture, but that only works for PNGs and refuses DDSs. So we have to accept the parent class, Texture2D to accept both file types and many more. However, I was able to use the hint filter to limit it to CompressedTexture and ImageTexture. Now only those options appear in the list. Neither work to create blanks as people must load/quickload or drag the files in, but they no longer cause a crash.

Fixed in 1a4b295
Adjusted in 41f5456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants