Commit Graph

4083 Commits

Author SHA1 Message Date
JFonS 112b416056 Implement new CPU lightmapper
Completely re-write the lightmap generation code:
- Follow the general lightmapper code structure from 4.0.
- Use proper path tracing to compute the global illumination.
- Use atlassing to merge all lightmaps into a single texture (done by @RandomShaper)
- Use OpenImageDenoiser to improve the generated lightmaps.
- Take into account alpha transparency in material textures.
- Allow baking environment lighting.
- Add bicubic lightmap filtering.

There is some minor compatibility breakage in some properties and methods
in BakedLightmap, but lightmaps generated in previous engine versions
should work fine out of the box.

The scene importer has been changed to generate `.unwrap_cache` files
next to the imported scene files. These files *SHOULD* be added to any
version control system as they guarantee there won't be differences when
re-importing the scene from other OSes or engine versions.

This work started as a Google Summer of Code project; Was later funded by IMVU for a good amount of progress;
Was then finished and polished by me on my free time.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2021-01-14 18:05:56 +01:00
JFonS a80e4a6158 Add Embree thirdparty library 2021-01-14 18:02:07 +01:00
JFonS ad8abef74c Add OpenImageDenoise thirdparty library 2021-01-14 18:02:07 +01:00
Rémi Verschelde f93c2ddc92
Merge pull request #45163 from akien-mga/3.2-cherrypicks
Cherry-picks for the 3.2 branch (future 3.2.4) - 16th batch
2021-01-13 17:38:05 +01:00
Rémi Verschelde 652105dcdd
Merge pull request #44704 from madmiraal/fix-44510-3.2
[3.2] Add signal to inform joint that body has exited tree
2021-01-13 17:16:19 +01:00
Rémi Verschelde b64fe918aa
Merge pull request #45160 from madmiraal/fix-45145-3.2
[3.2] Only remove Bullet's body constraints when removing body from space
2021-01-13 17:16:01 +01:00
Rémi Verschelde 8a8e0ae2eb
Merge pull request #40990 from madmiraal/fix-40739-3.2
[3.2] Reload Bullet space override modifier even when RigidBody is inactive.
2021-01-13 16:44:04 +01:00
Vedat Günel de34616552
Change reserved keyword in Regex documentation code
(cherry picked from commit 446a3f8ff2)
2021-01-13 16:17:09 +01:00
David Snopek bd0f5f50b2
Invert the Y-axis on thumbsticks and trackpads in WebXR
(cherry picked from commit 7a0d4275a2)
2021-01-13 16:17:09 +01:00
zero13cool 57416ce3ff
Changed type to make it work on x32 architecture.
(cherry picked from commit 9f3d7d9709)
2021-01-13 16:17:09 +01:00
Aaron Franke 6e1b2af770
Descriptive error message when using AudioStream(OGG/MP3) incorrectly
(cherry picked from commit 193564d83e)
2021-01-13 16:17:08 +01:00
nevarek 2167b977de
Optimize data format for OpenSimplex images
The previous RGBA format included unused RGB data. Using the LA8 format
removes the need to store the extra data.

The Docs have been updated to reflect the format changes.

(cherry picked from commit 041fe20f64)
2021-01-13 16:17:07 +01:00
Rémi Verschelde 49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Rémi Verschelde 188609e5ab
CI: Update to clang-format 11 and apply ternary operator changes
(cherry picked from commit af878716f2)
2021-01-13 16:14:35 +01:00
Marcel Admiraal 47657cd140 Only remove Bullet's body constraints when removing body from space 2021-01-13 13:45:40 +00:00
Rémi Verschelde 0a8cc0a565
Merge pull request #44006 from RandomShaper/gds_needless_check_3.2
Remove useless check in GDScript (3.2)
2021-01-11 13:53:42 +01:00
Yuri Roubinsky 602fc00e56 [3.2] Auto-assign default value for variable in visual script on type changing 2021-01-11 10:29:12 +03:00
Rémi Verschelde 3d31433229
doc: Remove links to RNG tutorial, not yet in 3.2 branch 2021-01-07 14:33:36 +01:00
Rémi Verschelde a18df71789
Merge pull request #44897 from RevoluPowered/add-blender-fbx-support
Preliminary Blender FBX support [3.2]
2021-01-06 09:43:26 +01:00
Gordon MacPherson 31bc1af82a Preliminary Blender FBX support
limitations:
- always has to use generated normal's.
- some animations won't be compatible (yet)

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-01-05 21:56:21 +00:00
Rémi Verschelde d7102ac78f
doc: Sync classref with current source 2021-01-05 21:33:34 +01:00
LoipesMas 0fc433d046
More explicit wording for str() and print() functions
(cherry picked from commit 9c65927aeb)
2021-01-05 21:33:34 +01:00
Hugo Locurcio e35f17d33d
Use `static const int` instead of `#define` for OpenSimplexNoise octaves
This closes #44860.

