Blender Git Commit Log
Git Commits -> Revision b20f6e2
Revision b20f6e2 by Benoit Bolsee (master) March 23, 2008, 23:12 (GMT) |
Commit patch #8724: This patch modifies the BL_ConvertMesh method from the data conversion module in order to reduce the number of polygon material objects that are created. Normally, there should be only one material object for each material bucket(the group of meshes that are rendered together with a single material). However, the number of materials that are created right now in the converter is much higher and eats a lot of memory in scenes with large polygon counts. This patch deletes those material objects(KX_BlenderMaterial) that are used only temporarily in the converter(and are now deleted only when the converter is destroyed, at the end of the game). For a cube that's subdivided 7 times(90+ k polygons) I get 200 MB usage in the game engine in 2.45 and 44 MB with a svn build with this patch applied if the "Use Blender Materials" option is activated in the Game menu. |
Commit Details:
Full Hash: b20f6e27ff24f60bfa39b2311be3cc2f4130ac09
SVN Revision: 14223
Parent Commit: f162428
Lines Changed: +38, -18
6 Modified Paths:
/source/gameengine/Converter/BL_BlenderDataConversion.cpp (+20, -7) (Diff)
/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp (+11, -6) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_Scene.h (+1, -1) (Diff)
/source/gameengine/Rasterizer/RAS_BucketManager.cpp (+3, -1) (Diff)
/source/gameengine/Rasterizer/RAS_BucketManager.h (+1, -1) (Diff)
/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp (+11, -6) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+2, -2) (Diff)
/source/gameengine/Ketsji/KX_Scene.h (+1, -1) (Diff)
/source/gameengine/Rasterizer/RAS_BucketManager.cpp (+3, -1) (Diff)
/source/gameengine/Rasterizer/RAS_BucketManager.h (+1, -1) (Diff)