The Machinery — September 2021 (version 2021.9)

A new month and as usual, we have a new release for you with new features and bug fixes. If you want to know what we are planning to do in the future, have a look at our roadmap. You can even vote for your favorite features.

If you are already running The Machinery, this new release should pop up in your Downloads tab. Otherwise, get it from our download page and have a look at this quick introduction video. We are also working on two books about The Machinery. One is an overview of the engine and the other one a collection of tutorials on how to do specific things. Note that both these books are still works in progress.

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 GitHub discussions or Discord.

Key highlights in this release are:

And as always, we also have a number of smaller updates.

API Versioning

We’ve introduced versioning of The Machinery APIs. Now, when you request an API like this:

tm_ui_api = tm_get_api(reg, tm_ui_api);

your request will be bound to the current version of the API. When your plugin is loaded, it will check if it can find a matching version of the API. If not, an error message will be printed and the plugin will be disabled.

This ensures that we can continue to develop The Machinery while providing maximum compatibility with existing plugins.

For more information about API versioning and the plugin system, see this blog post.

Reflection Pipeline

We’ve added a new component that implements screen-space reflections (SSR). The implementation is based on the slides from Stochastic Screen-Space Reflections presented at Siggraph 2015. In addition, we have also added support for local parallax corrected image based lights (IBLs). When used together, they form the foundation of a full reflection pipeline with SSR falling back to local IBLs falling back to a global sky IBL.

There’s still work to be done to increase the quality and improve the performance as well as adding support for raytraced reflection as a higher-quality fallback to prebaked IBLs when running on GPUs with ray tracing support.

Reflection Pipeline: SSR falling back to IBLs

Reflection Pipeline: SSR falling back to IBLs

ARM Support

The Machinery now compiles for ARM CPUs. In particular, we compile natively on Apple silicon (the new MacBook CPUs). Note that we do not yet have a Metal backend, so only the command-line tools currently run on OS X (but everything compiles).

