Commit Graph

1929 Commits

Author SHA1 Message Date
Mitchell Stokes
03c1585e3a BGE Animations: BGEDeformVerts() now handles normals instead of relying on BL_MeshDeformer::RecalcNormals(), which BlenderDeformVerts() still uses. As expected, the BGEDeformVerts() version isn't as accurate, but it avoids a sqrt per vertex. This gives about a 15~20% improvement in time spent on the rasterizer in my test scene, which resulted in about 5 more fps. However, the main reason for the new normal code is it will be easier to do on the GPU (doesn't rely on neighbor information). 2011-08-01 23:02:10 +00:00
Mitchell Stokes
d3edf274b0 BGE Animations: This should solve the issue with NULL not being defined in BL_ActionManager.cpp 2011-07-30 17:27:54 +00:00
Mitchell Stokes
387439390d BGE Animations: Fixing some warnings from GCC about initialization order. 2011-07-29 21:58:31 +00:00
Joerg Mueller
29f214f7f3 Merging up to trunk r38834. 2011-07-29 21:28:18 +00:00
Mitchell Stokes
e4a512351d BGE Animations: Save the deform number to pose channel map created by BL_SkinDeformer::BGEDeformVerts() so it isn't recreated on every update. This gives minor speed ups, but I mostly did it because I thought it was a little cleaner this way. 2011-07-29 01:59:36 +00:00
Mitchell Stokes
eb7b1f0c58 This allows the game engine to build again, but I'm not sure if it's the best approach. Aligorith: feel free to revert this if there is a better solution. 2011-07-28 15:07:32 +00:00
Mitchell Stokes
1f65b3b1a8 BGE Animations: Adding a new choice for vertex deformation for armatures, which can be found in the Armature's Skeleton panel by the Deform options. Before only Blender's armature_deform_verts() was used. Now users can choose a vertex deformation function that is optimized for the BGE. At the moment it is mostly a copy of armature_deform_verts() with various chunks of code removed, and the BLI_math code was replaced with Eigen2. In my test scene, the new function offered about a 40% improvement over armature_deform_verts() (17~19ms rasterizer to 11~12ms). The only current limitation that I'm aware of if that B-Bone segments are not supported in the BGE version, and I will probably leave it out. I would like to also limit the BGE version to 4 weights to make things easier for a GPU version, but this may just make things slower (sorting weights to find the top 4). 2011-07-26 06:10:05 +00:00
Brecht Van Lommel
62415cab05 Fix #28014: joystick sensor not working. Broke this with an earlier commit
trying to fix blenderplayer startup warnings. It seems we do need to init
the SDL video subsystem even if we only want events, thanks Juha Maki-Kanto
for pointing this out.
2011-07-25 15:44:41 +00:00
Dalai Felinto
fee1594a65 BGE BugFix for: [#23874] Custom projection matrix doesn't work in custom viewport
This was never highly tested, that's why I never committed (my patch for this was from September 2010).

But once again I got a report that this bug was a deal-break and the patch seems to work for this artist.
I believe it's working, but I will keep my eyes open for this.
2011-07-25 15:37:55 +00:00
Joerg Mueller
682cc63161 Merging with trunk up to r38631. 2011-07-23 16:34:30 +00:00
Joerg Mueller
1193be6eaa 3D Audio GSoC:
* Reviewed and improved the linear resampler. Now it should work pretty good also for special cases that caused errors previously.
* Fixed a crash in the GE when a sound actuator doesn't have a sound assigned.
* Corrected the OpenAL device's threading code. This is a bugfix for #27913, thanks to Juha Mäki-Kanto for helping to resolve this.
2011-07-23 15:59:10 +00:00
Campbell Barton
382050501d remove duplicate function for printing the current file:line of a python script in the BGE. 2011-07-22 11:21:01 +00:00
Joerg Mueller
4532bd731d Merge with trunk up to r38584. 2011-07-21 21:11:58 +00:00
Mitchell Stokes
abb3f8c80b BGE Animations: Fixing a crash with "IPO" animations on an object with modifiers. 2011-07-20 06:20:49 +00:00
Mitchell Stokes
71eda5ca4d BGE Animations: BL_Action::m_action could be garbage, which can lead to odd problems. So, now I make sure it's set to NULL in the constructor. 2011-07-20 06:09:41 +00:00
Dalai Felinto
f2e055f4a4 bugfix: [#27348] blenderplayer showing a different viewport size in 2.57b
I believe this bug was there since we (me) moved the game settings to scene->gm
Since I was here I added support for x/y non square aspect pixels (i.e. anamorphic)
we were already using it for videotexture so I don't know why we were not here.

Tested in OSX, but it should be working in all OSs.
2011-07-19 01:41:45 +00:00
Mitchell Stokes
7e72356b8d BGE Animations: Allow the Copy Transform constraint to work with external targets in the game engine. 2011-07-17 20:06:50 +00:00
Campbell Barton
5792bd7cc7 cmake: cleanup include paths, some duplicates and going up some unneeded dirs. 2011-07-17 09:11:13 +00:00
Campbell Barton
410c5e3cd2 cmake source definitions:
remove missing includes and use more strict formatting.
2011-07-16 23:01:14 +00:00
Mitchell Stokes
c9c51776ee BGE Animations: Some updates to the Python api:
* Adding methods KX_GameObject.stopAction() and KX_GameObject.isPlayingAction().
  * Made all layer arguments optional. This means I had to change setActionFrame(layer, frame) to setActionFrame(frame, layer=0). This seems a little backwards to me, but I guess that's what you get with optional arguments. Also, this will break existing scripts.
  * Made sure to check user supplied layer values on all action methods. Previously this was only done for playAction().
  * Fixed a few newline issues.
2011-07-16 05:25:15 +00:00
Campbell Barton
3a6158a8bf move mathutils into its own lib. 2011-07-15 04:01:47 +00:00
Mitchell Stokes
ad08de4c2a BGE Animations: Now animations are only updated based on the set animation speed. This offers a significant performance increase (about 2x fps in my animation stress tests) for cases such as the defaults: 60fps logic and 30fps animations. This means that animations now only have to be updated half the time. I've also added Animations as a profiling category. This is the time spent in Blender's animation code, and not in the BL_ShapeDeformer (the mesh deformation). I'd like the add the deformation too, but right now it's counted in the rasterizer, and I don't see an obviously clean way to have it counted as animation instead. I'll investigate more. 2011-07-14 07:03:33 +00:00
Joerg Mueller
d9cf985730 Merging trunk up to r38329. 2011-07-12 13:09:22 +00:00
Campbell Barton
7370ba1839 fix for NULL pointer usages 2011-07-09 19:59:32 +00:00
Mitchell Stokes
a79fefee8c BGE Animations: Adding constants for the action play modes to bge.logic:
* KX_ACTION_MODE_PLAY
 * KX_ACTION_MODE_LOOP
 * KX_ACTION_MODE_PING_PONG
2011-07-08 07:32:45 +00:00
Mitchell Stokes
5a0f3690d0 BGE Animations: Fixing a crash when animating non-armature objects that didn't have shape keys. 2011-07-08 07:31:40 +00:00
Joerg Mueller
c57ac39f7f Merging trunk up to r38193. 2011-07-07 16:34:19 +00:00
Nathan Letwory
5e6abb8004 Fix compile with scons, after thread commit in r38185 2011-07-07 13:57:20 +00:00
Mitchell Stokes
4e7417e9fd The Blenderplayer wasn't freeing GPU_Textures since according to BLI_threads, GPU_free_image() was never being called from the main thread. Calling BLI_threadapi_init() when the Blenderplayer starts sets the current thread as the main thread and solves the problem. 2011-07-07 10:37:46 +00:00
Mitchell Stokes
0eacdc94ba BGE Animations: Removing unused code and adding some more comments. 2011-07-07 03:53:24 +00:00
Joerg Mueller
34c5784f99 Merging trunk up to r38167. 2011-07-06 20:26:56 +00:00
Brecht Van Lommel
11645e7a3f Fix #27877: writing .avi files > 4 GB not working on windows.
Solution is to replace "long" by "int64_t" and "fseek" by "_fseeki64", because
long on 64 bit windows is still 32 bit.
2011-07-06 10:19:04 +00:00
Mitchell Stokes
eb55fd1b17 BGE Animations: Fixing a typo: fram -> frame 2011-07-05 22:33:01 +00:00
Joerg Mueller
3f3c6f5f1f Merging from trunk up to r38119. 2011-07-05 13:54:25 +00:00
Mitchell Stokes
ceabc6d119 BGE Animations: Various fixes and bits of cleanup to get the action actuator to behave more like it did in trunk. The Pepper version is still more sensitive to pulses than the trunk version, but this is more accurate. I might try to address this, but I'm not sure. 2011-07-05 05:22:02 +00:00
Mitchell Stokes
e66b778fd6 BGE Animations: Updating some copy+pasted license blocks. 2011-07-04 21:21:49 +00:00
Mitchell Stokes
1b7ebd3857 BGE Animations: Adding preliminary support for blend shape actions on different layers. This, and shape action blending in general still require more work though. 2011-07-04 21:19:11 +00:00
Mitchell Stokes
46d12b480e BGE Animations: Making the action actuator's loop end play mode work better. 2011-07-03 02:57:50 +00:00
Mitchell Stokes
5d7921691b BGE Animations: Reimplementing support for the "Flipper" play mode of the action actuator. 2011-07-03 02:51:14 +00:00
Mitchell Stokes
5f4f75c51a BGE Animations: Adding in layer weights to allow for layer blending. 2011-07-03 01:59:17 +00:00
Mitchell Stokes
b4b26b735c BGE Animations: Fixing a bug where an action actuator could update a frame property when it wasn't active. 2011-06-30 20:08:05 +00:00
Mitchell Stokes
12596969af BGE Animations: Shape drivers are now working again. 2011-06-30 19:33:13 +00:00
Mitchell Stokes
b85e0c3e85 BGE Animations: Moving the BL_Action::IsDone() implementation from the header file to the source file. 2011-06-29 02:45:08 +00:00
Mitchell Stokes
3afe0e9c88 BGE Animations: Beginning work on layer blending. Blending armature actions works, but needs more testing. Also, currently the mode is forced to ADD and the weight to 1. 2011-06-29 02:42:46 +00:00
Mitchell Stokes
d122f24c1a BGE Animations: Fixing a bug with priority and non continuous animations. 2011-06-29 01:53:17 +00:00
Mitchell Stokes
de3c95a09c BGE Animations: Adding blendin for Shape Actions. 2011-06-29 01:05:12 +00:00
Brecht Van Lommel
8e90ba3b20 Fix last part of #26850: OS X game player did not react to quit event. 2011-06-27 14:34:58 +00:00
Brecht Van Lommel
49f84ef9ed Fix part of #26850: OS X game player was showing _NSAutoreleaseNoPool()
error messages on start. These were coming from initializing the SDL video
subsystem as part of Joystick init. We do not need this, as video stuff is
covered by GHOST, most likely this was conflicting.
2011-06-27 14:06:11 +00:00
Campbell Barton
33e554799b Minor warning cleanup & fix
- comment/remove assignments from values to themselves.
- add case break statements (no functional change but some source code checkers notice).
- fix python errors when the sculpt brush is None.
2011-06-27 03:36:14 +00:00
Mitchell Stokes
a165ad251e BGE Animations: Removing no longer used code and variables. 2011-06-24 00:31:13 +00:00