Comments (10)
Had this issue when importing glTF, fixed it by exporting in compatibility (non-physical) mode from blender:
It's this setting in the UI:
Godot could probably do the same when exporting glTF from blend
from godot.
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.
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.
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.
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.
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.
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.
@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.
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.
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)
- In any project using Godot 4.3, disabling Vsync will cause the entire macOS system to freeze and crash HOT 1
- mouse_get_position: Mouse is not supported by this display server HOT 7
- Texture Progress Bar does not render the progress texture correctly when using an Atlas Texture in clockwise and counter clockwise fill modes HOT 2
- Containers do not correctly resize to their contents when their visibility is toggled HOT 3
- Godot crashes during launch when editor_settings.tres is corrupted HOT 3
- Borderless non-fullscreen windows with Wayland display server still have decorations
- RPC function breaks when using it right after giving visibility to a peer
- 2D Physics Run on Seperate Thread Silent Crash
- [Web] "Maximum call stack exceeded" with `dev_build=yes` on Quest browser HOT 2
- Toggling Erase mode in TileMap does not update cursor immediately
- WebXR only rendering left eye when built with Emscripten 3.1.61 HOT 1
- Pressing Cancel while exporting project does nothing
- Bitmap Font resources display correctly in editor, but not at runtime HOT 1
- No warning on recursion of mesh in array mesh HOT 6
- _export_file() not called for GDScript files HOT 1
- Changing window mode Windowed -> Maximized -> Minimized -> Windowed results in window filling the screen
- `Access is denied` when trying to compile Godot HOT 4
- Exported properties with default values in custom resources aren't correctly assigned `null` values
- Dualsense Edge controller inputs read incorrectly
- GLB assets configured with "Decompose Convex" colliders now loading with "Trimesh" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot.