Skip to content

Releases: SolarLune/tetra3d

v0.15.0

06 Feb 08:02
Compare
Choose a tag to compare
v0.15.0 Pre-release
Pre-release

Here's a new release!

Lots of QoL changes and improvements.

What's Changed

  • Only Return Error on Animation Not Found by @karl-tye in #31

New Contributors

Full Changelog: v0.14.0...v0.15.0

v0.13.0

05 May 21:06
Compare
Choose a tag to compare
v0.13.0 Pre-release
Pre-release

Hello! It's been awhile since the last release of Tetra3D, so here's another one. This one updates to Ebitengine v2.5, and includes quite a few QoL improvements and fixes.

In kind of big news, I've added a Text helper object in Tetra3D - what this tool does is allow you to render text to a texture, usually for display within a space, like a text box. It also can calculate the text box's size depending on an orthographic camera for optimal sizing, which is useful - there's a new example showcasing this nice new tool as well.

screenshot2023-05-05 14:09:50

Check the changelog for more information!

Full Changelog: v0.12.1...v0.13.0

v0.12.0 - Ray testing!

01 Feb 05:26
Compare
Choose a tag to compare
Pre-release

raytest3

Raytesting has been added! It's now possible to perform raytests in Tetra3D, either freely or from the camera towards the mouse-cursor.

There's also other additions, like fixes, performance optimizations, and some API changes. Check it out~

Full Changelog: v0.11.1...v0.12.0

v0.11.1

17 Dec 16:30
Compare
Choose a tag to compare
v0.11.1 Pre-release
Pre-release

Here's a quick bug-fix release - just a couple of minor fixes (and one major one for orthographic rendering). Overlapping faces should also display more accurately.

Full Changelog: v0.11.0...v0.11.1

v0.11.0 - Indexed Rendering! Collision checking improvement!

13 Dec 06:35
Compare
Choose a tag to compare

Yo, what's up! It's been quite awhile!

tetra3dNewLogo

So here's Tetra3D v0.11.0! This one is kind of a massive change, as internally I've dramatically altered Tetra3D in a few ways.

Performance

Firstly, we've moved to indexed rendering. Previously, each triangle had its own vertices; now, each mesh is comprised of vertices, and each triangle is comprised of indices. This means that, in a best-case scenario, triangles can reuse vertices, making for, hopefully, faster rendering.

I also created my own Vector struct, as flat structs of numbers seems to be far faster (both in mathematics as well as in allocation of memory) than the previous vector package I was using, by quartercastle. I still recommend that package outside of Tetra3D, as it's a very elegant solution for multi-dimensional vectors where speed isn't absolutely integral to the process.

All of this should mean a fairly significant boost in performance! We can see this in the case of the stress test in the examples folder. Here's the results as performed in v0.10.0 (Average 18.6 FPS):

Screenshot from 2022-12-12 22-03-22

And here's the same test in v0.11.0 (Average 26.3 FPS):

Screenshot from 2022-12-12 22-04-49

That's over a 40% improvement, which ain't shabby!

Collision Checking

Collision checking has been improved to be simpler and easier - now, instead of two CollisionTest() functions, there's just one, and it just takes a CollisionTestSettings struct. In this struct, you specify the objects you want to check against, as well as an optional callback to handle a collision as it happens. This is an improvement in collision checking because previously, you could only act on all of the collisions from CollisionTest() - however, this new callback is called before any collisions happen for each collision. This is useful because you can use it to resolve collisions sequentially (i.e. if object A collides with objects B and C, and on checking with a collision against B you move A out of collision with B and C, then you won't have a collision with C, naturally). It's a small difference, but an important one, and it's helpful to be able to know that each collision will be handled properly.

Smaller stuff

There's also a variety of other minor changes and other performance optimizations. One such minor-ish improvement is that I've added the ability to tag objects for automatic static merging or dynamic batching (either through code or in Blender). This automatic batching is done when an object is added to or removed from a scene's hierarchy, and is automatically performed when a scene is rendered through a camera (as that way, we can ensure objects should be where they're desired to be prior to batching). This should help to allow for some easy optimizing non-moving elements in a game.

You can now add game properties to scenes themselves, which can be rather useful for global properties, like specifying background music for a level, as an example.

In Blender, you now have a couple of buttons to easily set an object's vector game property to the object's center or the 3D cursor.

In Blender, you now have the ability to copy game properties from a collection instance to top-level instanced nodes (so, in other words, you can override properties on a collection instance and have them be applied to the instanced objects. This is helpful for a situation where, say, you want to change the health on a specific character; now you can check off this option and create an HP property on the instanced version of that character. That property will be passed down to the instanced nodes).

All of the examples have been overhauled to be simpler and share common elements, like the camera and debug features.

You can now draw sprites in 3D, such that it's drawn in 2D, but still can be obscured and "occupy space in 3D". See the relevant sprite3d example. This can be very useful for situations where you want a sprite to not be resized or crimped with the camera, but have the sprite still be tied to 3D space.

@tomlister added the ability to export game resolution from Blender itself, so that makes loading cameras more seamless.

@eliasdaler fixed up some of the other examples, as well.


NOTE: I've also updated the Tetra3D add-on for Blender 3.4 support - note that this add-on probably won't work any longer with a previous version of Blender, as the default GLTF exporter now exports light intensity using customizeable units (real-world accurate or otherwise).


Anyway, lots of other stuff, so check out the commits for the full changelog.

What's Changed

New Contributors

Full Changelog: v0.10.0...v0.11.0

v0.10.0

26 Sep 18:15
Compare
Choose a tag to compare
v0.10.0 Pre-release
Pre-release

OK, 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.

cube lighting

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

grid image

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.

fieldparticle2


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

v0.9.1 - Collision Bugfixes and QoL Improvements

20 Jul 18:09
Compare
Choose a tag to compare

Hello~!

Here's another update to Tetra3D; this one adds some QoL impprovements and bugfixes, particularly centered around everybody's favorite core part of a game, collision detection.

Previously, collision detection / intersection testing was done on a per-object basis - this option is still available, but now you also have the option to check for collisions against multiple objects at the same time using BoundingObject.CollisionTest() or BoundingObject.CollisionTestVec(). The result of an intersection test was previously called an IntersectionResult - now, it's called a Collision. This renaming was done to be easier to conceptualize. You can also test for collisions with a suggested movement (so you can, for example, check straight down a bit to check for ground, or check up to see if a character would bump its head when jumping).

Normals and slopes have also been added to the collision reporting process, making it far easier to do basic physics. Slopes are currently returned as an angle ranging from 0 (straight up) to pi (straight down) - you can convert this into degrees for easier human readability using tetra3d.ToDegrees().

I've added functions to return contact points, slopes, and MTVs that are averaged across any and all intersections as well, which makes things a bit easier to deal with when it comes to working with simple baselines.

I've also updated the Blender addon to add a World panel to easily customize fog and the screen clear color. (Note that the screen clear color doesn't do anything by default - you use Scene.ClearColor when clearing the screen.)

Finally, I've created a simple quick start project for Tetra3D projects here.

Anyway, feel free to check out the changelog below!

Full Changelog: v0.9.0...v0.9.1

v0.9.0 - Optimizations and Preliminary Dynamic Batching

07 Jul 21:22
Compare
Choose a tag to compare

HELLO~!

It's been awhile since the last Tetra3D release, and so I wanted to give it another shot~!

Optimizations

Firstly, there have been massive optimizations!

General vertex transformation is 15-30% faster! Point lighting has been optimized, as well - internally, Tetra3D can exit lighting sooner if a triangle lies outside of the range of the light, for example. Armature animation time is down around 50%! Tetra3D is just running better in general compared to a few months ago, which is good. Part of that might be ebitengine and Go becoming faster as well, haha.

Dynamic Batching

Screenshot from 2022-07-07 14-21-06

I've also added some preliminary support for dynamic batching. Dynamic Batching allows you to render many objects using a single object's material information and color - this is very good, as it is far faster than rendering each object individually. This makes things like minimaps or many individual NPCs a lot more possible. Note that this only works with a single texture / draw call currently (so you can't have, for example, multiple MeshParts with different material settings or textures in a single batch at the moment; they will all render using the first MeshPart's render information).

Billboarding

I've also added billboarding to Tetra3D with a couple of different billboarding modes - now you can get some sprites in your games~

Billboarding
From left to right: Off, Horizontal (X/Z) Billboarding, Full Billboarding

I've updated the wiki a bit more as well. Thanks, and I'll catch you guys later~!

Full Changelog: v0.8.1...v0.9.0

v0.8.1 - Minor Bugfixes

19 Jun 23:50
Compare
Choose a tag to compare
Pre-release

Yo!

Here's a quickie minor bugfix release that just has some nice stability / usability fixes.

Full Changelog: v0.8...v0.8.1

Thanks!

v0.8 - Material Panel, Marker Importing, Animated Textures, Multiple Vertex Colors, Paths

18 Mar 23:12
Compare
Choose a tag to compare

Yo! It's been a bit since the last version of Tetra3D - here's v0.8! This one has quite a few improvements in it!

It Breeds Fear - Construction Worker

Material Panel 🧱

A new Material Panel has been added to the Tetra3D Blender add-on, making it easier to color Materials, set shading or blending parameters, and backface culling, all from one place.

Marker Importing 🚩

Markers placed in animations can now be imported from Blender into Tetra3D! This can be very useful in timing events like sound playback (e.g. playing a footstep sound in time with an animation) or marking traits in an animation.

Animated Textures 🏃

Being that old-school renderers were working with such limited poly counts, utilizing animated textures were a key part of the experience in doing more with less. This being the case, I've added both a TextureAnimation and TexturePlayer struct - these structs allow you to play back simple sprite animations on a collection of vertices on a Mesh. This can be useful for facial animations for 3D characters, or 2D animations, among other things.

Multiple Vertex Colors 🔴 🔵

Previously, vertices only supported a single vertex color channel. I was unsure about how to go about selecting vertices (say, for animation) easily - after some different attempts, I've come to the conclusion that the simplest way to do this was just to support multiple vertex channels. This way, you can use channels to select vertices of interest (i.e. the faces of a person's face, to do facial animation).

Paths ♾️

Path support has been added to Tetra3D, allowing you to both create paths through code, or import paths from Blender into Tetra3D. You can use paths to easily make NPCs walk on a route, for example.


There are quite a few other bugfixes and optimizations, as well, including one made by the creator of the Golang GLTF parsing library, @qmuntal - thanks a lot to him for his assistance and contribution!

Full Changelog: v0.7...v0.8