1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:29:55 +00:00
Commit graph

579 commits

Author SHA1 Message Date
alekulyn
ed532b5aca Add BSEffectShaderPropertyFloatController record reading 2023-07-10 17:58:32 -05:00
alekulyn
7ea2ea96b6 Read new nodes pt1 2023-07-10 17:27:05 -05:00
psi29a
d9027f7eef Merge branch 'falloutfalloffnthtimesthecharm' into 'master'
BSEffectShader/NoLighting fixes

See merge request OpenMW/openmw!3211
2023-07-10 07:51:53 +00:00
Alexei Dobrohotov
52a16e0e93 BSEffectShader/NoLighting fixes
Don't hijack BSShader::NoLighting for BSEffectShader functionality
(Fallout meshes break if you use the actual emissive color as a base color)
Don't use falloff for textureless NoLighting objects
Use falloff flag for BSEffectShader
2023-07-09 14:44:09 +03:00
alekulyn
74aa7b947a Load BSTriShape NIF nodes 2023-07-09 10:14:27 +00:00
alekulyn
683fb0a342 Templated nif reader function modelled after cc9cii's reader 2023-06-28 09:27:22 +00:00
alekulyn
dc860ca302 Load BSInvMarker NIF nodes 2023-06-01 15:27:42 -05:00
Petr Mikheev
788a4d32aa Handle DoubleSided and TreeAnim flags in BSLightingShaderProperty. 2023-05-29 18:47:27 +02:00
Petr Mikheev
e74161ea8e Merge branch 'slashrslashmarijuanaenthusiasts' into 'master'
Improve Skyrim tree loading (limited)

See merge request OpenMW/openmw!3054
2023-05-24 19:16:55 +00:00
Alexei Dobrohotov
a983977e6a Fix NiSkinData loading for >4.2.1.0 2023-05-23 01:19:22 +03:00
Alexei Dobrohotov
1b5e904285 Read BSMultiBound et al. 2023-05-22 23:05:10 +03:00
Evil Eye
9728024978 Replace compare with more idiomatic methods 2023-05-22 19:51:27 +02:00
Alexei Dobrohotov
3e8a9d1de4 Read BSTreeNode, handle as NiNode 2023-05-21 18:16:06 +03:00
Petr Mikheev
493858127a Drop NIF root node transformation for Skyrim models the same way as for Morrowind models. 2023-05-18 02:10:39 +02:00
Alexei Kotov
d8dad79195 Read bsLeafAnimNode 2023-02-24 20:34:41 +03:00
Alexei Kotov
9618a465ce Read bhkCompressedMeshShape 2023-02-24 20:32:35 +03:00
Alexei Kotov
fc6bc90c3d Read BSFurnitureMarkerNode 2023-02-24 19:38:29 +03:00
Alexei Kotov
2de81738c1 Implement the basics of BSEffectShaderProperty 2023-02-20 00:23:00 +03:00
Alexei Kotov
99aa90f90c Rewrite NiVertexColorProperty 2023-02-11 00:58:13 +03:00
Alexei Kotov
d39127cc3d Add NiTriBasedGeomData abstraction 2023-02-10 23:06:56 +03:00
psi29a
de2bd6d802 Merge branch 'nistringpalette' into 'master'
Fix NiStringPalette loading again

See merge request OpenMW/openmw!2703
2023-02-10 07:46:39 +00:00
Alexei Kotov
a4ddf443ed Fix NiStringPalette loading 2023-02-09 21:10:25 +03:00
Alexei Kotov
c8430ee6c8 Clean up fillTriangleMesh for NiTriStrips 2023-02-09 20:24:05 +03:00
psi29a
a41cbfb349 Merge branch 'candles' into 'master'
Read NiBlendInterpolator records, fill in NiControllerManager fields

See merge request OpenMW/openmw!2700
2023-02-08 22:24:37 +00:00
elsid
2c43a8558a
Add option to disable debug log for unsupported nif files
It becomes quite extensive and not very useful when loading oblivion content
files.
2023-02-08 22:59:29 +01:00
Alexei Kotov
d7834c43e5 Fill in NiControllerManager fields 2023-02-09 00:06:08 +03:00
Alexei Kotov
091fcd837e Read all the NiBlendInterpolator record types 2023-02-09 00:06:08 +03:00
Alexei Kotov
7ecf018743 Add NiBlendInterpolator 2023-02-08 22:58:47 +03:00
Alexei Kotov
41d6ccd3f6 Read NiDefaultAVObjectPalette 2023-02-08 15:08:52 +03:00
psi29a
5f9332751c Merge branch 'roottrafo' into 'master'
Don't discard root node transformations for Gamebryo meshes

