K. S. Ernest (iFire) Lee
fa62037ff6
In the GLTF importer normalize Quaternions after every operation and when reading from the format.
2018-08-27 14:59:28 -07:00
Rémi Verschelde
52466d57e9
Make some debug prints verbose-only, remove others
2018-08-24 14:59:01 +02:00
Juan Linietsky
5b70ad9d34
Respect process order for out of order skeleton bones (fixes GLTF2 import issues).
2018-08-06 22:35:09 -03:00
Juan Linietsky
00c573c255
Several fixes to GLTF2 importer
2018-08-06 18:41:37 -03:00
Hein-Pieter van Braam
0e29f7974b
Reduce unnecessary COW on Vector by make writing explicit
...
This commit makes operator[] on Vector const and adds a write proxy to it. From
now on writes to Vectors need to happen through the .write proxy. So for
instance:
Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;
Failing to use the .write proxy will cause a compilation error.
In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.
_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
K. S. Ernest (iFire) Lee
ac541f5d16
Bones are now named and their parents are correct.
2018-07-24 15:29:53 -07:00
Juan Linietsky
ad4666f8e0
Merge pull request #19193 from tagcup/quat_norm
...
Fixed Basis -> Quat conversions, added a few safety checks.
2018-06-25 10:58:04 -03:00
Rodolfo Ribeiro Gomes
01b01209a3
fix default glTF metallic & roughness factor values
...
The glTF 2.0 spec says that these pbrMetallicRoughness material
properties should be set as 1.0 by default.
In fact, KhronosGroup's official Blender Exporter does not even write
down those parameters if they are set as 1.0.
However, Godot import them as 0.0.
https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#pbrmetallicroughness
Fixes : #19613 https://github.com/godotengine/godot/issues/19613
2018-06-21 00:00:58 -03:00
Pedro J. Estébanez
4810eae03b
Import morph target names from glTF
...
If mesh.extras.targetNames is available. Keep the former naming pattern as fallback.
2018-06-14 00:25:22 +02:00
tagcup
9d41161596
Fixed Basis -> Quat conversions, added a few safety checks.
...
Fixes #19027 .
2018-05-27 14:15:47 -04:00
Yaakuro
9a50a4442d
Use mimetype according to glTF spec.
2018-05-10 23:21:05 +02:00
Pedro J. Estébanez
d8765dd103
Fix skeleton import from glTF
...
For some glTF files, the order of bones in the skeleton array wasn't matching the joints array in the meshes.
Fixes #17808 .
2018-04-06 22:22:59 +02:00
Pedro J. Estébanez
1f26da0ad1
Fix animation length from glTF not correctly set
2018-03-19 00:27:14 +01:00
Pedro J. Estébanez
adbe749513
Fix glTF not accepting VEC3 colors
...
Aside from the colors themselves, the rejection was adding somes issues later in the mesh import process.
2018-03-19 00:27:14 +01:00
Florian Zwoch
1abf464b59
gltf: improve embedded data discovery
...
Some editors seems to use the image resource's mime type (e.g. "image/png") for data embedded uris instead of "application/octet-stream".
2018-02-21 12:18:52 +01:00
Juan Linietsky
a8a3d5c835
Fixes to GLTF2 importer skeleton positioning, though vertex bone indices still look broken somehow..
2018-01-05 09:53:40 -03:00
Rémi Verschelde
e4213e66b2
Add missing copyright headers and fix formatting
...
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Juan Linietsky
f11a138505
Added more hacks to GLTF2 importer to support crap exporter (MakeHuman in this case), fixes #13393
2017-12-28 16:07:45 -03:00
Webster Sheets
74b68d2e71
Fix importing GLTF meshes as external files.
2017-12-09 17:40:48 -05:00
Juan Linietsky
209cb3830c
Exposed EditorSceneImporter to script. Added APIs to use intermediate converters more easily.
2017-12-07 15:44:20 -03:00
Juan Linietsky
bc2e8d99e5
Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
...
leading to unnecesary copy on writes and reduced performance.
2017-11-25 00:09:40 -03:00
Webster Sheets
05dce362d5
Fix for #12056 , though GTLF import of that file is still incorrect.
2017-11-12 23:47:51 -05:00
Hein-Pieter van Braam
b2a38854fd
Fix unused variable warnings
...
The forth in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-08 15:03:53 +02:00
Juan Linietsky
ded74dedef
Fixed missing return value in glTF2.0 importer camera, closes #10130
2017-09-01 22:36:49 -03:00
Hein-Pieter van Braam
f9467ec1ea
Fix signed and unsigned comparisons
...
The first in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-01 08:13:12 +02:00
Ferenc Arn
609ef89362
Fix the channels gltf importer uses for metallic and AO textures.
...
Khronos blender gltf exporter uses red channel for occlusion and blue channel for metallic, whereas the current behavior is the opposite.
Fixes #10700 .
2017-08-28 15:09:47 -04:00
Juan Linietsky
26ff90eaed
Full GLTF 2.0 Specification support! cheers!
2017-08-03 19:42:32 -03:00
Juan Linietsky
5c361485db
-Added GLTF scene support (still missing animations and .glb extension)
...
-Fixed bugs regarding tangent generation in SurfaceTool
2017-08-02 15:43:49 -03:00