Commit Graph

6877 Commits

Author SHA1 Message Date
Daniel Hritzkiv
cc4531459f Set mNumUVComponents to 0 when deleting texture coordinate sets 2017-10-31 15:14:21 -04:00
Kim Kulling
8be196f77d closes https://github.com/assimp/assimp/issues/1490 : fix invalid access to mesh array when the array is empty. 2017-10-31 14:03:03 +01:00
Kim Kulling
af4556d569 only scale the root node because this will rescale all children nodes as well. 2017-10-31 13:08:24 +01:00
Kim Kulling
64ee21024b Add missing file. 2017-10-31 13:07:07 +01:00
Kim Kulling
ae020281e2 Add unittest 2017-10-31 12:24:32 +01:00
Lars Jørgen Solberg
711050de8a fix frame pointer arithmetic 2017-10-30 19:08:51 +01:00
thomas-lemaire
4d09e61b13 Merge branch 'master' into master 2017-10-30 11:41:25 +01:00
Victor NG
99b9ba4c11 Merge branch 'master' into master 2017-10-30 16:33:47 +08:00
Victor NG
aca8f068d0 Update ColladaExporter.cpp 2017-10-30 16:29:57 +08:00
Kim Kulling
bbeb9dd640 Use correct lookup if scaling is enabled. 2017-10-29 23:18:37 +01:00
Kim Kulling
f49de6ecfe closes https://github.com/assimp/assimp/issues/1514: add postprocess step for scaling 2017-10-29 20:28:59 +01:00
Thomas
18cef9b391 [ObjExporter] add a "no mtl" version of the obj exporter 2017-10-27 10:14:38 +02:00
Daniel Hritzkiv
8b73ec7541 Fix shininess to roughness conversion; Add comments
Was accidentally flipping to value (1 - x) twice, thus negating the effect.
2017-10-26 11:33:33 -04:00
Kim Kulling
bfa33b50ad Merge branch 'master' into gltf2-materials 2017-10-24 10:40:20 +02:00
Alexandre Avenel
cc8374dd80 Return exception when obj file contains invalid face indice 2017-10-21 20:58:00 +02:00
Victor NG
90ba199ad4 Update ColladaExporter.cpp 2017-10-21 18:28:14 +08:00
Victor NG
cd4ef0a2e9 Update ColladaExporter.h 2017-10-21 18:15:46 +08:00
ndotl
8cf61c3c89 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-20 15:22:49 +02:00
Daniel Hritzkiv
6e88838602 powf -> pow
Fix build errors on linux
2017-10-19 16:21:29 -04:00
Daniel Hritzkiv
40147d253d Prefer “BLEND” over “MASK” as an alphaMode default
“BLEND” is a much nicer alphaMode value (if the hardware supports it – not a steep requirement) than “MASK” as mask is either fully opaque or fully transparent, depending on the alphaCutoff. This matches many other converters’ alphaMode default.
2017-10-19 16:21:29 -04:00
Daniel Hritzkiv
89358458f0 Approximate specularity / glossiness in metallicRoughness materials
Before, models (of traditional lighting models) with specularity/glossiness would be completely flat when exported to metallicRoughness. These changes approximate glossiness (as an inverse of roughness, with specular intensity as a multiplier) both reading from gltf2 and writing to gltf2.
2017-10-19 16:21:29 -04:00
Daniel Hritzkiv
a898c1f2d1 SpecularFactor import and export improvements
The changes here (which only apply to reading from or writing to pbrSpecularGlossiness) will:

- store and read specular color on `AI_MATKEY_COLOR_SPECULAR ` rather than `AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_SPECULAR_FACTOR`
- store and read specular texture from `aiTextureType_SPECULAR` rather than `AI_MATKEY_GLTF_PBRSPECULARGLOSSINESS_SPECULARGLOSSINESS_TEXTURE`. Even though pbrSG’s specularGlossiness texture uses the alpha channel for glossiness, it will still work well enough with just the RGB channels of the image
2017-10-19 16:21:29 -04:00
Daniel Hritzkiv
c71790c78d Diffuse color and diffuse texture import and export improvements
These changes do a better of importing and exporting baseColor colors and textures, as well as diffuse colors and textures (in the case of pbrSpecularGlossiness)