See merge request OpenMW/openmw!2697
2023-02-08 11:32:16 +00:00
Alexei Kotov
b14d1f0c6b Don't discard root node transformations for Gamebryo meshes 2023-02-08 14:20:42 +03:00
Alexei Kotov
8ebdd1e4a5 Fix material data loading for 10.0.1.0 2023-02-08 13:46:54 +03:00
Alexei Kotov
115c30a573 Read bhkConvexTransformShape 2023-02-08 13:26:26 +03:00
Alexei Kotov
9f28a26b25 Read NiSequence/NiControllerSequence 2023-02-08 01:03:11 +03:00
jvoisin
3cbf1dc042 First pass with include-what-you-use 2022-10-09 10:39:43 +00:00
elsid
06f7e8088e
Check for negative record list length 2022-09-24 19:10:38 +02:00
elsid
0688b6de40
Separate record list reading from its state
To make it possible to set record list state independently from reading NIF
file.
2022-09-24 19:10:35 +02:00
elsid
c338c1e5d3
Add Nif::FileView as read only interface for Nif::NIFFile
To make sure interface is scoped to what users require.
2022-09-24 19:10:21 +02:00
elsid
f2fb3d6de8
Separate NIFFileReader from NIFFile
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.

Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
2022-09-24 19:10:14 +02:00
elsid
b39ccbeeef
Remove NIFFile::warn and NIFFile::fail functions
These functions use NIFFile only as context, they are not really a part of
either reading nor state invariant. And they only confuse reader because it's
not immediatelly obvious that no code is executed after fail.
2022-09-24 19:10:05 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Alexei Kotov
7aee22be91 Further controller updates
Correct NiMaterialColorController base class
Load everything in NiGeomMorpherController
Make a guess at how weighted interpolators might be supposed to work like
2022-09-16 23:45:54 +03:00
Alexei Kotov
e2ed313389 Don't load keys for Gamebryo morphs 2022-09-16 05:55:37 +03:00
psi29a
d1c79fa8d1 Merge branch 'pre_clang_format_fixes_2' into 'master'
Fixes before applying clang-format 2

