This Week in Fyrox #12
Fyrox is an open-source (opens new window) Rust game engine with lots of out-of-box game-ready features and a full-featured editor. This week was mostly dedicated to adding some new features and fixing existing functionality.
# Ability to Animate Material Properties
It is now possible to animate properties of any material, it adds a lot of control for various visual effects that use custom shaders. Animation editor is now able to bind to material properties, making something like this possible:
This can be applied to pretty much any numeric shader uniform, which adds an ability to create any kinds of visual effects.
# Reflection Improvements
Reflection now supports hash maps. This functionality was added to have an ability to animate properties
of materials via engine's animation system (see the gif above). This was a pretty easy change, but it
added more flexibility to the reflection system. The next improvement will be an ability to clone
dyn Reflect
values to add an ability to copy-paste properties in the Inspector.
# Audio Improvements in the Editor
Sound management in the editor now much more predictable and convenient. Previously, any sound in Playing state would immediately start playing after you load a scene in the editor, making pretty much impossible to create sound effects. It is now fixed, every sound is now not updating until you start previewing it. This can be done in a new audio preview panel:
.
To activate it, all you need to do is to select a Sound node. Then you need to click on Preview
checkbox
and the sound will start playing. Any changes made in this panel will not be recorded in the scene, you
can play with the sound as you want to.
# Automatic Resource Handle Restoration
When the engine saves a scene that has resource handles, those handles saves only path to resources, not the actual content. When loading the same scene, the engine re-loads all resources, but all handles scattered around must be restored manually to point to actual resource data. This is now fixed, the engine will use reflection to iterate over each field of every scene node and restore the handles.
# Other
Fixed terrain editing in the editor; its material property is now exposed in the Inspector. Terrains geometry is now update immediately when doing changes to the height map.
It is now possible to fetch standard shader names. Sound nodes now have validation, which check if a sound source has missing sound buffer.
It is now possible to force the engine to create unique materials when instantiating a prefab.
# Full List of Changes in Random Order
- Reflection for hash maps
- Fixed
Debug
trait implementation forImmutableString
- Expose material properties for reflection
- Added support for hash maps in property selector
- Ability to ignore some type when doing property inheritance
- Reflection-based resource handle mapping
- Access to terrain material via reflection
- Immediate geometry rebuild for terrain instead of deferred.
- Print texture resource name when failed to create its gpu representation.
- Removed a possibility to create a deadlock in resource manager
- Provided access to standard shader names
- Ability to set pre-generated particles in particle systems
- Fixed deadlock when selecting object's property in animation editor
- Fixed crash when previewing a scene with a root node with limited lifetime
- Ability to partially update global properties of an hierarchy of nodes
- Audio preview panel
- Prevent sounds from playing in the editor on their own.
- Validation for sound node
- Ability to get unique material instances when cloning a surface
- Added
Model::instantiate_at
method.