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-10remove unneeded vars and wasn't returning on some errorsCampbell Barton
2009-05-10deprecate controller.getActuator(name) and controller.getSensor(name) forCampbell Barton
controller.actuators[name] and controller.sensors[name] Made a read-only sequence type for logic brick sensors and actuators which can access single items or be used like a list or dictionary. We could use a python dictionary or CValueList but that would be slower to create. So you can do... for s in controller.sensors: print s print controller.sensors["Sensor"] print controller.sensors[0] sensors = list(controller.sensors) This sequence type keeps a reference to the proxy it came from and will raise an error on access if the proxy has been removed.
2009-05-10BGE Dome: Reducing FBO size to warped meshes.Dalai Felinto
Commit 20099 started using a FBO way too big. According to Paul Bourke this is how it's done in other Engines: Projectors HD: 1920x1050 - buffersize = 1024; FBO size = 2048 1400x1050 - buffersize = 1024; FBO size = 2048 Projectors XGA: 1024x768 - buffersize = 512; FBO size = 1024 Now in Blender Game Engine we are using: Projectors HD: 1920x1050 - buffersize = 1050; FBO size = 2048 1400x1050 - buffersize = 1050; FBO size = 2048 Projectors XGA: 1024x768 - buffersize = 768; FBO size = 1024 (I guess I should be committing code to the ge_dome branch instead of the trunk. I feel bad doing all those adjustments in a hurry to 2.49 final release in the trunk. That is ok, right?)
2009-05-10BGE Dome: Allowing FOV different from 180º for Truncated DomesDalai Felinto
*) a small note: In the end it turned out that we have upright and downright domes out there. So I may rearrange the order of the gui later: (1 = fisheye, 2 = truncated up, 3 = truncated down, 4 = envmap, 5 = spherical panoramic) I don't plan to do a doVersion() for that, so if you are using it already keep in mind that the modes may change before 249 final release.
2009-05-09Methods didn't check for zombies which could crash in the case where a ↵Campbell Barton
method for an object is kept. func = ob.getMass ...remove ob... func() # crash 2 More refcount fixes spotted by Benoit too
2009-05-09More refcount errors spotted by Benoit, one with python getting a list item ↵Campbell Barton
so scene.objects["OBfoo"] would always mess up refcounts.
2009-05-09BGE: repair soft body - include this in RC2 pleaseBenoit Bolsee
2009-05-09refcounting bugfix, gameOb.getParent() and gameOb.parent both added a ↵Campbell Barton
reference when they should not have.
2009-05-08BGE Dome: Truncated Dome are back (Upright and Downright) + ↵Dalai Felinto
GLEW_EXT_framebuffer_object check before generating FBO After last commit (20099) warping meshes got slower (more quality == less performance). Since we don't need an extra warping for truncated domes, It's better to handle them directly in openGL without the need of warping it. I'll talk with some Dome owners to see if we need both Upright and Downright modes. I may remove one of them by 2.49 them. *) also: a proper GLEW_EXT_framebuffer_object check before generating FBO (for warping meshes). **) next in line (maybe after RC2): tilt option to tilt the camera up to 90º upward.
2009-05-08BGE Python owned proxies had a problem being decref'd twice, this would ↵Campbell Barton
crash on freeing KX_Vertex/Poly Proxy types when python was compiled with debug options enabled. add_mesh_torus.py wasnt tested from update, will go through all edited scripts and test :\
2009-05-08BGE Dome: Implementation of FBO to handle warp mesh rendering.Dalai Felinto
We are using an image twice as big to render the fisheye before warping. It'll slow down warping meshes a little, but we get way more resolution. Therefore I will bring Truncated Dome mode back in order to avoid using warping mesh for that.
2009-05-07BGE: unfortunately VA+list still doesn't work on ATI card, so put a specific ↵Benoit Bolsee
check for ATI.
2009-05-07[#18645] Texture painting smudge brush darkens images - 2.49RC1Campbell Barton
not fixed but the problem is now less bad when projection painting, bilinear interpolation was rounding down. - added gameOb.attrDict to get the internal gameObject dict. - mesh.getVertex wasnt setting an exception.
2009-05-07BGE performance, 3rd round: culling and rasterizer.Benoit Bolsee
This commit extend the technique of dynamic linked list to the mesh slots so as to eliminate dumb scan or map lookup. It provides massive performance improvement in the culling and in the rasterizer when the majority of objects are static. Other improvements: - Compute the opengl matrix only for objects that are visible. - Simplify hash function for GEN_HasedPtr - Scan light list instead of general object list to render shadows - Remove redundant opengl calls to set specularity, shinyness and diffuse between each mesh slots. - Cache GPU material to avoid frequent call to GPU_material_from_blender - Only set once the fixed elements of mesh slot - Use more inline function The following table shows the performance increase between 2.48, 1st round and this round of improvement. The test was done with a scene containing 40000 objects, of which 1000 are in the view frustrum approximately. The object are simple textured cube to make sure the GPU is not the bottleneck. As some of the rasterizer processing time has moved under culling, I present the sum of scenegraph(includes culling)+rasterizer time Scenegraph+rasterizer(ms) 2.48 1st round 3rd round All objects static, 323.0 86.0 7.2 all visible, 1000 in the view frustrum All objects static, 219.0 49.7 N/A(*) all invisible. All objects moving, 323.0 105.6 34.7 all visible, 1000 in the view frustrum Scene destruction 40min 40min 4s (*) : this time is not representative because the frame rate was at 60fps. In that case, the GPU holds down the GE by frame sync. By design, the overhead of the rasterizer is 0 when the the objects are invisible. This table shows a global speed up between 9x and 45x compared to 2.48a for scenegraph, culling and rasterizer overhead. The speed up goes much higher when objects are invisible. An additional 2-4x speed up is possible in the scenegraph by upgrading the Moto library to use Eigen2 BLAS library instead of C++ classes but the scenegraph is already so fast that it is not a priority right now. Next speed up in logic: many things to do there...
2009-05-07python3 compatibility for the BGE api, this only works with scons when ↵Campbell Barton
WITH_BF_NOBLENDER is enabled. Mathutils, Geometry and BGL modules are currently disabled with python3
2009-05-06[#18681] Mousesensor Over doesn't work in ortho mode of 3dview cameraCampbell Barton
bugfix, the clip near/far are scaled up for some reason, so use a range between 0 - clipfar for now.
2009-05-06moved py controller functions from SCA_PythonController to SCA_IController - ↵Campbell Barton
the base controller class so python can get the sensors & actuators from any controller (not just SCA_PythonController types) also deprecated getActuators() and getSensors() for 'sensors' and 'actuators' attributes. an example of getting every sensor connected to an object. all_sensors = [s for c in ob.controllers for s in c.sensors]
2009-05-06[#18690] mesh ripping allowed on multiresCampbell Barton
also fixed uninitialized variable use in the BGE when shaders are not supported.
2009-05-06Fix an undefined variable bug detected by valgrind.Benoit 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-04print BGE Py api warnings only once to avoid flooding the terminal and ↵Campbell Barton
slowing the game down too much, resets on loading scenes/blendfiles and restarting the game engine.
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-04BGE performance: use inline function as much as possible in scenegraph and ↵Benoit Bolsee
logic to avoid function call.
2009-05-04BGE: fix a crash with previous scene destruction speed up commit when ↵Benoit Bolsee
sensors and controllers are cross connected between objects.
2009-05-04fix for a problem with setUV2 reported by cthames on blenderartistCampbell Barton
http://blenderartists.org/forum/showpost.php?p=1369757&postcount=35 there was an undocumented second arg but may as well allow a single vector arg like setUV()
2009-05-03on second thought its less trouble to make a python script that makes all ↵Campbell Barton
the getset's in the array, apologies to Alex for suggesting this be dynamic :/ included python script to print out getsets as a comment
2009-05-03[#18678] Swizzle properties for Mathutils.VectorCampbell Barton
patch from Alex Fraser (z0r) eg. - vec.xyz = vec.zyx - vec.xy = vec.zw - vec.xxy = vec.wzz - vec.yzyz = vec.yxyx See http://en.wikipedia.org/wiki/Swizzling_(computer_graphics) made some minor modifications to this patch. tested access times and adding 336 attributes to vectors doesn't make a noticeable differences to speed of existing axis attributes (x,y,z,w) - thanks to python dict lookups.
2009-05-03fixes for bugs submitted by BGE users, fixes by myself and Mitchell StokesCampbell Barton
- when the attribute check function failed it didnt set an error raising a SystemError instead - Rasterizer.getMaterialMode would never return KX_BLENDER_MULTITEX_MATERIAL - PropertySensor value attribute checking function was always returning a fail. - Vertex Self Shadow python script didnt update for meshes with modifiers.
2009-05-02BGE PyController module type.Campbell Barton
- Added support for any number of attributes, this means packages are supported automatically. so as well as "myModule.myFunc" you can do "myPackage.myModule.myFunc", nested packages work too. - pass the controller to the python function as an argument for functions that take 1 arg, this check is only done at startup so it wont slow things down. added support for
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-05-02BGE performance:Benoit Bolsee
- Vast performance increase when removing scene containing large number of objects: the sensor/controller map was updated for each deleted object, causing massive slow down when the number of objects was large (O(n^2)). - Use reference when scanning the sensor map => avoid useless copy. - Remove dynamically the object bounding box from the DBVT when the object is invisible => faster culling.
2009-05-01BGE: work around a problem with DBVT culling when graphic objects are ↵Benoit Bolsee
rescaled. This happens when objects with very diverse scale are instantiated with dupligroup. The problem remains when the objects are rescaled during the game. The effect of the problem is an inefficient culling: objects can have a bounding box larger than needed. Patch to fix the problem is filed at Bullet forum.
2009-05-01BGE: New function GameLogic.setMaxLogicFrame() to allow better control over ↵Benoit Bolsee
the time spent on logic. This function sets the maximum number of logic frame executed per render frame. Valid values: 1..5 This function is useful to control the amount of processing consumed by logic. By default, up to 5 logic frames can be executed per render frame. This is fine as long as the time spent on logic is negligible compared to the render time. If it's not the case, the default value will drag the performance of the game down by executing unnecessary logic frames that take up most of the CPU time. You can avoid that by lowering the value with this function. The drawback is less precision in the logic system to physics and I/O activity. Note that it does not affect the physics system: physics will still run at full frame rate (actually up to 5 times the ticrate). You can further control the render frame rate with GameLogic.setLogicTicRate().
2009-05-01add blendfile dirs to the sys.path without the scripts subdirCampbell Barton
2009-05-01BGE bug fix: when a dynamic object is parented to a compound shape and then ↵Benoit Bolsee
unparented, it jumps at the position it had before the parenting.
2009-04-30BGE bug #18091: Hitbox of object X doesn't move along when object X is ↵Benoit Bolsee
parented to object Y.
2009-04-30supporting warp data files with tabs instead of spaces.Dalai Felinto
2009-04-30added Geometry as a BGE module, removed its dependency on gen_utils.cCampbell Barton
2009-04-30BGE fux #17796: Glsl + bones + set smooth = bug on vertext groups.Benoit Bolsee
2009-04-30BGE Python sys.path for the blenderplayer and blenderCampbell Barton
sys.path is the search path for python modules. This is useful so people making games can put all their scripts in a folder and be sure they will always load into the BGE. for each blend file a scripts directory is added to the path /home/me/foo.blend will look for modules in... /home/me/scripts/*.py It could also default to look for modules in the same directory as the blend file but I think this is messy. Added a note in the tooltip about //scripts so its not such a hidden feature. This works by storing the original sys.path, then adding the paths for the blendfile and all its libs, when a new blendfile is loaded, the original sys.path is restored before adding the blendfiles paths again so the sys.path wont get junk in it. One problem with this - when using linked libs the module names must be unique else it will load the wrong module for one of the controllers. also fixed 2 bugs - sys.path in the blenderplayer was growing by 1 for every file load in blenderplayer - the relative path (gp_GamePythonPath), wasnt being set when loading files in the blenderlayer (as I wrongly said in the last commit).
2009-04-30BGE 2dFilters: Revert of part of own commit [rev. 19687]Dalai Felinto
Therefore we still need to find a better way to solve this problem: [#18154] 2dFilter and motion blur should run only once to all the scenes: http://projects.blender.org/tracker/?func=detail&aid=18154&group_id=9&atid=127
2009-04-30BGE Dome update. Spurious black seams (finally) fixed.Dalai Felinto
The solution is a hack. It's a workaround for another bug (#18655). Now it's working in all modes: fullscreen, maximized screen and gameplayer. * small change to always set the perspective mode as true during dome mode.
2009-04-302 BGE bugs from 2.48 fixedCampbell Barton
- the gp_GamePythonPath relative path variable wasnt updated when loading new files. - missing NULL check for scene crashed blender when it failed to load a file. Both problems dont affect blenderplayer
2009-04-30Not sure why this INCREF is needed since making a replica wont use the ↵Campbell Barton
m_bytecode so why should it add a user? Removed in 19974 but that crashes YoFrankie so adding back in for now.
2009-04-30error in last commitCampbell Barton
2009-04-30python modules in the game engine could point to builtin modules like ↵Campbell Barton
GameLogic that was cleared. I added module clearing before there was checks for invalid python objects, so now its not needed for BGE Builtin types at least. also made the builtin modules get re-used if they already exist and clear all user modules when the game engine finishes so with Module-Py-Controllers the referenced modules are at least up to date when pressing Pkey.
2009-04-29was testing this, didnt mean to commit.Campbell Barton