-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPBGE: Implement physics mesh refit. #835
base: master
Are you sure you want to change the base?
Commits on Oct 30, 2017
-
Some deformers as skin and shape deformer need an object to update a blender mesh, but this object must own the blender mesh. To do so we used previously a argument in some deformer constructor to pass a blender object owning the blender mesh. But in case the mesh is replaced the blender object of a game object can't be used, in these case we looked at a blender object registered along the blender mesh during the conversion. With the recent merge of deformer creation into BL_DeformableGameObject::LoadDeformer the look at blender object from mesh was always used. This worked fine only when only one game object used a deformer for one blender mesh, when two deformer used the same mesh the both conflicted and no update appeared. To solve this issue we first check if the blender object of the game object own the blender mesh, else we do the look at.
Configuration menu - View commit details
-
Copy full SHA for 050eea1 - Browse repository at this point
Copy the full SHA 050eea1View commit details
Commits on Oct 31, 2017
-
Previously when a modifier deformer was detect the code checked if a armature deformer or shape deformer was present to, in this case the modifier deformer was created with an aramture object. This cuased issues when the a shape deformer existed but without any armature parent object. To avoid both checks, we only check if the parent is an armature object. Fix issue: #628.
Configuration menu - View commit details
-
Copy full SHA for a84a3b1 - Browse repository at this point
Copy the full SHA a84a3b1View commit details -
UPBGE: Dont incref proxy when subclassing an owner proxy.
When we subclass a proxy we previously incref the proxy to make sure the game data keep the proxy alive, but in case of proxy owning the game data, we should not incref to make sure the proxy can be freed independtly of the game data.
Configuration menu - View commit details
-
Copy full SHA for cd671d6 - Browse repository at this point
Copy the full SHA cd671d6View commit details
Commits on Nov 4, 2017
-
UPBGE: Fix general render area dimensions.
Previously multiple issue related to the render area were noticed. They are the all due to a common issue: the width and height get in RAS_Rect return the number of pixel between the corner (x1 - x2) giving the maximum pixel index but not the real number of pixels which is one pixel more. This issue wasn't unknown as "+ 1" were spread in all the code for the functions SetViewport and SetScissor of the rasterizer. But the python function to get window size didn't used the + 1 and gave wrong values to the user compared to filter off screen size which were correct. To avoid all futur issues the functions GetWidth and GetHeight in RAS_Rect include the addition of 1 and the + 1 workaround is removed is the rest of the code. After testing with a custom shape cursor (a simple dot), it seems that linux cursor doesn't use the corner of the cursor but the corner without the little white margin contrary to windows which use the corner with the margin. The mouse event code was introducing a offset for linux cursor, as this offset is wrong in windows and the window dimensions are right, the mouse offset is removed. Fix issue: #560.
Configuration menu - View commit details
-
Copy full SHA for 5a4d5d3 - Browse repository at this point
Copy the full SHA 5a4d5d3View commit details
Commits on Nov 5, 2017
-
UPBGE: Fix angular velocity motion servo with little objects.
Previously the force computed in servo control logic brick was multiplied by the mass. This behaviour is correct because bullet in btRigidBody::integrateVelocities compute the linear velocity using force / mass. But the angular velocity doesn't use this formula. For the angular velocity we have to multiply the torque by the inertia of the body because bullet compute angular velocity with: torque * inertia_tensor.
Configuration menu - View commit details
-
Copy full SHA for 3d2e0c7 - Browse repository at this point
Copy the full SHA 3d2e0c7View commit details
Commits on Nov 6, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 96fe0f6 - Browse repository at this point
Copy the full SHA 96fe0f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for ffe4790 - Browse repository at this point
Copy the full SHA ffe4790View commit details
Commits on Nov 11, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 130f736 - Browse repository at this point
Copy the full SHA 130f736View commit details -
UPBGE: Improve vertex memory architecture.
Previously the vertex were using a common base class named RAS_IVertex which owned basic vertex data as position, normal, tangent. This base class also defined function to mutate these value and virtual functions for value in subclasses. The subclasses were RAS_Vertex, a template class, which owned the uv and color data with size depending on the template paramaters. This class also defined the virtual function to access uv or color. This conception is correct as it allows using small vertex memory if the user doesn't need a lot of uv or color layers. But the usage of virtual function imposed the class to store a virtual ptr table, this table is meanly a pointer (8o), this pointer was send to VBO and used memory for nothing from OpenGL side. To avoid this vptr, the vertex class is split in two classes: RAS_VertexData and RAS_Vertex. The first class is only vertex data without function. It use template parameters for uvs and colors and is based upon RAS_VertexDataBasic for the position, color, normal data. The second class is containing the functions and used only to mutate the vertex data. When accessing a vertex a RAS_Vertex instance is created with as parameters the vertex data pointer and the vertex format. This vertex format is used in uv and color getter to compute the return value based on the vertex data pointer plus a gap corresponding to the looked layer. As RAS_Vertex is now a new class, it functions names are cleaned using CamelCase.
Configuration menu - View commit details
-
Copy full SHA for 5d84885 - Browse repository at this point
Copy the full SHA 5d84885View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ba5931 - Browse repository at this point
Copy the full SHA 7ba5931View commit details -
UPBGE: Use float array for vertex conversion.
Previously the vertex was using float array converted to Moto type and converted back to float array. To avoid these two conversion stages the function RAS_IDisplayArray::CreateVertex now accept float arrays. The previous CreateVertex function is still keep for future mesh builder.
Configuration menu - View commit details
-
Copy full SHA for f874e52 - Browse repository at this point
Copy the full SHA f874e52View commit details -
UPBGE: Implement physics and logic object activity culling.
The activity culling helps to disable the physics or logic of an object depending of its distance to the nearest camera. From user side options were added in both UI and python API to control this feature. In UI the activity culling is put in three level, scene, camera, object. The two first level are enabled as default and the last disabled. Also the object panel expose option to enabled physics or logic culling with a different radius. In python the attribute activityCulling is added to these three levels and KX_GameObject receive four attributes to enabled physics and logic culling and controlling their radius. In internal sources the activity culling info are stored into KX_GameObject::ActivityCullingInfo which is owned by in KX_GameObject::m_activityCullingInfo. To suspend logic we suspend from SCA_IObject calling Suspend and Resume but in the same time we need to suspend animation as they are independant of logic and that it will be hard to control them when the object doesn't run its logic. To do so BL_ActionManager implement a suspend flag which disallow any task creation in KX_Scene::UpdateAnimations. Thanks for youle's work on this.
1Configuration menu - View commit details
-
Copy full SHA for f9d7e24 - Browse repository at this point
Copy the full SHA f9d7e24View commit details -
UPBGE: Use tempalte peramter for walk_children function.
The recursive argument of this function was always known at compile time, it is converted to a template parameter.
Configuration menu - View commit details
-
Copy full SHA for b6f4234 - Browse repository at this point
Copy the full SHA b6f4234View commit details -
UPBGE: Implement custom camera viewport in UI.
Previously the camera were able to use custom viewport only in python. An UI is created to do the same based on entire viewport ratios. The UI expose an option named "Custom Viewport" and four ratio for left, right, bottom and top. These ratio correspond with the width or height of the canvas multiplied by the ratio.
Configuration menu - View commit details
-
Copy full SHA for a09bc02 - Browse repository at this point
Copy the full SHA a09bc02View commit details -
UPBGE: Implement client/server update utilities.
These utilities instore a mechanism where multiple clients are checking for modifications of a common server, but the client are not looking at the server at the same time and the server state is changing. To ensure that all client know that the server is modified, at each update the server iterate over all the clients registered and set a modification state to true in each client if the update flag from the server match a part of a filter from the clients. The client class is CM_UpdateClient, the server CM_UpdateServer, these both class use a template paramter for the type studied for update in the perspective to avoid messing clients and servers of different types.
Configuration menu - View commit details
-
Copy full SHA for 094696e - Browse repository at this point
Copy the full SHA 094696eView commit details
Commits on Nov 12, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 0a8ea4d - Browse repository at this point
Copy the full SHA 0a8ea4dView commit details
Commits on Nov 13, 2017
-
UPBGE: Fix KX_ObjectActuator.torque value affected by servo control.
This doesn't change the behaviour of the servo control.
Configuration menu - View commit details
-
Copy full SHA for d45086e - Browse repository at this point
Copy the full SHA d45086eView commit details -
UPBGE: Use KX_GameObject directly instead of KX_CullingNode.
KX_CullingNode is not interesting as is goal was just to offer a pointer to the game object using it and the SG_CullingNode API. This class can be replaced by KX_GameObject in KX_CullingHandler which still get the culling node, but this time only SG_CullingNode.
Configuration menu - View commit details
-
Copy full SHA for 5577969 - Browse repository at this point
Copy the full SHA 5577969View commit details -
UPBGE: Implement python fast keyword parsing.
The usage of undocumented python function _PyArg_ParseTupleAndKeywordsFast (already used in blender) helps to improve performance spend during function argument parsing. After some test this new function is 2/3 of the runnign time of the previous parsing function. But this function has a drawback: it request more code and variable to be used especially a python parser pre created. To avoid to write this code each time the template function EXP_ParseTupleArgsAndKeywords is used. This function receive the args and kwds tuples, the format, the keywords name and pointers converted values.
Configuration menu - View commit details
-
Copy full SHA for 3f9e0b5 - Browse repository at this point
Copy the full SHA 3f9e0b5View commit details
Commits on Nov 14, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 85a1eea - Browse repository at this point
Copy the full SHA 85a1eeaView commit details -
UPBGE: Add support of GCC sanitizer.
The sanitizer is enabled only for the game engine sources compilation, it is enabled from cmake and the argument passed can also be customized.
Configuration menu - View commit details
-
Copy full SHA for 11c71da - Browse repository at this point
Copy the full SHA 11c71daView commit details -
UPBGE: Replace SetActiveAction by SetLastFrame in BL_DeformableGameOb…
…ject. as BL_DeformableGameObject::m_activePriority was not used and as m_lastframe was always set in SetActiveAction, this function is replaced by SetlastFrame which just update m_lastframe attribute.
Configuration menu - View commit details
-
Copy full SHA for fe84de3 - Browse repository at this point
Copy the full SHA fe84de3View commit details
Commits on Nov 15, 2017
-
UPBGE: Avoid checking deformer skip transform every frame.
The skip transform value from deformer is used to know if during render we have to apply the object matrix or not, only soft body deformers are using it. The goal of this commit is to access only time to this value while creating a display array bucket, to do so we have first to ensure that the construction of DAB is not in the constructor of deformers because it will mean that any virtual call will be invalid as the vptr is not yet complete. To avoid this a function called InitDisplayArrays is implemented in RAS_Deformer and called in BL_DeformableGameObject::LoadDeformer. After these modification it is now possible to call SkipVertexTransform in DAB constructor and affect its value to m_applyMatrix.
Configuration menu - View commit details
-
Copy full SHA for 5193049 - Browse repository at this point
Copy the full SHA 5193049View commit details -
Configuration menu - View commit details
-
Copy full SHA for 137faa3 - Browse repository at this point
Copy the full SHA 137faa3View commit details -
UPBGE: Fix parent for physics object conversion.
Previously in CcdPhysicsEnvironment::ConvertObject we iterate over all the parents from the object tree to find the closer object possibly used as a compound shape parent. But by doing this we affected the search of just the root parent object to disable dynamic or just for tracking (e.g for fh spring). To found both the root parent and the root compound parent, two variables are used in COnvertObject, compoundParent and parentRoot. Also to clairfy, the function in physics controller named SetParentCtrl is rename SetParentRoot as it was used to set the root parent controller only, not the parent controller. Fix issue: #634.
Configuration menu - View commit details
-
Copy full SHA for 067da32 - Browse repository at this point
Copy the full SHA 067da32View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d8b2eb - Browse repository at this point
Copy the full SHA 9d8b2ebView commit details -
This commit fix the vertex reading from triangles in display array.
Configuration menu - View commit details
-
Copy full SHA for 8166b30 - Browse repository at this point
Copy the full SHA 8166b30View commit details -
UPBGE: Use memory pool to allocate vertex data.
Currently in the conversion vertex data are always allocated, checked for redundant then maybe copied and free. To avoid frequently allocation a memory pool is used for each display array type, this memory pool is a boost::object_pool. Tested with sintel desert_level.blend file: Before: 0.85s After: 0.82s
Configuration menu - View commit details
-
Copy full SHA for a3e48cc - Browse repository at this point
Copy the full SHA a3e48ccView commit details
Commits on Nov 16, 2017
-
UPBGE: Implement PyObjectFrom with float array.
Previously when we only get a float array and wanted to convert it to python vector we were obligated to convert first to MT_Vector. To avoid this extra conversion PyObjectFrom is also implemented for float array of a template size. This improvement is used mainly in KX_VertexProxy, but in consideration the data passed to PyObjectFrom must be a array reference not a pointer, to do so the getter in RAS_Vertex are modified.
Configuration menu - View commit details
-
Copy full SHA for 4326995 - Browse repository at this point
Copy the full SHA 4326995View commit details
Commits on Nov 17, 2017
-
UPBGE: Fix inertia form factor.
The "Form Factor" UI value was not working anymore since a long time, this was caused by the fact that UpdateCcdPhysicsController was always called on conversion and that this function recalculated the inertia tensor without the factor. In this bug two parts are fixed, first the factor is applied properly everytime setMassProps is called. Secondly the call to UpdateCcdPhysicsController is avoided during conversion. This call was proceeded because the functions SetUserCollision[Group/mask] are calling RefreshCollisions. To avoid these calls the collision group and mask are moved fully to physics part, now KX_GameObject is reading and setting these bitmask from the PHY_IPhysicsController API. The group and mask is initialized along physics controller in ConvertObject function.
Configuration menu - View commit details
-
Copy full SHA for ca95d10 - Browse repository at this point
Copy the full SHA ca95d10View commit details
Commits on Nov 20, 2017
-
UPBGE: Don't tag empty display array for bounding box update.
If empty array are detected in a mesh they are not added in the tracked list of the boundign box, if this list is empty a dummy bounding box is created instead of a mesh bouning box.
Configuration menu - View commit details
-
Copy full SHA for 99a7910 - Browse repository at this point
Copy the full SHA 99a7910View commit details -
UPBGE: Fix near/radar sensors.
When a near sensor is used a physics controller using a sphere shape is created through CreateSphereController. But previously the construction info was memset to 0 instead using the CcdConstructionInfo constructor. This caused issues by setting the collision mask/group to zero. The memset is removed as it doesn't do more than the constructor and that the similar funciton CreateConeController isn't requesting it. In the same time the usage of memset 0 for PHY_PHY_RayCastResult is removed in favor of a constructor.
Configuration menu - View commit details
-
Copy full SHA for e5bd8a5 - Browse repository at this point
Copy the full SHA e5bd8a5View commit details
Commits on Nov 21, 2017
-
UPBGE: Move restrict animation update management in KX_Scene.
Moving the management in KX_Scene avoid KX_KetsjiEngine to call the animaiton update for every scene even if only one is needed. The memeber m_previousAnimTime is added in KX_Scene and UpdateAnimations now accept a restrict bool arguments.
Configuration menu - View commit details
-
Copy full SHA for 066db11 - Browse repository at this point
Copy the full SHA 066db11View commit details
Commits on Nov 23, 2017
-
UPBGE: Implement chacracter maximum slope.
Maximum slope is bullet feature which can be used to restrict the player movements, this value is between 0 and pi/2, exposed in UI and in python under KX_CharacterWrapper.maxSlope. IN the same time the PHY_ShapeProps struct is removed as its purpose was just to store blender data used in ConvertObject function but this function was already doing data conversion from blender directly, instead mixing different levels, this struct is removed.
Configuration menu - View commit details
-
Copy full SHA for d83c2fa - Browse repository at this point
Copy the full SHA d83c2faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9fc369b - Browse repository at this point
Copy the full SHA 9fc369bView commit details
Commits on Nov 25, 2017
-
UPBGE: Implement non-callback collision test.
Previously if the user wanted to know if two objects were colliding he needed a collision sensor or a collision callback and then check for every objects collided or use a specific mask for target object only. This technic was pretty complex for an operation looking simpler from the user point of view. To know if two object are colliding a method named KX_GameObject.collide(obj) is implemented in python, this method return a tuple of a boolean (colliding state) and a list of contact points (KX_CollisionContactPoint) or None. This function is using the new internal function named CollisionTest in the physcis environment which returns a struct with essentially the same information than the user gets. This function is checking for the presence of a broadphase pair in bullet cache and then getting the manifold.
Configuration menu - View commit details
-
Copy full SHA for ed9c14a - Browse repository at this point
Copy the full SHA ed9c14aView commit details -
UPBGE: Cleanup KX_CollisionEventManager.[h/cpp].
This cleanup contains: - uncrustify pass - move definition to .cpp - remove use of void * - remove unused enum in PHY_DynamicTypes.h
Configuration menu - View commit details
-
Copy full SHA for b6cd494 - Browse repository at this point
Copy the full SHA b6cd494View commit details
Commits on Nov 26, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 2efea77 - Browse repository at this point
Copy the full SHA 2efea77View commit details -
UPBGE: Refactor material attributes management.
The attributes management inherited from the BFBGE conception, these attributes were computed in blender shader, material or custom shader and set globally through the rasterizer with calls like SetAttribs/SetTexCo. Then these attributes were pulled back in VBO storage when creating the VAO. The issues of this conception is the useless process of updating global attributes as the VBO storage need it only once at its creation. Also the VBO storage is used for both display array storage (vertices and indices) and for attributes storage (VAOs per draw type), so when reconstructing the attributes was needed the VBO was also destructed. To avoid these issues first of all the VBO and VAO are split in two different class, respectively RAS_DisplayArrayStorage and RAS_AttributeArrayStorage. RAS_DisplayArrayStorage is owned by RAS_DisplayArray and is dedicated to wrap RAS_StorageVbo following a pimpl idiom. This storage is created via function RAS_IDisplayArray::ConstructStorage called from RAS_DisplayArrayBucket the first render time when the modified flag STORAGE_INVALID is set, this is designed to delay storage creation to handle asynchronous libloading where the OpenGL context is inaccessible. Excepted these the functions are IndexPrimitves[...]... do the same work as before. RAS_AttributeArrayStorage is owned by a new class named RAS_AttributeArray, and this last class is owned by the display array bucket using it. The purpose of RAS_AttributeArray is to store the list of attributes description (location, type, layer, flag) and lazily create a RAS_DisplayArrayStorage depending on the drawing mode used. This process is done by the function GetStorage called at every render step in RAS_DisplayArrayBucket::UpdateActiveMeshSlots. Similar to RAS_DisplayArrayStorage, RAS_AttributeArrayStorage wrap RAS_StorageVao using pimpl and offers the function Bind/UnbindPrimitives. RAS_DisplayArrayStorage and RAS_AttributeArrayStorage are both referenced in RAS_DisplayArrayNodeData to be used by node callbacks from display array bucket level and mesh slot level. As described before the attributes are not anymore a global variable, instead they are build and get in the same time RAS_AttributeArray is created via a call to RAS_IPolyMaterial::GetAttribs which redirect (at KX_BlenderMaterial level) to functions from BL_BLenderShader or BL_Shader. In consideration BL_BLenderShader remove its parsing and store mechanism. The display array bucket is noticed that the attributes changed by checking a update client (CM_UpdateClient) tracked to the used material, to do so RAS_IPolyMaterial is inherited from CM_UpdateServer and use two flags: ATTRIBUTES_MODIFIED and SHADER_MODIFIED. These both flags are viewed from the display array bucket and set by BL_Shader and BL_BLenderShader. Because the display array storage is created in the constructor of the display array it's not possible to call any virtual functions from the display array, the previous function used for memory format of the used vertex data type can't be used anymore, to fill this gap, a struct named RAS_VertexDataMemoryFormat is implemented and initialized from the function RAS_VertexData<>::GetMemoryFormat(), this struct is now used in both RAS_DisplayArrayStorage and RAS_AttributeArrayStorage. Previously the VAO was optional because instancing was poorly mixed with the VAO behavior. The correct behavior is while the VAO is bound to bind once the instancing buffer, bind the attributes and unbind the buffer. By doing this there's no conflict of attributes and buffer. In consideration all unbind instancing function are now unused and so removed.
Configuration menu - View commit details
-
Copy full SHA for 60756bc - Browse repository at this point
Copy the full SHA 60756bcView commit details
Commits on Nov 28, 2017
-
UPBGE: Replace math library from Moto to Mathfu.
The previous math library Moto is replaced in this commit by the recent mathfu library, this replacement is motivated by multiple points: - The Moto API was pretty limited and its updated version (2014 Moto version) was totally incompatible with the current usage of the library. - Mathfu was offering a lot more of functions and also the capability of working with multiple types, int or float vector through a template API. - Mathfu was using column major matrix contrary to Moto which help to transfer data to OpenGL or blender functions without transposing back into a temporary array. - Mathfu implemented SSE optimizations even for various platforms. Mathfu was also preferred from other math library as Eigen because of its well compatible API to the one used from Moto, the main compatibility issues were fixed by renaming functions calls and object types. But some compatibility were harder to manage, especially column major matrix instead of older row major matrix. Moto was mainly row major but the constructor using a float array and functions setValue/getValue were transposing from/to column major model. So matrices constructed from an array must not inverse the row/column access, but matrices computed (e.g perspective projection) needed to inverse the access row/column. The new usage of the math library is described as follow: the type names are similar to GLSL names, they are mt::vec2/3/4 mt::mat3/4 only two types are not in GLSL: mt::mat3x4 (the old MT_Transform) and mt::quat. To access these types mathfu.h must be included. Following GLSL convention the dot and cross product are written: mt::dot(v1, v2) mt::cross(v1, v2), for the other operators the mathfu functions names are used. Mathfu introduced some constant vector, so a vector of zeros can be initialized from mt::zero2/3/4 and for a vector of ones mt::ones2/3/4. Finally the raw vector data can be accessed through function Data, this function return an array (not a pointer) which help to remove cast in case of matrix data passed to blender functions. Else to copy in a raw array the function Pack is used.
3Configuration menu - View commit details
-
Copy full SHA for a30aef6 - Browse repository at this point
Copy the full SHA a30aef6View commit details -
UPBGE: Remove moto and mathfu library in cmake.
Mathfu is only include files.
Configuration menu - View commit details
-
Copy full SHA for 6334097 - Browse repository at this point
Copy the full SHA 6334097View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c89e96 - Browse repository at this point
Copy the full SHA 3c89e96View commit details -
Configuration menu - View commit details
-
Copy full SHA for c818be6 - Browse repository at this point
Copy the full SHA c818be6View commit details -
UPBGE: Fix contact point list for ghost objects.
Two issues were noticed into CallbackTriggers function. First manifolds for objects ignoring contact response were automatically removed, apparently this was needed for older version of bullet which didn't updated the manifold. This behaviour caused to always send a invalid contact point list to the user in case of ghost object collision. To solve this issue the clear is removed as after some test the bug is not anymore present. Secondly debug draw of contact points was proceed in CallbackTriggers but btIDebugDraw is already managing it the same… The manual debug draw is removed. Fix issue #636.
Configuration menu - View commit details
-
Copy full SHA for 3c43e14 - Browse repository at this point
Copy the full SHA 3c43e14View commit details
Commits on Nov 29, 2017
-
UPBGE: Fix slow parent relation.
A quaternion issue caused a erronous behaviour of the slow parent relation. This issue came from the slerp function which called a sub function ToAngleAxis when multiplying a quaternion by a scalar, in this function a axis vector was normalized. If the axis was a zero vector (happen when we interpolate the same quaternions) the normalized failed a return a vector of NaN. To fix this issue quaternion now use a SafeNormalize instead of Normalize vector function. Fix issue: #639.
Configuration menu - View commit details
-
Copy full SHA for de19738 - Browse repository at this point
Copy the full SHA de19738View commit details
Commits on Nov 30, 2017
-
UPBGE: Fix custom shader UV layers.
Previously since BFBGE the UV layers through texture coord for custom shader were wrongly managed. Every texture used a unique UV layer which forced vertices to have always 8 UV layers for maximum 8 textures. But in UPBGE the UV layer managed by vertices is variable and so this behaviour is wrong as it could defines texture coord with invalid memory offset of inexistant layers. To solve this issue the behaviour for material attributes is applied to texture coord: they are defined for every textures but can use shared UV layers depending on the UV layer used by the texture. To get the proper layer index, in BL_Shader::GetAttrib an iteration over all the UV layers from the mesh is proceeded to match the UV name from the material texture. Fix issue: #644.
Configuration menu - View commit details
-
Copy full SHA for 11214b7 - Browse repository at this point
Copy the full SHA 11214b7View commit details
Commits on Dec 1, 2017
-
UPBGE: Fix versioning for character max slope.
Compatiblity initialization of max slope for character was missing. Fix issue: #647.
Configuration menu - View commit details
-
Copy full SHA for 7250e3c - Browse repository at this point
Copy the full SHA 7250e3cView commit details
Commits on Dec 2, 2017
-
UPBGE: Avoid normal recalculation for modifiers.
Previously a call to RecalcNormals was procceded in BL_ShapeDeformer when we detected that the deformer was usign modifiers, but the update normal function work upon m_transverts and m_transnorms which are not updated in case of BL_ModifierDeformer and even worse doesn't contain the same number of elements. This ends in an invalid memory read. To fix this issue the normals are not updated manually, this wans't necessary as the modifiers are already giving correct normal during conversion.
Configuration menu - View commit details
-
Copy full SHA for d6c81a0 - Browse repository at this point
Copy the full SHA d6c81a0View commit details -
UPBGE: Use per display array vertex data memory pool.
Using a globally memory pool cause a lot of issues, it sometimes during modifier deformer convertion and make async load of meshes of the same type very dangerous.
Configuration menu - View commit details
-
Copy full SHA for f855e5c - Browse repository at this point
Copy the full SHA f855e5cView commit details -
UPBGE: Fix duplication of action actuator.
Before the action actuator a member m_lastUpdate was used in the update process of the actuator, when the actuator was duplicated this member was set to -1 as for the constructor of the actuator. The refactor removed this member because it was redundant, but nothing compensated it during the duplication of the actuator. To do so the flag of the actuator is reset to 0 excepted for continue flag, as again the actuator constructor. In the same time unused members of the action actuator were removed and the python attribute blendTime which was inffective since BFBGE was removed.
Configuration menu - View commit details
-
Copy full SHA for 462a705 - Browse repository at this point
Copy the full SHA 462a705View commit details
Commits on Dec 3, 2017
-
The previous algorithm used to update parent relation was wrong because it tried to compute scale, position and rotation separatly. The correct algorithm must convert position, scale and rotation to a transform (mat3x4) then multiply the parent world transform by the child local transform. After this we extract the position, scale and rotation. This algorithm is applied to all parent node relation. In the same time the convertion of the inverse parent matrix in converter is simplified by using mat4_to_loc_rot_size and supporting the delta scale in the global scale.
Configuration menu - View commit details
-
Copy full SHA for a536bbd - Browse repository at this point
Copy the full SHA a536bbdView commit details -
UPBGE: Fix collision callback detection.
CcdPhysicsEnvironment::CallbackTriggers was testing only if the second colliding controller was using callback, now it checks for both controllers.
Configuration menu - View commit details
-
Copy full SHA for 287c8d1 - Browse repository at this point
Copy the full SHA 287c8d1View commit details -
Since the KX_CollisionSensor cleanup, some virtual functions used PHY_IPhysicsController instead of void pointer, but the same function were not updated in KX_NearSensor which inherited from KX_CollisionSensor and so the function in near sensor were never used. The functions signature are updated in KX_NearSensor.
Configuration menu - View commit details
-
Copy full SHA for 56d0855 - Browse repository at this point
Copy the full SHA 56d0855View commit details
Commits on Dec 5, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 42ab320 - Browse repository at this point
Copy the full SHA 42ab320View commit details
Commits on Dec 6, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 548c238 - Browse repository at this point
Copy the full SHA 548c238View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90f2ea2 - Browse repository at this point
Copy the full SHA 90f2ea2View commit details -
UPBGE: Cleanup KX_NavMeshObject.[h/cpp].
This cleanup includes: - uncrustify pass - add const
Configuration menu - View commit details
-
Copy full SHA for b2293e9 - Browse repository at this point
Copy the full SHA b2293e9View commit details -
UPBGE: Cleanup KX_SteeringActuator.[h/cpp].
This cleanup includes: - uncrusitfy pass - add const - remove dynamic_cast
Configuration menu - View commit details
-
Copy full SHA for 615cdb0 - Browse repository at this point
Copy the full SHA 615cdb0View commit details -
UPBGE: Use std::vector for path instead of float array for nav mesh.
The type KX_NavMeshObject::PathType alias a std::vector of mt::vec3. It is used by function FindPath and DrawPath in KX_NavMeshObject.
Configuration menu - View commit details
-
Copy full SHA for 86cf416 - Browse repository at this point
Copy the full SHA 86cf416View commit details -
UPBGE: Use slot to store information around display arrays in RAS_Def…
…ormer. Previously the display array and display array bucket tracked by deformers were stored in two separated listes, m_displayArrayList and m_displayArrayBucketList. But futur feature will request to store more information related to the display arrays. To fix this inconvenient a slot struct is introduced: DisplayArraySlot stored under list m_slots. This struct contains the new DA and DAB but also the original DA for update listening and the original mesh material for replication.
Configuration menu - View commit details
-
Copy full SHA for 404070c - Browse repository at this point
Copy the full SHA 404070cView commit details -
UPBGE: Cleanup mesh layers info.
Previously the layers were all sotred in the same list, so any code reading them needed to check the type of the layer. In some code it can be inconvenient. A better system is to store uv and color layers info in separated listes. In consideration the type doesn't have any reason to stay.
Configuration menu - View commit details
-
Copy full SHA for 39ae7f9 - Browse repository at this point
Copy the full SHA 39ae7f9View commit details
Commits on Dec 8, 2017
-
UPBGE: Replace display array modification flag by update client/server.
Previously the display array was notify for an update thanks to a modification flag, but different user were reading this flag and one user was setting clearing it. This caused to not notify some user that the display array was modified. To fix this issue the new CM_Update[Server/Client] utilities are used, display array inherit from CM_UpdateServer and the users RAS_MeshBoundingBox, RAS_Deformer and RAS_DisplayArrayBucket are owning a update client registered into a display array. But before using the update client/server mechanism, CM_UpdateClient needed to be modified to track a integer for the update flag and not only a boolean, thsi is used in DAB to catch any update from the DA but after a call to GetInvalidAndClear make a check of what is modified actually. RAS_MeshBoundingBox wans't really designed to handle update client as not struct was used to represent and used DA in the bounding box. Similar to RAS_Deformer, RAS_MeshBoundingBox use a DisplayArraySLot struct, this struct store the tracked DA and it's update client.
Configuration menu - View commit details
-
Copy full SHA for 87a7e65 - Browse repository at this point
Copy the full SHA 87a7e65View commit details
Commits on Dec 9, 2017
-
UPBGE: Fix channel update of duplicated armatures.
Previously the BL_ArmatureChannel list stored under name m_poseChannels in BL_ArmatureObject was shared between duplicated armatures. But blender armature channels are unique per armature, this caused that only the original armature was affected by any update of the duplicated armatures. To fix this issue the BL_ArmatureChannel are made unique per armature. Fix issue: #629.
Configuration menu - View commit details
-
Copy full SHA for eb0374a - Browse repository at this point
Copy the full SHA eb0374aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3bc77d - Browse repository at this point
Copy the full SHA e3bc77dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6696957 - Browse repository at this point
Copy the full SHA 6696957View commit details
Commits on Dec 10, 2017
-
UPBGE: Cleanup KX_Scene.[h/cpp].
This cleanup includes: - uncrustify pass - move function definition - remove extra class keyword - add const - use static_cast - reword comments
Configuration menu - View commit details
-
Copy full SHA for 1973f22 - Browse repository at this point
Copy the full SHA 1973f22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 555e650 - Browse repository at this point
Copy the full SHA 555e650View commit details -
UPBGE: Remove unused m_rootnode member in KX_Scene.
This member was used only locally in a function, its visibility is restricted then.
Configuration menu - View commit details
-
Copy full SHA for a82e220 - Browse repository at this point
Copy the full SHA a82e220View commit details -
UPBGE: Remove blender group object in KX_GameObject.
The blender group object member in KX_GameObject (m_blenderGroupObject) was a redundant information has it is similar to m_dupliGroupObject->GetBlenderObject(). This member is removed and its usage is replaced by calling function GetBlenderObject of the dupli game object.
Configuration menu - View commit details
-
Copy full SHA for 71dcfe6 - Browse repository at this point
Copy the full SHA 71dcfe6View commit details -
Configuration menu - View commit details
-
Copy full SHA for cafd183 - Browse repository at this point
Copy the full SHA cafd183View commit details
Commits on Dec 11, 2017
-
UPBGE: Fix free of collision data.
Previously when calling python function obj.collide(...) the collision data PHY_ICollData was owned by noone and so leaked in memory. To fix this issue the owner ship if transfered to KX_CollisionContactPointList. Also a function KX_GameObject::HasCollisionCallbacks is implemented to not create contact point list for nothing.
Configuration menu - View commit details
-
Copy full SHA for 2cc0d9e - Browse repository at this point
Copy the full SHA 2cc0d9eView commit details
Commits on Dec 14, 2017
-
UPBGE: Use RAS_VertexFormatType to specify format in RAS_VertexData t…
…emplate. Instead using two parameters to intanciate the RAS_VertexData template class, one struct is used: RAS_VertexFormatType, this struct also include the enum for the uv and color size.
Configuration menu - View commit details
-
Copy full SHA for 091804c - Browse repository at this point
Copy the full SHA 091804cView commit details
Commits on Dec 15, 2017
-
UPBGE: Implement template intantiation switch utility.
The display array templates classes need a switch to create the proper display array instance corresponding on the format given. This was proceded thanks to macros but these macro were duplicated for regular display array and batch display array. As new classes using format to get template paramater will be used later a general function is implemented. This function is named CM_InstantiateTemplateSwitch, it receives as explicit template parameters the base class to down cast to, the up class using templates and a tuple of all the template parameters possible for the up class. Also the function receive a key to select compare with the tuple element instantiated and a list of arguments passed to the up class constructor. For display array classes purpose, a tuple is defined in RAS_VertexFormat.h containing all RAS_VertexFormatType possible: RAS_VertexFormatTuple. RAS_VertexFormatType now have a comparaison operator with RAS_VertexFormat to be working properly in CM_InstantiateTemplateSwitch when compared with the key.
Configuration menu - View commit details
-
Copy full SHA for f47a2dc - Browse repository at this point
Copy the full SHA f47a2dcView commit details
Commits on Dec 17, 2017
-
Configuration menu - View commit details
-
Copy full SHA for ef6c5b4 - Browse repository at this point
Copy the full SHA ef6c5b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4b0e4c - Browse repository at this point
Copy the full SHA b4b0e4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 65ab238 - Browse repository at this point
Copy the full SHA 65ab238View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2bb2675 - Browse repository at this point
Copy the full SHA 2bb2675View commit details -
UPBGE: Expose all soft body solver iterations and improve UI.
This commit expose all solver iterations for position, velocity, cluster and drift solvers. In the same time the RNA definition of new parameters is a bit cleaned and the UI defined in python is simplified to fit in two columns insteasd of three.
Configuration menu - View commit details
-
Copy full SHA for 45f9385 - Browse repository at this point
Copy the full SHA 45f9385View commit details -
BGE: Fix softbody cluster collision: set mass before creating cluster.
Previously the mass of the soft body was set after creating the cluster, causing incorrect mass in the clusters and incorrect behavior in collision.
Configuration menu - View commit details
-
Copy full SHA for 4a45419 - Browse repository at this point
Copy the full SHA 4a45419View commit details -
UPBGE: Use BL_ConvertObjectInfo to store object conversion data.
Previously the game objects were all storing a constraint list used for the creation of physics constraint from user settings, but once the object created, this list has no interest and over all it can be shared between duplicated objects. To solve this situation a BL_ConvertObjectInfo struct is introduced, this struct store a pointer to the blender object which was converted and a list of the blender constraints. These convert info are created in BL_BlenderSceneConverter and kept in BL_BlenderConverter after conversion, as promissed they are shared between game objects under a pointer member: m_convertInfo. Getter GetBlenderObject and GetConstraints are rewritten to return data from the convert info. A special case is dedicated in GetBlenderObject to default camera which doesn't have any convert info.
Configuration menu - View commit details
-
Copy full SHA for fe801b4 - Browse repository at this point
Copy the full SHA fe801b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa9079f - Browse repository at this point
Copy the full SHA fa9079fView commit details -
UPBGE: Move ReplicateConstrains function in KX_GameObject.
Always try to not see ketsji from other parts.
Configuration menu - View commit details
-
Copy full SHA for 4b4259c - Browse repository at this point
Copy the full SHA 4b4259cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 491ed27 - Browse repository at this point
Copy the full SHA 491ed27View commit details -
UPBGE: Replace SetProg by BindProg and UnbindProg in shaders.
Using a function like SetProg and an argument to decide to bind or not obligate to use a condition. This condition can be totally avoided if we the enable argument is not dynamic as in our case. This function is split in two, BindProg and UnbindProg. For BL_Shader the BindProg function is override non virtually as the only caller is KX_BlenderMaterial which has a BL_Shader pointer.
Configuration menu - View commit details
-
Copy full SHA for ec62b3e - Browse repository at this point
Copy the full SHA ec62b3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 45f9b46 - Browse repository at this point
Copy the full SHA 45f9b46View commit details -
UPBGE: Fix m_convertInfo not initialized to nullptr.
This operation is important for the default camera.
Configuration menu - View commit details
-
Copy full SHA for 149f33e - Browse repository at this point
Copy the full SHA 149f33eView commit details -
1
Configuration menu - View commit details
-
Copy full SHA for e8a9322 - Browse repository at this point
Copy the full SHA e8a9322View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab265f6 - Browse repository at this point
Copy the full SHA ab265f6View commit details -
UPBGE: Fix reference counting of module items.
The item passed to PyDict_SetItemString will be incref, so if the item is constructed in the current scope and not stored in an external data, the item must be decref. These rules are applied to KX_PythonInit.cpp and remove the usage of PyDict_Clear in LA_Launcher.
Configuration menu - View commit details
-
Copy full SHA for 77464fb - Browse repository at this point
Copy the full SHA 77464fbView commit details -
UPBGE: Cleanup python initialization.
Previously python was created and initialized the same way for the blenderplayer through the function setupGamePython. This caused that when reloading the launcher because of game reload (same file or other file) we had to take care to not call anything related to python, and the management of the global dict in blenderplayer was harder. Because of this difficulties the global dict wasn't shared between game reload contrary to the shared behaviour in embedded player. To solve this issue the python initialization and module initialization is split in two functions: initPlayerPython for constructing python and initGamePython to initialize a context with all the modules and the previous global dict. In the same time the prefix bpy_ is removed in BL_BlenderConverter, and python joysticks, keyboard and mouse are now using std::unique_ptr in KX_PythonInit.cpp.
Configuration menu - View commit details
-
Copy full SHA for c83d50e - Browse repository at this point
Copy the full SHA c83d50eView commit details
Commits on Dec 19, 2017
-
UPBGE: Use aligned allocator for RAS_BoundingBox::DisplayArraySlot.
Struct DisplayArraySlot contains mt::vec3 which must be aligned on 16 bytes, in consideration RAS_BoundingBox::m_slots uses mt::simd_allocator to allocate with the proper alignement.
Configuration menu - View commit details
-
Copy full SHA for a99d456 - Browse repository at this point
Copy the full SHA a99d456View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3aa9b76 - Browse repository at this point
Copy the full SHA 3aa9b76View commit details
Commits on Dec 22, 2017
-
Configuration menu - View commit details
-
Copy full SHA for a3957d7 - Browse repository at this point
Copy the full SHA a3957d7View commit details
Commits on Dec 23, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 92af8d6 - Browse repository at this point
Copy the full SHA 92af8d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a5f431 - Browse repository at this point
Copy the full SHA 6a5f431View commit details
Commits on Dec 24, 2017
-
UPBGE: Implement mesh duplication in python.
The user is now able to duplicate a KX_Mesh using the python function mesh.copy(). Internally this function copy construct KX_Mesh and RAS_Mesh and its RAS_MeshMaterial, then the mesh conversion is finalized and registered to the converter. For this last operation it was needed to store a KX_Scene pointer into KX_Mesh and to be able to replace it in case of lib loading.
Configuration menu - View commit details
-
Copy full SHA for 1df87c0 - Browse repository at this point
Copy the full SHA 1df87c0View commit details
Commits on Dec 25, 2017
-
Configuration menu - View commit details
-
Copy full SHA for ba6ae87 - Browse repository at this point
Copy the full SHA ba6ae87View commit details
Commits on Dec 27, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 48ad207 - Browse repository at this point
Copy the full SHA 48ad207View commit details -
UPBGE: Rename BL_Blender* to BL_*.
"BL_" and "Blender" is redundant.
Configuration menu - View commit details
-
Copy full SHA for 271407c - Browse repository at this point
Copy the full SHA 271407cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 95774a1 - Browse repository at this point
Copy the full SHA 95774a1View commit details -
UPBGE: Cleanup BL_ScalarInterpolator.[h/cpp].
This cleanup includes: - uncrustify pass - remove extra class/struct keyword - move function definition to .cpp.
Configuration menu - View commit details
-
Copy full SHA for a972f04 - Browse repository at this point
Copy the full SHA a972f04View commit details
Commits on Dec 28, 2017
-
UPBGE: Cleanup SG_Controller and subclasses.
This commits add an empty SetOption function in SG_Controller to avoid redefinition in subclasses, also the attributes m_modified and m_ipotime which are used in all controller classes are moved into the base class SG_Controller, in consideration the function SetSimulationTime is de-virtualized and moved into SG_Controller.
Configuration menu - View commit details
-
Copy full SHA for ad70ea4 - Browse repository at this point
Copy the full SHA ad70ea4View commit details
Commits on Dec 29, 2017
-
UPBGE: Move interpolator into SG_Controller.
Interpolator list was a common attribut of all the classes derived from SG_Controller, in consideration this attribut is moved into SG_Controller and the function Update iterate over all the interpolators and call for update. In the same time the function UpdateSpatialData always call for parent relation update as before all the controller subclasses were returning false in function Update.
Configuration menu - View commit details
-
Copy full SHA for 7dfc5e2 - Browse repository at this point
Copy the full SHA 7dfc5e2View commit details -
UPBGE: Factorize code in KX_IpoSGController::Update().
The code in Update function could be simplified by using loops for check on all axis.
Configuration menu - View commit details
-
Copy full SHA for a8d9f40 - Browse repository at this point
Copy the full SHA a8d9f40View commit details -
UPBGE: Unify SG_COntroller subclasses replication.
m_ipo_xform is not a pointer in KX_IpoSGController and using this instead of its addresse will end in the same result.
Configuration menu - View commit details
-
Copy full SHA for 0ba4f91 - Browse repository at this point
Copy the full SHA 0ba4f91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d876f1 - Browse repository at this point
Copy the full SHA 6d876f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c8e4c4 - Browse repository at this point
Copy the full SHA 3c8e4c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfebcec - Browse repository at this point
Copy the full SHA bfebcecView commit details -
UPBGE: Remove redundant check in KX_IpoController::Update.
After the begining of the Update function we know that variables m_ipo_start_initialized and m_ipo_euler_initialized are set to true and then the check later of these two variables is useless.
Configuration menu - View commit details
-
Copy full SHA for 6141fa3 - Browse repository at this point
Copy the full SHA 6141fa3View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab74372 - Browse repository at this point
Copy the full SHA ab74372View commit details -
UPBGE: Unify replication of interpolator in SG_Controller.
A function ProcessReplica is introduced in SG_Controller to duplicate the interpolator and set a correct target. To have this function we needed first to make SG_ScalarInterpolator and merge KX_ScalarInterpolator to SG_Interpolator.
Configuration menu - View commit details
-
Copy full SHA for cf48458 - Browse repository at this point
Copy the full SHA cf48458View commit details
Commits on Dec 30, 2017
-
UPBGE: Use std::unique_ptr in KX_GameObject.
Some pointer in KX_GameObject corresponded to data owned by the game object or inexistant. In this case std::unique_ptr could be used to ensure the free of data. The only drawback is the requierment of a copy constructor to duplicate the data or set they to nullptr. Also m_clientInfo is now not anymore a pointer as it is never nullptr and owned by the game object.
Configuration menu - View commit details
-
Copy full SHA for 5a546f6 - Browse repository at this point
Copy the full SHA 5a546f6View commit details
Commits on Dec 31, 2017
-
UPBGE: Convert curves as Empty objects to add it in scene.objects
See comments in the commit. Test file: http://pasteall.org/blend/index.php?id=48626
Configuration menu - View commit details
-
Copy full SHA for cd9fa2b - Browse repository at this point
Copy the full SHA cd9fa2bView commit details -
UPBGE: Use VBO and VAO for debug drawing.
Using VBO and VAO allow to render all the lines in one command and to render all the AABB and frustum using instancing in one command too. The usage of VBO request that all the structs for lines, aabbs, frustum and boxes use array instead of mathfu types to avoid SSE padding and alignement. Four shaders are introduced to help debug drawing using instancing. The first is just for drawing lines using a flat color, the second is for wire boxes, the third for solid boxes with in and out color and the fourth for 2d boxes. All the these geometry type use geometry instancing. For each type RAS_OpenGLDebugDraw allocate a VAO and multiples VBOs, they are stored into m_vbos and m_vaos and accessed thanks to enums. The VAO are initialized in RAS_OpenGlDebugDraw constructor pointing to the uninitialized VBOs, some VBOs as unit 3d and 2d box and IBOs are initialized in the same time. At each render step the VBO containing data about instancing or geometry are updated from the data list contained into RAS_DebugDraw. Then the render is procceed binding the VAO and calling the proper draw call. 2d boxes receive a special treatment. The boxes are rendered using a vertically inverted ortho matrix because the Y axis is from the top of the screen. All these modification ends in a significant speedup for debug drawing and makes the code easier to move to blender 2.8.
2Configuration menu - View commit details
-
Copy full SHA for a23e65c - Browse repository at this point
Copy the full SHA a23e65cView commit details -
UPBGE: Remove duplication of sg controllers.
The duplication of sg controller is useless as the controllers duplicated are finally used by no one because the action manager of the new object is inexistant.
Configuration menu - View commit details
-
Copy full SHA for 863d1ce - Browse repository at this point
Copy the full SHA 863d1ceView commit details -
UPBGE: Don't allocate SG_Interpolator on heap.
Allocating SG_Interpolator on heap is useless as only SG_Controller see and modify they.
Configuration menu - View commit details
-
Copy full SHA for c0d24cf - Browse repository at this point
Copy the full SHA c0d24cfView commit details -
UPBGE: Fix empty profiler box.
We should use at least box of one pixel.
Configuration menu - View commit details
-
Copy full SHA for 14105f3 - Browse repository at this point
Copy the full SHA 14105f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4324ae - Browse repository at this point
Copy the full SHA b4324aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 986e236 - Browse repository at this point
Copy the full SHA 986e236View commit details -
Configuration menu - View commit details
-
Copy full SHA for 48e2862 - Browse repository at this point
Copy the full SHA 48e2862View commit details
Commits on Jan 1, 2018
-
UPBGE: Use std::unique_ptr for event managers in SCA_LogicManager.
In the same time the replacement of the logic manager into the event manager is removed in the scene merging as the event manager are deleted just after the merge of the scene.
Configuration menu - View commit details
-
Copy full SHA for 0414529 - Browse repository at this point
Copy the full SHA 0414529View commit details -
UPBGE: Use ARB OpenGL for functions higher than 3.0.
Functions like glVertexAttribDivisor and glDraw[Arrays/Elements]Instanced are requiering OpenGL 3.0/3, but some GPU could not offer it and so they must use the ARB extension instead.
Configuration menu - View commit details
-
Copy full SHA for ae062f8 - Browse repository at this point
Copy the full SHA ae062f8View commit details -
UPBGE: Reset mouse look actuator position on negative event.
Previously when the mouse actuator was deactivated then activated the mouse gap from the mouse position on the last activation was taken causing a high movement. This behaviour is unconsistent with the first activation of the mouse actuator which ignore the last mouse position (set to -1) and then just init the mouse position for the next frame. This commit mimic this behaviour when the actuator is deactived by setting the previous mouse position to -1. Fix issue: #663.
Configuration menu - View commit details
-
Copy full SHA for c36bc67 - Browse repository at this point
Copy the full SHA c36bc67View commit details
Commits on May 19, 2018
-
UPBGE: Rework the way of load the game controller database
This way we can update gamecontrollerdb.txt file easier than before (only it is necessary overwrite the file)
4Configuration menu - View commit details
-
Copy full SHA for 03e07a5 - Browse repository at this point
Copy the full SHA 03e07a5View commit details -
2
Configuration menu - View commit details
-
Copy full SHA for 2aafdc1 - Browse repository at this point
Copy the full SHA 2aafdc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f18f47e - Browse repository at this point
Copy the full SHA f18f47eView commit details
Commits on May 21, 2018
-
2
Configuration menu - View commit details
-
Copy full SHA for f18255b - Browse repository at this point
Copy the full SHA f18255bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 143dcb3 - Browse repository at this point
Copy the full SHA 143dcb3View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd44f38 - Browse repository at this point
Copy the full SHA fd44f38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 230eae6 - Browse repository at this point
Copy the full SHA 230eae6View commit details -
4
Configuration menu - View commit details
-
Copy full SHA for c960fe0 - Browse repository at this point
Copy the full SHA c960fe0View commit details
Commits on May 22, 2018
-
UPBGE: Compile fixes for last clean up.
@panzergame : Please, give a look to check if my fixes are ok.
1Configuration menu - View commit details
-
Copy full SHA for b9468df - Browse repository at this point
Copy the full SHA b9468dfView commit details -
UPBGE: Start step to remove Blender logo and trademarks
As is indicated in the Blender web (https://www.blender.org/about/ logo/), the logo and the brand name “Blender” are not part of the GNU GPL, and can only be used commercially by the Blender Foundation on products, websites, and publications. Due to this, we would have to move Blender logo and trademark to UPBGE ones before next release, pointing out in a clear way that this is fork of Blender-BGE to avoid any future issues.
2Configuration menu - View commit details
-
Copy full SHA for 1e5c590 - Browse repository at this point
Copy the full SHA 1e5c590View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9181356 - Browse repository at this point
Copy the full SHA 9181356View commit details
Commits on May 24, 2018
-
UPBGE: Add the option to disable component execution on game start
The new option is at user preferences under system tab. The component execution is disable by default (similar to scripts).
Configuration menu - View commit details
-
Copy full SHA for a98a2bd - Browse repository at this point
Copy the full SHA a98a2bdView commit details
Commits on May 25, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 92cefc1 - Browse repository at this point
Copy the full SHA 92cefc1View commit details
Commits on May 26, 2018
-
UPBGE: Remove SG word in SG_Node function.
It is not necessary to repeat that a function is from a scene graph class when we call it from a scene graph class.
Configuration menu - View commit details
-
Copy full SHA for 06e8f2a - Browse repository at this point
Copy the full SHA 06e8f2aView commit details -
UPBGE: Simplify SG_Controller interaction with SG_Node.
Previously the SG_Controller were helding a pointer to the node owning them, but this pointer was used only in Update function called by the node. So the member is removed and the function Update receive the node pointer instead. Also BL_Action use an helper function AddController to add a valid controller, controllers without any interpolators (Empty()) are ignored.
Configuration menu - View commit details
-
Copy full SHA for 96567f2 - Browse repository at this point
Copy the full SHA 96567f2View commit details
Commits on May 27, 2018
-
UPBGE: Rework component auto-exec disable
Now it uses the same DEFINE as the python script auto-exec disable. As blend component executation on loading as component registration or component reloading are disable by default. Warning notifications were added to top-bar and console.
Configuration menu - View commit details
-
Copy full SHA for b0e3a39 - Browse repository at this point
Copy the full SHA b0e3a39View commit details -
Configuration menu - View commit details
-
Copy full SHA for c80501f - Browse repository at this point
Copy the full SHA c80501fView commit details -
Merge pull request #694 from UPBGE/experimental-component-security
UPBGE: Add the option to disable component execution on game start
Configuration menu - View commit details
-
Copy full SHA for a8f9cf3 - Browse repository at this point
Copy the full SHA a8f9cf3View commit details -
UPBGE: Re-enable 8th UV and color layer in ConstructArray.
Somehow the case in RAS_IDisplayArray::ConstructArray was ignoring the vertex formats with an 8th UV or color layer. Intent to fix issue #699.
Configuration menu - View commit details
-
Copy full SHA for 351f778 - Browse repository at this point
Copy the full SHA 351f778View commit details
Commits on May 30, 2018
-
UPBGE: Pointing blender-addons out to our own blender-addons repository
This way we can modify current game engine addons and to add a new ones
Configuration menu - View commit details
-
Copy full SHA for 7188624 - Browse repository at this point
Copy the full SHA 7188624View commit details -
UPBGE: Use template function for PyObjectFrom.
PyObjectFrom is now a template function to adapt on different vector size and matrix sizes. Support of vecX_mapped is addded.
Configuration menu - View commit details
-
Copy full SHA for 8b68754 - Browse repository at this point
Copy the full SHA 8b68754View commit details
Commits on May 31, 2018
-
UPBGE: Fix ray cast with xray and property filtering.
A check of prop.size() == 0 was rewritten in prop.size() instead of prop.empty(). In the same time the function CheckRayCastObject is implemented to factorise the proprety and mask check made in RayHit and NeedRayCast. CheckRayCastObject also add a little optimization by not getting the object collision group when the mask accept all objects. Fix issue #671.
Configuration menu - View commit details
-
Copy full SHA for 2c93233 - Browse repository at this point
Copy the full SHA 2c93233View commit details -
UPBGE: Add component scritp generation.
To ease the definition of a component a button named "Create Component" is added. This button ask for a path module.Class and generates a script named module.py with a component class Class inside. This template class contains a start and update function commented and a definition block before the class for global game engine variable. If the file already exists an error is raised. The previous button named Add Component is now renamed Register Component.
Configuration menu - View commit details
-
Copy full SHA for fba7bd3 - Browse repository at this point
Copy the full SHA fba7bd3View commit details
Commits on Jun 1, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 4b6dca0 - Browse repository at this point
Copy the full SHA 4b6dca0View commit details -
UPBGE: Fix early bail for object activity culling.
X & 0 means nothing contrary to X == 0.
Configuration menu - View commit details
-
Copy full SHA for 69d9d10 - Browse repository at this point
Copy the full SHA 69d9d10View commit details
Commits on Jun 3, 2018
-
UPBGE: Use member function in EXP_ListWrapper.
EXP_ListWrapper is now a template class based upon EXP_BaseListWraper. The template parameter are the Object and its memeber functions to call. These memeber fuctions are encapsulated in static function defined in EXP_ListWrapper.
Configuration menu - View commit details
-
Copy full SHA for 99455b2 - Browse repository at this point
Copy the full SHA 99455b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 096e566 - Browse repository at this point
Copy the full SHA 096e566View commit details -
UPBGE: Simplificate PHY_GetActiveEnvironment().
This function is placed in KX_Globals.h under the name KX_GetPhysicsEnvironment and directly call for KX_Scene::GetPhysicsEnvironment().
Configuration menu - View commit details
-
Copy full SHA for 9bbdb6b - Browse repository at this point
Copy the full SHA 9bbdb6bView commit details -
UPBGE: Fix component auto script in blenderplayer.
From blenderplayer the user pref flags are not copied to Global. To do so we mimic wm_init_userdef by checking and copying USER_SCRIPT_AUTOEXEC_DISABLE flag.
Configuration menu - View commit details
-
Copy full SHA for 33c6583 - Browse repository at this point
Copy the full SHA 33c6583View commit details
Commits on Jun 4, 2018
-
UPBGE: Fix weak reference creation in EXP_BaseListWrapper.
In the same time any call to GetProxy implictly incref the proxy, so if we don't return it as for attributes or methods we must decref the proxy after.
Configuration menu - View commit details
-
Copy full SHA for 0b4da63 - Browse repository at this point
Copy the full SHA 0b4da63View commit details
Commits on Jun 13, 2018
-
UPBGE: Fix deletion of mathutils types in blenderplayer python.
The blenderplayer was not calling explicit initialization of mathutils and other modules and let the user calls the initialization when importing them. But some of the types defined on these modules can be returned by a python function without requering to import the module, for example KX_GameObject.worldPosition return a mathutils.Vector and some scripts don't import mathutils. To solve this issue the initialization of the modules are explicitly called into initPlayerPython by looping over bge_internal_modules and calling PyImport_ImportModuleLevel. It fix a major issue in blenderplayer scripts.
Configuration menu - View commit details
-
Copy full SHA for 646ae9d - Browse repository at this point
Copy the full SHA 646ae9dView commit details
Commits on Jun 14, 2018
-
UPBGE: Move camera zoom setting in BL_Converter and RAS_CameraData.
The camera zoom setting was previously only stored into the ketsji engine, to avoid storing a setting only for override camera, this zoom is stored in RAS_CameraData. Then the override camera zoom is initialized easily from LA_BlenderPlayer and for other camera, the zoom is copied from BL_Converter global zoom variable (m_camZoom) initialized at the converter construction from the launcher.
Configuration menu - View commit details
-
Copy full SHA for 3257be1 - Browse repository at this point
Copy the full SHA 3257be1View commit details
Commits on Jun 15, 2018
-
UPBGE: Improve frustum culling performance. (#701)
* UPBGE: Improve frustum culling performance. Frustum culling was improved in two ways. First, simplificate the bounding box update. Second the test are parallelized using TBB range loop. The bounding box update is simplified by adding the call to RAS_Deformer::UpdateBuckets in KX_GameObject::UpdateBounds after we checked that the objects as a bounding box. By doing this we avoid a call to GetDeformer for all objects without a bounding box, with an unmodified bounding box or without auto update. All the computation of culling objects is moved into KX_CullingHandler, this class construct it's own objects list and returns it in Process function. Process function build a CullTask and launch it usign tbb::parallal_reduce. Each CullTask have an operator() to test a range of object, any objects passing the culling test is added in a task local objects list. Once the tests finished the CullTask merge these objects list in function join to end up with the list of all non-culled objects. This technique of reduce of list is way better than using a shared object list for all tasks and lock a mutex before adding an object. The method with mutex was always slower than without parallelization. This patch was tested with cube meshes : number of object | previous time | new time 1000 | 0.06 | 0.07 8000 | 1.04 | 0.55 27000 | 3.81 | 1.90 125000 | 16.16 | 8.31
Configuration menu - View commit details
-
Copy full SHA for 20e9ff0 - Browse repository at this point
Copy the full SHA 20e9ff0View commit details
Commits on Jun 17, 2018
-
UPBGE: Don't directly allocate on heap RAS_MeshSlot.
RAS_MeshSlot are owned by RAS_MeshUser, there's no need to allocate them on heap to after hold their pointers in a list, just allocate in the list directly. Tested with sintel desert level.
Configuration menu - View commit details
-
Copy full SHA for 822bd35 - Browse repository at this point
Copy the full SHA 822bd35View commit details -
UPBGE: Use debug draw directly in KX_Scene and KX_KetsjiEngine.
Previously the debug draw (RAS_DebugDraw) was get from the rasterizer with a scene as identifier, but the scene could simply store an instance of RAS_DebugDraw and avoid lookup in rasterizer. In the same time the ketsji engine request a debug draw only for profiling render.
Configuration menu - View commit details
-
Copy full SHA for e613636 - Browse repository at this point
Copy the full SHA e613636View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cc0ea0 - Browse repository at this point
Copy the full SHA 6cc0ea0View commit details
Commits on Jun 22, 2018
-
UPBGE: Use SoA for vertices in RAS_DisplayArray. (#715)
The principle of AoS (array of structure) is to store an element structure in a array e.g: struct Vertex { mt::vec3_packed pos; mt::vec3_packed nor; }; std::vector<Vertex> vertices; This kind of structure is very easy to use and totally tolerated for big structure or small amount of elements, also a reference or a pointer to a Vertex can be passed to any functions. Unfortunatly the memory cache usage is most of the time not efficient. Imagining a function modifying only the position of vertices, at each iteration the Vertex struct will be loaded in cache and only the member pos will be used, so 12 bytes on 24, the left 12 bytes will pollute the cache and cause more cache loads. If our function is modifying all the member of Vertex the cache isn't an issue. The opposite way SoA (structure of array) stores in a structure an array for each member, e.g: struct Vertices { std::vector<mt::vec3_packed> pos; std::vector<mt::vec3_packed> nor; }; With this method passing a vertex to an other function is quite complicated as it ends up passing the Vertices instance and the vertex index to sample pos and nor. But on the cache side, if we back to our function modifying the positions, this function will load cache pages of only position and not waste memory at loading other unused data. Also for the case of modifying positions and normals, the both array will be stored in different cache pages without performance decrease compared to AoS. For CPU using SoA is generally an improvement, for GPU too, excepted for old GPU which might prefer interleaved data but nothing really confirms it. Previously in UPBGE and BGE, the vertices were stored in AoS idiom, UPBGE make more complex the vertices by adding different vertex struct for each combination of UV and color layer. All was accessed through an interface RAS_Vertex which hold a pointer to a RAS_IVertexData, the base class of any vertex data of any format. In the same time RAS_IDisplayArray was an interface to RAS_DisplayArray<VertexData>. By using SoA, RAS_DisplayArray owns a VertexData struct with a list for all vertex members (position, normal, tangent, 8 uv and 8 color), depending on the format some UV and color array are left empty. In the same time function for getting and setting all the member data are added, these function takes a vertex index, UV/color index for uv and color, and for setter a value too. By this way BL_SkinDeformer update the position just by calling RAS_DisplayArray::SetPosition(i, pos) instead of getting the RAS_Vertex via RAS_DisplayArray::GetVertex(i) and calling RAS_Vertex::SetXYZ. With these modifications RAS_DisplayArray<>, RAS_VertexData<> are removed and RAS_BatchDisplayArray doesn't need anymore virtual inheritance. On the conversion side, without RAS_VertexData the structure BL_SharedVertexPredicate used to find similar vertices is now copying the normal, tangent, uv and color data inside. Once a vertex is unique, it is added to the display array through RAS_DisplayArray::AddVertex(pos, nor, tan, uvs, colors, origIndex, flag) which append the vertex data to m_vertexData and construct the vertex info. VBO don't try to re-interleave the data as the time cost is too expensive, instead each member are sent to the VBO one by one, this is proceeded in RAS_StorageVbo::CopyVertexData. An other advantage of SoA is allowing to update only one kind of data, if the positions are modified these data are just copied to the beginning of the VBO without touching of the other data. This technique is used in RAS_StorageVbo::CopyVertexData by checking a modification flag. OpenGL attributes (VAO) are changed too because of the new VBO layout. The RAS_VertexDataMemoryFormat is replaced by RAS_DisplayArrayLayout which is not constant after the display array creation as modifying the size of the array change the offset of each data type in the VBO. In consideration RAS_DisplayArray::GetLayout return a new RAS_DisplayArrayLayout with the proper offsets. To recreate the attributes, RAS_AttributeArray::Clear is called when detecting a size update in RAS_DisplayArrayBucket::UpdateActiveMeshSlots. To summarize the advantages of using SoA are the cache friendly load, the possibility to update only modified data in VBO and the simplification of storing multiple vertex formats. But the inconveniences could be some old GPU limitation and the recreation of the VAO at each display array size update in modifier deformers. This patch was tested with 3 files : The first file is 1600 cubes of 384 faces deformed by an armature. If the cube have only the default UV and color layer : Previous Current Animation 9.6 6.3 Rasterizer 17.5 10.8 With 8 UV and color layers : Previous Current Animation 17.5 6.7 Rasterizer 42.7 11.9 The second and third files are about modification of vertex position from python or rendering a mesh with a huge amount of vertices, both files didn't show a time difference.
Configuration menu - View commit details
-
Copy full SHA for b6123cc - Browse repository at this point
Copy the full SHA b6123ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed78298 - Browse repository at this point
Copy the full SHA ed78298View commit details -
UPBGE: Simplify RAS_Rasterizer::SetViewMatrix.
Previously SetViewMatrix requested view matrix, position and scale. Position is useless at it could be found in the inverse view matrix which is computed anyway. Scale is not needed for users of this function not using any scale for example shadow and texture renderers. In consideration the user could call : SetViewMatrix(viewmat) SetViewMatrix(viewmat, scale) The second function test if the scale is negative and negate the rows of the view matrix.
Configuration menu - View commit details
-
Copy full SHA for 11be475 - Browse repository at this point
Copy the full SHA 11be475View commit details -
UPBGE: Move RAS_Deformer in RAS_MeshUser. (#717)
Previously the deformers were owned in BL_DeformableGameObject. But this place was not optimal for two reasons : first by design deformers are directly linked to the display array of the obejct mesh slots, RAS_MeshUser is the nearest level to the mesh slots of the object. Second a futur patch will allow fast mesh replace by switching of mesh user, to do so the mesh user must include its deformer to avoid recreating the current deformer for the current mesh user. By moving the the deformer in RAS_MeshUser, only a last frame variable stays in BL_DeformabelGameObject, this variable is then moved into BL_MeshDeformer and BL_DeformableGameObject is removed. Because this class is removed the function LoadDeformer is changed in BL_ConvertDeformer which returns a deformer for the given mesh and object, could be null. This last function is called in AddMeshUser and makes obsolete the replication of deformers as it is called after any object creation. The only drawback of avoid replication is to let all modifier deformers using unique derived mesh, this impact only non-dynamic derived mesh. Tested with sintel desert_level.
Configuration menu - View commit details
-
Copy full SHA for d2e0374 - Browse repository at this point
Copy the full SHA d2e0374View commit details
Commits on Jun 27, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 9b34b86 - Browse repository at this point
Copy the full SHA 9b34b86View commit details
Commits on Jun 28, 2018
-
Configuration menu - View commit details
-
Copy full SHA for abbd135 - Browse repository at this point
Copy the full SHA abbd135View commit details
Commits on Jun 29, 2018
-
Configuration menu - View commit details
-
Copy full SHA for aef8773 - Browse repository at this point
Copy the full SHA aef8773View commit details -
The function AddInstanceObjects and SetDupliGroupObject must be called for every objects replicated by the group.
Configuration menu - View commit details
-
Copy full SHA for af34951 - Browse repository at this point
Copy the full SHA af34951View commit details
Commits on Jun 30, 2018
-
UPBGE: Avoid passing mat4 by value for windows compiler. (#722)
Windows compiler doesn't support align specifier for function parameters, then use a reference and copy in the function body.
Configuration menu - View commit details
-
Copy full SHA for c157a52 - Browse repository at this point
Copy the full SHA c157a52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 06e4dd9 - Browse repository at this point
Copy the full SHA 06e4dd9View commit details
Commits on Jul 1, 2018
-
UPBGE: Fix UV and color update for deformer display array.
RAS_DisplayArray::UpdateFrom should notify itself that some channels are modified.
Configuration menu - View commit details
-
Copy full SHA for f17538d - Browse repository at this point
Copy the full SHA f17538dView commit details
Commits on Jul 2, 2018
-
UPBGE: Fix object auto bounds update.
The clearing of the bounding box modified flag must happen after the function UpdateBounds is called indirectly in the culling pass.
Configuration menu - View commit details
-
Copy full SHA for ba30dbb - Browse repository at this point
Copy the full SHA ba30dbbView commit details
Commits on Jul 4, 2018
-
UPBGE: Fix FuzzyZero for very small vectors. (#664)
Previously FuzzyZero for vectors was comparing the squared length of the vector, but as it is a squared length the value are even more low for small values. To solve this issue the function should compare the length directly but this is too expensive. Instead the sum of all the absolute vector components and comparing the sum to float epsilon.
Configuration menu - View commit details
-
Copy full SHA for aac6b53 - Browse repository at this point
Copy the full SHA aac6b53View commit details -
UPBGE: Move SG_Controller entirely in BL_Action. (#708)
Previously SG_Controller were owned and updated by SG_Node. This class is not the best place for it as SG_Controller are not always modifying spatial, for example Light or Camera controllers. The best place is in BL_Action as this class was setting the simulation time and updating the controllers indirectly. In the same time the option "child" in action actuator which enabled recursive time update for controllers is removed. Indeed every call to SetSimulatedTime was followed by Update for the controllers in BL_Action.
Configuration menu - View commit details
-
Copy full SHA for 8df1a72 - Browse repository at this point
Copy the full SHA 8df1a72View commit details
Commits on Jul 5, 2018
-
UPBGE: Avoid updating polygon offset if the previous state is same.
A state struct is introduced in RAS_Rasterizer and checked for functions SetPolygonOffset and SetFrontFace to reduce the OpenGL calls.
Configuration menu - View commit details
-
Copy full SHA for 462e36b - Browse repository at this point
Copy the full SHA 462e36bView commit details
Commits on Jul 7, 2018
-
UPBGE: Replace LA_System by a simple clock.
The only goal of this class was to provide the timing but STD clock do the same without carring about the platform. m_system in KX_KetsjiEngine is replaced by m_clock an instance of CM_Clock which exposes two functions one for second time and an other for nanosecond time. In the same time KX_TimeCategoryLogger is constructed with a reference to the engine clock to avoid passing the time for each log start / end function.
Configuration menu - View commit details
-
Copy full SHA for 3ed74ca - Browse repository at this point
Copy the full SHA 3ed74caView commit details -
UPBGE: Use bullet 3 and support multithreading physics. (#721)
The bullet library used by blender and game engine is update to the latest bullet 3 version. Only minor modification were requeired for the switch. This bullet version allow multi threading for rigid body collision and constraints, the main world for this prupose is btDiscretDynamicsWorldMt. Unfortunatly this class doesn't manage soft bodies and to fill this gap btSoftRigidDynamicsWorldMt which is a copy of btSoftRigidDynamics on top of btDiscretDynamicsWorldMt. Once these modification the world is initialised with a special dispatcher and a constraint solver pool for multi threading. The solver pool own as many regular solver by threads available. A compatiblity issue is introduced in KX_CharacterWrapper, bullet now supports vector for the gravity instead of simple float, then a vector is exposed into the API. Tests: 2700 spheres on two planes : Previous Current Begining 100ms 70ms Stable 21ms 7.5ms 16000 point constraints on 10 cube chains. Previous Current 141ms 75ms
3Configuration menu - View commit details
-
Copy full SHA for 96148a6 - Browse repository at this point
Copy the full SHA 96148a6View commit details
Commits on Jul 8, 2018
-
UPBGE: Add debugbreak library.
This library is useful in debugging to stop the debuger without raising a kill signal. This library try to as much as possible raise a trap signal. Its usage is simple: // First import the library, visible from alsmot anywhere. // Call a break debug_break();
Configuration menu - View commit details
-
Copy full SHA for fb9d84f - Browse repository at this point
Copy the full SHA fb9d84fView commit details
Commits on Jul 16, 2018
-
Configuration menu - View commit details
-
Copy full SHA for f37a3f0 - Browse repository at this point
Copy the full SHA f37a3f0View commit details
Commits on Jul 17, 2018
-
UPBGE: Fix for bug #746 Navmesh related (#752)
Previously when the navmesh was removed from the object this one kept the OB_NAVMESH flag set and the engine tried without success to process it as a navmesh. Now OB_NAVMESH flag is removed. Additionally, Name for button "Navmesh Clear Data" is modified to "Remove Navmesh" to avoid possible misunderstandings.
Configuration menu - View commit details
-
Copy full SHA for 8c94a3f - Browse repository at this point
Copy the full SHA 8c94a3fView commit details
Commits on Jul 20, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 7a791c9 - Browse repository at this point
Copy the full SHA 7a791c9View commit details
Commits on Jul 21, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 1851639 - Browse repository at this point
Copy the full SHA 1851639View commit details
Commits on Jul 22, 2018
-
UPBGE: Add
scene.onRemove
callback listThe callback list is executed when the scene is removed. ```py def example(controller): scene = controller.owner.scene @scene.onRemove.append def callback(scene): print('removing scene "%s"' % scene.name) ```
2Configuration menu - View commit details
-
Copy full SHA for f62dca6 - Browse repository at this point
Copy the full SHA f62dca6View commit details
Commits on Jul 24, 2018
-
UPBGE: Change default directories (#758)
Changed `GHOST_SystemPaths::getSystemDir` and `GHOST_SystemPaths::getUserDir` implementations to use UPBGE specific folders. commit by @marechal-p Fix #755.
Configuration menu - View commit details
-
Copy full SHA for 155b83a - Browse repository at this point
Copy the full SHA 155b83aView commit details
Commits on Jul 25, 2018
-
UPBGE: Avoid calling glGetUniformLocation while setting a uniform thr…
…ough BL_Shader. (#733) All the setUniform functions in BL_Shader are using name to identify the uniform, these functions call RAS_Shader::GetUniformLocation. This last function was naively calling indirectly glGetUniformLocation, but even simple OpenGL calls cost more than caching. Fortunatly OpenGL allows to enumerate all active uniforms thanks to glGetActiveUniform, this function is used in GPUShader side inside function GPU_shader_get_uniform_infos constructing a list of GPUUniformInfo storing the uniform location, size, type and name. These uniform info are used in RAS_Shader::ExtractUniformInfos which insert the info in a map associating to the name the location, size and type> This map is then used into GetUniformLocation. Tested with a 4 uniforms shader and 1000 updates : Previous : 3.26ms Current : 2.88ms
Configuration menu - View commit details
-
Copy full SHA for 18e5a96 - Browse repository at this point
Copy the full SHA 18e5a96View commit details -
UPBGE: Additional fixes to can compile under MacOS X (#761)
Additional fixes to can compile under MacOS X related to TBB library detection and use abs instead of std::abs (not working right in Mac) for all OS
Configuration menu - View commit details
-
Copy full SHA for a18c4ac - Browse repository at this point
Copy the full SHA a18c4acView commit details
Commits on Jul 28, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 8f3ae99 - Browse repository at this point
Copy the full SHA 8f3ae99View commit details -
Configuration menu - View commit details
-
Copy full SHA for f72f4c0 - Browse repository at this point
Copy the full SHA f72f4c0View commit details
Commits on Jul 30, 2018
-
UPBGE: Implement BVH generation from KX_Mesh. (#736)
The python function KX_Mesh.constructBvh now returns a new BVH Tree based on the mesh geometry where every indices elements of the tree correspond to the polygons indices.
8Configuration menu - View commit details
-
Copy full SHA for 59d33db - Browse repository at this point
Copy the full SHA 59d33dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 727c1fb - Browse repository at this point
Copy the full SHA 727c1fbView commit details
Commits on Jul 31, 2018
-
12
Configuration menu - View commit details
-
Copy full SHA for ce3a765 - Browse repository at this point
Copy the full SHA ce3a765View commit details
Commits on Aug 2, 2018
-
UPBGE: Implement dynamic object ligthing layer. (#734)
Previously the ligthing of the objects based on a layer was fixed at the conversion time by the construction of BL_BlenderShader with the member m_lightLayer. Also because of the blender material managment the object layer was used only when binding the material and not when binding object dependent uniforms. The situation is changed firstly because the usage of one layer for all the object using the same material is totally wrong. Secondly the layers were not dynamic per object. To solve this situation the fastest way is to expose a layer into the shader, the function lamp_visible is designed for. It receives the lamp layer, object layer, lamp color and lamp energy and updates out color and energy if the lamp layer mask the object layer, to avoid branching the test computes a value of 0 or 1 and multiply the color and energy by it. The object layer is defined as a material builtin uniform and each GPULamp holds a dynlayer used as a dynamic uniform. At each call to GPU_material_bind_uniforms the object layer is updated. Concerning the lamps the dynlayer value is updated in a preparing stage before rendering any material, this stage intents to update the textures and the lamps. The main caller is RAS_BucketManager::PrepareBuckets calling for each material the Prepare function redirected to BL_BlenderShader::UpdateLights. This last function is calling GPU_material_update_lamps which over all lamps update the "dyn" value for color and matrices. Inside GPU_material_bind the lamp layer is computed. As it is not the only way to decide of the visibility of a lamp, if the lamp is hidden or the layer is set to 0, else if the lamp is not using a "layer only" option then all layers are enabled, else if the layer is not in the scene layer the layer is set to 0 else to the actual lamp object layer. As GPU_material_bind_uniforms now use the object layer, RAS_MeshUser store the layer of the object to allow BL_BlenderShader to get this value and send it to the GPU_ function. In the same time the calls to SetFrontFace are reduced to only updating when the object node transform changed. No performance win neither loss were noticed.
Configuration menu - View commit details
-
Copy full SHA for c024480 - Browse repository at this point
Copy the full SHA c024480View commit details
Commits on Aug 5, 2018
-
UPBGE: Use mathfu types in KX_MouseActuator.
The usage of float array is replaced by mt::vec2 to have a better support of assignement and math operation, also the python attributes are modified to support mt::vec2.
Configuration menu - View commit details
-
Copy full SHA for 8a844d9 - Browse repository at this point
Copy the full SHA 8a844d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 11e3f98 - Browse repository at this point
Copy the full SHA 11e3f98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44186f7 - Browse repository at this point
Copy the full SHA 44186f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 432ec8f - Browse repository at this point
Copy the full SHA 432ec8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 179edd8 - Browse repository at this point
Copy the full SHA 179edd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e658ce - Browse repository at this point
Copy the full SHA 1e658ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e11751 - Browse repository at this point
Copy the full SHA 3e11751View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f0e7b8 - Browse repository at this point
Copy the full SHA 3f0e7b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32a6eaa - Browse repository at this point
Copy the full SHA 32a6eaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b53c8bf - Browse repository at this point
Copy the full SHA b53c8bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 99feb54 - Browse repository at this point
Copy the full SHA 99feb54View commit details
Commits on Aug 7, 2018
-
UPBGE: Implement new Lamp Falloff (#768)
* UPBGE: Implement new Lamp Falloff - Inverse Square Cutoff for Lamps. Describes here: https://imdoingitwrong.wordpress.com/2011/01/31/light-attenuation/ Original code by @DCubix. Slightly modified by me to add light preview. New Radius & CutOff parameters exposed in UI when you select "Inverse Square CutOff" falloff type in point and spot lamps For feature request #728
Configuration menu - View commit details
-
Copy full SHA for b87fe29 - Browse repository at this point
Copy the full SHA b87fe29View commit details
Commits on Aug 8, 2018
-
UPBGE: Fix merging of bucket manager and text material.
All texts are using a unique material per scene and so a unique material bucket and display array bucket. They both are owned by the bucket manager (RAS_BucketManager). In case of libload all the material buckets of the loaded scene are moved into the destination scene bucket manager. In case of text material the material bucket of the loaded was moved but also destructed when the loaded was freed at the end of the libload, this created an illegal memory access. To solve this issue, the only proper way found is to discard the material bucket dedicated to text when mergin the bucket manager and when merging the objects, for font objects force the recreation of the text user (RAS_TextUser) to be sure that this one is linked to the display array bucket for texts of the destination scene. Tested with valgrind.
Configuration menu - View commit details
-
Copy full SHA for bea452b - Browse repository at this point
Copy the full SHA bea452bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 70f563e - Browse repository at this point
Copy the full SHA 70f563eView commit details
Commits on Aug 10, 2018
-
UPBGE: Use mt::mat4 for RAS_MeshUser::m_matrix.
Previously it was a float array but some code is converting it back to mt::mat4. As mt::mat4 has a direct array acces the cost is the same as a float array.
Configuration menu - View commit details
-
Copy full SHA for ca264cb - Browse repository at this point
Copy the full SHA ca264cbView commit details -
UPBGE: Fix compilation with MSVC2015
Workaround for weird MSVC2015 compiler
Configuration menu - View commit details
-
Copy full SHA for be57887 - Browse repository at this point
Copy the full SHA be57887View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9955dcd - Browse repository at this point
Copy the full SHA 9955dcdView commit details -
UPBGE: Fix mathutils callbacks registration.
The assertion in Mathutils_RegisterCallback was raised when all the callbacks were registered (freestyle and bmesh too). But this assertion introduced in 1b74ec9 is wrong. The test i + 1 < MAX suppose that the last callback is a null sentinel. But this is not the case as no one is using this to stop a loop and the loop in Mathutils_RegisterCallback must stop when it find a null slot or that the slot is already containing the callback, otherwise it's an error. It's impossible to stop the loop with all regular slots registered and and different from the one intenting to register. Fix a part of issue #785.
Configuration menu - View commit details
-
Copy full SHA for f30d10d - Browse repository at this point
Copy the full SHA f30d10dView commit details -
gl_Color is set as the vertex color of the first color layer, this was broken by the addressu sage of RAS_DisplayArrayLayout::colors instead of RAS_DisplayArrayLayout::colors[0]. Fix issue #784.
Configuration menu - View commit details
-
Copy full SHA for 26c128f - Browse repository at this point
Copy the full SHA 26c128fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b461aeb - Browse repository at this point
Copy the full SHA b461aebView commit details -
UPBGE: Remove regrettable tracked modification.
These's modifications were pulled for unknown reason, sorry…
Configuration menu - View commit details
-
Copy full SHA for 1dc0fc1 - Browse repository at this point
Copy the full SHA 1dc0fc1View commit details
Commits on Aug 12, 2018
-
UPBGE: Refactor exit code managment.
In the interest of futur way to start a game from a memory file, the exit information should not track only the file name but also more data. To do so the exit informations are standardized into the struct KX_ExitInfo which holds the exit code and the file name for the moment. This struct is stored into the ketsji engine and returned by KX_KetsjiEngine::GetExitInfo. Inside LA_Launcher::EngineNextFrame an exit code can be generated (only for window exit or exit key) and the exit info is returned. This same exit info is checked in LA_Launcher::EngineMainLoop when it contains a exit code different from NO_REQUESTS this function returns and so abort the launcher. Finally the creator of the launcher is using this exit info in case or restart or start to get the file name. In the same time the restoration of cursor visibility is moved into GPG_ghost and BL_KetsjiEmbedStart instead of the launcher.
Configuration menu - View commit details
-
Copy full SHA for 2413cd4 - Browse repository at this point
Copy the full SHA 2413cd4View commit details
Commits on Aug 16, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 2fdcf10 - Browse repository at this point
Copy the full SHA 2fdcf10View commit details -
UPBGE: Avoid redundant state call to GL_CULL_FACE.
The function SetCullFace now use a state from RAS_Rasterizer to skip unecessary opengl calls. Also the rendering of plane to screen is now using the function SetFrontFace instead disabling and renabling the face culling.
Configuration menu - View commit details
-
Copy full SHA for 9fb0a3b - Browse repository at this point
Copy the full SHA 9fb0a3bView commit details -
UPBGE: Simplify texture blurring.
The shader used to blur a texture was using ftransform for gl_Position and so it needed the modelview/prjection matrix to be set. This can be avoided by using gl_Vertex directly.
Configuration menu - View commit details
-
Copy full SHA for f1e625c - Browse repository at this point
Copy the full SHA f1e625cView commit details
Commits on Aug 19, 2018
-
The python main loop is using PythonMainLoopState struct to get the launcher and set the exit info, but the launcher wasn't set.
Configuration menu - View commit details
-
Copy full SHA for 4a5055c - Browse repository at this point
Copy the full SHA 4a5055cView commit details -
UPBGE: Fix parallel creation of KX_Scene.
Previously KX_Scene was parallelly created when libloading in asynchronous mode. But the constructor of KX_Scene is not adapted contrary to the conversion of the scene data. The first issue was related to the debug drawer that was initializing VBOs and VAOs, which is totally forbidden in a thread without OpenGL context. The second issue is the creation of the task pool using the engine task scheduler. To prevent any futur issues and as the constructor of the scene is cheap, its construction is moved in BL_Converter::LinkBlendFile when preparing the libload status. All the scenes are created via KX_KetsjiEngine::CreateScene and put in a list in KX_LibLoadStatus, this same list is read back in async_convert to call the conversion. Even if the debug draw (RAS_DebugDraw) construction is safe, its implementation RAS_OpenGLDebugDraw is not needed per scene as for each update all the VBOs are updated. To avoid duplicating simple VBO (e.g cube vertices and indices) per scene, only one implementation is stored in the rasterizer and the function FlushDebug permit to update the implementation VBO with the debug draw to render.
Configuration menu - View commit details
-
Copy full SHA for 1acbbf7 - Browse repository at this point
Copy the full SHA 1acbbf7View commit details -
UPBGE: Fix mesh user useless recreation.
Previously both function AddReplicaObject and AddNodeReplicaObject (or DupliGroupRecurse and AddNodeReplicaObject) were calling AddMeshUser on the same objects. This led to a recreation of the RAS_MeshUser without freeing the previous one and also two bounding box were registered for the same object and the first was never freed.
Configuration menu - View commit details
-
Copy full SHA for a7c5a5f - Browse repository at this point
Copy the full SHA a7c5a5fView commit details -
UPBGE: Handle non-threadable libloading data.
As python is badly managing threading, it is better to delay any python call to the main thread. This situation happen in case of libload is python components are registered. The component conversion is moved into the function BL_PostConvertBlenderObjects which can later manage more than just the components. This function is called by BL_Converter::PostConvertScene based on a scene converter. Because the post conversion needs to iterate over all the objects, the scene converter expose a list of all the objects registered (active and inactive). The introduction of this new function helped to clarify the process of scene or data conversion. For a simple scene conversion without merge: - scene creation - conversion (BL_Converter::ConvertScene) - post conversion (BL_Converter::PostConvertScene) - finalizing data (BL_Converter::FinalizeSceneData) This procedure can be find in KX_KetsjiEngine::ConvertScene, FinalizeSceneData does less work than before as it is calling KX_BlenderMaterial::InitShader to create the shaders and so assume that all the data are using the correct scene. In consideration during a merge of scene an extra step is required to set the destination scene in the mesh and material. This is an effect of the BL_Converter::MergeSceneData which also merge to the destination SceneSlot the scene converter of the scene to merge. To summarize, in case of libload, the procedure is: - scene creation (optional) - conversion - post conversion (optional) - merging data (BL_Converter::MergeSceneData) - merging scene (KX_Scene::MergeScene) (optional) - finalizing data FinalizeSceneData is still called after the merging of the scene because the material shaders are depending of the scene state and especially the lamps contained by the scene used to generate the shader.
Configuration menu - View commit details
-
Copy full SHA for 8765a15 - Browse repository at this point
Copy the full SHA 8765a15View commit details
Commits on Aug 21, 2018
-
UPBGE: Disable Cycles OpenCL for MacOSX
This way we avoid crashes. It is a temporary solution.
Configuration menu - View commit details
-
Copy full SHA for 8192377 - Browse repository at this point
Copy the full SHA 8192377View commit details
Commits on Aug 22, 2018
-
UPBGE: Rename RAS_IPoly[gon]Material to RAS_IMaterial.
There's no reasons to precise material to be for polygons, also the name was incorrect between file and class.
Configuration menu - View commit details
-
Copy full SHA for fcbde82 - Browse repository at this point
Copy the full SHA fcbde82View commit details
Commits on Aug 23, 2018
-
UPBGE: Load scripts and actions before converting scene during libload.
Previously the scripts where loaded after the scene was converted and caused the python component conversion to failed because the script wasn't reachable at the import. This is fixed by moving the call to addImportMain before the scene conversion. Similar behaviour is applied for the actions.
1Configuration menu - View commit details
-
Copy full SHA for 7f35889 - Browse repository at this point
Copy the full SHA 7f35889View commit details
Commits on Aug 25, 2018
-
UPBGE: Clarify globalDict setting.
Previously the "GameLogic" was get using PyDict_GetItemString inside initGamePython but decref at the end of the function. This is unsafe as the documentation of PyDict_GetItemString says that no incref is proceeded. In the same time PyModule_AddObject is used intead of manual insert in the module dictionnary.
Configuration menu - View commit details
-
Copy full SHA for 3ce5565 - Browse repository at this point
Copy the full SHA 3ce5565View commit details
Commits on Aug 26, 2018
-
UPBGE: Enable more compatible GLSL versions.
This commit with the condition of ARB_compatiblity allow to select an higher GLSL version in the function gpu_shader_version. ARB_compatibility is needed as > GLSL 150 doesn't support builtin natives.
Configuration menu - View commit details
-
Copy full SHA for bf69125 - Browse repository at this point
Copy the full SHA bf69125View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f49836 - Browse repository at this point
Copy the full SHA 2f49836View commit details -
Configuration menu - View commit details
-
Copy full SHA for f1bae4d - Browse repository at this point
Copy the full SHA f1bae4dView commit details
Commits on Aug 27, 2018
-
UPBGE: Add UPBGE version infos to bpy.app
UPBGE version infos access from bpy (can be useful for addons) Feature request from Momel on discord
Configuration menu - View commit details
-
Copy full SHA for 1450832 - Browse repository at this point
Copy the full SHA 1450832View commit details
Commits on Aug 28, 2018
-
UPBGE: Set audiorate to 48000Hz by default
48000Hz is the newer standard used in professional audio recording as it "works" better with multiple frame rates. Additionally, it solves the frequent "Error AL lib: UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead" raised in a lot realtek, intel, nvidia integrated sound cards (some of them even with crash). And it seems to works better with HRTF binaural sound (in me own TODO list) TODO: To make this value configurable by user
Configuration menu - View commit details
-
Copy full SHA for 6e8870b - Browse repository at this point
Copy the full SHA 6e8870bView commit details
Commits on Aug 30, 2018
-
UPBGE: Fix orthographic camera getScreenRay.
Previously the function getScreenRay was adapted to only perspective cameras because the ray cast was always starting from the center of the camera. In case of orthographic the ray cast should start from a point unprojected from the near plane and continue to in the direction of the camera (-Z orientation axis). This is proceeded in getScreenRay and the indirect call to getScreenVect is removed. Fix issue #765.
Configuration menu - View commit details
-
Copy full SHA for 229ff4e - Browse repository at this point
Copy the full SHA 229ff4eView commit details
Commits on Aug 31, 2018
-
I added an image in the readme, made some adjustments and added a release notes link.
Configuration menu - View commit details
-
Copy full SHA for 86460ea - Browse repository at this point
Copy the full SHA 86460eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f94f02 - Browse repository at this point
Copy the full SHA 1f94f02View commit details
Commits on Sep 1, 2018
-
UPBGE: Enable occluder for invisible objects. (#808)
Previously objects were considered as occluder if the occluder option was checked and that the object was visible. The last constraint is bothering for the user that could define a simplified mesh for occlusion that naturally will not be visible. This commit is introducing the condition "visible || occluder" for the call activating the graphic controller in KX_GameObject::SetVisible/ SetOccluder and the initialization of the graphic controller. Fix issue #807.
Configuration menu - View commit details
-
Copy full SHA for fa68fed - Browse repository at this point
Copy the full SHA fa68fedView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7cf667d - Browse repository at this point
Copy the full SHA 7cf667dView commit details -
UPBGE: Improve component UI. (#795)
Previously the components name was exposed by a property non-editable which was rendered in light gray and the component box was always expanded. Also the module name was inaccesible from bpy. The last issue is simply solved by exposing the "module" string to RNA. The name property is replaced by a label in the UI. To expanse the box the property "show_expanded" similar to the logic brick is implemented, when this property is True, an inner box is generated containing all the properties. Fix issue #793.
Configuration menu - View commit details
-
Copy full SHA for af46b84 - Browse repository at this point
Copy the full SHA af46b84View commit details -
Some unused options/entities are removed from the UI in game engine mode: - scene keying set - speaker and force field in add menu The game engine is renamed UPBGE and the audio panel under scene tab is siplified to expose only the speed of sound, doppler factor and the distance model, these attributes are used by LA_Launcher to initialize the AUD_Device. Fix issue #756.
Configuration menu - View commit details
-
Copy full SHA for 6065fbd - Browse repository at this point
Copy the full SHA 6065fbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0279840 - Browse repository at this point
Copy the full SHA 0279840View commit details -
UPBGE: Allow constructing mesh BVH with a transform. (#810)
The function KX_Mesh.constructBvh can now use as first argument a transform 4x4 matrix used over all the vertices. This allow the user to create a BVH in world space by passing the object world transform. Fix issue #786.
Configuration menu - View commit details
-
Copy full SHA for b7105d0 - Browse repository at this point
Copy the full SHA b7105d0View commit details
Commits on Sep 2, 2018
-
UPBGE: Fix default auto exec option for new created user prefs. (#809)
When the user pref config isn't saved, blender load one from memory and call the function BLO_update_defaults_userpref_blend to initialize properly the preferences such as the auto exec script option defaulted to true. Unfortunatly this function is called after the check of the option and so for blender auto exec is always false until the user saves the preferences and reload. Also the cmake option WITH_PYTHON_SECURITY is defaulted to OFF to avoid new users compiling the software been blocked by this it.
Configuration menu - View commit details
-
Copy full SHA for 3883d6a - Browse repository at this point
Copy the full SHA 3883d6aView commit details -
UPBGE: Change startup file and default theme. (#814)
Since ever UPBGE was starting a startup file from blender that was adapted only to blender with the selection of "Blender Render" and the shading to solid (non-GLSL). As UPBGE is designed for game, the new startup include: - select the proper render engine to "Blender Game" - logic editor is exposed with component tab expanded - default component in Cube - physics static for Plane and Cube - shadow PCF from sun light - back lighting with 2 hemi - environment lighting - blue color on Cube - MSAA 4x - script editor exposed at bottom - world background - framerate and profiler The theme is also changed to a flat dark theme proposed by @Momel15. This theme is named "upbge" and select by default in the startup. Fix issue: #742.
1Configuration menu - View commit details
-
Copy full SHA for 08b0874 - Browse repository at this point
Copy the full SHA 08b0874View commit details -
UPBGE: Implement color management option. (#777)
Previously the color management was always of sRGB and the user had no control over it. To fill this gap the user should have the ability to define the final color space, linear or sRGB. First of all an option named "Color Management" in a new tab under Render panel is added, it can be "Linear" or "sRGB", the default is "sRGB", When game engine is selected changing this option will force the recompilation of all shaders and they will add or remove color space conversion at the end of the shader. In game the color space is not managed at the shader level, but at the final copy of the offscreen to the screen. Firstly the material in game must disable the color management, this is done by a new set of flags passed to GPU_material_from_blender or GPU_material_world and the flag GPU_MATERIAL_NO_COLOR_MANAGEMENT. Secondly the three shaders used to copy the offscreen to screen (normal, stipple stereo, anaglyph stereo) now have a sRGB version including a call to linearrgb_to_srgb enabled by the macro COLOR_MANAGEMENT. The color space used is stored in the rasterizer in enum variable m_colorManagement for linear and sRGB, this variable is used to select the correct shader to bind before flushing to screen. Because the linear to sRGB conversion is not anymore using a float value with the highest precision at the output of the fragment shader, the texture format GL_RGBA8 is introducing bands because of its poor resolution. Replacing it by GL_RGBA12 prevents the bands. In the same time the color management used in KX_FontObject or KX_WorldInfo is now obsolete and removed, also KX_WorldInfo is getting GPUMaterial only in new function ReloadMaterial called by the FinalizeSceneData such as material shaders and by setMaterialGLSL.
Configuration menu - View commit details
-
Copy full SHA for 552bf8e - Browse repository at this point
Copy the full SHA 552bf8eView commit details -
The commit f62dca6 introduced a remove of the replaced scene in the scene list, this call is unnecessary as EXP_ListValue::SetValue is swapping the values. The drawback of RemoveValue was to reduce the size of the container by actually erasing the item. This is fixed by not removing the scene but only replacing its pointer. Fix issue: #819.
1Configuration menu - View commit details
-
Copy full SHA for 60b5dc4 - Browse repository at this point
Copy the full SHA 60b5dc4View commit details
Commits on Sep 5, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 04b7275 - Browse repository at this point
Copy the full SHA 04b7275View commit details
Commits on Sep 9, 2018
-
UPBGE: Rename async parameter from LibLoad as is a reserved word (#827)
Rename async parameter from LibLoad as is a reserved word in Python 3.7 A note will be included in Release notes as this breaks compatibility with old scripts.
Configuration menu - View commit details
-
Copy full SHA for 1959ed2 - Browse repository at this point
Copy the full SHA 1959ed2View commit details
Commits on Sep 10, 2018
-
UPBGE: Renable Cycles in startup file.
The option in user prefs enabling cycles UI wasn't checked in startup. Fix issue: #823.
Configuration menu - View commit details
-
Copy full SHA for a6dd6cc - Browse repository at this point
Copy the full SHA a6dd6ccView commit details -
The noodle curving is set to 5 (like default themes) and regular inner widget color is set to a darker color to avoid invisible box in layer popup. Fix issue: #823.
Configuration menu - View commit details
-
Copy full SHA for 30b4e06 - Browse repository at this point
Copy the full SHA 30b4e06View commit details -
UPBGE: Fix RNA for object logic states.
The function rna_GameObjectSettings_used_state_get and rna_GameObjectSettings_state_get were previously using an array of ints, a blender commit changed it to an array of bools but forgotten to change the initialization of the arrays on these two functions. The initialization is using memset and using the previous size for int is creating a overflow smashing the program stack. This issue is fixed by using sizeof(bool).
Configuration menu - View commit details
-
Copy full SHA for b5ae732 - Browse repository at this point
Copy the full SHA b5ae732View commit details
Commits on Sep 11, 2018
-
Previously the layer send to the shader is non-zero and so checked with object layer when: The lamp is visible OR the lamp is in view layers. But the correct behaviour is: The lamp is visible AND the lamp is in view layers. So that all lamps in layers not selected by view will not affect any objects even one sharing a layer with the lamp. To restore this behaviour the dynlayer is set to 0 also when lamp->lay & viewlay is 0. Fix issue: #831.
Configuration menu - View commit details
-
Copy full SHA for 0f27b92 - Browse repository at this point
Copy the full SHA 0f27b92View commit details
Commits on Sep 14, 2018
-
UPBGE: Sleep when frame time is smaller than fixed frame time. (#803)
Previously when the frame time was too fast the function KX_KetsjiEngine::NextFrame concluded that 0 frames have to be proceeded and done nothing. This function was called until the elapsed time was suffisent to process a frame. This approch is naive, robust and precise but introduce an high CPU usage because of the extra calls to KX_KetsjiEngine::NextFrame setting the CPU to it's maximum. To avoid this high usage, the elapsed time to the next frame is computed and the main thread sleep of this time.
Configuration menu - View commit details
-
Copy full SHA for 0f395ce - Browse repository at this point
Copy the full SHA 0f395ceView commit details
Commits on Sep 15, 2018
-
UPBGE: Implement physics mesh refit.
Bullet library is allowing for triangle mesh shapes (btBvhTriangleMeshShape and btGImpactMeshShape) tree refit which is faster than rebuilding the whole BVH tree. To detect a possible refit we must check if only the vertices changed, to do so we store information of the converted display arrays into struct MeshPart during CcdShapeConstructionInfo::UpdateMesh. Next call to CcdShapeConstructionInfo::UpdateMesh will compare the previous mesh parts with the current one and if they are equivalent then only update the vertices of the btTriangleIndexVertexArray. The vertices are always converted from the display arrays and stored into m_vertexArray. Finally CcdShapeConstructionInfo::UpdateMesh returns a flag to tell if physics controllers need to recreate the shape (UPDATE_RECREATE) or update the shape tree (UPDATE_REFIT). The last flag is making ReinstancePhysicsShape to call CcdPhysicsEnvironment::RefitCcdPhysicsControllerShape which itself forward to RefitCollisionShape of all the physics controllers using the same shape. RefitCollisionShape is managing BVH shape and gimpact shape by calling the proper functions for the both shape types. Actually the tree is refit and not partially refit as it will request the user to select a maximum AABB, the complete refit is a little bit more expensive but much safer. A new function in btGimpactMeshShape is added to refit the tree: refitTree. Tested with 8192 triangles: Static: Before Current 12.32ms 1.89ms Rigid: Before Current 1.69ms 1.48ms
Configuration menu - View commit details
-
Copy full SHA for 9dfcda3 - Browse repository at this point
Copy the full SHA 9dfcda3View commit details