Commit Graph

442 Commits (08484a46c7e8ed17202eb28d1cbf4f43799e5320)

Author SHA1 Message Date
Chris Robinson 6f0b9a5f2c Avoid unnecessary multimap copies 12 years ago
Chris Robinson 512ff3687a Don't create Ogre animations for skeletons 12 years ago
Chris Robinson 634b0fd067 Fix for controller delta time going below start time 12 years ago
Chris Robinson 020bc410bf Merge remote-tracking branch 'zini/master' into nifogre 12 years ago
scrawl 44ac0a7c18 Use one vertex buffer for all UV coordinates 12 years ago
Chris Robinson adc6a948c7 Add methods to get the rotation, translation, and scale from a NodeTargetValue 12 years ago
Chris Robinson 59137d93c9 Partially handle NiGeomMorpherController
The morphs aren't actually applied yet, but the Ogre controller is set up so
all that has to be done is to implement the setValue method.
12 years ago
Chris Robinson d936291dbf Remove an unused ostream operator<< 12 years ago
Chris Robinson a3511c62cf Don't store textkeys in user object bindings
It's a bit unwieldy to have them stored in the 'skeleton master' instead
of the skeleton instance. And although the text keys are extracted for
each created instance now, this shouldn't be much worse than the
multimap copying going on before.

Plus, proper serialization can help for future optimizations.
12 years ago
Chris Robinson 2345b5e8b3 Avoid storing text keys for each animation 12 years ago
Chris Robinson 7d59340ed6 Don't clip out the group name from the textkeys 12 years ago
Chris Robinson ace7d647e5 Add a method to apply a NodeTargetValue-based controller to a specified node. 12 years ago
Chris Robinson f37a71f025 Use a separate method to build node-based controllers 12 years ago
Chris Robinson 3def2a0f45 Treat the particle random values as the max differential 12 years ago
Chris Robinson 36170c5374 Use flag enums instead of hard-coded hex values 12 years ago
Chris Robinson 1b1f9f7921 Allow multiple ObjectLists to be created for Animations.
addObjectList may not currently be called outside of the related constructor.
12 years ago
Chris Robinson 7000a1aa3e Add a ParticleSystemController 12 years ago
Chris Robinson bf8bc989fc Recognize and partly handle NiBSParticleNode 12 years ago
Chris Robinson f4695ec4ac Cleanup NIFObjectLoader some 12 years ago
Chris Robinson acb1b5f002 Try to handle NiBSAnimationNode
This is still incomplete guess work. Currently it seems as though flag 0x20
specifies whether the controllers auto-play (if on), rather than follow the
object's animation time.
12 years ago
Chris Robinson 0b363ba36e Handle NiParticleColorModifier with Ogre's ColourInterpolator
Note that Ogre's ColourInterpolator has a maximum of six color stages. This
seems to be fine so far, but if we want anything better, we'll need a custom
affector for it.
12 years ago
Chris Robinson 80a4345787 Keep particles in local space 12 years ago
Chris Robinson dd981077b9 Handle the vertical and horizontal parameters of Nif particles
Note that 'horizontal' is mapped to rotate around the Z axis, not Y. The Nif
particle parameters seem to be set up to expect a normal OpenGL (Direct3D?)
orientation, rather than the 90-degree pitch offset of the game.
12 years ago
Chris Robinson 7191f6ed2a Start a Nif-style particle emitter
Not complete yet (doesn't handle the vertical or horizontal direction/angle),
and should probably be renamed.
12 years ago
Chris Robinson 07c24e0382 Don't create entities and particles when only the skeleton base is needed 12 years ago
Chris Robinson 4a42f89e08 Merge remote-tracking branch 'zini/master' into nifogre 12 years ago
Chris Robinson 5b30677e41 Add the start of a custom gravity affector 12 years ago
scrawl 23b477a938 Fix normal maps with spaces in filename not getting loaded 12 years ago
Chris Robinson d26ffe9de0 Move a method to the Node class 12 years ago
Chris Robinson 62e0abd945 Move the mesh loader to its own source file 12 years ago
Chris Robinson 75489b1e9d Move NIFMaterialLoader to a separate file 12 years ago
Chris Robinson caff28e20a Move NIFSkeletonLoader to a separate file 12 years ago
Chris Robinson 6c6750342c Specified particle size is actually the radius 12 years ago
Chris Robinson 973fdeb2e0 Improve particle system placement when no emitters are specified 12 years ago
Chris Robinson e7c0f2a211 Minor cleanup to loading texture UV coords 12 years ago
Chris Robinson 01a1a0b846 Merge remote-tracking branch 'zini/master' into nifogre
Conflicts:
	components/nifogre/ogrenifloader.cpp
12 years ago
scrawl 343e2027af Support NIF detail maps 12 years ago
scrawl a5c868c9f5 Create a separate vertex buffer for each UV set 12 years ago
Chris Robinson dba7308248 Recognize NiParticleRotation 12 years ago
Chris Robinson 3c633e275e Don't create a controller for empty keyframe data 12 years ago
Chris Robinson 261ea1fe5e Implement a KeyframeController 12 years ago
Chris Robinson f69a8259e1 Update animation source controller targets 12 years ago
Chris Robinson 44a59e1b87 Fix a couple messages 12 years ago
Chris Robinson 2362e920f3 Use an unconnected object list for animation sources
We'll want the controllers, as the plan is to use their keyframe controllers
to animate the actual skeleton used for the meshes.
12 years ago
Chris Robinson 399394ff10 Don't restrict animations to the keyframe time limits 12 years ago
Chris Robinson ab5980ae18 Let the default controller function use absolute input
And convert the VisController to use it.
12 years ago
Chris Robinson fe9a7f12b6 Material fixes 12 years ago
Chris Robinson 2e067e95a9 Handle NiWireframeProperty 12 years ago
Chris Robinson ebff64a7a4 Fix UVController and add warn about unhandled material controllers 12 years ago
Chris Robinson be419bc891 Handle NiCamera nodes 12 years ago
Chris Robinson 2db72ae607 Rename EntityList to ObjectList 12 years ago
Chris Robinson 834a6a1f00 Remove old, unused code 12 years ago
Chris Robinson d97b341dc6 Rename NIFMeshLoader to NIFObjectLoader 12 years ago
Chris Robinson 63cbf7ddeb Specify a default return for failed lookups 12 years ago
Chris Robinson ca289a317c Separate the UVController function out and make it generic
Also fix a timing bug in it.
12 years ago
Chris Robinson 6b151be3f4 Create particle systems even when MRK was specified 12 years ago
Chris Robinson c283991126 Remove an unneeded method 12 years ago
Chris Robinson ebcb4c66c3 Properly read and use the NIF root record list 12 years ago
Chris Robinson 59f1d4b047 Add support for NiUVController on meshes 12 years ago
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.
12 years ago
Chris Robinson 95730cc127 Create entities and particle systems for hidden objects
They're set as (in)visible as appropriate.
12 years ago
Chris Robinson f764f243d2 Fix the particle quota 12 years ago
Chris Robinson 41ce5464c9 Recognize NiBSAnimationNode as a record type
And don't warn about animated nodes without textkeys
12 years ago
Chris Robinson 99b915e652 Fix some material warnings 12 years ago
Chris Robinson af756bfa9c Merge remote-tracking branch 'zini/master' into nifogre 12 years ago
Chris Robinson b5017e0543 Implement NiParticleGrowFade 12 years ago
Chris Robinson aa9df818a5 Add support for NiVisController 12 years ago
Chris Robinson 0631b28646 Prepare for supporting controller objects 12 years ago
scrawl 75b462b974 If alpha rejection was forced, we also need to force depth_write and depth_check 12 years ago
Chris Robinson 12fada2862 Don't offset the animation time to 0 12 years ago
Chris Robinson dc9f5f93e7 Use a helper function to get node properties 12 years ago
Chris Robinson b5719e0ec7 Create particle systems for NiAutoNormalParticles and NiRotatingParticles nodes
Very incomplete, but it's something to work with.
12 years ago
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).
12 years ago
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).
12 years ago
scrawl a9b56eedc3 Support NIF "glow maps", which are basically an emissive channel. 12 years ago
scrawl 5625d73d84 Bump texture support 12 years ago
Chris Robinson 095daca058 Create entities when iterating through the NIF 12 years ago
Chris Robinson 512534be11 Read the correct texture resource for other layers 12 years ago
Chris Robinson f6f165852d Better handle material texture layers 12 years ago
scrawl 6c1ff8caca Merge branch 'master' into next
Conflicts:
	apps/openmw/mwworld/weather.cpp
	components/fileorderlist/model/datafilesmodel.cpp
