MiroslavR
721fa28c1e
Fix assertion failure with NiTextureEffect missing source texture
2016-07-16 18:59:18 +02:00
MiroslavR
9c6739f1b3
Fix doubled particle spawn range
2016-07-11 22:40:58 +02:00
MiroslavR
2a987b6857
Do not skip inactive keyframe controllers (Bug #1942 )
2016-07-10 19:02:28 +02:00
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.
2016-05-14 22:55:14 +02:00
scrawl
7202072196
Freeze particle systems on construction if the AutoPlay flag is missing
2016-05-14 22:38:49 +02:00
scrawl
0c08f705c5
Make the ParticleSystemController freeze the particle system instead of the emitter (Bug #3390 )
2016-05-14 22:36:53 +02:00
scrawl
e30bb31a79
Handle the particle node's AutoPlay flag (Bug #3390 )
2016-05-14 22:35:34 +02:00
scrawl
bc36269617
When a controller is present more than once in the same keyframe file, pick the first one ( Fixes #2719 )
2016-03-26 14:59:49 +01:00
scrawl
aae43dbff5
Set the MorphGeometry vertex buffer object usage to GL_DYNAMIC_DRAW
2016-03-11 16:10:39 +01:00
scrawl
84b8da7a09
Share the osg::Material on drawables
...
Reduces the number of GL calls / frame by ~4%.
2016-03-11 01:06:54 +01:00
scrawl
abcfe9bcee
Don't add empty text key objects
2016-03-10 17:01:14 +01:00
scrawl
02d23564dc
Include cleanup
2016-03-10 14:29:45 +01:00
scrawl
f898bf493f
Don't use Geodes
2016-03-10 13:17:01 +01:00
scrawl
82b792f808
Eliminate dynamic_cast in BillboardCallback
2016-03-05 20:02:33 +01:00
scrawl
dd2fbfc0a2
Fix windows build
2016-03-02 21:57:25 +01:00
scrawl
6e7c6fdd7e
Implement NiTexturingProperty::DecalTexture
2016-03-01 18:41:36 +01:00
scrawl
30d06bfe0e
Add comment
2016-03-01 17:27:54 +01:00
scrawl
64636bd85a
Improve error reporting
2016-03-01 17:05:02 +01:00
scrawl
cdccf03228
Fix mismatched delete
2016-02-25 21:32:42 +01:00
scrawl
5f4ace1bc2
Implement support for sphere map NiTextureEffects ( Fixes #1827 )
2016-02-24 21:06:41 +01:00
scrawl
90a99991d1
Use empty() instead of !size()
2016-02-22 19:06:12 +01:00
scrawl
8bd16e4d5a
Don't compute the world matrix multiple times
2016-02-22 18:58:19 +01:00
scrawl
055d35a2b0
Revert "Warn about particle emitters that have multiple parent node paths"
...
Not working correctly because osg won't ignore camera nodes.
This reverts commit 1667c807be
.
2016-02-22 18:10:25 +01:00
scrawl
1667c807be
Warn about particle emitters that have multiple parent node paths
2016-02-22 15:21:06 +01:00
scrawl
8f81df2bd3
Cleanup
2016-02-20 20:34:56 +01:00
scrawl
e647ee5424
Support RGB and RGBA embedded textures in NIF files ( Fixes #2295 )
2016-02-18 19:37:56 +01:00
scrawl
606758d72f
NifLoader: create the BumpTexture slot, but don't use it yet
2016-02-18 19:37:56 +01:00
scrawl
4cd4131da9
NifLoader: assign a name to created textures
...
This name will tell the shader visitor how to handle that texture.
2016-02-18 19:37:56 +01:00
scrawl
50e92c8136
NifLoader: move texture property handling to a separate function
2016-02-18 19:37:56 +01:00
scrawl
acf44fd9e5
NifLoader: handleTextureControllers outside of the NumTextures loop
2016-02-18 19:37:55 +01:00
scrawl
5824619a95
Clean up includes
2016-02-12 19:28:10 +01:00
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)
2016-02-12 14:46:45 +01:00
scrawl
be6ea3d607
Account for UV coordinate flip in UVController ( Fixes #3203 )
2016-02-11 16:22:54 +01:00
scrawl
9f729667fb
Remove debug output
2016-02-09 21:16:11 +01:00
scrawl
9e53e12c70
More renaming of TextureManager -> ImageManager
2016-02-05 23:10:27 +01:00
scrawl
f99f403dda
Rename TextureManager to ImageManager
2016-02-05 23:03:53 +01:00
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.
2016-02-05 23:01:11 +01:00
scrawl
5b972ee777
Move texture filtering settings to SceneManager
...
Practical benefits:
- Filter settings are now applied to native OSG format models. These models do not use TextureManager::getTexture2D since the model itself specifies a Texture.
- The GUI render manager will be able to use its own separate textures, making it easier to turn off filtering for them.
2016-02-05 21:03:10 +01:00
scrawl
2eda495f89
Build fix for OSG 3.2
2016-02-03 19:05:15 +01:00
scrawl
06ed20abf8
Use the initial pose of a MorphGeometry for object placement ( Fixes #3136 )
2016-02-03 18:53:38 +01:00
scrawl
6b48acaf0e
Don't optimize TriShapes with controllers ( Fixes #3143 )
2016-02-01 21:01:17 +01:00
scrawl
daa94cc50e
Fix cppcheck warnings
2016-01-03 20:19:38 +01:00
scrawl
723c392a73
NifLoader: fall back to the first UV set when encountering invalid UV set references
2015-12-17 04:05:39 +01:00
scrawl
0731595c2b
Wrap a Texture2D in a ref_ptr
2015-12-17 03:38:38 +01:00
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.
2015-12-17 03:38:26 +01:00
scrawl
64424e7262
Move keyframe loading out of SceneManager to new KeyframeManager
2015-12-13 15:31:07 +01:00
scrawl
e3d3380c8c
Remove return value for in-place toLowerStr
2015-12-07 22:43:08 +01:00
scrawl
1d5af3c9c8
Remove unneeded cast
2015-12-06 15:44:27 +01:00
scrawl
e39f49a88f
OSG extensions namespace fixes
2015-12-06 15:27:43 +01:00
scrawl
a29aef14f1
Eliminate a dynamic_cast in ParticleSystemController
2015-12-02 14:59:32 +01:00
scrawl
6cf2c35235
Don't rely on the _particles vector implementation details
...
This will allow compiling OpenMW with an osgParticle optimization to be pushed to OpenMW/osg.
2015-12-02 14:59:32 +01:00
scrawl
c9d710f334
Use a typedef to avoid conditional compiling
2015-12-01 16:18:19 +01:00
Alexander "Ace" Olofsson
cfcbd20d99
Let's put it as a MSVC-only fix for now
2015-12-01 04:19:30 +01:00
Alexander "Ace" Olofsson
e42f4999bd
Quick fix for building on MSVC
2015-12-01 04:06:34 +01:00
scrawl
e5ec4fe042
Add const specifier
2015-11-30 21:02:26 +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
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.
2015-11-30 05:42:31 +01:00
scrawl
38510a56c2
GeomMorpherController: do not dirty the MorphGeometry unless necessary
2015-11-22 21:24:00 +01:00
scrawl
0d49c7fa51
GeomMorpherController: fix double update of MorphGeometry
2015-11-22 21:23:46 +01:00
scrawl
28b20428b9
Remove dynamic_cast in GeomMorpherController
2015-11-22 20:33:22 +01:00
scrawl
fc7456e0a1
Explicitely opt for float matrices in performance critical places
2015-11-22 19:54:27 +01:00
scrawl
36e91617c9
Revert "NifOsg::Emitter: ignore psToWorld scale"
...
This reverts commit 7c16630874
.
Fixes #3022
2015-11-19 22:09:32 +01:00
scrawl
9b96fcc224
Set the particle scaleReferenceFrame to local space
2015-11-19 15:49:42 +01:00
scrawl
21e25f4756
Use the traversalNumber as frame number
2015-11-16 20:03:45 +01:00
scrawl
7c16630874
NifOsg::Emitter: ignore psToWorld scale
...
Seems wrong to me, but MW appears to do it that way. Without this fix, the light_de_candle_08_64 from http://www.nexusmods.com/morrowind/mods/41654/ has flame particles in the wrong spot.
2015-11-13 00:23:00 +01:00
scrawl
0965a9059d
Handle NiLODNode using osg::LOD ( Fixes #3008 )
2015-11-12 19:52:36 +01:00
scrawl
1edcb219a7
Leak fix
2015-11-11 16:27:17 +01:00
scrawl
fc93dc6195
Remove a stray method declaration
2015-11-11 01:32:31 +01:00
scrawl
0409e5a043
Use OSG_VERSION_GREATER_EQUAL / LESS_THAN rather than MIN_VERSION_REQUIRED (cosmetic change)
2015-11-10 18:28:58 +01:00
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.
2015-11-10 18:23:42 +01:00
scrawl
bd8332d2b0
Remove default copyop argument for nodecallback copy constructors
...
Works around a compiler warning with OSG 3.4:
warning: base class 'class osg::Callback' should be explicitly initialized in the copy constructor [-Wextra]
With no default argument for osg::CopyOp&, the compiler no longer sees the function as a real copy constructor and stops warning about the missing virtual initializations.
We don't care about this warning because there is nothing interesting to initialize in the osg::NodeCallback base anyway.
A proper fix for the warning would require to inserting OSG_VERSION conditional compiling all over the place, that is as long as we are still supporting OSG 3.2.
2015-11-09 18:57:17 +01:00
scrawl
64abdbabe3
Small refactor of controllers handling, print warning messages for unhandled controllers
2015-11-09 17:42:35 +01:00
scrawl
35f5be680b
Support for NiVisController on trishape nodes
2015-11-09 17:42:35 +01:00
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.
2015-10-19 15:46:53 +02:00
scrawl
8e69c80bf6
Add framenumber checks in various cull callbacks, so we don't update more than once per frame when multiple cameras are used
2015-09-26 01:21:33 +02:00
scrawl
76fb68a9c0
Handle particle systems that don't have emitters
...
Fixes a crash in the Magic Diversity mod.
2015-09-07 22:07:09 +02:00
scrawl
16b8ef3164
Don't use a shared Material in MaterialColorController
2015-07-31 00:01:55 +02:00
scrawl
de479e35c8
Fix AlphaController affecting all instances of the StateSet
2015-07-30 23:51:37 +02:00
Arthur Moore
2d93a6f6cb
Be more verbose when dealing with unhandled nif texture properties
2015-07-28 18:46:11 -04:00
scrawl
ac1f64b559
Fix StencilProperty front face mixup ( Fixes #2802 )
2015-07-28 03:20:18 +02:00
scrawl
24ae1d5ace
Fix some issues found by coverity
2015-07-11 03:34:08 +02:00
scrawl
bf9c62fa42
Fix for some coverity scan defects
2015-07-02 20:46:34 +02:00
scrawl
7a5f220ac5
GlowTexture keeps the alpha channel from the previous texture stage
2015-06-19 17:43:13 +02:00
scrawl
39539603bf
Re-enable a warning message
2015-06-18 03:03:30 +02:00
scrawl
a7c5beb7c5
Remove redundant allocations for NIF meshes
2015-06-18 01:26:45 +02:00
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.
2015-06-17 20:43:39 +02:00
scrawl
934166a853
Ignore the alpha value for particle materials (Bug #2699 )
2015-06-17 18:04:33 +02:00
scrawl
d7a4a9fd66
Create NIF root nodes as Group instead of Transform when possible
2015-06-15 15:25:45 +02:00
scrawl
b79ab1a3b8
Fix InverseWorldMatrix bug introduced by last commit
2015-06-15 02:22:52 +02:00
scrawl
ec25f1da95
Fix ParticleSystem bug introduced by last commit
2015-06-15 02:17:57 +02:00
scrawl
ad46ff7a98
Remove redundant Transform nodes for TriShapes/ParticleSystems with an identity transform
2015-06-15 02:06:04 +02:00
scrawl
ab597f672e
State the filename in NIF loader warning messages
2015-06-15 01:49:46 +02:00
scrawl
6a788c3462
Minor cleanup
2015-06-15 01:29:32 +02:00
scrawl
a5b72a358b
Prune empty nodes in RemoveDrawableVisitor
...
Gets rid of 28 useless transform nodes in base_anim.1st.nif.
2015-06-14 23:56:35 +02:00
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.
2015-06-14 21:22:44 +02:00
scrawl
8d6620b074
Assign an initial bounding box to particle systems
2015-06-11 02:37:49 +02:00
scrawl
b5099324d1
Enable ParticleSystem's FreezeOnCull, big speed-up in Vivec
2015-06-10 20:35:59 +02:00
scrawl
93ee11c5e7
Fix particlesystem nested RenderBin issue (Bug #2631 )
2015-06-08 21:21:09 +02:00
scrawl
347c9b57b8
Copy constructor signature fix
2015-06-08 01:59:42 +02:00
scrawl
5edf457ab7
Build fix
2015-06-08 01:13:23 +02:00