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

Importing project with HDR texture taking too long #73627

Closed
telmotrooper opened this issue Feb 20, 2023 · 8 comments
Closed

Importing project with HDR texture taking too long #73627

telmotrooper opened this issue Feb 20, 2023 · 8 comments

Comments

@telmotrooper
Copy link

telmotrooper commented Feb 20, 2023

Godot version

4.0.rc2.official [d2699dc]

System information

OS: Arch Linux, CPU: i7-3770, GPU: Radeon RX 570

Issue description

In Godot 3, importing a project with an HDR texture of size 4096x2048 was pretty much instantaneous, while in Godot 4.0 RC 2 it takes (in my computer) almost 6 minutes.

For reference, I've prepared two equivalent projects, both have only a 3D scene with a WorldEnvironment, loading the texture as a panorama sky:

image

I'm not sure if this is a bug or if the default settings for importing textures are way too demanding now. My CD pipeline is timing out when trying to export a Godot 4 project and it's likely that it has to do with this issue.

If this is intended behavior, feel free to close the issue, though I'd appreciate if someone could tell me whether there's something I can do to reduce this import time.

Steps to reproduce

Just load the projects attached.

Minimal reproduction project

godot_projects.zip

@akien-mga
Copy link
Member

Duplicate of #72666. This is fixed in RC2 already, but you have to remove the corresponding .import files, or change the import setting manually.

@telmotrooper
Copy link
Author

@akien-mga I just generated this project in RC 2.

@akien-mga
Copy link
Member

akien-mga commented Feb 20, 2023

Are you sure that you didn't use RC 1 first on that project before moving to RC 2?

In the MRP, I can reproduce the issue because the casual_day_4k.hdr.import file uses VRAM compression which seems to be very slow to compress, as outlined in #72666.

If I delete that file (and the .godot folder for good measure) and open in 4.0 RC 2, the import is instantaneous, since no compression is done.

@telmotrooper
Copy link
Author

telmotrooper commented Feb 20, 2023

@akien-mga Yup, been using RC 2 since it was out and just created the project on it:
image

If I try generating a new project (in RC 2) and re-creating the scenario, I get the same issue.

@telmotrooper
Copy link
Author

@akien-mga Any chance this is related to the Linux build of 4.0 RC 2?

@akien-mga
Copy link
Member

I'm using the Linux build of 4.0 RC 2 too.

I can reproduce the issue too when copying main.tscn and casual_day_4k.hdr in a new project. The initial import is fast, but opening main.tscn triggers a new slow import. Somehow the WorldEnvironment must be forcing some import settings.

@Calinou
Copy link
Member

Calinou commented Feb 20, 2023

Somehow the WorldEnvironment must be forcing some import settings.

This is likely Detect 3D logic, which should be modified to use Lossless compression for HDR textures until the HDR VRAM compressor performance issue is fixed.

A more extreme solution would be to disable Detect 3D entirely for panorama sky textures, but it'll likely cause other issues (such as not having mipmaps, which can cause the sky to look grainy at lower viewport resolutions).

@clayjohn
Copy link
Member

Duplicate of #61948

@clayjohn clayjohn marked this as a duplicate of #61948 Feb 20, 2023
@clayjohn clayjohn closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2023
@github-project-automation github-project-automation bot moved this from To Assess to Done in 4.x Priority Issues Feb 20, 2023
@clayjohn clayjohn removed this from the 4.0 milestone Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants