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

Punctual Lights from gltf / glb files import with 0 range and attenuation values #53019

Closed
timshannon opened this issue Sep 24, 2021 · 4 comments · Fixed by #53109
Closed

Punctual Lights from gltf / glb files import with 0 range and attenuation values #53019

timshannon opened this issue Sep 24, 2021 · 4 comments · Fixed by #53109

Comments

@timshannon
Copy link

Godot version

3.4-beta5

System information

Ubuntu 20.04.3 LTS

Issue description

Since 3.4 punctual lights from scenes imported from gltf or glb files seem to all have 0 range and attenuation. Color seems to come across fine.

I'm not seeing any errors in the output window.

In my workflow my gltf files come from blender, but I can replicate it (with the attached project) with the Lights gltf sample model here (https://github.com/KhronosGroup/glTF-Sample-Models/tree/adf2abe718a61a6859b29fab481bfbbdfc05df24/2.0/Lights).

Steps to reproduce

  1. Start a brand new empty project in Godot 3.4 (beta 4 or 5)
  2. Download the gltf file here: https://github.com/KhronosGroup/glTF-Sample-Models/tree/adf2abe718a61a6859b29fab481bfbbdfc05df24/2.0/Lights
  3. Import it into the project
  4. You could turn down the ambient environment light to make it more apparent.

If you do the same in 3.3, the lights show up closer to what is expected.

Minimal reproduction project

test3.3.zip
test3.4.zip

@Calinou
Copy link
Member

Calinou commented Sep 24, 2021

cc @fire

@fire
Copy link
Member

fire commented Sep 24, 2021

Will investigate. Worked with this with @lyuma @aaronfranke too.

I'm out for 2021-09-24 (Friday).

@aaronfranke
Copy link
Member

I did a bisect on the master branch and found that this is a regression from #34193 (4b4efd2).

The default values for the light fields were set to 0 ( modules/gltf/gltf_light.h lines 45 to 50), while before they had non-zero values (editor/import/editor_scene_importer_gltf.h lines 214 to 219). Making them 0 was a mistake.

@fire
Copy link
Member

fire commented Sep 26, 2021

Are you able to make a pr on this? Currently in downtime preparing for next week fixing things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants