Commit Graph

77 Commits

Author SHA1 Message Date
Campbell Barton
8b6f5c171d - rather then passing the python namespace dictionary to the controller function get the namespace from the converter.
- renamed SetPythonDictionary() to SetPyNamespace()
- remove IsLight(), GetGameObjectType() existed before this but wasnt used for lights.
2009-09-29 22:49:33 +00:00
Campbell Barton
98ee2a781d option to build the BGE without python, uses existing python check (cmake and scons)
when python is disabled videotextures are not built.
2009-09-29 21:42:40 +00:00
Campbell Barton
5cd51b4387 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22625:22668
needed this for 2.5 testing
2009-08-21 03:09:27 +00:00
Campbell Barton
442ba39d49 fix for own bug added since 2.49a,
2.49a tries to remove the object from the conversion list every time. Now remove from the conversion list directly without being apart of the remove object function.
2009-08-21 03:06:36 +00:00
Campbell Barton
c3041ae7cd - fix for BGE warnings
- when C++ uses guardedalloc SYS_DeleteSystem was called after MEM_printmemlist(), making it look like there was a leak.
2009-08-19 10:26:43 +00:00
Campbell Barton
bc093b4cc4 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22205:22290 2009-08-07 04:41:15 +00:00
Campbell Barton
e7c53e20a1 gameObject -> blenderObject mapping was being created but wasnt needed.
Added utility func tag_main for (un)tagging every ID in a Main database with LIB_DOIT.
2009-08-07 03:51:28 +00:00
Dalai Felinto
77d79ffb5d BGE: removing remaining reference to sce->world->gravity/physics/... (it's all in sce->gm now) + Dome UI changes
UI changes: splitting dome options for different dome modes (eg angle doesn't work for envmap mode)
if anyone wants to tweak that, feel free to do it.

* I put a remaining to bring setEyeSeparation + Focal Length to the Stereo GUI. I'm still not sure what would be the default parameters for that, and that will require other changes (eg remove the flag m_setfocallength and m_seteyesep). For so far only a label remind :)
2009-08-07 03:06:32 +00:00
Campbell Barton
0b3fd395ef svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22075:22099 2009-07-31 23:42:22 +00:00
Campbell Barton
3eb8000eb4 remove more unneeded args, also allow ipo to animate the ref value for KX_BlenderMaterial's 2009-07-31 09:05:13 +00:00
Campbell Barton
c371f49d9a svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r21908:22075 2009-07-31 00:42:10 +00:00
Campbell Barton
7301f33b26 remove some unused function args 2009-07-30 21:42:29 +00:00
Campbell Barton
8ead648fd1 Spring Cleaning
* removed radiosity render code, DNA and RNA (left in radio render pass options), we'll get GI to replace this probably, better allow baking to vertex colors for people who used this.
* removed deprecated solid physics library, sumo integrations and qhull, a dependency
* removed ODE, was no longer being build or supported
* remove BEOS and AMIGA defines and references in Makefiles.
2009-06-21 16:18:38 +00:00
Campbell Barton
2773464561 Game Engine working with the new animation system for Ipos (IpoActuator)
FCurves are used for animation evaluation so FCurve modifiers work :).

Tested with object location and object color animation.
Armature and Shape Keys next.
2009-06-15 10:11:08 +00:00
Campbell Barton
fa01eef27e svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20849:20855
to get the BGE building with py3k and no sdl
2009-06-13 14:07:38 +00:00
Campbell Barton
b40eb540d3 G.sipo was being passed in the BGE when it wasnt needed, just access G.sipo directly.
KX_PythonSeq.cpp - disable the cmpfunc with py3, need to have richcmp.
2009-06-13 13:02:01 +00:00
Brecht Van Lommel
c8b4cf9206 2.50:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD

Notes:
* Game and sequencer RNA, and sequencer header are now out of date
  a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
  not needed anymore.
  * Fix "duplicate strip" always increase the user count for ipo.
  * IPO pinning on sequencer strips was lost during Undo.
2009-06-08 20:08:19 +00:00
Benoit Bolsee
5441323dca BGE: fix memleaks.
SCA_RandomActuator: The random generator was shared between replicas and not deleted. Added ref counting between replicas to allow deletion at the end.
KX_Camera: The scenegraph node was not deleted for temporary cameras (ImageMirror and shadow), causing 500 bytes leak per frame and per shadow light.
KX_GameActuator: Global dictionary buffer was not deleted after saving.
KX_MotionState: The motion state for compound child was not deleted
KX_ReplaceMeshActuator: The mesh was unnecessarily converted for each actuator and not deleted, causing large memleak.

After these fix, YoFrankie runs without memleak.
2009-05-23 14:46:43 +00:00
Campbell Barton
def33757e3 recorded game physics ipo's also have the same problem FBX export had with eulers rotations
http://www.graphicall.org/ftp/ideasman42/game_euler.png

- dont calculate handles for key added (it does them all at the end).
- was doing twice the number of curve lookup's per frame as was needed.
- test handles function that runs at the end was converting to ipo transformation values for no reason.
- when adding new curves set them to linear interpolation.
2009-05-19 05:07:52 +00:00
Brecht Van Lommel
874c29cea8 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-20 15:06:46 +00:00
Benoit Bolsee
0b8661ab4d BGE: Occlusion culling and other performance improvements.
Added occlusion culling capability in the BGE. 
More info: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Game_Engine#BGE_Scenegraph_improvement
MSVC, scons, cmake, Makefile updated.

Other minor performance improvements:
- The rasterizer was computing the openGL model matrix of the objects too many times
- DBVT view frustrum culling was not properly culling behind the near plane:
  Large objects behind the camera were sent to the GPU
- Remove all references to mesh split/join feature as it is not yet functional
2009-04-13 20:08:33 +00:00
Benoit Bolsee
51b4145841 BGE Scenegraph and View frustrum culling improvement.
This commit contains a number of performance improvements for the
BGE in the Scenegraph (parent relation between objects in the
scene) and view frustrum culling.

The scenegraph improvement consists in avoiding position update
if the object has not moved since last update and the removal
of redundant updates and synchronization with the physics engine.

The view frustrum culling improvement consists in using the DBVT
broadphase facility of Bullet to build a tree of graphical objects
in the scene. The elements of the tree are Aabb boxes (Aligned 
Axis Bounding Boxes) enclosing the objects. This provides good
precision in closed and opened scenes. This new culling system
is enabled by default but just in case, it can be disabled with
a button in the World settings. There is no do_version in this
commit but it will be added before the 2.49 release. For now you
must manually enable the DBVT culling option in World settings
when you open an old file.

The above improvements speed up scenegraph and culling up to 5x.
However, this performance improvement is only visible when
you have hundreds or thousands of objects.

The main interest of the DBVT tree is to allow easy occlusion
culling and automatic LOD system. This will be the object of further
improvements.
2009-04-07 22:14:06 +00:00
Brecht Van Lommel
d52400bfbd 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes:
* Sequence transform strip uses G.scene global, this is commented
  out now, should be fixed.
* Etch-a-ton code was most difficult to merge. The files already in
  2.5 got merged, but no new files were added. Calls to these files
  are commented out with "XXX etch-a-ton". editarmature.c and
  transform_snap.c were complex to merge. Martin, please check?
* Game engine compiles and links again here for scons/make/cmake
  (player still fails to link).
2009-03-17 21:44:58 +00:00
Erwin Coumans
abb338ddf9 upgrade to latest Bullet trunk, fix related to vehicle anti-roll, added constraint visualization.
This commit doesn't add new functionality, but more updates are planned before Blender 2.49 release.
2009-03-09 04:21:28 +00:00
Brecht Van Lommel
6ea6edfa32 2.5: patch to comment out some more bad level calls in the game engine,
apparently msvc is more strict here, provided by Jean-Michel Soler.
2008-11-16 21:13:53 +00:00
Brecht Van Lommel
bdfe7d89e2 Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416

Issues:
* GHOST/X11 had conflicting changes. Some code was added in 2.5, which was
  later added in trunk also, but reverted partially, specifically revision
  16683. I have left out this reversion in the 2.5 branch since I think it is
  needed there.
  http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683
* Scons had various conflicting changes, I decided to go with trunk version
  for everything except priorities and some library renaming.
* In creator.c, there were various fixes and fixes for fixes related to the -w
  -W and -p options. In 2.5 -w and -W is not coded yet, and -p is done
  differently. Since this is changed so much, and I don't think those fixes
  would be needed in 2.5, I've left them out.
* Also in creator.c: there was code for a python bugfix where the screen was not
  initialized when running with -P. The code that initializes the screen there
  I had to disable, that can't work in 2.5 anymore but left it commented as a
  reminder.

Further I had to disable some new function calls. using src/ and python/, as
was done already in this branch, disabled function calls:
* bpath.c: error reporting
* BME_conversions.c: editmesh conversion functions.
* SHD_dynamic: disabled almost completely, there is no python/.
* KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled.
* text.c: clipboard copy call.
* object.c: OB_SUPPORT_MATERIAL.
* DerivedMesh.c and subsurf_ccg, stipple_quarttone.

Still to be done:
* Go over files and functions that were moved to a different location but could
  still use changes that were done in trunk.
2008-11-12 21:16:53 +00:00
Joshua Leung
4245aaed86 == Global 'Delete Key' Tool ==
The 'opposite' of the "Insert Key" tool. 
- Use the hotkey Ctrl-Alt-IKEY to activate.
- Only available in 3d-view and buttons window 

I've added an extra var to verify_ipo and verify_ipocurve to save having to make another duplicate of that code. Hopefully the gameengine compiles ok with this.
2008-09-14 12:41:42 +00:00
Campbell Barton
b25d0cc5cc game engine didnt compile with recent keyframing changes 2008-09-14 05:42:05 +00:00
Daniel Genrich
44f9276b67 svn merge -r 16396:16411 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-09-07 19:47:15 +00:00
Benoit Bolsee
0bf03ef2f1 BGE patch: Simulate dupligroup operation when parent and child are not active/inactive at the same time: don't convert the child. This unusual situation is used in Apricot for testing. 2008-09-07 10:47:33 +00:00
Daniel Genrich
dd03596bfe svn merge -r 16351:16368 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-09-04 23:33:19 +00:00
Brecht Van Lommel
cb89decfdc Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:

* GLSL support in the viewport and game engine, enable in the game
  menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
  gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
  storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.

* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
  An extra texture slot shows up once the last slot is used.

* Memory limit for undo, not enabled by default yet because it
  needs the .B.blend to be changed.
* Multiple undo for image painting.

* An offset for dupligroups, so not all objects in a group have to
  be at the origin.
2008-09-04 20:51:28 +00:00
Daniel Genrich
096b4638c4 Revert rev16344 on trunk, bullet work is done in sim_physics branch as discussed on sunday meeting 2008-09-03 11:11:11 +00:00
Erwin Coumans
1926e84650 Finally upgraded to latest Bullet subversion, about to release 2.71. Some recent changes in extern/bullet2 need to be re-applied, will check with Benoit. Ray tests in 0_FPS_Template.blend is broken, didn't figure out why yet.
HELP BUILD SYSTEM MAINTAINERS: Please help with updating all build systems: the newly added files need to be added. Note that the src/SoftBody has been added for future extension of real-time soft bodies.
2008-09-03 02:27:16 +00:00
Brecht Van Lommel
272a91f754 Merge of apricot branch game engine changes into trunk, excluding GLSL.
GLEW
====

Added the GLEW opengl extension library into extern/, always compiled
into Blender now. This is much nicer than doing this kind of extension
management manually, and will be used in the game engine, for GLSL, and
other opengl extensions.

* According to the GLEW website it works on Windows, Linux, Mac OS X,
  FreeBSD, Irix, and Solaris. There might still be platform specific
  issues due to this commit, so let me know and I'll look into it.
* This means also that all extensions will now always be compiled in,
  regardless of the glext.h on the platform where compilation happens.

Game Engine
===========

Refactoring of the use of opengl extensions and other drawing code
in the game engine, and cleaning up some hacks related to GLSL
integration. These changes will be merged into trunk too after this.

The game engine graphics demos & apricot level survived my tests,
but this could use some good testing of course.

For users: please test with the options "Generate Display Lists" and
"Vertex Arrays" enabled, these should be the fastest and are supposed
to be "unreliable", but if that's the case that's probably due to bugs
that can be fixed.

* The game engine now also uses GLEW for extensions, replacing the
  custom opengl extensions code that was there. Removes a lot of
  #ifdef's, but the runtime checks stay of course.
* Removed the WITHOUT_GLEXT environment variable. This was added to
  work around a specific bug and only disabled multitexturing anyway.
  It might also have caused a slowdown since it was retrieving the
  environment variable for every vertex in immediate mode (bug #13680).

* Refactored the code to allow drawing skinned meshes with vertex
  arrays too, removing some specific immediate mode drawing functions
  for this that only did extra normal calculation. Now it always splits
  vertices of flat faces instead.
* Refactored normal recalculation with some minor optimizations,
  required for the above change.
* Removed some outdated code behind the __NLA_OLDDEFORM #ifdef.
* Fixed various bugs in setting of multitexture coordinates and vertex
  attributes for vertex arrays. These were not being enabled/disabled
  correct according to the opengl spec, leading to crashes. Also tangent
  attributes used an immediate mode call for vertex arrays, which can't
  work.
* Fixed use of uninitialized variable in RAS_TexVert.
* Exporting skinned meshes was doing O(n^2) lookups for vertices and
  deform weights, now uses same trick as regular meshes.
2008-06-17 10:27:34 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
Benoit Bolsee
822e51bd2d BGE memleak fixed: mesh/material not deleted when switching scene 2008-03-09 21:42:03 +00:00
Chris Want
5e3cffc64a Patch to change license to GPL only, from GSR. 2008-01-07 19:13:47 +00:00
Campbell Barton
a42e548e81 removed some more header files, made the game engine compile with removed header files, added includes to SConstruct files. 2008-01-01 19:20:49 +00:00
Ton Roosendaal
86f3b640ec Blender interface code in Game Engine, who would that have thought!
(this fixes compile error in GE)
2007-11-28 13:33:59 +00:00
Diego Borghetti
457824e437 Fix insert_vert_icu, missing the new "fast" argument. 2007-09-18 14:01:33 +00:00
Kent Mein
ed47851517 Updated calls to insert_vert_ipo to be
insert_vert_icu since insert_vert_ipo no longer exists.

Kent
2007-09-17 15:32:10 +00:00
Erwin Coumans
14ad8c9941 preparation to upgrade to Bullet 2.53 2007-06-23 05:02:31 +00:00
Erwin Coumans
1852d1a410 Enable 'show physics visualization' in the Game Menu. Should help to locate problems with collision detection/physics (also useful when baking, and/or using the new rigidbody constraints). 2006-12-20 06:43:43 +00:00
Erwin Coumans
92379ec21f contribution from RCRuiz:
drawing of rigidbody constraint pivots, and allow passing of full constraint frame.
2006-12-16 05:50:38 +00:00
Erwin Coumans
2572b9f72c Reserved some Bullet 2.x constraint data.
Although we will delay the main Rigid Body user interface after 2.43 release early 2007, I need some constraint data/UI to make progress with COLLADA Physics.
Added RigidBody constraint UI
LR_ALTKEY+LR_CTRLKEY+LR_SHIFTKEY+ P will bake rigidbody
Contribution by RCRuiz, Ramon Carlos.
2006-11-30 00:19:27 +00:00
Erwin Coumans
46234f90ce Removed old Blender/extern/bullet, and upgraded game engine to use Bullet 2.x
All platforms/build systems: either upgrade to use extern/bullet2, or disable the game engine until the build is fixed.
2006-11-21 00:53:40 +00:00
Erwin Coumans
ede20c166a - Charlie provided a work-around for some armature related crashes
- fixed some Bullet raycasting (hitfraction was not properly updated for static meshes)
- removed some cvs tags in Bullet's BMF _Font files (they keep on conflicting when duplicated in different repositories)
- set default linearsleepingtreshold explicitly
2006-05-11 17:58:23 +00:00
Erwin Coumans
93c47e1071 - Added support for kinematic objects (interaction between rigidbodies), deriving linear/angular velocity from previous transform/current transform and deltatime.
- Made another attempt to migrate from Sumo to Bullet: import of older files automatically switch to Bullet, but you can override it, and save the file in 2.42 version. then it stays Sumo physics.
2006-05-11 00:13:42 +00:00
Erwin Coumans
4c9f07e59f Disabled Sumo, and use Bullet physics instead.
Until too many people complain: People can use older versions of Blender / player if they really need Sumo.
Sumo is not supported by anyone, and Bullet needs more feedback.

Note: Sumo is not removed yet, because no discussion is started about this. It's currently just a simple switch that replaced Sumo by Bullet.
2006-05-10 00:30:35 +00:00