(cherry picked from commit 7a65375b7a)
2021-01-05 21:33:32 +01:00
Rémi Verschelde 3d88ea8468
Merge pull request #42397 from dsnopek/webxr
Add WebXR support (for Godot 3.2)
2021-01-05 00:13:10 +01:00
David Snopek 22cfa90ef5 Add support for WebXR 2021-01-04 17:01:42 -06:00
Marcel Admiraal 6b3bab6e54 Add signal to inform joint that body has exited tree 2020-12-31 14:51:07 +00:00
Rémi Verschelde 10cc044ea5
FBX: Clarify outdated format error
See #44780.

(cherry picked from commit 1dd75f41e5)
2020-12-29 16:02:03 +01:00
hoontee 85cc31332a
Properly handle empty CSGShapes
(cherry picked from commit 24a6aac472)
2020-12-29 16:02:02 +01:00
Marcel Admiraal cb629dd06b
Ensure flags are applied to CVTT options
(cherry picked from commit 709aa8ae2c)
2020-12-29 16:02:02 +01:00
Eyad d4bfa5a684
Fixes #42149 and fixes indentation errors to pass clang-format
(cherry picked from commit be1c161b0b)
2020-12-29 16:02:01 +01:00
Yuri Roubinsky 742a3f461c
Fix broken members panel in visual script editor
(cherry picked from commit d6bdd042bc)
2020-12-29 16:02:01 +01:00
Ignacio Etcheverry bf942447a3
Mono: Add extra WASM framework assemblies on game export
This is needed with newer Mono versions, at least with Mono 6.12+

Depends on the following commit from our build scripts:
godotengine/godot-mono-builds@9d75cff174

(cherry picked from commit b98e8b11e6)
2020-12-29 16:01:59 +01:00
skyace65 e072b3db82
Pow method doc fix
(cherry picked from commit 4fd20015f3)
2020-12-29 16:01:59 +01:00
Rémi Verschelde 688d422554
PVRTC: Move compress func to `modules/pvr`, drop obsolete PVRTexTool code
The code we had for PVRTexTool doesn't work as it's not compatible with current
PVRTexTool CLI options, and likely hasn't been for years.

Instead, we have our own vendored pvrtccompressor thirdparty library which all
users have thus de-facto been using. This commit moves the compress code to
`modules/pvr` where it belongs.

There's no proper compress function for PVRTC 2-bit format, that's a bug that
will need to be fixed (currently it's compressed as 4-bit format even if you
use Image::FORMAT_PVRTC2).

Fixes #28669.

