godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.1k stars 21.15k forks source link

3D web export texture is not rendered at all. #81519

Open pegasusearl opened 1 year ago

pegasusearl commented 1 year ago

Godot version

v4.1.stable.official [970459615]

System information

Godot v4.1.stable - Manjaro Linux #1 SMP PREEMPT_DYNAMIC Sun Aug 27 23:08:04 UTC 2023 - Vulkan (Compatibility) - NVIDIA GeForce GTX 1650 (nvidia; 535.104.05) - AMD Ryzen 5 3500 6-Core Processor (6 Threads)

Issue description

When previewing in the editor, texture rendered just fine. But if you actually export them, the texture is not rendered.

Screenshot_20230910_235526

In the screenshot above, the one that is rendered correctly are those without materials.

Steps to reproduce

  1. Make a project.
  2. Import 3D model, OBJ.
  3. Make a 3D scene, add camera, light, and the 3D model.
  4. Project Settings > export, add web export.
  5. Preview export to web.

Minimal reproduction project

GodotWebMinimalReproduction.zip

Screenshot_20230911_000040

Calinou commented 1 year ago

Note that actual 3-dimensional textures are not supported in the Compatibility rendering method yet: https://github.com/godotengine/godot/issues/71029

Your project doesn't appear to use any though, so this is likely an issue with VRAM compression formats. I suggest changing the compress mode from Video RAM to Lossless for your PNG texture in the Import dock though, as pixel art textures don't benefit from VRAM compression.

pegasusearl commented 1 year ago

How do I reimport all textures? Do I have to do it one by one?

Tried to set one png to lossless then "Preset" > "Set as Default for Texture2D" but it doesn't seem to do anything.

Filtering *png in FileSystem docker then selecting all png, setting lossless and pressing re-import doesn't change compression mode to lossless either, it's still Vram Compression.

Calinou commented 1 year ago

How do I reimport all textures? Do I have to do it one by one?

Select texture(s) in the FileSystem dock, go to the Import dock, change the compression mode and click Reimport. You then need to export the project again to see the changes.

Setting the default preset will not affect imported resources retroactively. It only affects newly imported resources.