-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Allow more flexible adjustments of VisualInstance3D Lightmap Scale #75164
Allow more flexible adjustments of VisualInstance3D Lightmap Scale #75164
Conversation
I will test this. It would be nice to have the texel debug view merged to see it in action |
Some tests in a custom sponza scene. It blows up at 2.25. Im pretty sure that the model was imported with a hight texel density and the issue is because the lightmap size (which is a already reported issue). It would be good to catch the error and display a message like Also it would be good to have a global lightmap size inside the lightmap to multiply the mesh value (I think there is a proposal) To test this I have to update all meshes values but thankfully I was able to search by type and select all at once
|
See godotengine/godot-proposals#3893 and its pull request #64908. |
a7da6e1
to
59f7a2a
Compare
Super nice. Where would be a good place to discuss the lightmap size hint property? Should't be that remove? We already have texel density import, lightmap size per mesh and global with #64908 PR |
The lightmap size hint is used by the lightmapper to determine the base size of the object on the lightmap. We can't remove it, but we could make it read-only in the inspector as there's usually no point in manually editing it. This should be changed in a future PR though. |
Should I made a proposal? I will suggest to hide it anyway since there is no useful information |
The lightmap size hint is useful information for troubleshooting why an object takes so much (or so little space) in the lightmap. It shouldn't be hidden 🙂 |
I'd need to add a compatibility handler (and rename the property so it's effective) for this PR to be in a mergeable state. It's too late to do this for 4.2 as feature freeze is imminent. There were some concerns about the texel scale PR possibly causing increased lightmap bleeding (with scales below Edit (February 2024): Rebased and tested again, it works as expected. I haven't added compatibility handlers yet. |
59f7a2a
to
8131feb
Compare
2.0 on the train, 0.5 on the rocks and the floor, 0.2 on the background cliffs. It works!
How about |
7a4a57a
to
e42fd72
Compare
Rebased and tested again, it works as expected. I've pushed a second commit that makes the PR fully backwards-compatible. It automatically converts the old properties into the new ones and keeps the GDExtension API identical. I'll squash commits into one if this is OK. |
Works as expected. I tested on a personal project as well as the TPSDemo. This gives a lot of freedom to bake better and efficient lightmaps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with the new compatibility methods. I'd say go ahead and squash this so we can merge for the next dev release
Any floating-point value greater than 0.01 can now be used. Prior to this change, only factors of 1×, 2× and 4× and 8× could be used.
e42fd72
to
1e5f0a8
Compare
Thanks! |
Any floating-point value greater than 0.01 can now be used. Prior to this change, only factors of 1×, 2× and 4× and 8× could be used.
I haven't spotted negative side effects from this change so far, but please test this in more complex scenes. cc @jcostello @WickedInsignia
Testing project: test_lightmap_scale_float.zip
TODO
Preview
Lightmap Scale from left to right: 0.5×, 1×, 2×, 45×.