- baseColorFactor will be stored on both `$clr.diffuse` and `$mat.gltf.pbrMetallicRoughness.baseColorFactor`, and will be extracted from `$mat.gltf.pbrMetallicRoughness.baseColorFactor` first, and falling back to `$clr.diffuse`. The behaviour for baseColorTexture is similar
- pbrSG’s diffuseFactor will now only be store on `$clr.diffuse` (overwriting any previous assignments to `$clr.diffuse`, e.g. from metallicRoughness’ baseColorFactor, as diffuseFactor is more analogous to diffuse color than baseColor), and will only extract from `$clr.diffuse`
2017-10-19 16:21:16 -04:00
Daniel Hritzkiv
5eaf083fbd Fix output of glTF 1 version string
Was writing out “\u0001” instead of “1.0” as the data types were incorrect
2017-10-19 12:43:52 -04:00
Kim Kulling
b2eb599176 Update ColladaExporter.cpp
Retrigger travis.
2017-10-16 18:51:25 +02:00
Kim Kulling
44ad80201c Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-14 21:47:21 +02:00
Jared Mulconry
f8c4002294 Fixed a divide by zero error in IFCBoolean that was latent, but nevertheless a bug 2017-10-14 18:46:19 +03:00
Turo Lamminen
9a6b141568 FBX: Replace bad pointer casting with memcpy 2017-10-14 18:46:19 +03:00
Turo Lamminen
7cbb5f4d3b B3DImporter: Replace bad pointer casting with memcpy 2017-10-14 18:46:19 +03:00
Kim Kulling
e662f2dc6f Blender: fix short overflow. 2017-10-13 22:41:38 +02:00
Kim Kulling
e79848ff79 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-11 13:49:47 +02:00
Jared Mulconry
3e7dbb5dfb Merge branch 'master' of github.com:assimp/assimp into appveyor 2017-10-11 19:06:29 +11:00
Kim Kulling
a1b79e23e6 Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-10 19:33:07 +02:00
Kim Kulling
c128e7e56c Merge branch 'master' into issue_1453 2017-10-10 18:20:22 +02:00
Jared Mulconry
fa91a0f64c Another minor source change, this time even more minor than the last. Let's see what the cache can do with this. 2017-10-10 22:45:45 +11:00
Jared Mulconry
1497cc27b2 Cleaned up the whitespace again. Let's see how the cache does. 2017-10-10 22:08:13 +11:00
Jared Mulconry
b8ad03baa1 Because I have to change a file somewhere to properly test the cache on AppVeyor, I've made some whitespace a bit better. 2017-10-10 19:45:57 +11:00
ndotl
7c8e8e04fa Merge branch 'master' into adsk-contrib-fix-std-stream-overflow 2017-10-09 16:00:46 +02:00
Haik Lorenz
7353d25c13 Prevent failing stringstream to crash the export process
Text exporters are using string streams to hold the file content first and then write them to the file in a single pass. If for whatever reason the stream has the fail bit set, tellp() will return pos_type(-1), which in turn makes the subsequent write crash - at least on Windows systems. One reason for the stream being in fail state is when its size exceeds 2^31 bytes, even on 64-bit systems (i.e., when very large scenes get exported).

The fix is checking the fail() before even opening the file.
2017-10-09 15:47:17 +02:00
Kim Kulling
d60fe38253 Merge branch 'master' into master 2017-10-09 00:07:43 +02:00
Turo Lamminen
cd64eae590 GenericProperty: Remove useless const qualifier from return value 2017-10-08 12:45:48 +03:00
Turo Lamminen
7e033c6cef FBX: Remove useless const qualifier from return value
const qualifier on primitive return type does nothing.
2017-10-08 12:45:02 +03:00
Kim Kulling
b57011552b Merge branch 'master' into issue_1453 2017-10-07 19:08:52 +02:00
Kim Kulling
f925e2cf4e Reproduce issue and remove assertion when a nullptr makes more sence 2017-10-07 19:08:20 +02:00
Marco Di Benedetto
9a79d243f9 added additional displacement texture token. 2017-10-07 12:36:02 +02:00
Jared Mulconry
326158633b Fixed warnings on MSVC caused by implicit conversions from double to float. 2017-10-06 18:23:28 +03:00
Turo Lamminen
50b43f76e1 OpenGEXImporter: Copy materials to scene 2017-10-06 18:23:28 +03:00
Turo Lamminen
b841ed194b OpenGEXImporter: Store RefInfo in unique_ptr so they get automatically cleaned up 2017-10-06 18:23:28 +03:00
Turo Lamminen
775f984d99 OpenGEXImporter: Fix IOStream leak 2017-10-06 18:23:28 +03:00
Turo Lamminen
22b55d01a2 OpenGEXImporter: Store ChildInfo in unique_ptr so they get automatically cleaned up 2017-10-06 18:23:28 +03:00