-
We now read glTF extras data to X3D nodes metadata.
In practical terms, it means that you can set custom properties in Blender, and then read it back in CGE using MetadataString and similar properties on nodes.
We read “extras” data from glTF primitives, materials, cameras and transformation nodes. If you use Blender, it means we can read “Custom Properties” from Blender objects, meshes, materials and cameras.
More pointers how to read custom properties defined in Blender are here. Our demo-models contain examples of Blender models with custom properties, see in subdirectories
blender/custom_properties/
andblender/custom_properties_2/
. Finally, reworked examples/short_api_samples/metadata shows how to read and write metadata in CGE. -
Our metadata API was also a bit simplified. MetadataString can now be used easier (doesn’t have an index, use it like
Node.MetadataString['my_name']
), but we expose MetadataStringArray when you need an array (use it likeNode.MetadataStringArray['my_name', 2]
). -
Shape.collision field supports
"NONE"
value. In Pascal you would set it asMyShapeNode.Collision := scNone
. -
We support a special custom property at Blender mesh:
CastleCollision
. It can have these values:- none — do not collide
- box — collide as box
- default — collide as precise triangles
See the Shape.collision field linked above for more details.
This way you can easily turn off collisions in Blender, or set collisions to use simple box for complicated shapes. Just set Blender custom property
CastleCollision
on a mesh.Demo usage in examples/fps_game/data/example_level level. The level defined there contains everything collidable + non-collidable water surface in one model, one glTF file, and the water is marked with CastleCollision=none.
-
Improved Detecting Memory Leaks Using HeapTrc documentation (done long time ago by Eugene Loza, now merged with notes previously in optimization manual chapter ).
-
Documented various X3D extensions added lately to have perfect glTF support:
-
Set shape bounding box (Shape.bboxCenter, Shape.bboxSize) (efficiency when animating shapes)
-
Make shape collide as a box or none at all (Shape.collision)
-
OrientationInterpolator2D (for efficient support of Spine 2D rotations)
-
Trigger multiple outputs of any type when some input is received (ValueTrigger)
-
Reading glTF extras (e.g. from Blender custom properties) to X3D metadata, support changing shape collision mode from Blender, documentation improvements
Start the discussion at Castle Game Engine Forum