12 years ago
scrawl e30af28860 Markers should still have collision if they have a NiRootCollisionNode 12 years ago
scrawl 599207a92d Transparency sorting should be enabled only when alpha blending is enabled 12 years ago
scrawl 7f8d659f3c Fix transparency sorting 12 years ago
scrawl 2486ec6cb9 Material fixes (vertex colors, alpha) 12 years ago
Chris Robinson 2f14f26b96 Use the full unique mesh name for the material instead of the NIF name 12 years ago
Chris Robinson 4e1e0eaf62 Merge remote-tracking branch 'zini/master' into material-fix
Conflicts:
	components/nifogre/ogrenifloader.cpp
12 years ago
Chris Robinson 5e50436a94 Convert some BooleanValues to StringValues 12 years ago
scrawl 05bd94effb Merge branch 'master' of git://github.com/zinnschlag/openmw into graphics 12 years ago
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
12 years ago
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).
12 years ago
Chris Robinson 7930aa82b2 Add missing depthFlags to the hash 12 years ago
Chris Robinson 8e35159ad4 Handle NiSpecularProperty 12 years ago
Chris Robinson 8c0326a49c Handle NiZBufferProperty 12 years ago
Chris Robinson 03785f3ecd Handle NiVertexColorProperty 12 years ago
Nathan Jeffords 109dff2d29 renamed high level NIF files... 12 years ago
Chris Robinson fdfcd5bb47 Material properties are accumulative along the node tree 12 years ago
Chris Robinson e3fd4b8429 Fix restoring the original texture name when the DDS check fails 12 years ago
Chris Robinson e6b547b9ba Merge remote-tracking branch 'zini/master' into transparency-fixes 12 years ago
Chris Robinson 166d529c50 Ensure the material is properly built after creating it 12 years ago
Chris Robinson 2c05a7477c Improve checks for texture resource names that include the "textures\" prefix 12 years ago
Chris Robinson eaa6813917 Workaround for meshes without any vertices 12 years ago
Chris Robinson 1168f15361 Don't disable depth writes when blending is enabled 12 years ago
Chris Robinson a7220518b6 Merge remote-tracking branch 'zini/master' into skeleton-fixes 12 years ago
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.
12 years ago
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.
12 years ago
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.
12 years ago
scrawl b82ee4872d Merge branch 'master' of https://github.com/zinnschlag/openmw into graphics
Conflicts:
	components/nifogre/ogre_nif_loader.cpp