(cherry picked from commit 1a31274855)
2020-12-29 15:12:06 +01:00
Marcel Admiraal 125032d8ee Fix ETC quality setting 2020-12-25 11:36:26 +00:00
Rémi Verschelde 344a02834b
Merge pull request #43899 from madmiraal/fix-43852-3.2
[3.2] Remove any constraints connected to a Bullet body when removing it
2020-12-19 09:31:04 +01:00
Rémi Verschelde 65c1db3131
Merge pull request #44305 from RevoluPowered/fbx-update-plugin
[fbx] Implement ColorIndex for Vertex Colors to ensure they are correct and duplicate vertexes correctly for multiple color attributes.
2020-12-17 21:19:59 +01:00
Rémi Verschelde 80c9f2d975
Merge pull request #44373 from neikeq/3.2-mono-wasm-m2n-hook
[3.2] Mono: Make Godot provide its own WASM m2n trampolines
2020-12-17 09:58:50 +01:00
Rémi Verschelde c01ccab885
Merge pull request #44392 from madmiraal/fix-42285-3.2
[3.2] Remove Generic6DOFJoint precision property
2020-12-15 19:07:27 +01:00
Marcel Admiraal 825ad65fc4 Remove Generic6DOFJoint precision property 2020-12-15 10:15:42 +00:00
Gordon MacPherson 18d1898309 [fbx] Fix #44371 #44376 File crash and Buffer Overflow
Fixes:
- Element collection will only contain valid elements.
- Fixes buffer overflow in the FBX document
2020-12-14 21:57:41 +00:00
Ignacio Etcheverry 1a5e985ed4 [3.2] Mono: Make Godot provide its own WASM m2n trampolines
This depends on a custom Mono patch from this commit:
godotengine/godot-mono-builds@0e312939bd
2020-12-14 19:46:41 +01:00
Gordon MacPherson 8ffad0d8bd ColorIndex supported now for vertex colors.
Other properties should index override where appropriate in future.
2020-12-14 16:51:15 +00:00
Ignacio Etcheverry 2c89152b33 Mono: Don't use -rdynamic when compiling for WASM
`-rdynamic` was causing the emsdk linker to silently fail to
generate the output `.wasm` file (even though exit code was 0).
2020-12-13 21:46:38 +01:00
Rémi Verschelde fd6b3060c1
Merge pull request #44316 from madmiraal/fix-handles-baseexception-3.2
[3.2] Don't handle BaseException in build scripts
2020-12-12 12:44:17 +01:00
Marcel Admiraal e21adf2bc6 Don't handle BaseException in build scripts 2020-12-12 10:10:23 +00:00
Rémi Verschelde b5e8b48bb7
Merge pull request #43921 from RevoluPowered/fbx-update-plugin
[FBX] general purpose fixes 🎄
2020-12-10 20:56:03 +01:00
Gordon MacPherson de61cfe7c5 [fbx] bugfixes skinning, materials and debugging info, merry xmas 🎄
Better materials:
- default values will no longer trigger things like emission,
clear coat being enabled etc incorrectly, mostly importers misunderstand
this value, a value of 1 is not actually enabled emission, it must have a
non zero setting other than emission value for the emission flags to
actually be enabled correctly in our engine #42386
- lambert materials are warned against significantly,
do not use Lambert in Godot, use a PBR material like Ai Standard Surface
 (it's like going from low quality to high definition in terms of output
 in scenes and on assets)
- roughness values are calculated correctly in this version

Fixes for normal's array - some normal's from some files were dropped and
generated, this is now fixed.
- FBX indexing for items with (-1) index, for normal data is supported,
this is super helpful at increasing our range of compatibility of
FBX meshes.

Fix bone rest data **no longer requiring go to bind pose in Maya and various applications**
- Partial fix for #43688

Validation tools added for validating large projects

Provide package name, vendor and FBX vendor in the log.

Implemented metadata properties so we can read extra document
info required for bug reporting

**FBX 2011 (version 7200)** is unsupported now,
you must re-export your file in Maya or Max to upgrade the file format.

Fixes skin bind poses being generated based on node xforms in the scene
Fixes duplicate bones being added to skin and prevents add_bones from
registering skeleton bones it now registers skin bind poses,
but this should really be documented in the engine correctly right now
 it doesn't tell you this is the case.
2020-12-10 19:30:17 +00:00
Rémi Verschelde 31cd9e560c
Mono: Fix GodotTools build after invalid cherry-pick
I wrongly resolved the cherry-pick conflict in c5acdfb5f5.
2020-12-10 17:54:37 +01:00
Rémi Verschelde 0c7a9bd283
doc: Sync classref with current source
And fix broken doctool after #43948.
2020-12-10 14:22:31 +01:00