Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-05-09BGE: repair soft body - include this in RC2 pleaseBenoit Bolsee
2009-05-05Disable importing module python controller scripts at conversion time ↵Campbell Barton
because it can run BGE functions and crash since the internal state isnt setup yet. face-select mode wasnt working when used with projection paint.
2009-05-05BGE logic: new sensor "tap" option to generate automatically on/off pulsesBenoit Bolsee
When enabled, this option converts any positive trigger from the sensor into a pair of positive+negative trigger, with the negative trigger sent in the next frame. The negative trigger from the sensor are not passed to the controller as the option automatically generates the negative triggers. From the controller point of view, the sensor is positive only for 1 frame, even if the underlying sensor state remains positive. The option interacts with the other sensor option in this way: - Level option: tap option is mutually exclusive with level option. Both cannot be enabled at the same time. - Invert option: tap option operates on the negative trigger of the sensor, which are converted to positive trigger by the invert option. Hence, the controller will see the sensor positive for 1 frame when the underlying sensor state turns negative. - Positive pulse option: tap option adds a negative trigger after each repeated positive pulse, unless the frequency option is 0, in which case positive pulse are generated on every frame as before, as long as the underlying sensor state is positive. - Negative pulse option: this option is not compatible with tap option and is ignored when tap option is enabled. Notes: - Keyboard "All keys" is handled specially when tap option is set: There will be one pair of positive/negative trigger for each new key press, regardless on how many keys are already pressed and there is no trigger when keys are released, regardless if keys are still pressed. In case two keys are pressed in succesive frames, there will be 2 positive triggers and 1 negative trigger in the following frame.
2009-05-04gcc4.4 needed this to buildCampbell Barton
2009-05-04BGE performance: second round of scenegraph improvement.Benoit Bolsee
Use dynamic linked list to handle scenegraph rather than dumb scan of the whole tree. The performance improvement depends on the fraction of moving objects. If most objects are static, the speed up is considerable. The following table compares the time spent on scenegraph before and after this commit on a scene with 10000 objects in various configuratons: Scenegraph time (ms) Before After (includes culling) All objects static, 8.8 1.7 all visible but small fraction in the view frustrum All objects static, 7,5 0.01 all invisible. All objects moving, 14.1 8.4 all visible but small fraction in the view frustrum This tables shows that static and invisible objects take no CPU at all for scenegraph and culling. In the general case, this commit will speed up the scenegraph between 2x and 5x. Compared to 2.48a, it should be between 4x and 10x faster. Further speed up is possible by making the scenegraph cache-friendly. Next round of performance improvement will be on the rasterizer: use the same dynamic linked list technique for the mesh slots.
2009-05-02BGE Py API patch from Mitchell Stokes, add distance attribute to the radar ↵Campbell Barton
sensor, dont use 'continue' because its a python keyword. removed (ssizeobjargproc) it breaks py2.3
2009-05-02BGE Py API patch from Mitchell Stokes, adds extra attributes and docsCampbell Barton
2009-04-30BGE fux #17796: Glsl + bones + set smooth = bug on vertext groups.Benoit Bolsee
2009-04-29ifdef's for future py3 support, after this adding py3 can mostly be done ↵Campbell Barton
with defines or batch renaming funcs (with the exception of CListValue slicing) . No changes for py2.x.
2009-04-29BGE alternative run mode for python controllers.Campbell Barton
Option to run a function in a module rather then a script from a python controller, this has a number of advantages. - No allocating and freeing the namespace dictionary for every time its triggered (hard to measure the overhead here, but in a test with calling 42240 scripts a second each defining 200 vars, using modules was ~25% faster) - Ability to use external python scripts for game logic. - Convenient debug option that lets you edit scripts while the game engine runs.
2009-04-29BGE: speed up mesh conversion by avoiding allocation/deallocation of ↵Benoit Bolsee
material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene.
2009-04-28BGE soft body: change welding option to disable welding check by default: ↵Benoit Bolsee
speeds up shape conversion. This is fine if the object has no duplicate vertices. Otherwise, bullet will be extremely slow and you can either set some welding or remove duplicates in the mesh. Welding is now displayed in linear scale: 0.0 -> 0.01, no need to use logarithmic scale ;-). Fix a bug with Bullet by which vertex array for soft body must have 3xfloat stride.
2009-04-27BGE: Add soft body welding parameter to the Advanced Settings panel. The ↵Benoit Bolsee
values are very small so I chose to use logarithmic scale. Should be fine, it's an advanced setting after all.
2009-04-27Lower the vertex welding threshold, for removing duplicate/nearby vertices ↵Erwin Coumans
for soft bodies (this broke susanne softbody regression test)
2009-04-26BGE: Fix Orthographic mode and viewport scalingBenoit Bolsee
- the BGE now uses correct glOrtho projection whe camera is in orthographic mode -
2009-04-25BGE mesh modifiers: fix view frustrum culling for mesh with modifiers. ↵Benoit Bolsee
Update the bounding box based on mesh extent after applying the modifiers.
2009-04-24BGE: removed support for time dependent modifiers, they don't make sense in ↵Benoit Bolsee
the GE. Disable modifiers when Bullet soft body is used: bullet needs the original vertex array.
2009-04-24BGE bug #17950: crash when GE softbody is parented to a rigid body/soft ↵Benoit Bolsee
body/dynamic object.
2009-04-23patch from Mitchell Stokes, comments only - KX_PYATTRIBUTE_TODO for missing ↵Campbell Barton
attributes
2009-04-22BGE: some more cleanup in GetReplica/ProcessReplica of deformers: make them ↵Benoit Bolsee
consistent with the other classes.
2009-04-22BGE C++ APICampbell Barton
PyObjectPlus::ProcessReplica() is now called when any of its subclasses are replicated. This is important because PyObjectPlus::ProcessReplica() NULL's the 'm_proxy' python pointer I added recently. Without this a replicated subclass of PyObjectPlus could have an invalid pointer (crashing the BGE). This change also means CValue::AddDataToReplica() can be moved into CValue::ProcessReplica() since ProcessReplica is always called.
2009-04-22BGE C++ APICampbell Barton
Some functions used ProcessReplica(replica); others replica->ProcessReplica() Use the second method everywhere so the PyObjectPlus's ProcessReplica() can be called from its subclasses. Note that PyObjectPlus's ProcessReplica isnt used yet.
2009-04-21BGE: Support mesh modifiers in the game engine.Benoit Bolsee
Realtime modifiers applied on mesh objects will be supported in the game engine with the following limitations: - Only real time modifiers are supported (basically all of them!) - Virtual modifiers resulting from parenting are not supported: armature, curve, lattice. You can still use these modifiers (armature is really not recommended) but in non parent mode. The BGE has it's own parenting capability for armature. - Modifiers are computed on the host (using blender modifier stack). - Modifiers are statically evaluated: any possible time dependency in the modifiers is not supported (don't know enough about modifiers to be more specific). - Modifiers are reevaluated if the underlying mesh is deformed due to shape action or armature action. Beware that this is very CPU intensive; modifiers should really be used for static objects only. - Physics is still based on the original mesh: if you have a mirror modifier, the physic shape will be limited to one half of the resulting object. Therefore, the modifiers should preferably be used on graphic objects. - Scripts have no access to the modified mesh. - Modifiers that are based on objects interaction (boolean,..) will not be dependent on the objects position in the GE. What you see in the 3D view is what you get in the GE regardless on the object position, velocity, etc. Besides that, the feature is compatible with all the BGE features that affect meshes: armature action, shape action, relace mesh, VideoTexture, add object, dupligroup. Known problems: - This feature is a bit hacky: the BGE uses the derived mesh draw functions to display the object. This drawing method is a bit slow and is not 100% compatible with the BGE. There may be some problems in multi-texture mode: the multi-texture coordinates are not sent to the GPU. Texface and GLSL on the other hand should be fully supported. - Culling is still based on the extend of the original mesh. If you have a modifer that extends the size of the mesh, the object may disappear while still in the view frustrum. - Derived mesh is not shared between replicas. The derived mesh is allocated and computed for each object with modifiers, regardless if they are static replicas. - Display list are not created on objects with modifiers. I should be able to fix the above problems before release. However, the feature is already useful for game development. Once you are ready to release the game, you can apply the modifiers to get back display list support and mesh sharing capability. MSVC, scons, Cmake, makefile updated. Enjoy /benoit
2009-04-21BGE Python APICampbell Barton
Separate getting a normal attribute and getting __dict__, was having to do too a check for __dict__ on each class (multiple times per getattro call from python) when its not used that often.
2009-04-20BGE Python APICampbell Barton
- More verbose error messages. - BL_Shader wasnt setting error messages on some errors - FilterNormal depth attribute was checking for float which is bad because scripts often expect ints assigned to float attributes. - Added a check to PyVecTo for a tuple rather then always using a generic python sequence. On my system this is over 2x faster with an optmized build.
2009-04-19BGE Python APICampbell Barton
removed redundant (PyObject *self) argument from python functions that are not exposed to python directly.
2009-04-19BGE Python API cleanup - no functionality changesCampbell Barton
- comments to PyObjectPlus.h - remove unused/commented junk. - renamed PyDestructor to py_base_dealloc for consistency - all the PyTypeObject's were still using the sizeof() their class, can use sizeof(PyObjectPlus_Proxy) now which is smaller too.
2009-04-19BGE Python APICampbell Barton
This changes how the BGE classes and Python work together, which hasnt changed since blender went opensource. The main difference is PyObjectPlus - the base class for most game engine classes, no longer inherit from PyObject, and cannot be cast to a PyObject. This has the advantage that the BGE does not have to keep 2 reference counts valid for C++ and Python. Previously C++ classes would never be freed while python held a reference, however this reference could be problematic eg: a GameObject that isnt in a scene anymore should not be used by python, doing so could even crash blender in some cases. Instead PyObjectPlus has a member "PyObject *m_proxy" which is lazily initialized when python needs it. m_proxy reference counts are managed by python, though it should never be freed while the C++ class exists since it holds a reference to avoid making and freeing it all the time. When the C++ class is free'd it sets the m_proxy reference to NULL, If python accesses this variable it will raise a RuntimeError, (check the isValid attribute to see if its valid without raising an error). - This replaces the m_zombie bool and IsZombie() tests added recently. In python return values that used to be.. return value->AddRef(); Are now return value->GetProxy(); or... return value->NewProxy(true); // true means python owns this C++ value which will be deleted when the PyObject is freed
2009-04-19Hidden faces were not rendering displayed in the game engine, only the ↵Campbell Barton
invisible face flag should be used for this. Hiding faces is a editing option like selection and should not change rendering, it wasn't even working right because meshes without UVs ignored it. I thought this was needed for compatibility with old files but just noticed this messes up 2 of the files in demos-2.42.zip
2009-04-15BGE MouseFocusSensorCampbell Barton
- fix for multiple viewpors broke single viewport (both work now) - python could get uninitialized values from m_prevTargetPoint and m_prevSourcePoint - getting the RayDirection for python could crash blender trying to normalize a zero length vector. - added python attributes - removed unused canvas from the MouseFocusSensor class
2009-04-14BGE PhysicsCampbell Barton
Clamp objects min/max velocity. Accessed with bullet physics from the advanced button with dynamic and rigid body objects. - useful for preventing unstable physics in cases where objects move too fast. - can add linear velocity with the motion actuator to give smooth motion transitions, without moving too fast. - minimum velocity means objects don't stop moving. - python scripts can adjust these values speedup or throttle velocity in the existing direction. Also made copy properties from an object with no properties work (in case you want to clear all props)
2009-04-14BGE: Occlusion culling and other performance improvements.Benoit Bolsee
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-10Added function name to many of the PyArg_ParseTuple calls in gameengineAndre Susano Pinto
This way python raises more useful messages.
2009-04-08small bge editsCampbell Barton
- Only try and remove light objects from the light list. - Only loop over mesh verts once when getting the bounding box - dont return None from python attribute localInertia when theres no physics objects. better return a vector still. - add names to send message PyArg_ParseTuple functions.
2009-04-08BGE Scenegraph and View frustrum culling improvement.Benoit Bolsee
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-07BGE Python APICampbell Barton
Use each types dictionary to store attributes PyAttributeDef's so it uses pythons hash lookup (which it was already doing for methods) rather then doing a string lookup on the array each time. This also means attributes can be found in the type without having to do a dir() on the instance.
2009-04-07BGE Joystick SensorCampbell Barton
- Raised limit of 2 axis to 4 axis pairs (4==8 joysticks axis pairs) - Added a new Joystick Sensor type "Single Axis", so you can detect horizontal or vertical movement, rather then just Up/Down/Left/Right - added Python attribute "axisSingle" so you can get the value from the selected axis (rather then getting it out of the axis list) - renamed Py attribute "axisPosition" to "axisValues" (was never in a release) If we need to increase the axis limit again just change JOYAXIS_MAX and the button limits.
2009-04-05BGE Python APICampbell Barton
- action attribute wasnt checking for NULL (own fault) - KX_Scene getCamera wasnt checking for NULL - CListValue had asserts for not yet implimented functionality, this would close blender. Better to print an error if the user manages to run this functions (I managed to by CListValue.count([1,2,3]))
2009-04-04BGE Py API, mistake when redoing set action as a static function.Campbell Barton
2009-04-04moved more attributes from getattr into PyAttributeDef'sCampbell Barton
2009-04-03Python BGE APICampbell Barton
- Initialize python types with PyType_Ready, which adds methods to the type dictionary. - use Pythons get/setattro (uses a python string for the attribute rather then char*). Using basic C strings seems nice but internally python converts them to python strings and discards them for most functions that accept char arrays. - Method lookups use the PyTypes dictionary (should be faster then Py_FindMethod) - Renamed __getattr -> py_base_getattro, _getattr -> py_getattro, __repr -> py_base_repr, py_delattro, py_getattro_self etc. From here is possible to put all the parent classes methods into each python types dictionary to avoid nested lookups (api has 4 levels of lookups in some places), tested this but its not ready yet. Simple tests for getting a method within a loop show this to be between 0.5 and 3.2x faster then using Py_FindMethod()
2009-04-03BGE Python apiCampbell Barton
Added the method into the PyType so python knows about the methods (its supposed to work this way). This means in the future the api can use PyType_Ready() to store the methods in the types dictionary. Python3 removes Py_FindMethod and we should not be using it anyway since its not that efficient.
2009-03-28game engine compile fix for MSVC, game engine team might want to check.Andrea Weikert
2009-03-09Add support to lock individual axis during rigid body simulation, for ↵Erwin Coumans
translation and rotation. This makes it easier to do 1D or 2D physics (tetris, blockout) todo: create some example/demo.blend.
2009-03-09upgrade to latest Bullet trunk, fix related to vehicle anti-roll, added ↵Erwin Coumans
constraint visualization. This commit doesn't add new functionality, but more updates are planned before Blender 2.49 release.
2009-02-25New Pulse option for the collision sensor (off by default wont change ↵Campbell Barton
existing logic) Previously only the first collision would trigger an event (no collisions a negative event ofcourse) With the Pulse option enabled, any change to the set of colliding objects will trigger an event. Added this because there was no way to count how many sheep were on a platform in YoFrankie without running a script periodically. Changes in collision are detected by comparing the number of objects colliding with the last event, as well as a hash made from the object pointers. Also changed the touch sensors internal list of colliding objects to only contain objects that match the property or material. - pulse isnt a great name, could change this.
2009-02-25Building the game engine with Solid/Sumo is now optional for scons using ↵Campbell Barton
WITH_BF_SOLID. Now Sumo is has been deprecated for a while we might want to remove it for 2.5.
2009-02-25Minor speedups for the BGECampbell Barton
* Where possible use vec.setValue(x,y,z) to assign values to a vector instead of vec= MT_Vector3(x,y,z), for MT_Point and MT_Matrix types too. * Comparing TexVerts was creating 10 MT_Vector types - instead compare as floats. * Added SG_Spatial::SetWorldFromLocalTransform() since the local transform is use for world transform in some cases. * removed some unneeded vars from UpdateChildCoordinates functions * Py API - Mouse, Ray, Radar sensors - use PyObjectFrom(vec) rather then filling the lists in each function. Use METH_NOARGS for get*() functions.
2009-02-25remove warnings for the BGECampbell Barton
- variables that shadow vers declared earlier - Py_Fatal print an error to the stderr - gcc was complaining about the order of initialized vars (for classes) - const return values for ints and bools didnt do anything. - braces for ambiguous if statements
2009-02-24compile scripts when converting controllers to give more predictable ↵Campbell Barton
performance and print syntax errors early on rather then when the script is first executed.