See merge request OpenMW/openmw!2401
2022-09-15 08:24:23 +00:00
Alexei Kotov
482de23893 Streamline NiInterpController handling 2022-09-15 00:58:10 +03:00
elsid
410a2881fe
Add comma to the last array element to prevent putting multiple elements on a single line 2022-09-14 00:36:02 +02:00
Project579
2df8bfed25 Fix build errors after rebase against master due to large amount of changes. 2022-09-11 14:41:20 +02:00
Project579
a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2022-09-11 14:41:20 +02:00
Project579
e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2022-09-11 14:41:15 +02:00
Alexei Kotov
f17b1cd7ab Load bhkCapsuleShape and bhkSphereShape 2022-09-07 16:09:19 +03:00
Alexei Kotov
44fbb5cdc3 Read NiMultiTargetTransformController 2022-09-04 08:36:32 +03:00
Alexei Kotov
8df0587793 Reformat NIF record type mapping 2022-09-04 08:36:32 +03:00
Alexei Kotov
126090bdc5 Load NiBillboardNode mode field 2022-08-31 22:32:45 +03:00
psi29a
5ee4ce1232 Merge branch 'nipixeldata' into 'master'
Support more NiPixelData formats (feature #6945)

Closes #6945

See merge request OpenMW/openmw!2290
2022-08-17 12:20:00 +00:00
Alexei Kotov
edbd05a3f7 Support more NiPixelData formats (feature #6945) 2022-08-17 14:22:27 +03:00
elsid
cc8c7002ea
Cleanup components includes 2022-08-16 19:14:04 +02:00
psi29a
bb9884c024 Merge branch 'split_stringops' into 'master'
Split components/misc/stringops.hpp into multiple headers

See merge request OpenMW/openmw!2233
2022-08-09 18:06:40 +00:00
elsid
f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
Alexei Kotov
014de72644 Use NiParticleSystemController's color for the initial particle color 2022-08-03 14:36:51 +03:00
Andrei Kortunov
c36c28e8f9 Move NIF implementation to cpp files 2022-07-21 15:54:52 +04:00
elsid
6c8ed4d19c
Move Files::IStreamPtr alias to a separate header
To avoid transitive include of Windows.h all over the engine.
2022-07-17 11:35:39 +02:00
glassmancody.info
0954597fa7 fix typo with wrong flags in particle nifloader 2022-07-05 11:00:28 -07:00
elsid
bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
2022-07-05 01:41:28 +02:00
Alexei Kotov
e673f9fa76 Clean up NIF flags 2022-06-22 01:58:16 +03:00
Alexei Kotov
e6f7a2f1ef Correct NiBoundingVolume loading 2022-06-17 14:35:33 +03:00
cody glassman
72fdf40e06 better support for particle arrays when spawning at node positions 2022-05-15 13:41:52 -07:00
elsid
94c1d0cced
Use unique_ptr to store istream 2022-04-22 18:27:17 +02:00
fredzio
d05a2facf3 Handle NCC flag in Nif files. Objects with this flag will collide only with camera.
Expose objects with NC flag to be used by Lua mods.
2022-04-17 20:03:00 +02:00
Wolfgang Lieff
373776170d refactor for NiFltAnimationNode 2022-04-07 00:49:08 +02:00
Bret Curtis
0db5415976 refactor to use mInternal, support Flag_Reverse and updated changelog/authors.md 2022-04-07 00:09:11 +02:00
Wolfgang Lieff
ead73fce31 initial NiFltAnimationNode support 2022-04-07 00:09:11 +02:00
Alexei Dobrohotov
c28f997c87 Make NiPlanarCollider finite-size 2022-04-05 01:33:36 +03:00
Alexei Dobrohotov
9d8f6064a1 Detail the unused parts of controlled.cpp defs 2022-04-05 01:33:36 +03:00
Alexei Dobrohotov
54df5031b7 Add XYZ rotation axis order support 2022-02-19 02:22:08 +03:00
Alexei Dobrohotov
76ba5025e3 Clarify root node transformation discard 2022-02-19 00:39:02 +03:00
psi29a
b011809056 Merge branch 'master' into 'sort_me_baby_one_more_time'
# Conflicts:
#   components/nif/niffile.cpp
2022-02-17 09:24:50 +00:00
elsid
e1fe501013
Use proper type for Record::recType 2022-02-11 21:52:00 +01:00
elsid
283b68025c
Avoid possible race condition on NIFFile::sLoadUnsupportedFiles
Its value is written from the main thread but other threads read it.
2022-02-11 21:41:08 +01:00
elsid
fbd95516f4
Repalce raw for-loops by corresponding algorithms 2022-02-11 21:41:08 +01:00
elsid
082810f924
Store record type as a part of construct function type 2022-02-11 21:41:08 +01:00
elsid
d097c16206
Use unique_ptr to manage nif record lifetime 2022-02-11 20:40:38 +01:00
glassmancody.info
712107de2d nisortadjust support 2022-02-10 11:59:49 -08:00
Alexei Dobrohotov
85053941b3 Properly postprocess NiSortAdjustNode 2022-02-09 13:55:32 +03:00
glassmancody.info
88f02913d5 use vertex emitters on array particle controllers when appropriate 2022-02-07 19:46:42 -08:00
elsid
3f14011087
Support multiple parents for NIF nodes
Choose a parent base on which node is used to iterate over children nodes.
This leads to duplicate handing of child nodes. A node will be handled so many
times how many parents it has.

For example:
p1 p2
 \ /
  c

Will be handled as:
p1 p2
|  |
c  c

If c has children they will be handled X times c is handled.
2022-01-22 01:02:31 +01:00
Alexei Dobrohotov
b5a7ad6d62 Fix multilayer parallax parameter reading 2022-01-08 01:58:52 +03:00
Alexei Dobrohotov
9b2978f143 Rehash morph loading rehashing 2021-12-26 17:56:19 +03:00
Alexei Dobrohotov
26dfce1114 Rehash key group and morph loading (bug #6517) 2021-12-24 07:21:30 +03:00
psi29a
59ab947f3b Merge branch 't800' into 'master'
Keep only one '\0' in NIF strings (bug #6473)

Closes #6473

See merge request OpenMW/openmw!1458
2021-12-06 14:45:57 +00:00
psi29a
6c7dc2d72f Merge branch 'assorted' into 'master'
Load NiSortAdjustNode and NiAccumulators

See merge request OpenMW/openmw!1396
2021-12-06 13:49:47 +00:00
Alexei Dobrohotov
dd15b30a27 Keep only one '\0' in NIF strings (bug #6473) 2021-12-05 15:56:58 +03:00
elsid
a665a38aca
Use MurmurHash3_x64_128 for file hash 2021-11-21 17:05:59 +01:00
Alexei Dobrohotov
63ea57e9cf Load NiSortAdjustNode and NiAccumulators 2021-11-14 00:31:49 +03:00
Alexei Dobrohotov
50b90a594d Loading and basic handling of BSLightingShaderProperty 2021-11-13 22:52:45 +03:00
Alexei Dobrohotov
d347f8f4f0 Fix build 2021-11-13 20:11:18 +03:00
Alexei Dobrohotov
25f4d05c2e Load bhkRigidBody 2021-11-13 19:59:30 +03:00
Alexei Dobrohotov
c01fff280a Load bhkConvexVerticesShape, bhkBoxShape, bhkListShape 2021-11-13 19:53:03 +03:00
Alexei Dobrohotov
83aa96e38f Load a bunch of triangle strip-based Havok records 2021-11-13 19:52:08 +03:00
Alexei Dobrohotov
e7cc76bba2 Load bhkMoppBvTreeShape 2021-11-13 19:27:32 +03:00
Alexei Dobrohotov
59ce00f742 Refactor all present Bethesda Havok 'support' 2021-11-13 19:14:28 +03:00
psi29a
41bd20e358 Merge branch 'bullet_shape_hash' into 'master'
Store BulletShape source file name and content hash

See merge request OpenMW/openmw!1379
2021-11-13 13:33:22 +00:00
elsid
d7041613ef
Store BulletShape source file name and content hash 2021-11-11 00:27:18 +01:00
Alexei Dobrohotov
cc4c96d0f1 Follow global naming convention for new records 2021-11-10 22:50:01 +03:00
Alexei Dobrohotov
6e5b45453d some physics stuff idk 2021-11-10 20:33:46 +03:00
Alexei Dobrohotov
6de9b49d3d Remove an empty line 2021-11-10 19:59:13 +03:00
Alexei Dobrohotov
923756b407 Load NiControllerManager 2021-11-10 19:42:55 +03:00
Alexei Dobrohotov
41097352a8 Load BSDismemberSkinInstance 2021-11-10 19:40:02 +03:00
Alexei Dobrohotov
5571099147 Load NiCollisionObject and bhkCollisionObject 2021-11-10 19:31:28 +03:00
Alexei Dobrohotov
9500afaa5a Load BSFurnitureMarker 2021-11-10 19:21:07 +03:00
Alexei Dobrohotov
66a1adc31e Handle NiExtraData *properly* 2021-07-27 07:58:57 +03:00
Alexei Dobrohotov
d5ab6e40ab Handle NiExtraData 2021-07-26 04:46:03 +03:00
jvoisin
aec3c74fa5 Sprinkle some [[noreturn]] where possible 2021-06-22 12:51:08 +02:00
Dobrohotov Alexei
19f0b80983 Improve null root handling 2021-05-05 02:41:30 +03:00
elsid
87ada56edd Various fixes for niftest 2021-05-04 20:58:01 +00:00
Andrei Kortunov
696cf9ab05 Extend variables range to avoid integer overflow 2021-04-14 08:06:22 +04:00
Alexei Dobrohotov
2fdbe9b3f6 Handle BSShader[PP/No]LightingProperty 2021-03-22 01:55:58 +03:00
Andrei Kortunov
a22f6b24d5 Init animation key struct before usage 2021-03-18 11:47:06 +04:00
Petr Mikheev
eaaa2f4a1c Use misc/endianness.hpp in components/nif/nifstream 2021-01-10 16:34:47 +01:00
Andrei Kortunov
33648313a6 Initialize variables 2021-01-09 14:21:57 +04:00
Andrei Kortunov
801e2d6ad0 Avoid to use uninitialized variables 2021-01-09 13:36:40 +04:00
Alexei Dobrohotov
1e6156e04a Turn all NIF records into structs 2020-12-16 01:54:31 +03:00
Alexei Dobrohotov
085ea44af5 Add BSShaderLightingProperty abstraction 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
c0b9823372 Read BSShaderProperty and handle NiGeometry properties 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
42226533d8 Handle BSLODTriShape
Its levels of detail are currently not handled
2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
8fd45d85ec Unify NiGeometry/NiGeometryData handling 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
5310dd6807 Clean up particle vertex handling 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
1c83e4936d Read BSShaderTextureSet and NiColorInterpolator
Accept boolean-based and 4D vector-based NiInterpolators in ValueInterpolator constructor
2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
db9c174ca8 Make NIF particle node handling more generic 2020-11-30 12:33:18 +03:00
Alexei Dobrohotov
df9667e923 Read NIF bounding volume data correctly 2020-11-14 14:16:29 +03:00
Alexei Dobrohotov
117697ea22 Fix NiStringPalette loading 2020-11-14 01:12:32 +03:00
Alexei Dobrohotov
a46699fb1e Handle NiGeomMorpherController interpolator list 2020-11-10 23:23:11 +03:00
Alexei Dobrohotov
f3f5dcb016 Read a few more NIF types
NiFloatInterpolator, NiPoint3Interpolator, NiTransformInterpolator, NiBoolInterpolator
Update a few existing controller records
Update NiSkinInstance
2020-11-10 22:37:39 +03:00
Alexei Dobrohotov
c857588ee9 Remove NIFFile settings manager dependency 2020-11-09 14:24:48 +03:00
Alexei Dobrohotov
1d07361f08 Read a few more NIF types
BSXFlags, NiTransformData, BSBound, BSFadeNode, bhkBlendController
2020-11-09 00:19:35 +03:00
Alexei Dobrohotov
a38c629425 Read NiSkinPartition 2020-11-08 13:23:18 +03:00
Alexei Dobrohotov
afea11b70a Read NiStringPalette and NiBoolData 2020-11-08 13:23:18 +03:00
Alexei Dobrohotov
7e63afdecf Allow loading arbitrary NIF files 2020-11-08 13:23:18 +03:00
Alexei Dobrohotov
4fc5e22e9e NIF fixes and cleanup
Get rid of NodeIndexHolder
Use unsigned 32-bit type for NIF record index
Fix calculation of the number of UV sets
2020-10-26 02:51:25 +03:00
Andrei Kortunov
8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
Alexei Dobrohotov
05cd005b30 Fix NiTriStripsData loading 2020-10-09 19:37:54 +03:00
Alexei Dobrohotov
df1014303d Add more generic extra data NIF types 2020-10-06 21:21:55 +03:00
Alexei Dobrohotov
0d02a3392a Clean up 2020-10-06 20:36:10 +03:00
Alexei Dobrohotov
e7c37f21b7 Add NiFloatInterpController abstraction 2020-10-06 20:24:05 +03:00
Alexei Dobrohotov
29ccb09da5 Introduce some extended NIF definitions 2020-10-04 13:18:56 +03:00
Alexei Dobrohotov
4e22c2687f niffile.cpp cleanup 2020-10-02 21:50:54 +03:00
Capostrophic
aa131262ea Implement quadratic interpolation for scalars and vectors 2020-08-07 11:13:53 +03:00
Bret Curtis
0d1b7fd3f0
Merge pull request #2908 from Capostrophic/uvsets
Remove 63 UV set limit
2020-06-15 07:54:51 +02:00
Capostrophic
6f94848dec Remove 63 UV set limit (now 65535) 2020-06-14 23:02:03 +03:00
Capostrophic
7aca18f92b Handle NiLines (feature #5445) 2020-05-30 19:09:34 +03:00
Capostrophic
b665fed8f2 Introduce NiGeometry abstraction 2020-05-14 10:52:27 +03:00
Bret Curtis
bb30b44766
Merge pull request #2839 from Capostrophic/nipathcontroller
Add basic NiPathController support (movement only)
2020-05-13 21:06:54 +02:00
Capostrophic
30fc2e3e5e Add basic NiPathController support (movement only) 2020-05-13 18:01:22 +03:00
Capostrophic
5377e0491b Adjust NiPixelData loading 2020-05-13 17:00:41 +03:00
Capostrophic
a08a9518c3 NIF version adjustments
Cut down on obscure version numbers
Call generateVersion without using a stream object
2020-05-13 01:06:38 +03:00
Bret Curtis
7096ecdcf2
Merge pull request #2719 from Capostrophic/capofixes
Fixes of my mistakes
2020-03-11 09:05:12 +01:00
Capostrophic
aef6cd7006 Fix handling of empty strings in NIF string tables 2020-03-10 23:04:20 +03:00
Capostrophic
19a7245251 Add bump mapping support 2020-03-03 13:32:30 +03:00
Andrei Kortunov
77d6fe46ca Handle NiCollisionSwitch node 2020-02-19 12:14:21 +04:00
Capostrophic
0479311c25 Correct declarations of utility methods 2020-02-02 19:01:47 +03:00
Capostrophic
e363d5df21 Some more minor NIF support fixes 2020-02-02 17:28:46 +03:00
capostrophic
f234d53269 Don't use double negation 2020-01-02 13:13:57 +03:00
capostrophic
32caab663f Enumerate interpolation types properly 2020-01-02 13:07:27 +03:00
capostrophic
e654a52b70 More NIF adjustments
Constant interpolation support
2020-01-02 13:07:27 +03:00
Capostrophic
7c4743fdd1 Convert recordptr typedefs to using directives 2019-10-16 01:36:43 +03:00
Capostrophic
8056107c6e More minor NIF improvements 2019-10-16 01:36:43 +03:00
Capostrophic
8baddefdbd Refactor extra data and particle modifier handling
Objects no longer inherit from extra data class
"Controlled" harmful abstraction no longer exists
Introduced NiParticleModifier/NiParticleCollider abstractions
Extra data size reading moved into the base read() method
2019-09-13 20:26:22 +03:00
capostrophic
9c7474f88c Implement NiPalette support (feature #4882) 2019-08-16 20:21:09 +03:00
capostrophic
9e93c9ecd2 Fix multiple-strip NiTriStrips loading 2019-08-08 22:48:24 +03:00
capostrophic
7fc3153f62 Reduce code duplication further 2019-08-08 20:29:45 +03:00
capostrophic
8efbdeaa57 Load NiTriStrips/NiTriStripsData (don't do anything yet) 2019-08-08 17:09:06 +03:00
capostrophic
6928adcee1 Prevent front() and operator[] from causing undefined behavior 2019-08-04 14:47:33 +03:00
Capostrophic
7c8360d0f3 Use NiSwitchNode initial index field 2019-06-09 01:58:02 +03:00
Capostrophic
b08fed6d83 Fix NIF printVersion and allow 4.0.0.0 file loading 2019-04-09 21:58:29 +03:00
elsid
b3c5d64ff3
Use std::make_shared 2019-03-10 22:07:46 +03:00
Andrei Kortunov
60f112d11c Add support for NiRollController (feature #4675) 2019-02-21 12:34:35 +04:00
Andrei Kortunov
b2126c2b6b Apply UVControllers only for given UV Set (bug #4827) 2019-01-26 14:53:33 +04:00
Andrei Kortunov
d2613e35a2 Fix some Clang 7 warnings 2018-11-09 19:42:59 +04:00
Andrei Kortunov
e06f0b797a Replace all NULLs to nullptr 2018-10-09 10:21:12 +04:00
Andrei Kortunov
1452684d9e Use new logging system for components 2018-08-14 19:42:41 +04:00
elsid
f2a63bcf35
Add unit tests for BulletNifLoader 2018-08-11 18:00:52 +03:00
Andrei Kortunov
c921d1c7e9 Refactor NifStream class (eliminate LNK4221 MSVC warning) 2018-07-10 13:32:52 +04:00
Andrei Kortunov
fba0c155df Fix assertion fail related to NiLookAtController 2018-06-09 17:07:38 +04:00
Andrei Kortunov
5afcc56860 Handle NiLookAtController (feature #4407) 2018-04-29 09:24:13 +04:00
Harald H
d3b623b5d3 http to https for supported urls (#1625)
* http to https for supported urls

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http tp https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* some url fixes

* http to https
2018-03-08 21:23:24 +01:00
Bret Curtis
93f14c219c camelCase 2018-01-01 16:32:20 +01:00
Bret Curtis
7a7b040216 fix building on mips machines 2018-01-01 14:10:23 +01:00
825de71b29 removed an iostream include used for debug prints from nifstream.hpp 2017-09-23 11:10:05 -05:00
30a213a9b3 updates for nifstream optimization including fixing the non-x86 path for little endian reads 2017-09-22 21:08:25 -05:00
8834066dea make streaming to a type array in nif a direct copy from the file into the vector 2017-09-21 23:47:09 -05:00
090a8408b8 made nif basic type read optimizations more portable 2017-09-21 22:37:19 -05:00
c72aa19d6d first pass on optimization of nif parsing functions from the file stream 2017-09-20 23:53:12 -05:00
Bret Curtis
d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 2017-06-09 19:08:53 +02:00
Bret Curtis
07f75e1104 replace boost::shared_ptr in extern and components 2017-06-09 19:08:53 +02:00
scrawl
9b27ec4945 Remove redundant and ambiguous NiNode::makeBone()
Ambiguous because a skeleton can have multiple skinned meshes, with their own bone weights/bind matrix each.
2017-02-26 22:39:23 +01:00
scrawl
aa8459b5c7 Revert "Remove redundant allocations for NIF meshes"
This reverts commit a7c5beb7c5.

Conflicts:
	components/nif/data.cpp
	components/nifbullet/bulletnifloader.cpp
	components/nifosg/nifloader.cpp
2017-02-18 02:33:41 +01:00
scrawl
6a37909ee7 Revert "Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)"
This reverts commit 115e563a7a.
2017-02-18 02:33:41 +01:00
scrawl
115e563a7a Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)
The first part of the fix is to assign VBO/EBO's upon loading the array in the Nif reader. This avoids triggering the 'addVertexBufferObjectIfRequired' code path in osg::Geometry which has the race condition when two threads add the same Array at the same time. Essentially, we want the Arrays to be 'const' when they come out of the Nif reader.

The second part of the fix is to make sure not to create empty arrays in the Nif reader (importantly, not assigning a VBO to the empty array). This empty array would be deleted when the NIFFile is cleaned up, and the detachment of the VBO assigned to it (which is still in use by other arrays) would cause threading issues.

This rare crash bug was first introduced with commit a7c5beb7c5. When using OSG dev version 3.5 the crashes were a little more prevalent, because 'addVertexBufferObjectIfRequired' in osg::Geometry is now used even when VBO's are disabled (as part of the VAO support changes).
2017-01-19 22:23:41 +01:00
MiroslavR
99bcf47167 Implement NiSphericalCollider (Closes #3644) 2016-12-06 01:32:13 +01:00
scrawl
9375cbea44 Make NIFFilePtr const 2016-07-10 17:10:19 +02:00
scrawl
5f4ace1bc2 Implement support for sphere map NiTextureEffects (Fixes #1827) 2016-02-24 21:06:41 +01:00
scrawl
e647ee5424 Support RGB and RGBA embedded textures in NIF files (Fixes #2295) 2016-02-18 19:37:56 +01:00
scrawl
a9ac108382 Fully read NiPixelData 2016-02-18 19:37:56 +01:00
scrawl
e8662bea31 Change the way that image origin is converted to OpenGL's lower-left convention
Flip the texture coordinates instead of flipping textures.

This simplifies the TextureManager (no need to worry if the caller wants flipping or not), should make it easier to generalize & multithread it.
2016-02-05 21:03:11 +01:00
scrawl
3ebfb47983 Do not discard root node transformations if the root node is named 'bip01' (Bug #3118) 2016-01-02 01:30:06 +01:00
scrawl
de84452e5a NifFile: close the stream after reading (Fixes #3070) 2015-12-09 04:52:00 +01:00
scrawl
462ef617ce Don't read forward/backward values for Quaternion key lists
https://forum.openmw.org/viewtopic.php?f=8&t=3201&p=35867#p35867
2015-12-04 00:18:54 +01:00
scrawl
695fcf41c4 Optimize ValueInterpolator / KeyframeController
Cache the current position in the animation track and attempt to reuse it in the next frame.

Decent speed up for the Update phase, about 0.3 ms faster in Balmora.
2015-11-30 20:53:47 +01:00
scrawl
a29d1ace2b Read NiSpotLight 2015-11-12 23:45:12 +01:00
scrawl
ba211ad9ad Read NiPointLight (Fixes #3011) 2015-11-12 23:42:17 +01:00
scrawl
626281977e Read NiLODNode (Bug #3008) 2015-11-12 19:52:32 +01:00
scrawl
a7c5beb7c5 Remove redundant allocations for NIF meshes 2015-06-18 01:26:45 +02:00
scrawl
ad46ff7a98 Remove redundant Transform nodes for TriShapes/ParticleSystems with an identity transform 2015-06-15 02:06:04 +02:00
scrawl
c621d0400c Fix error handling for out-of-range NIF roots (found in Bosmora, TR) 2015-06-09 18:22:18 +02:00
scrawl
b0b55e2037 Delete niftest as it's currently broken 2015-06-01 02:48:15 +02:00
scrawl
da24e298ee Fix -Wreorder warnings 2015-05-23 22:44:00 +02:00
scrawl
604580d75d Move toMatrix to Nif::Node 2015-05-07 21:17:15 +02:00
scrawl
e1f4a7f647 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/openmw/engine.cpp
	apps/openmw/mwgui/mainmenu.cpp
	apps/openmw/mwgui/windowmanagerimp.cpp
	apps/openmw/mwinput/inputmanagerimp.cpp
	apps/openmw/mwrender/animation.cpp
	apps/openmw/mwrender/debugging.cpp
	apps/openmw/mwrender/npcanimation.cpp
	apps/openmw/mwrender/renderingmanager.cpp
	apps/openmw/mwrender/sky.cpp
	components/nif/nifkey.hpp
	components/nif/nifstream.hpp
	components/nifbullet/bulletnifloader.cpp
	components/nifogre/ogrenifloader.hpp
	libs/openengine/bullet/physic.cpp
	libs/openengine/gui/manager.cpp
2015-05-04 02:41:50 +02:00
Rohit Nirmal
997347b01e Silence -Wreorder warnings. 2015-04-28 18:48:02 -05:00
Marc Zinnschlag
e69687b0f2 silenced a warning (potentially unintialised variable) 2015-04-28 14:06:52 +02:00
scrawl
372a54bbc7 Dead code removal 2015-04-25 01:28:01 +02:00
scrawl
28643660d3 Change triangle indices to unsigned 2015-04-21 20:56:16 +02:00
scrawl
167ae600c5 Implement gravity decay (previously unknown float) 2015-04-20 00:37:17 +02:00
scrawl
c4738b11b1 Identify unknown float in NiGravity 2015-04-05 00:09:05 +02:00
scrawl
236d628884 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/opencs/model/doc/document.cpp
	apps/opencs/model/doc/documentmanager.cpp
	components/CMakeLists.txt
	components/bsa/resources.cpp
	components/nif/data.hpp
	components/nif/node.cpp
	components/nifogre/mesh.hpp
	components/nifogre/ogrenifloader.cpp
	components/nifogre/particles.cpp
2015-03-27 17:30:48 +01:00
scrawl
c10c146ad1 Skeleton based bounding box callback for RigGeometry (Bug #455) 2015-03-26 23:15:46 +01:00
scrawl
46cbec9a4a Add skinning auto-detection in nifosg loader 2015-03-25 15:39:41 +01:00
scrawl
b7867d6f0a Stop warning about unused nif properties 2015-03-25 05:29:00 +01:00
scrawl
6d9deaa386 Implement planar collider for particles (Fixes #2149) 2015-03-25 04:57:01 +01:00
scrawl
9141a8d801 Fully implement NiStencilProperty (Feature #1057) 2015-03-24 23:05:20 +01:00
scrawl
9242e6d256 Avoid copying keyframes in controller instances 2015-03-22 23:47:49 +01:00
scrawl
2db5df77f0 Change rotation/scale workaround in preparation for loading .kf controllers 2015-03-22 22:55:35 +01:00
scrawl
f8422c3ed4 Particles mostly completed, still need to attach emitters to the correct node and handle NiBSPArrayController 2015-03-19 03:01:11 +01:00
dteviot
45b6538820 fixed MSVC 2013 warning C4800
forcing value to bool 'true' or 'false'
2015-03-06 23:19:57 +13:00
dteviot
407cd50890 fixed warning C4099:
type name first seen using 'class' now seen using 'struct'
2015-03-06 21:36:42 +13:00
scrawl
6c63bab8e4 Change Nif::Property flags to unsigned 2015-02-23 21:08:25 +01:00
scrawl
8e01d8cb19 Add OSG nifloader, currently supports geometry, materials, basic texturing, skinning, morphing, and most controllers. 2015-02-23 21:06:10 +01:00
scrawl
6b36e55a4e NIF reader cleanup: move definitions to cpp file 2015-02-22 19:17:28 +01:00
scrawl
387969bf42 Remove an old .gitignore 2015-02-22 18:05:46 +01:00
scrawl
f6f37e02df NIF Transformation redundancy fix and include fixes 2015-02-20 17:56:49 +01:00
scrawl
8c10d4badb NIF reader compiles without Ogre 2015-02-17 17:08:55 +01:00
scrawl
d541bc8064 Remove unused functions in nifstream 2015-01-31 22:40:42 +01:00
scrawl
c6c7d102d0 Revert "components/nif/base.hpp now uses the templated get() function"
This reverts commit ad609bff78.

Revert "Made incorrect nif get error message more informative."

This reverts commit 9909c4abad.

Revert "Build the nif file tester by default"

This reverts commit c1315ed90c.

Revert "Converted most nifstream "get multiple" functions to the templated version"

This reverts commit 2619d57bb6.

Revert "Add a templated option for getting vectors to NIFStream"

This reverts commit f318ee0b8c.

Revert "Made NIFStream getters templated"

This reverts commit 4edc4142f3.
2015-01-06 23:36:15 +01:00
Arthur Moore
ad609bff78 components/nif/base.hpp now uses the templated get() function 2015-01-02 01:19:34 -05:00
Arthur Moore
9909c4abad Made incorrect nif get error message more informative. 2015-01-02 01:16:47 -05:00
Arthur Moore
c1315ed90c Build the nif file tester by default
It's extremely useful in determining if a nif file is bad without having to load up openmw or opencs.
Also updated the nif testing script to run at a low priority.
2015-01-01 22:49:33 -05:00
Arthur Moore
2619d57bb6 Converted most nifstream "get multiple" functions to the templated version 2015-01-01 22:49:05 -05:00
Arthur Moore
f318ee0b8c Add a templated option for getting vectors to NIFStream 2015-01-01 22:45:55 -05:00
Arthur Moore
4edc4142f3 Made NIFStream getters templated 2015-01-01 21:39:44 -05:00
Marc Zinnschlag
33d905dc03 Merge remote-tracking branch 'scrawl/master' 2014-12-13 12:37:57 +01:00
Arthur Moore
b8edd9bac3 Get a nif file's version string regardless of its length. 2014-12-12 02:01:46 -05:00