1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 07:49:56 +00:00
Commit graph

395 commits

Author SHA1 Message Date
Chris Robinson
2e067e95a9 Handle NiWireframeProperty 2013-04-07 07:12:52 -07:00
Chris Robinson
ebff64a7a4 Fix UVController and add warn about unhandled material controllers 2013-04-07 06:56:12 -07:00
Chris Robinson
be419bc891 Handle NiCamera nodes 2013-04-07 02:28:15 -07:00
Chris Robinson
2db72ae607 Rename EntityList to ObjectList 2013-04-07 01:52:35 -07:00
Chris Robinson
834a6a1f00 Remove old, unused code 2013-04-07 01:14:26 -07:00
Chris Robinson
d97b341dc6 Rename NIFMeshLoader to NIFObjectLoader 2013-04-07 01:02:21 -07:00
Chris Robinson
63cbf7ddeb Specify a default return for failed lookups 2013-04-06 12:41:40 -07:00
Chris Robinson
ca289a317c Separate the UVController function out and make it generic
Also fix a timing bug in it.
2013-04-06 12:26:58 -07:00
Chris Robinson
6b151be3f4 Create particle systems even when MRK was specified 2013-04-06 11:26:51 -07:00
Chris Robinson
c283991126 Remove an unneeded method 2013-04-06 10:33:07 -07:00
Chris Robinson
ebcb4c66c3 Properly read and use the NIF root record list 2013-04-06 10:17:09 -07:00
Chris Robinson
59f1d4b047 Add support for NiUVController on meshes 2013-04-06 09:44:10 -07:00
Chris Robinson
e0da265972 Use accurate bone lookups for attaching objects
NIFs don't requires nodes to have unique names, which means looking up a
bone by name may get the wrong one. Instead, use a NifIndex:BoneHandle
map to make sure we can get the proper bone from a given Nif::Node.
2013-04-06 08:15:12 -07:00
Chris Robinson
95730cc127 Create entities and particle systems for hidden objects
They're set as (in)visible as appropriate.
2013-04-06 06:53:08 -07:00
Chris Robinson
f764f243d2 Fix the particle quota 2013-04-06 06:44:34 -07:00
Chris Robinson
41ce5464c9 Recognize NiBSAnimationNode as a record type
And don't warn about animated nodes without textkeys
2013-04-06 05:00:19 -07:00
Chris Robinson
99b915e652 Fix some material warnings 2013-04-06 00:54:53 -07:00
Chris Robinson
af756bfa9c Merge remote-tracking branch 'zini/master' into nifogre 2013-04-06 00:22:31 -07:00
Chris Robinson
b5017e0543 Implement NiParticleGrowFade 2013-04-06 00:19:05 -07:00
Chris Robinson
aa9df818a5 Add support for NiVisController 2013-04-05 10:38:27 -07:00
Chris Robinson
0631b28646 Prepare for supporting controller objects 2013-04-05 10:13:54 -07:00
scrawl
75b462b974 If alpha rejection was forced, we also need to force depth_write and depth_check 2013-04-05 18:24:12 +02:00
Chris Robinson
12fada2862 Don't offset the animation time to 0 2013-04-05 05:34:59 -07:00
Chris Robinson
dc9f5f93e7 Use a helper function to get node properties 2013-04-05 05:14:24 -07:00
Chris Robinson
b5719e0ec7 Create particle systems for NiAutoNormalParticles and NiRotatingParticles nodes
Very incomplete, but it's something to work with.
2013-04-04 05:10:53 -07:00
Chris Robinson
77ba0fbe73 Prepare for creating particles
This adds a vector of ParticleSystems to the EntityList, and modifies
corresponding code to handle it. It also loads the ParticleFX plugin so
particles can be created (although they aren't yet).
2013-04-04 05:10:52 -07:00
Chris Robinson
97d617d43f Use more appropriate VBO settings
Unskinned meshes don't need dynamic VBOs; they aren't rewritten since their
transformations are handled by the modelview matrix. They also don't need the
local RAM copy (the "shadow buffer") since it's really only useful for skinning
purposes (though this means the VBO has to be readable for static geometry to
work).
2013-04-04 05:10:49 -07:00
scrawl
a9b56eedc3 Support NIF "glow maps", which are basically an emissive channel. 2013-04-03 18:51:40 +02:00
scrawl
5625d73d84 Bump texture support 2013-04-03 17:16:34 +02:00
Chris Robinson
095daca058 Create entities when iterating through the NIF 2013-04-03 03:27:41 -07:00
Chris Robinson
512534be11 Read the correct texture resource for other layers 2013-04-02 22:58:07 -07:00
Chris Robinson
f6f165852d Better handle material texture layers 2013-04-02 21:09:44 -07:00
scrawl
6c1ff8caca Merge branch 'master' into next
Conflicts:
	apps/openmw/mwworld/weather.cpp
	components/fileorderlist/model/datafilesmodel.cpp
2013-03-20 02:29:03 +01:00
scrawl
e30af28860 Markers should still have collision if they have a NiRootCollisionNode 2013-03-14 19:03:42 +01:00
scrawl
599207a92d Transparency sorting should be enabled only when alpha blending is enabled 2013-03-13 01:00:47 +01:00
scrawl
7f8d659f3c Fix transparency sorting 2013-03-05 17:09:20 +01:00
scrawl
2486ec6cb9 Material fixes (vertex colors, alpha) 2013-03-05 13:51:48 +01:00
Chris Robinson
2f14f26b96 Use the full unique mesh name for the material instead of the NIF name 2013-03-04 10:35:13 -08:00
Chris Robinson
4e1e0eaf62 Merge remote-tracking branch 'zini/master' into material-fix
Conflicts:
	components/nifogre/ogrenifloader.cpp
2013-03-03 14:24:05 -08:00
Chris Robinson
5e50436a94 Convert some BooleanValues to StringValues 2013-03-03 14:19:02 -08:00
scrawl
05bd94effb Merge branch 'master' of git://github.com/zinnschlag/openmw into graphics 2013-03-03 15:14:20 +01:00
scrawl
0f6fd80294 Merge branch 'master' of git://github.com/zinnschlag/openmw into graphics
Conflicts:
	apps/openmw/mwgui/windowmanagerimp.cpp
	apps/openmw/mwrender/npcanimation.cpp
	files/mygui/openmw_settings_window.layout
2013-03-03 11:02:38 +01:00
Chris Robinson
21e2c287eb Fix/workaround specular issues
The glossiness should not be multiplied by 255, however the values set in many
of Bloodmoon's meshes would look horrible otherwise. Now we can let the
NiSpecularProperty specify when to enable specular (which is supposed to
default to on, but due to the aforementioned meshes, we default to off).
2013-03-02 19:30:23 -08:00
Chris Robinson
7930aa82b2 Add missing depthFlags to the hash 2013-03-02 19:09:15 -08:00
Chris Robinson
8e35159ad4 Handle NiSpecularProperty 2013-03-02 19:06:28 -08:00
Chris Robinson
8c0326a49c Handle NiZBufferProperty 2013-03-02 18:30:28 -08:00
Chris Robinson
03785f3ecd Handle NiVertexColorProperty 2013-03-02 16:28:32 -08:00
Nathan Jeffords
109dff2d29 renamed high level NIF files... 2013-03-02 13:23:09 -08:00
Chris Robinson
fdfcd5bb47 Material properties are accumulative along the node tree 2013-03-02 12:23:29 -08:00
Chris Robinson
e3fd4b8429 Fix restoring the original texture name when the DDS check fails 2013-03-01 17:57:34 -08:00
Chris Robinson
e6b547b9ba Merge remote-tracking branch 'zini/master' into transparency-fixes 2013-03-01 13:32:30 -08:00
Chris Robinson
166d529c50 Ensure the material is properly built after creating it 2013-03-01 13:26:31 -08:00
Chris Robinson
2c05a7477c Improve checks for texture resource names that include the "textures\" prefix 2013-02-28 17:16:28 -08:00
Chris Robinson
eaa6813917 Workaround for meshes without any vertices 2013-02-28 13:54:53 -08:00
Chris Robinson
1168f15361 Don't disable depth writes when blending is enabled 2013-02-28 12:17:58 -08:00
Chris Robinson
a7220518b6 Merge remote-tracking branch 'zini/master' into skeleton-fixes 2013-02-27 13:22:33 -08:00
Chris Robinson
3ed0bf97a8 Share the space with the parent entity only when there's real skinned meshes
The existence of a base skeleton doesn't mean it shares the same bone
structure. If there isn't an actual skinned entity besides the base, simply
attach it to the bone like unskinned meshes should be.
2013-02-27 13:16:27 -08:00
Chris Robinson
bfe80bb8dc Avoid duplicating skeletons due to casing issues
Manually created resource names are apparently always case sensitive, causing
some skeletons to get loaded multiple times.
2013-02-27 12:33:36 -08:00
Sergey Shambir
03ca7f6123 NIF: added NiStencilProperty record handling
NiStencilProperty appears in Better Clothes plugin. If it not handled,
some parts of NPCs bodies will be not rendered.
2013-02-27 23:45:09 +04:00
scrawl
b82ee4872d Merge branch 'master' of https://github.com/zinnschlag/openmw into graphics
Conflicts:
	components/nifogre/ogre_nif_loader.cpp
2013-02-27 12:25:34 +01:00
scrawl
369f881170 Merge branch 'master' of https://github.com/zinnschlag/openmw into graphics 2013-02-27 09:25:44 +01:00
Chris Robinson
b4b20622c6 Properly handle NiAlphaProperty values 2013-02-26 15:24:20 -08:00
Marc Zinnschlag
70b6b68005 Merge remote-tracking branch 'sergeyshambir/BBfix' 2013-02-26 22:37:45 +01:00
Chris Robinson
aefd12dfe0 Don't create meshes for collision shapes 2013-02-25 15:44:59 -08:00
Chris Robinson
429bc23cf6 Convert the 0-1 glossiness parameter to 0-255 for shininess 2013-02-25 13:08:40 -08:00
Chris Robinson
ff1ecb85c6 Don't bother storing the shape name for the submesh name
The submesh name Ogre has is completely useless to us
2013-02-25 08:22:57 -08:00
scrawl
cacdb33b42 Merge branch 'master' into graphics
Conflicts:
	apps/openmw/CMakeLists.txt
	apps/openmw/mwrender/npcanimation.cpp
	apps/openmw/mwrender/sky.cpp
2013-02-25 15:12:03 +01:00
Chris Robinson
53eb553c57 Be a little more aggressive when looking to skip generating a skeleton
This is needed to handle the insane number of nodes and trishapes in
in_prison_ship.nif, as Ogre has a 256-bone limit for skeletons. This is a bit
sketchy, but it works.
2013-02-24 18:12:15 -08:00
Sergey Shambir
b1381ddd69 Nif loader: workaround for missed textures in BB/BH
Works for Better Bodies / Better Heads addons.
2013-02-25 04:12:41 +04:00
Chris Robinson
c60e858b02 Create bones for NiTriShape nodes, and attach the entities to them
Otherwise some models don't connect properly. NiTriShapes are more guaranteed
to have unique names than their parent nodes.
2013-02-24 12:42:32 -08:00
scrawl
2e6c63d9cd Disable specular on NIF's 2013-02-24 17:18:22 +01:00
Chris Robinson
da5f11700f Warn about unhandled node types before the controllers 2013-02-13 00:45:00 -08:00
Chris Robinson
5b2ca6fa7d Don't complain about RootCollisionNode, it's handled in nifbullet 2013-02-13 00:43:29 -08:00
Chris Robinson
f4e587c72c Always create a skeleton from a NIF when there's more than one NiNode 2013-02-09 17:48:23 -08:00
Chris Robinson
8b1e7b95ba Attempt to load the skeleton source if it doesn't yet exist 2013-02-05 17:55:12 -08:00
Chris Robinson
bec538bfa1 Always declare operator<< for using a TextKeyMap with Ogre::Any 2013-02-04 09:19:59 -08:00
Chris Robinson
c45b4d6072 Clean up some NIF warning reports 2013-02-02 22:27:08 -08:00
Chris Robinson
e6e7c69013 Fix handling of filtered entities 2013-02-02 05:26:52 -08:00
Chris Robinson
c6a9ea5007 Use the skeleton as defined in the NIF model
The avoids having to duplicate models that get attached to different character
skeletons.
2013-01-30 22:37:39 -08:00
Chris Robinson
b6354c6282 Don't share skeleton instances between bounded parts on an NPC
However, a skeleton instance will still be shared between entities in an entity
list.
2013-01-30 09:29:16 -08:00
Chris Robinson
0853fa335c Avoid redundant string concatenations 2013-01-29 01:36:17 -08:00
Chris Robinson
487c83e943 Rename nonaccum to animroot 2013-01-28 22:09:41 -08:00
Chris Robinson
e1d3933145 Remove an unused struct 2013-01-28 01:27:12 -08:00
Chris Robinson
b1ffdf855f Reset the initial state of animated nodes on the skeleton instances
This is so the animation specifies node keyframe data based on the node's
parent. This will also be necessary for applying animations from different
skeleton sources, as they can have different binding positions (even native
.skeleton resources will need to specify animation data this way).
2013-01-26 04:48:53 -08:00
Chris Robinson
d836b3d0ff Don't try to create animations if there's no text keys and nonaccum node.
Such meshes apparently use NiBSAnimationNode, a Bethesda-specific extension
which has animation-related info in its flags (values currently unknown).
2013-01-22 00:24:57 -08:00
Chris Robinson
6905bd18ba Filter out the group name from the text keys
It's already in the animation name, and the text keys are animation-specific
anyway.
2013-01-21 02:59:12 -08:00
Chris Robinson
8e8900e422 Use the first bone with text keys as the nonaccum root. 2013-01-20 22:51:39 -08:00
Chris Robinson
536f8104e6 Do not create an 'all' animation. 2013-01-20 17:24:43 -08:00
Chris Robinson
94e30199d1 Merge remote-tracking branch 'zini/master' into animation2
Conflicts:
	components/nifogre/ogre_nif_loader.cpp
2013-01-15 14:59:30 -08:00
scrawl
6c6ce4a05c Merge branch 'master' of https://github.com/zinnschlag/openmw into graphics 2013-01-14 00:10:57 +01:00
Chris Robinson
b23fcb260c Use the record index for finding the NiTriShape instead of the name 2013-01-13 08:00:04 -08:00
scrawl
52516ca4b4 Merge branch 'master' into graphics 2013-01-12 01:22:01 +01:00
Nathan Jeffords
d5ebd6654d cache loaded NIF files to eliminate reloads
Created a NIF file caching mechanism to prevent the system from
reloading a NIF during a startup and cell changes.
2013-01-10 21:47:02 -08:00
Nathan Jeffords
0989b44b41 spread some const around NIF loading 2013-01-10 21:32:47 -08:00
scrawl
6ef85c46fd Merge branch 'master' of https://github.com/zinnschlag/openmw into graphics 2013-01-10 19:35:40 +01:00
Chris Robinson
23ac1c2de5 Merge remote-tracking branch 'zini/master' into animation2
Conflicts:
	components/nifogre/ogre_nif_loader.cpp
2013-01-09 20:52:12 -08:00
scrawl
455ec0996d Shaders & textures are now loaded upon loading the NIF, instead of when the object becomes visible in the camera frustum. Should improve responsiveness. 2013-01-09 22:27:58 +01:00
eduard
2dc0064cc2 more string lowercase 2013-01-09 20:51:52 +01:00
Chris Robinson
c4c8295e0b Rename NIFLoader to Loader, and update some comments 2013-01-09 09:10:59 -08:00
Chris Robinson
4b7cc1372f Some cleanup 2013-01-09 06:32:31 -08:00
Chris Robinson
a9bcbfd8d3 Use Node::_getFullTransform instead of building the matrix manually 2013-01-09 05:11:32 -08:00
Chris Robinson
015bb0bf1f Use the calculated max time for the "all" animation 2013-01-09 04:30:32 -08:00
Chris Robinson
465fd9c8af Offset animation times to start at 0 2013-01-09 04:21:56 -08:00
Chris Robinson
4054934f16 Store text keys for each animation 2013-01-09 02:51:25 -08:00
Chris Robinson
bb98542c5a Build separate animations for each group 2013-01-09 01:40:38 -08:00
Chris Robinson
e44729cd43 Make the text keys lower-case when extracting them
I think it's safe to assume all text keys are treated in a case-insensitive
manner. So far the only known NiTextKeyExtraData records are for animation
keys, which effectively are.
2013-01-09 00:17:42 -08:00
Chris Robinson
14d814d1d3 Avoid creating bones for NiTriShape nodes
The offset specified for them can be just as easilly handled by the tag point
they get connected to, and as such it's just needless extra nodes.
2013-01-07 04:21:25 -08:00
Chris Robinson
7ba09ff025 Catch errors from buildBones 2013-01-06 20:05:50 -08:00
Chris Robinson
8ebf49a35b Only lower-case the model name
The skeleton name will already be lower-case
2013-01-05 20:54:57 -08:00
Chris Robinson
18389c7b04 Set non-bone nodes as manually controlled 2013-01-05 17:50:22 -08:00
Chris Robinson
e5ce55b6a4 Remove a hack 2013-01-05 06:20:21 -08:00
Chris Robinson
58d35dbfcf Have createEntities' caller retrieve the text keys as needed 2013-01-05 04:01:11 -08:00
Chris Robinson
761914bdaa Use a separate method to build the animation 2013-01-05 03:31:51 -08:00
Chris Robinson
8a086e3afb Cache the mesh names from the mesh/skeleton pairs 2013-01-04 20:58:35 -08:00
Chris Robinson
3131e8dae6 Don't get the text keys if they're not being requested 2013-01-04 20:33:26 -08:00
Chris Robinson
683ced54a0 Store and retrieve the node text keys in the bones' user object bindings 2013-01-04 19:41:37 -08:00
Chris Robinson
a3d33db415 Store a NiNode's NiTextKeyExtraData in a user object binding on Ogre::Bone 2013-01-04 15:55:47 -08:00
Chris Robinson
1d4d67f811 Avoid underflows if the texture name doesn't include a '.' 2013-01-04 15:03:57 -08:00
Chris Robinson
3f19b13695 Merge remote-tracking branch 'zini/master' into animation2 2013-01-04 14:47:01 -08:00
Nathan Jeffords
2181393518 change texture renaming logic to increase performance
ResourceGroupManager::resourceExistsInAnyGroup is slow (at least on
windows) if the tested path does not exist, but is fast if it does (due
to finding it in the index). This change tries the '.dds' version of the
name first, and reverts to the original if the '.dds' version was not
found.
2013-01-04 11:36:22 -08:00
Chris Robinson
61ad8bb3dd Use a list of mesh names instead of mesh objects 2013-01-04 00:14:41 -08:00
Chris Robinson
019893b5c6 Get rid of some unnecessary case-insensitive compares 2013-01-03 23:44:58 -08:00
Chris Robinson
cd8515396a Use a multimap to store the text keys 2012-09-28 23:20:15 -07:00
Chris Robinson
9b491edbf8 Small cleanup for loading animation keyframes 2012-09-28 18:53:24 -07:00
scrawl
906d290935 Markers are actually hidden now. Inspecting the markers in NifSkope revealed why it didn't work previously: the flag that is being looked for is not present in any of the markers, nor any other flag or extra data to identify them. However, the root node name always starts with "marker", making it possible to do a string search. 2012-09-12 12:41:12 +02:00
Marc Zinnschlag
e3d893b001 Merge remote-tracking branch 'jhooks/animationsmooth' 2012-09-06 09:09:46 +02:00
scrawl
4f1bcb749f turned off redundant edge list building 2012-09-02 10:09:41 +02:00
Jason Hooks
5202b11235 just moving a comment 2012-08-18 15:31:54 -04:00
Jason Hooks
4a219404fc Super smooth animations; 100 PERCENT COMPLETE 2012-08-18 15:21:43 -04:00
Jason Hooks
f21df64808 changing a few things around 2012-08-18 14:48:18 -04:00
Jason Hooks
cc776810e2 smoother animations 2012-08-17 17:10:21 -04:00
Marc Zinnschlag
1da56e2832 removed some unused variables 2012-08-17 15:37:14 +02:00
Jason Hooks
d14cc5a435 update master 2012-08-16 18:20:26 -04:00
scrawl
281e15f58e consider all material properties for nif material sharing, instead of just the texture 2012-07-26 23:40:55 +02:00
Chris Robinson
4f46c8a8db Use a functor for the mismatch compare function 2012-07-24 14:59:25 -07:00
Chris Robinson
36be1536d9 Return text keys from NIFs when creating entities 2012-07-23 17:20:47 -07:00
scrawl
f8d6a36196 Merge branch 'master' into nif-cleanup
Conflicts:
	apps/openmw/mwrender/sky.cpp
	apps/openmw/mwrender/sky.hpp
	components/nifogre/ogre_nif_loader.cpp
	components/nifogre/ogre_nif_loader.hpp
2012-07-23 15:35:31 +02:00
Chris Robinson
4035d7370e Fix name/filter comparison 2012-07-21 22:04:05 -07:00
Chris Robinson
d8cb685543 Interpolate keyframes when creating them
Probably not fully correct, but better than nothing.
2012-07-21 18:03:01 -07:00
Chris Robinson
c5b9098517 Remove an unused field from EntityList 2012-07-21 17:09:16 -07:00
Chris Robinson
4bc93ecd1a Use the skeleton name for the main animation 2012-07-20 11:09:05 -07:00
Chris Robinson
4210880c06 Load the animation tracks into Ogre 2012-07-19 21:46:16 -07:00
Chris Robinson
0986cd5962 Get the animation controller target names 2012-07-19 20:48:12 -07:00
Chris Robinson
c2acf47d88 Store the list of keyframe controllers when building the bones 2012-07-19 20:30:10 -07:00
Chris Robinson
f6c837468f Load the proper NIF skeleton 2012-07-19 11:44:08 -07:00
Chris Robinson
e760219953 Use a unique loader for each skeleton resource 2012-07-19 11:36:36 -07:00
Chris Robinson
c9b1f72d81 Use a case-insensitive compare for the part filter 2012-07-18 22:31:07 -07:00
Chris Robinson
bd74ab027a Mirror left-sided parts 2012-07-18 21:21:49 -07:00
Chris Robinson
4af1bce659 Restore and fix some missing parts 2012-07-18 20:14:23 -07:00
Chris Robinson
d9b64b77ec Attach skinned parts to the scene node instead of the named bone 2012-07-18 18:38:55 -07:00