We hope everyone is doing well during these uncertain times. All of us at Our Machinery are grateful to have you as a community and we hope change for the better in the world is on the horizon. During the last few weeks, we not only focused on how we can do better, on a personal level but also how The Machinery Beta can improve with the June 2020 release (2020.6). We have a number of new features and updates in this release that we hope you will like.
As always, registered beta users can download the build from our forum. If you want to join the beta, sign up! If you find bugs in this release or have requests for specific features, post them to our issue tracker. For more general discussions, hit us up on the forum or Discord.
Some of the key highlights in this release are:
- UI Themes — Choose Dark or Light mode or create your own color theme.
- Subgraphs — Hide details of graphs by using subgraphs.
- Memory Tracking — Investigate the memory use of The Machinery.
- Improved Motion Mixer — Easier testing of Animation State Machines.
- Runner — It is now possible to publish stand-alone applications.
- Render Passes — Added support for rendering to images using Creation Graphs.
As usual, we also have a number of smaller updates.
The Machinery now supports customizable UI Themes, available from the Window > Theme menu.
This is the default Dark Theme:
And this is the default Light Theme:
In addition to the default themes, you can also create your own theme with Theme > New Theme… and share it with other users using the Export Theme… and Import Theme… options.
Here’s an example of a custom theme also showing the Theme color editor:
It is now possible to create Subgraphs by selecting two or more nodes and choosing Create Subgraph in the context menu. It will automatically create a set of inputs and outputs for the Subgraph and connect them. More inputs and outputs can be added by connecting to the + connector.
The Subgraph is initially stored within the owning graph, but it may be exported to a re-usable asset by right-clicking it and choosing Create Subgraph Prototype.
There is a recent blog post explaining the implementation details of Subgraphs here: https://ourmachinery.com/post/subgraphs-and-function-graphs/
The Machinery now includes a Memory Use tracker, letting you see where memory is used. You find it under View > Memory Use.
The memory tracker has multiple subviews, letting you examine the memory use in various ways. The Scoped Allocations view lets you see how much memory is used in each Allocation Scope:
The Allocation Scopes form a nested hierarchy of memory allocation contexts that you can expand to dig deeper. The root scope contains all allocations, below that you find separate contexts for the profiler, the application data, the memory tracker itself, etc.
Note that the total memory use shown in this view (103 MB) does not match the memory use shown in
the system’s Task Manager. The reason for this is that while we track all allocations made using our
own allocators, we don’t track the allocations that external DLLs make directly to the system. For
example, the Vulkan DLL might directly call
VirtualAlloc() and those calls won’t
show up here.
In the future, we might add support for OS API hooks/detours to detect and track these allocations too.
Another subview is the Asset Tree:
This shows you how much memory is used by each asset in your project. The hierarchy here matches the asset hierarchy in your project. Directories show the sum of all the assets in the directory, and just as with the scope view, you can expand a directory to dig deeper.
The Resident column shows the amount of asset data that is currently loaded in memory, while the Unloaded column shows asset data on disk that hasn’t yet been loaded. Note that, at the moment, this information is of limited use, because we don’t provide any way of explicitly loading or unloading asset data to/from memory. This will be in a future version.
In addition to the Memory Use views, we’ve also added memory use information to the existing Statistics view:
This shows the total memory allocated in our different allocators — the System allocator uses malloc(), while the VM allocator allocates memory directly from Virtual Memory.
In addition to the total memory used, the statistics view also shows memory churn — memory allocated and released every frame. Keeping the churn low is important for performance as allocating and freeing memory can be expensive.
Improved Motion Mixer
The Animation State Machine ships with a new Motion Mixer:
The purpose of the Motion Mixer is to provide an easy way to test event transitions and variable changes in the Animation State Machine.
The old Motion Mixer showed an interface with sliders for all variables in the State Machine and buttons for all events. The new Motion Mixer is more discriminate. It lets you add just the buttons and sliders that you need.
It also lets you set up key bindings for the State Machine. Keys can be tied either to events or variables. When a key is tied to an event, pressing the key will trigger the event. When a key is tied to a variable, as long as the key is held, the variable will interpolate towards its maximum value, over the specified interpolation time. When the key is not held, the variable will interpolate towards the minimum value.
Note that key bindings are only processed when the State Machine Preview window has focus. Also, note that the Motion Mixer keybindings are only active in the State Machine window. When you are running the game in the simulation tab, the motion mixer is not active.
Another change is that instead of being a part of the Preview tab, the Motion Mixer is now a regular Properties tab. This means that you can move it around, dock it, etc, just as any other tab in the UI.
The Runner is an application that runs a project created using The Machinery as a stand-alone application. Much like the Simulation Tab within The Machinery, but without the editor. You can Publish your project along with the Runner executable by choosing File > Publish… inside The Machinery.
We do not currently ship the source code for the Runner, but we will include this in the near future so that you can customize it with your own code.
Using Creation Graphs, it is now possible to create new GPU Images and render directly into them
using the new
Render Pass Node. This can be useful for doing various types of image baking and
Here’s an example showing how to burn out the UV-set of a mesh into a 2D texture for debugging purposes:
The motivation behind this work is to move the Creation Graphs towards a more generic data-processing framework that will allow you to easily create and manipulate any type of buffer and image data. Typical use cases are:
- Texture space lighting.
- Voxelization of arbitrary geometry.
- Generation of Signed Distance Fields.
- Texture baking operations.
- Preparation of mesh and image data to be fed to the GPU simulation system.
- Foundation for various types of TA-created tools.
Fixed a bug where The Machinery wouldn’t run in a directory with accented characters (e.g. Téléchargements).
Fixed missing localizations.
Now gives a clear error if The Machinery headers are included in a C++ file without wrapping them in an
extern "C"block [#240]
Keyboard navigation now works in modal dialog boxes. [#232]
The Asset Browser now shows the size of selected assets.
The Graph Editor now has snapping. The settings are saved per-application-per-project.
The settings of the scene tab are now saved per-application-per-project.
Simple Draw no longer receives mouse input when it doesn’t have focus. [#235]
The mouse wheel can now be used to zoom in and out of the view. [#243].
Fix for crash when working with “recursive” entities. [#249]
Entity rigging and extraction of resources from a
dcc_assetnow runs as a background task.
Fix for screen going black when The Machinery got restored from a minimized state [#236].
apidoc.md.htmlnot loading in some browsers. [#229]
Cleanup of documentation.
Documentation is now enabled and disabled with
// tm_docgen on/offinstead of with a
#pragma. This means our build scripts no longer need to disable the warning about unknown pragmas.
- Fix for crash when
create_context()is run in the Simple 3D app. [#239]
The Animation State Machine Preview window shows the current state of the Animation State Machine.
The Animation State Machine Preview shows a log of transitions.
When a state is selected in the State Graph, that state will be “pinned” in the state machine, and it won’t auto-transition out of it.
Fix for project resources being sometimes being “dirty” when they shouldn’t be.
When saving projects in single-file mode, buffers are deduplicated, resulting in a significantly smaller file size.
There are now per-application-per-project settings.
Fix for crash when project data contains NaNs or Infs.
Fix for broken mipmap chains in compressed non-power-of-two textures.
Fix for random Vulkan crash when repeatedly open and closing new windows.
Fix for GPU memory leak when switching between projects.
Various performance improvements when working with scenes containing lots of Creation Graphs.
More efficient and well-behaved execution of GPU workloads and resources created using Creation Graphs.
State of GPU Simulation system is now completely GPU-driven. All workloads except spawning of new elements now run using dispatch- and draw indirect calls.
Fix for synchronization bug in GPU Simulation system preventing system updates from being chained together.