scrawl
45f7563a55
Revert "Revert "Check for a Geometry node when attaching bodyparts""
...
Issue with shaders has been fixed with b9931fb71c
This reverts commit a1e3fb7604
.
7 years ago
scrawl
a1e3fb7604
Revert "Check for a Geometry node when attaching bodyparts"
...
This reverts commit 3fc8634206
.
7 years ago
scrawl
3fc8634206
Check for a Geometry node when attaching bodyparts ( Fixes #3957 )
7 years ago
scrawl
bc82c6a35d
Use white color if told to use nonexisting vertexcolors ( Fixes #3833 )
7 years ago
scrawl
5d2fe5e887
Implement lightmode/vertmode of NiVertexColorProperty
7 years ago
scrawl
40dc1dd6f5
Fix checking a variable before it's assigned (Bug #3950 )
8 years ago
Bret Curtis
07f75e1104
replace boost::shared_ptr in extern and components
8 years ago
scrawl
45d9e38616
Fix check for default material
8 years ago
scrawl
29556a1802
More consistent wording of errors/warnings
...
A Warning indicates a potential problem in the content file(s) that the user told OpenMW to load. E.g. this might cause an object to not display at all or as intended, however the rest of the game will run fine.
An Error, however, is more likely to be a bug with the engine itself - it means that basic assumptions have been violated and the engine might not run correctly anymore.
The above mostly applies to errors/warnings during game-play; startup issues are handled differently: when a file is completely invalid/corrupted to the point that the engine can not start, that might cause messages that are worded as Error due to the severity of the issue but are not necessarily the engine's fault.
Hopefully, being a little more consistent here will alleviate confusion among users as to when a log message should be reported and to whom.
8 years ago
scrawl
1402e0b872
Don't optimize billboard nodes ( Fixes #3774 )
8 years ago
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.
8 years ago
scrawl
aba3c471a9
nifloader: fix setting of dataVariance for non-controlled bones and refactor the code
8 years ago
scrawl
4e5a1e6123
nifloader: improve setting of DataVariance
8 years ago
scrawl
6e996bf2a3
Create TriShapes with an identity transform as a Group
8 years ago
scrawl
6e5d9efa93
Remove NifLoader::optimize, to be replaced with something better
8 years ago
scrawl
c45013c983
Fix particle systems not being rendered in their first frame
8 years ago
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
8 years ago
scrawl
6a37909ee7
Revert "Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580 )"
...
This reverts commit 115e563a7a
.
8 years ago
scrawl
892d1b162d
nifloader: ignore nodes named 'bounding box' ( Fixes #3650 )
8 years ago
scrawl
4d53ab6c32
nifloader: attempt to remove redundant root node when a Skeleton is added
8 years ago
scrawl
2a42c4781e
nifloader: override animflags instead of accumulating them
8 years ago
scrawl
0187f2ce4c
nifloader: combine animFlags and particleFlags (Bug #2100 )
8 years ago
scrawl
bccfd6cef8
nifloader: handle textures with no image that are later assigned in a FlipController
...
As found in vurt's trees (Bug #2100 )
8 years ago
scrawl
f3045331f1
Fix regression in handling of NiZBufferProperty
8 years ago
scrawl
851f61ac82
Always assign osg::Material when a material controller is used
8 years ago
scrawl
9180089a3b
Add sharing for more State Attributes, most notably BlendFunc and AlphaFunc, to improve the state tracking in osg::State and reduce the number of GL calls
8 years ago
scrawl
960d4a96c3
Reduce the number of osg::Material state by setting the default state on the graph root
8 years ago
scrawl
e399e10607
Add missing lock in shareMaterial
8 years ago
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).
8 years ago
scrawl
aafff1deb6
Fix memory leak
8 years ago
MiroslavR
99bcf47167
Implement NiSphericalCollider ( Closes #3644 )
8 years ago
Allofich
6ec37b5cfb
Fix shadowing warnings
8 years ago
Allofich
a8e9f2df67
Cleanup
8 years ago
Allofich
be96ff1fd1
Remove redundant parameter
8 years ago
Allofich
a033ba3bd2
Override spell textures by NiTexturingProperty
8 years ago
scrawl
a5da3a269e
Fix shadowing warnings
8 years ago
scrawl
341e3846c0
Use initial particle state to compute the initial bounding box ( Fixes #3500 )
9 years ago
scrawl
513e1da8a3
Remove unneeded casts
9 years ago
MiroslavR
721fa28c1e
Fix assertion failure with NiTextureEffect missing source texture
9 years ago
MiroslavR
9c6739f1b3
Fix doubled particle spawn range
9 years ago
MiroslavR
2a987b6857
Do not skip inactive keyframe controllers (Bug #1942 )
9 years ago
scrawl
62018e802b
Minor fix to particle system AutoPlay flag handling
...
The previous commit broke some magic effects (e.g. shield). The controller's emit start/stop times should control the emitter, while the absence of the ParticleSystem's autoplay flag should freeze the whole particle system if no valid controller source gets assigned. This revised version works for both the Shield effect and the "dagoth ur death sparkles" effect.
9 years ago
scrawl
7202072196
Freeze particle systems on construction if the AutoPlay flag is missing
9 years ago
scrawl
0c08f705c5
Make the ParticleSystemController freeze the particle system instead of the emitter (Bug #3390 )
9 years ago
scrawl
e30bb31a79
Handle the particle node's AutoPlay flag (Bug #3390 )
9 years ago
scrawl
bc36269617
When a controller is present more than once in the same keyframe file, pick the first one ( Fixes #2719 )
9 years ago
scrawl
aae43dbff5
Set the MorphGeometry vertex buffer object usage to GL_DYNAMIC_DRAW
9 years ago
scrawl
84b8da7a09
Share the osg::Material on drawables
...
Reduces the number of GL calls / frame by ~4%.
9 years ago
scrawl
abcfe9bcee
Don't add empty text key objects
9 years ago
scrawl
02d23564dc
Include cleanup
9 years ago
scrawl
f898bf493f
Don't use Geodes
9 years ago
scrawl
82b792f808
Eliminate dynamic_cast in BillboardCallback
9 years ago
scrawl
dd2fbfc0a2
Fix windows build
9 years ago
scrawl
6e7c6fdd7e
Implement NiTexturingProperty::DecalTexture
9 years ago
scrawl
30d06bfe0e
Add comment
9 years ago
scrawl
64636bd85a
Improve error reporting
9 years ago
scrawl
cdccf03228
Fix mismatched delete
9 years ago
scrawl
5f4ace1bc2
Implement support for sphere map NiTextureEffects ( Fixes #1827 )
9 years ago
scrawl
90a99991d1
Use empty() instead of !size()
9 years ago
scrawl
e647ee5424
Support RGB and RGBA embedded textures in NIF files ( Fixes #2295 )
9 years ago
scrawl
606758d72f
NifLoader: create the BumpTexture slot, but don't use it yet
9 years ago
scrawl
4cd4131da9
NifLoader: assign a name to created textures
...
This name will tell the shader visitor how to handle that texture.
9 years ago
scrawl
50e92c8136
NifLoader: move texture property handling to a separate function
9 years ago
scrawl
acf44fd9e5
NifLoader: handleTextureControllers outside of the NumTextures loop
9 years ago
scrawl
5824619a95
Clean up includes
9 years ago
scrawl
8b596dfcbe
Remove support for OSG 3.2
...
Since commit e8662bea31
, we're using OSG functionality that contains an unfixed crash bug in version 3.2. The bug is fixed in version 3.4 (OSG commit 6351e5020371b0b72b300088a5c6772f58379b84)
9 years ago
scrawl
9e53e12c70
More renaming of TextureManager -> ImageManager
9 years ago
scrawl
f99f403dda
Rename TextureManager to ImageManager
9 years ago
scrawl
6ef848b7c5
Remove TextureManager::getTexture2D
...
Instead use getImage and let the caller create the Texture. Sharing of textures is then handled in post by the SharedStateManager.
This is closer to what the OSG serializer does.
Streamlines the TextureManager and will make it easier to multithread.
9 years ago
scrawl
2eda495f89
Build fix for OSG 3.2
9 years ago
scrawl
06ed20abf8
Use the initial pose of a MorphGeometry for object placement ( Fixes #3136 )
9 years ago
scrawl
6b48acaf0e
Don't optimize TriShapes with controllers ( Fixes #3143 )
9 years ago
scrawl
723c392a73
NifLoader: fall back to the first UV set when encountering invalid UV set references
9 years ago
scrawl
0731595c2b
Wrap a Texture2D in a ref_ptr
9 years ago
scrawl
31c3324705
Don't assume the emitter node is a Group ( Fixes #3082 )
...
This would be a correct assumption by default, but is no longer true when the NifLoader::optimize() function optimizes the graph.
9 years ago
scrawl
e3d3380c8c
Remove return value for in-place toLowerStr
9 years ago
scrawl
1d5af3c9c8
Remove unneeded cast
9 years ago
scrawl
ac366f1603
Fix the rig bounds being updated twice per frame
...
Unlike what I expected, the osgUtil::UpdateVisitor is set to traverse all children (not only active children). The FrameSwitch was thus traversing both RigGeometries part of the double-buffering scheme, rather than only the one active in the current frame.
9 years ago
scrawl
9b96fcc224
Set the particle scaleReferenceFrame to local space
9 years ago
scrawl
21e25f4756
Use the traversalNumber as frame number
9 years ago
scrawl
0965a9059d
Handle NiLODNode using osg::LOD ( Fixes #3008 )
9 years ago
scrawl
1edcb219a7
Leak fix
9 years ago
scrawl
0409e5a043
Use OSG_VERSION_GREATER_EQUAL / LESS_THAN rather than MIN_VERSION_REQUIRED (cosmetic change)
9 years ago
scrawl
f1ac408f35
Place Drawables directly in the scene graph when built with OSG 3.4
...
OSG 3.4 adds the ability to place Drawables directly in the scene graph, without a Geode decorating them. Leveraging this should give a small performance boost, because the redundant Geodes increase culling overhead.
There is still an oustanding issue with the RemoveDrawableVisitor no longer working correctly, because Drawables can have multiple parents.
9 years ago
scrawl
64abdbabe3
Small refactor of controllers handling, print warning messages for unhandled controllers
9 years ago
scrawl
35f5be680b
Support for NiVisController on trishape nodes
9 years ago
scrawl
2ee6b41887
Handle NiAlphaProperty on a drawable basis
...
Removes the RenderBin nesting complication. Also results in leaner StateSets, so the cull phase should be a bit faster.
9 years ago
scrawl
8e69c80bf6
Add framenumber checks in various cull callbacks, so we don't update more than once per frame when multiple cameras are used
9 years ago
scrawl
76fb68a9c0
Handle particle systems that don't have emitters
...
Fixes a crash in the Magic Diversity mod.
9 years ago
Arthur Moore
2d93a6f6cb
Be more verbose when dealing with unhandled nif texture properties
10 years ago
scrawl
ac1f64b559
Fix StencilProperty front face mixup ( Fixes #2802 )
10 years ago
scrawl
7a5f220ac5
GlowTexture keeps the alpha channel from the previous texture stage
10 years ago
scrawl
39539603bf
Re-enable a warning message
10 years ago
scrawl
a7c5beb7c5
Remove redundant allocations for NIF meshes
10 years ago
scrawl
81a4a6da6b
Make better use of the available texture units (Bug #2702 )
...
Nvidia drivers only support a maximum of 4 fixed function texture units. To resolve this problem, bind texture units in order instead of binding to the NiTexturingProperty::TextureType unit.
10 years ago
scrawl
934166a853
Ignore the alpha value for particle materials (Bug #2699 )
10 years ago
scrawl
d7a4a9fd66
Create NIF root nodes as Group instead of Transform when possible
10 years ago
scrawl
b79ab1a3b8
Fix InverseWorldMatrix bug introduced by last commit
10 years ago
scrawl
ec25f1da95
Fix ParticleSystem bug introduced by last commit
10 years ago
scrawl
ad46ff7a98
Remove redundant Transform nodes for TriShapes/ParticleSystems with an identity transform
10 years ago
scrawl
ab597f672e
State the filename in NIF loader warning messages
10 years ago
scrawl
6a788c3462
Minor cleanup
10 years ago
scrawl
a5b72a358b
Prune empty nodes in RemoveDrawableVisitor
...
Gets rid of 28 useless transform nodes in base_anim.1st.nif.
10 years ago
scrawl
9e049894e8
Reduce the number of StateSets created for NIF scene graphs
...
The Material state is now set on the NiTriShape's node rather than the Geode, thus merged with other state like NiTexturingProperties, etc that are typically attached to the NiTriShape.
Effectively cuts in half the number of StatSets for a NIF file, resulting in big speedup (~10%) in the Cull and Draw phases.
10 years ago
scrawl
8d6620b074
Assign an initial bounding box to particle systems
10 years ago
scrawl
b5099324d1
Enable ParticleSystem's FreezeOnCull, big speed-up in Vivec
10 years ago
scrawl
93ee11c5e7
Fix particlesystem nested RenderBin issue (Bug #2631 )
10 years ago
scrawl
5edf457ab7
Build fix
10 years ago
scrawl
0a411cbd7c
Enable particle lighting
10 years ago
scrawl
0f8f19958a
NifLoader: Fix empty StateSets being created in some cases
10 years ago
scrawl
261ed1f4e5
Revert "Enable culling for particle emitters & programs"
...
This reverts commit 8b206e0aed
.
10 years ago
scrawl
3dcb167066
Map rendering
10 years ago
scrawl
604580d75d
Move toMatrix to Nif::Node
10 years ago
scrawl
63b69db617
Port skeleton based bounding boxes to the new skinning system
...
Not sure if going to keep this, there's a noticable performance impact.
10 years ago
scrawl
09742d5b95
Animation playback works, no movement accumulation yet
10 years ago
scrawl
cd7808fc11
Cleanup in preparation for animation port
...
Scrapped previous idea for multiple animation sources, better approach incoming.
10 years ago
scrawl
148c041a43
Nif loader cleanup - forcing a skeleton is no longer needed
10 years ago
scrawl
28643660d3
Change triangle indices to unsigned
10 years ago
scrawl
10644544ab
Dead code removal
10 years ago
scrawl
eaa4316ff8
Move skinning code to SceneUtil
10 years ago
scrawl
111e3eb6db
Slightly improve bounding box for skinned meshes
10 years ago
scrawl
4ea6d4aa01
Rewrite of skinning code
...
Goals:
- get rid of the mesh pre-transform (this requires supporting different bind matrices for each mesh)
- bounding box should be relative to the bone the mesh is attached to, ideally we can then get rid of the expensive skeleton-based bounding boxes
- update bone matrices in CullCallback instead of UpdateCallback
Works OK, though the bounding boxes are not correct yet.
10 years ago
scrawl
c334a76a6f
Fix skinning bug
10 years ago
scrawl
f7da979669
Add FrameSwitch (geometry "double buffering") for efficient updates of RigGeometry & MorphGeometry
10 years ago
scrawl
c516e897ee
Move Controller base classes to SceneUtil, add visitor to assign ControllerSources
10 years ago
scrawl
de2c85e0f8
Port nifloader to the more efficient StateSetController
10 years ago
scrawl
a0b43f426e
Avoid setting DYNAMIC DataVariance on StateSets
10 years ago
scrawl
591a35b8d7
*very* early version of the LightManager
10 years ago
scrawl
433e29f297
MorphGeometry optimizations: static bounding box and vertices updated during cull traversal
10 years ago
scrawl
8b206e0aed
Enable culling for particle emitters & programs
...
Big speedup, though might cause timing inconsistencies that we should fix at some point.
10 years ago
scrawl
74c56556cc
More fixes for scaled particle systems
10 years ago
scrawl
304d7e544f
Optimize RigGeometry to update skinning in CullCallback
10 years ago
scrawl
e5e1013c51
TextKeys attached to root node as user data, add .kf loading to scenemanager
10 years ago
scrawl
12f27123f2
Billboard scaling fix and culling bug fix
10 years ago
scrawl
9975ec1678
Missing clone function
10 years ago
scrawl
bb32c761df
*very* early texture manager, need a lot more thought to design this properly
10 years ago
scrawl
322fcdc2d3
Transform world space particles when attaching to a node
10 years ago
scrawl
ac2612926e
Disable unRefImageDataAfterApply
10 years ago
scrawl
e91d9d0903
Fix for behaviour of scaled particle nodes
...
Not sure if used in vanilla assets so may be low priority, but couldn't help looking into this.
10 years ago
scrawl
c10c146ad1
Skeleton based bounding box callback for RigGeometry (Bug #455 )
10 years ago
scrawl
99c9907ff3
Fix emitter/particlesystem scene graph order problems
10 years ago
scrawl
caa93f767b
Skip creating meshes for hidden nodes with no VisControllers
...
There's quite a bit of garbage in base_anim.nif, so this change should result in a much leaner scene graph.
10 years ago
scrawl
e938fa4a9d
Implement extrapolation mode in ControllerFunction (Bug #1871 )
10 years ago
scrawl
96d51f0bb7
NiParticleRotation seems to be unused
10 years ago
scrawl
46cbec9a4a
Add skinning auto-detection in nifosg loader
10 years ago
scrawl
60ede8dede
Stop warning about NiFogProperty (unused in MW)
10 years ago
scrawl
6d9deaa386
Implement planar collider for particles ( Fixes #2149 )
10 years ago
scrawl
20866b44f7
FlipController fix, DetailTexture & DarkTexture tested
10 years ago
scrawl
b072e803ce
Use correct ambient/diffuse default values when no NiMaterialProperty exists
10 years ago
scrawl
9ee99a751c
Stop warning about NiDitherProperty, ignore NiShadeProperty (unused)
10 years ago
scrawl
9141a8d801
Fully implement NiStencilProperty (Feature #1057 )
10 years ago
scrawl
baa152328a
Crash fix
10 years ago
scrawl
376f0f3ac1
Small cleanup
10 years ago
scrawl
018115601a
Move particle emitter/affector handling to separate functions
10 years ago
scrawl
36ad40827b
Move parent node attachment out of nifloader
10 years ago
scrawl
ff9e2b03a0
Hide NIF loader details in the implementation file
10 years ago
scrawl
5a582e7eb7
Reintroduce showMarkers flag
10 years ago
scrawl
6d85444d26
Add text key loading
10 years ago
scrawl
6219a7bbfc
Add .kf loader
10 years ago
scrawl
9242e6d256
Avoid copying keyframes in controller instances
10 years ago
scrawl
2db5df77f0
Change rotation/scale workaround in preparation for loading .kf controllers
10 years ago
scrawl
15f9c1ddcf
NiBSPArrayController works
10 years ago
scrawl
71782462b7
Subclass ParticleSystem to support limit on the number of particles
10 years ago
scrawl
2e11642273
Fix BillboardNode overriding scale
10 years ago
scrawl
a9aee389c0
Emitters attached to correct node, a bit ugly
10 years ago
scrawl
32bb202290
Implement BillboardNode
10 years ago
scrawl
d486cde330
Fix broken VisControllers
10 years ago
scrawl
4957ceeb1d
Refactor controllers, now part of the scene graph as UpdateCallbacks
...
Practical benefits:
- The controller update is now run automatically
- Creating an instance of a scene graph should now work properly using the defined copy constructors
10 years ago
scrawl
00ab474188
More work on copy constructors
10 years ago
scrawl
f8422c3ed4
Particles mostly completed, still need to attach emitters to the correct node and handle NiBSPArrayController
10 years ago
scrawl
79c2138e53
Port ResourceHelpers to new VFS
10 years ago
scrawl
f843e12538
Add world space particle systems, will need more changes when emitters are added
10 years ago
scrawl
510375aa63
Add virtual file system (VFS) replacing the low level parts of the old resource system
10 years ago
scrawl
8d64f2081e
Add particle system state loading
10 years ago
scrawl
2a92fb57f7
Add FlipController
10 years ago
scrawl
6c8613ae35
Add DarkTexture and DetailTexture
10 years ago
scrawl
c54ee16748
Add AlphaController and MaterialColorController
10 years ago
scrawl
3839d6f777
Simplify controller classes
10 years ago
scrawl
74dfb23e7b
Handle material properties in trishapeToGeometry
10 years ago
scrawl
8e01d8cb19
Add OSG nifloader, currently supports geometry, materials, basic texturing, skinning, morphing, and most controllers.
10 years ago