12 years ago
scrawl 369f881170 Merge branch 'master' of https://github.com/zinnschlag/openmw into graphics 12 years ago
Chris Robinson b4b20622c6 Properly handle NiAlphaProperty values 12 years ago
Marc Zinnschlag 70b6b68005 Merge remote-tracking branch 'sergeyshambir/BBfix' 12 years ago
Chris Robinson aefd12dfe0 Don't create meshes for collision shapes 12 years ago
Chris Robinson 429bc23cf6 Convert the 0-1 glossiness parameter to 0-255 for shininess 12 years ago
Chris Robinson ff1ecb85c6 Don't bother storing the shape name for the submesh name
The submesh name Ogre has is completely useless to us
12 years ago
scrawl cacdb33b42 Merge branch 'master' into graphics
Conflicts:
	apps/openmw/CMakeLists.txt
	apps/openmw/mwrender/npcanimation.cpp
	apps/openmw/mwrender/sky.cpp
12 years ago
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.
12 years ago
Sergey Shambir b1381ddd69 Nif loader: workaround for missed textures in BB/BH
Works for Better Bodies / Better Heads addons.
12 years ago
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.
12 years ago
scrawl 2e6c63d9cd Disable specular on NIF's 12 years ago
Chris Robinson da5f11700f Warn about unhandled node types before the controllers 12 years ago
Chris Robinson 5b2ca6fa7d Don't complain about RootCollisionNode, it's handled in nifbullet 12 years ago
Chris Robinson f4e587c72c Always create a skeleton from a NIF when there's more than one NiNode 12 years ago
Chris Robinson 8b1e7b95ba Attempt to load the skeleton source if it doesn't yet exist 12 years ago
Chris Robinson bec538bfa1 Always declare operator<< for using a TextKeyMap with Ogre::Any 12 years ago
Chris Robinson c45b4d6072 Clean up some NIF warning reports 12 years ago
Chris Robinson e6e7c69013 Fix handling of filtered entities 12 years ago
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.
12 years ago
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.
12 years ago
Chris Robinson 0853fa335c Avoid redundant string concatenations 12 years ago
Chris Robinson 487c83e943 Rename nonaccum to animroot 12 years ago
Chris Robinson e1d3933145 Remove an unused struct 12 years ago
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).
12 years ago
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).
12 years ago
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.
12 years ago
Chris Robinson 8e8900e422 Use the first bone with text keys as the nonaccum root. 12 years ago
Chris Robinson 536f8104e6 Do not create an 'all' animation. 12 years ago
Chris Robinson 94e30199d1 Merge remote-tracking branch 'zini/master' into animation2
Conflicts:
	components/nifogre/ogre_nif_loader.cpp
12 years ago
scrawl 6c6ce4a05c Merge branch 'master' of https://github.com/zinnschlag/openmw into graphics 12 years ago
Chris Robinson b23fcb260c Use the record index for finding the NiTriShape instead of the name 12 years ago
scrawl 52516ca4b4 Merge branch 'master' into graphics 12 years ago
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.
12 years ago
Nathan Jeffords 0989b44b41 spread some const around NIF loading 12 years ago
scrawl 6ef85c46fd Merge branch 'master' of https://github.com/zinnschlag/openmw into graphics 12 years ago
Chris Robinson 23ac1c2de5 Merge remote-tracking branch 'zini/master' into animation2
Conflicts:
	components/nifogre/ogre_nif_loader.cpp
12 years ago
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. 12 years ago
eduard 2dc0064cc2 more string lowercase 12 years ago
Chris Robinson c4c8295e0b Rename NIFLoader to Loader, and update some comments 12 years ago
Chris Robinson 4b7cc1372f Some cleanup 12 years ago
Chris Robinson a9bcbfd8d3 Use Node::_getFullTransform instead of building the matrix manually 12 years ago
Chris Robinson 015bb0bf1f Use the calculated max time for the "all" animation 12 years ago
Chris Robinson 465fd9c8af Offset animation times to start at 0 12 years ago