v0.10.0
Pre-releaseOK, so!
It's been awhile since the last release. I've added a faaaaaaaair amount of new features and stuff, so I'll just go over some of the bigger things.
Broadphase Collision Testing
Collisions involving triangle meshes now have a broadphase part to the collision test. This means that collision testing should be a lot faster in general, as we only have to check collisions against the triangles nearby the object we're testing, rather than all triangles. The broadphase collision size is, by default, 20 Blender Units in size (with Tetra3D adding more cells to wholly wrap around the mesh, but can be altered (or turned off) at will using BoundingTriangles.Broadphase.Resize()
or BoundingTriangles.DisableBroadphase()
.
Recursive Collision Testing
Now collision testing (using one of the BoundingObject.CollisionTest functions) is done on all children recursive to the tested nodes - this means that, firstly, you can now easily check to see if a bounding object collides with a model, for example, rather than its bounding objects. This is good because most times, you'll attach tags to the Model to indicate, for example, that it's solid, or that it's dangerous - this lessens the amount of code you need to type to do fairly basic things, going from this:
// Test all bounding objects that are children of "solid" Models in the scene
solids := scene.Root.ChildrenRecursive().ByTags("solid").Children().BoundingObjects()
for _, col := range bounds.CollisionTest(0, 0, 0, solids...) {
parentModel := col.Parent().(tetra3d.INode) // Get the parent to interact with it in some way
}
to this:
// Test all bounding objects that are children of "solid" Models in the scene (but do so automatically)
solids := scene.Root.ChildrenRecursive().ByTags("solid")
for _, col := range bounds.CollisionTest(0, 0, 0, solids...) {
// Here, Root is the objects that we passed for testing (so, the Nodes or Models that have "solid" tags)
parentModel := col.Root
}
Secondly, you can now compose more complex shapes out of smaller BoundingObjects by simply parenting them to a common parent in the hierarchy and then testing that parent.
Of course, if you want to test each BoundingObject individually like you did before, that's still an option as well.
Worlds
Worlds have been added, as well. A World contains things like fog color, distance, screen clear color, etc. Worlds can be easily swapped around, and each Scene has its own World reference. A World in Tetra3D directly corresponds to a World in Blender, as well.
Lighting
Cube Lights have been added - these are lights that light triangles only within an AABB. This is useful for lighting, say, an indoor space. The light bleed can be customized, allowing you to change the light level within this specific space.
Light Groups have been added, as well - this allows you to easily control which lights influence a Model.
Baking of lighting and baking (preliminary) AO to vertex colors has also been added. Baking AO is fairly slow, so be aware, but this should be rather useful for easily optimizing games where the lighting doesn't need to be live-calculated.
Optimizations
Various parts of Tetra3D have been optimized, including lighting, collision testing, etc.
Grids
Grids have been added. A Grid is a network of points (vertices, in Blender) and their connections (edges). Grids allow you to get a path from one point to another, passing only through those connections. This being the case, Grids can be useful to handle things like pathfinding. Grids are most easily created through Blender, by creating a mesh like normal, and then switching the Object Type from Mesh to Grid in the Tetra3D Object Properties section.
When an object is a Grid, it no longer is visible in the game world, and becomes a Grid (rather than a Model). Each vertex becomes a GridPoint in Tetra3D, and the edges between vertices become connections between those GridPoints.
Particles
A basic, simple particle implementation has been added to make things a bit easier on that front. While particles aren't necessarily the hardest thing to add, they're useful in enough situations where even a basic implementation should be useful.
Anyway, that's just some of the big stuff. I have to go now, so have fun checking everything out, lol
Feel free to read up on the Wiki for more information, as well!
Full Changelog: v0.9.1...v0.10.0