Giter Club home page Giter Club logo

Comments (10)

passivestar avatar passivestar commented on July 22, 2024 2

Had this issue when importing glTF, fixed it by exporting in compatibility (non-physical) mode from blender:

passivestar/quickmenu@a4bcad1

It's this setting in the UI:

image

Godot could probably do the same when exporting glTF from blend

from godot.

clayjohn avatar clayjohn commented on July 22, 2024 2

This seems to be the same as #73624. We are currently doing things wrong from the perspective of the spec, but the solution is not very easy since it seems that not many people actually follow spec (and the Blender exporter didn't until recently)

from godot.

AThousandShips avatar AThousandShips commented on July 22, 2024

This could just be the way these values are translated, the engine uses a different concept for energy that isn't a physical quantity

from godot.

IcyChills avatar IcyChills commented on July 22, 2024

I assumed as much as well. Maybe a function could be implemented to convert the values when imported.

I'm not too familiar with Godot's codebase. Will download it and see if I can write a fix on my side. Could you point me to the location of the Blender importer source code?

from godot.

AThousandShips avatar AThousandShips commented on July 22, 2024

Maybe a function could be implemented to convert the values when imported.

Are the resulting light values wrong, i.e. does it look wrong? Otherwise they are very clearly converted as they don't match, but aren't just random

from godot.

IcyChills avatar IcyChills commented on July 22, 2024

Their values are extremely bright for the default light values from blender. All lights in a imported scene requires adjustment.

I understand it's not best practice to use blender files, as usually it's best to export to another format. It just saves a lot of time read blender as is.

from godot.

RedMser avatar RedMser commented on July 22, 2024

Could you point me to the location of the Blender importer source code?

Blend files are imported by creating a GLTF document and importing that, so check the GLTF importer code for how it generates lights. See GLTFLight class.

Also see the temporary gltf file which gets generated on import into Godot (it might be in the .godot/imported folder?) to see what energy values are stored in the light in gltf.

from godot.

IcyChills avatar IcyChills commented on July 22, 2024

@RedMser Thanks, I checked the generated files for GLTF in the imported folder. Seems the GLTF conversion does store those high values. Still need to setup the environment to build the Godot source code, will look into that GLTFLight class.

from godot.

IcyChills avatar IcyChills commented on July 22, 2024

Okay I'm confused by how the values are retrieved by the import.

I looked at:

 editor_scene_importer_blend.cpp
 
 Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_t p_flags, const HashMap<StringName, Variant> &p_options, List<String> *r_missing_deps, Error *r_err)

Does it get the values from_dictionary from gltf_light.cpp file?

Also which function check what the original import format is?

from godot.

IcyChills avatar IcyChills commented on July 22, 2024

Thank you for looking into this. I'm not very familiar with Godot's code base, tried to find a solution but ended up focusing on other work.

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.