Community Contributions

  • Thanks to geekrelief for multiple pull requests.
    • Instantly updating other viewports through gizmo operations. [#703]
    • Opening entities by dragging them to empty Scene tabs [#734]
    • Compact mode for Workspaces bar. [#732]
    • Improved Layout menu. [#730]
    • Color fix to menu bar [#720]
  • Thanks to RiederAlex for fixing a bug in the mover. [#727]
  • Thanks to infosia for adding support for .ttc. [#738]

Entity

  • Fixed a crash in the Entity Spawner Component when using a channel where Max Count is set to 0. [#691]
  • Stability fixes in Entity Spawner Component when frequently adjusting a channel’s input.
  • Crash fix when authoring a Creation Graph containing a GPUSim Init node.
  • Entity systems can now have init() and shutdown() callbacks. init() is run just before the first call to update(). shutdown() is called when the system is removed or when the entity context is destroyed.
  • Entity systems & engines can now modify entity archetypes (add/remove components, etc) in a thread-safe way by making use of a command queue (operations are executed at a later synchronization point).

Simulation

  • Simulate Entry has been renamed to Simulation Entry.
  • Simulate Entry assets have been removed and replaced by a Simulation Entry Component.
  • The simulate and simulate_common plugins have been merged into simulation.
  • The simulate_tab isn’t fed camera input anymore unless the tab is in focus.

Editor

  • Fix for a crash when drag-and-dropping workspaces. [#776]
  • It should not be possible to close the last workspace. [#771]
  • The Workspaces bar can now be hidden and shown.
  • Microsoft Translate and Google Translate can now be used for online live translation of the UI.
  • The localization language is now remembered by the editor.
  • Fixed a bug where the preview flickers while previewing shaders. [#783]
  • Fixed a bug where thumbnails are not generated in some corner cases involving shader compiles.
  • Fixed a bug where graphs constantly get invalidated while the graph settings are open for editing.
  • Fixed a crash when collapsing the preview tab [#731].
  • Fixed bug where the color wheel slider knob was behind the slider bar.
  • The color scopes tab now has a CIE-1931 scope that displays the viewer’s gamut relative to the viewer’s output color space and the standard observer spectral locus.
  • Open Prototype and Open Prototype in New Workspace context menu options.
  • New Workspace with Layout context menu option.
  • Fix for workspace blinking when changing tabs.
  • Fix for one frame blink of menu bar key underlines.
  • Support crash recovery files > 4 GB. [#739]
  • Fix for memory leak in physics.
  • Added missing shortcuts to the shortcut manager.
  • It’s now possible to extend the set of default layouts in code.
  • New default workspace layout for color management.
  • Fix for workspace context menu closing just after being opened, if it was opened while another workspace context menu was active.
  • Whenever assets in core are updated, the user is now presented with a dialog where they can uncheck assets they do not want to update. This makes it possible for users to avoid updating a certain asset if the updated version gives them problems.
  • There is now a menu item File -> Force Reimport Core that runs the core update, but forcing it to present you with all the core assets for which you’ve previously skipped update, so that you can decide once again.
  • The prototype picker now works as expected when editing multiple assets.
  • The properties tab is now shown in the entities workspace.
  • Fix for bug with using locals as blackboard pointers.
  • Fixes an issue where the Scene Tab Grid was blinked for a frame if Ctrl was held while hovering over the move arrow.
  • Select Default Camera Settings opens the Properties tab if it’s not already open. [#804]
  • Tooltips now work in menus.
  • Core now ships with a reflection_probe helper entity.
  • AssImp: If locating external textures fails when using the full embedded path, try searching for them in the source asset folder.
  • Import Settings: Support for toggling Material and Texture merging based on name.

Asset Browser

  • Made drag-and-drop import from the OS more robust. Users should no longer see weird behavior where files are dropped into the wrong folder.
  • The tooltips in the asset browser now behave in the same way as the rest of the application.
  • File tree directories are now sorted according to the Asset Browser sort settings [#807].

Creation Graph

  • Fix for type_hash inconsistency in GPUSim Init node.
  • Alpha cutoff is now available in DCC material node.
  • We now support multi edit of Creation Graphs. For Creation Graphs that come from the same prototype, multiple can now be edited at the same time. All inputs that have matching ID and type will be presented for multi edit.
  • Added nodes for inverse trigonometric functions.
  • Added DDX, DDY, smoothstep and Remap shader nodes.
  • Added Gradient Noise, Value Noise and Voronoi shader nodes.
  • Rescaled *Simplex* and *Perlin* shader nodes into a normalized range [0, 1].
  • Dirty marking of creation graph instances from background tasks can now safely be done from background tasks by using tm_creation_graph_api->queue_instances_for_dirty_marking()
  • Stability fixes in crunch texture compression node when compressing a GPU Image that requires a GPU → CPU readback.
  • Filter Image now supports generating mip maps for 3D/Volume textures.
  • It’s possible to set creation graph’s draw call constants.

Entity graph

  • Fix for graph input/output settings object stealing property panel focus whenever you double click something while having a graph open.
  • Fixed a crash that occurred while adding an input or output to a graph while having the input or output node selected.
  • Graph inputs and outputs are now added with a name (unique identifier), instead of a display name and no name.
  • Quaternion From Look At node
  • First Entity With Tag query node
  • Get Entity Variable & Set Entity Variable nodes
  • String comparison nodes now work as expected with NULL strings
  • Entity Asset From Absolute Path node
  • String Not Equal node
  • Constant nodes for: bool, float, vec2, vec3, vec4, rect, string
  • Variables for expression nodes are now optional. [#811]
  • Alt-dragging property fields should increase their values instead of panning the graph. [#800]
  • It’s possible to create custom graph nodes which have “execution path” output connectors.
  • The graph-node-generator correctly understands comments and indentation.

Platforms

  • The Machinery now compiles natively on M1 ARM.
  • SSE instructions are emulated on Neon using sse2neon.
  • Cleanup of SSE/AVX code with specific defines TM_CPU_SSE, TM_CPU_AVX.
  • We no longer rely on GetKeyNameTextW() to determine the name of keyboard keys. [#801]

Foundation

  • Improved temp allocator performance.
  • Fix for memory leak in expression language.
  • Allow temp allocations > 4 GB.
  • Fix for slowdown at startup because of a synchronous getaddrinfo() call.

Runner

  • The input isn’t feed anymore to the camera if the window is not in focus. [#790]

Rendering

  • Color grading is now fully ACES compliant.
  • Color grading now allows separate saturation transformation.
  • Support for local parallax corrected IBLs.
  • Fix for SSAO upscale pass not upscaling the half-res AO texture.

Physics

  • The local offset of static physics shapes is now respected. [#769]
  • Fix for a bug where triggers collide with everything. [#794]
  • Added a Set offset to Child button to the Physics Joint Component.
  • More detailed debug drawing for Physics Joint Component, now we draw each bodies’ respective local spaces and a line between them.

Primitive Drawer

  • Added a stroke_axis function to the tm_primitive_drawer_api, making it easier to visualize transforms (e.g. the new debug drawing for Physics Joint Component).

UI

  • Push buttons that are in a pushed state are now more readable.
  • Fix for entity tree shortcuts not working for a second selection. [#774]
  • Better behavior of Undo in text edit boxes [#810]
  • If stroke_bezier() runs out of memory, it will now draw the bezier curve at a lower quality instead.
  • Fixed a variety of issues in the High Contrast Light Theme.
  • Fixed a variety of issues in the Light Theme. [#805] [#802]
  • Fixed a variety of UI contrast issues.

UI Components

  • Fix for buttons and input fields in preview tab losing focus due to ui_serial() not starting at the correct UI ID.
  • It’s now possible to scale UI Components from gizmo.
  • Proportional layout options was added.
  • Added vertical and horizontal splitter containers.
  • Added radio, checkbox and label controls UI Components.
  • Remove feature flag.

Project Management

  • The project window layout isn’t saved on exit if the safe-mode flag is active.

2021.9.a

  • Fix for a glitch that failed detecting a creation graph swap.
  • Make sure we never register engines with the same name more than once.
  • Fix for Get button in new version popup always downloading the Windows version.
  • Only register the Camera Controller Component once.
  • Fix for incorrectly selecting the diffuse IBL creation graph instead of specular IBL creation graph when using prebaked IBL textures (i.e. not captured using the cubemap capture component).
  • Prevent duplication of components and the entity root.
  • Prevention from peeking at a dead creation graph instance in tm_creation_graph_api->named_outputs().
  • Fix for plugin generation not working when TM_SDK_DIR is not set. [#754]
  • Fix for occasional crash in workspace system.
  • The simulation now checks that the camera entity is alive as it may have been deleted externally.
  • Fix for image resources in samples not released properly. [#758] (thanks infosia)
by The Machinery Team