Posts
- May 2024 Progress Report
- November 2023 Progress Report
- October 2023 Progress Report
- July 2023 Progress Report
- March 2023 Progress Report
- December 2022 Progress Report
- August 2022 Progress Report
- May 2022 Progress Report
May 2024 Progress Report
Filmmaker
The new features are only available in the preview release for now. If you want to try it, you can download it here, but keep in mind it's not a stable version.
Reminder: You can manage your Supporter rewards (including your credits name, if you're eligible) on the supporter page.
Full-Body IK
Biiiig update on the IK system:
I still have some things in mind for the future, such as adding pole vectors/targets like the ones in Blender/Maya/Unreal, which make it easier to control the bending direction of limbs like arms and legs, but I'm content with it for now.
Meta Rig System
Part of the new updates is also a new "Meta Rig" system, which can automatically detect biped character models and generate an IK rig for them (among other things). This means you don't have to do anything manually in order to make use of the new IK system, just place your character in the scene and the IK controls should be available immediately. If you find a model where this doesn't work, please let me know, I'll be continuously working on improvements to the system.
The meta-rig system can also detect quadruped models, but I've yet to set up a template IK rig for them, so full-body IK isn't available for them yet.
Motion Editor
Also a long time coming, I finally got around to implementing the motion editor:
It has some performance issues if a large number of properties are selected, but nothing that can't be improved upon in the future.
Embedded Projects / Scenebuilds
I've added support for embedding a PFM project in other PFM projects. For instance, you can set up a project "A" as a scenebuild, and then create a new project "B" that uses "A" as a base:
It's similar to using a map, but more flexible. You can use multiple embedded sub-projects, change an embedded project between film clips, etc. It also makes it easier to re-use a scenebuild for different projects, or share them.
Motion Capture
Some more work on the motion capture module, which can now capture motion directly from webcam:
It also has support for tracking hands, fingers, as well as the lower body and facial expressions. Eye tracking is still a work-in-progress and it's still a bit jittery.
This will allow you to do simple motion capture using a webcam or your SmartPhone for any humanoid character model. Unfortunately the tracking isn't good enough for complex movements (like dance moves), but I think it should still come in handy. You can also specify what you want to track, for instance if you only wish to track facial movements (for lip synching).
Recording
You can now record gameplay as animation data:
While the recording mode is active, all changes to selected actor properties are recorded as an animation. The recorded animation data is then automatically smoothed and keyframes are generated (so they can be edited in the graph editor).
The main use-case for it is to record animation data from motion capture, but you can also use it to record manual changes like shown in the video above. For the future I'm also planning to use this to allow you to record physics interactions as animation.
Future Plans
I'm currently working on finishing up a new Prelewd release, hopefully ready some time next week (there will be another post at that time). I've already mentioned it a while back, but I will be focusing a lot more on Prelewd going forward to try and get more supporters on board to finance the project. For PFM I will be primarily focusing on bug fixes and quality-of-life improvements. I'm not sure if I can do any more interactive tutorials, as they're very time-consuming to create (and I haven't received much feedback on them), so I'll have to put those on halt for now. Depending on how things go, I might come back to them at a later date.
November 2023 Progress Report
A new stable release is available on GitHub!
Reminder: You can manage your Supporter rewards (including your credits name, if you're eligible) on the supporter page.
Constraints
No progress on the constraint tutorial yet unfortunately, I decided to focus on some quality-of-life changes first:
Constraints can now be created between actors/properties by using drag-and-drop, similar to SFM:
A constraint can be created between any two properties that are compatible (i.e. two vector or rotation-based properties).
I also added several new variants of the child-of constraint:
- Regular child-of constraint (equivalent to SFM's locks):
- Positional child-of constraint (Rotation of child remains unaffected):
- Translational child-of constraint (Child is affected by parent position, but not rotation):
- Rotational child-of constraint (Child has the same rotation as the parent, but its position is unaffected):
In addition, if you use drag-and-drop to place an object from the model explorer in the scene, the object will be automatically attached to the object under the cursor, if the two objects are compatible:
For example. if you have a hat that has a matching bone name with an actor in the scene, like in the example above, you can just drag-and-drop it onto the actor and the hat will be attached to the actor automatically using a child-of constraint. You can hold the alt-button to disable this feature.
Please ignore the delayed movement of the hat in the video, that only happens while moving the actor and will not be a problem during playback/rendering.
There's still a few small improvements I want to make to the constraint-system, but I'll get around to the tutorial soon.
Render Previews
You can now view all previously rendered frames in the render panel:
Previously it would only show whatever frame you rendered last in the current session, but the render panel can now be used as a sort-of video player for all frames that have been rendered for the project so far. The playback quality is significantly lower than the actual image quality of the rendered frames, but it's only meant as a preview anyway.
Timeline Export
I've mentioned in my last post that I was working on a timeline export feature for DaVinci Resolve. I decided to built on that, and added a timeline export feature for the FCPXML format, which should be supported by most video editing programs (I've only tested it with DaVinci Resolve, however.):
This should, in theory, allow you to import the rendered image sequences and audio in the PFM timeline into most video editing software. Please let me know if there's issues with it with whatever software you are using.
For DaVinci Resolve, there is also a special import function in the render panel:
This just makes it a little easier by directly launching DaVinci Resolve (assuming it's installed), then you just have to run a script within DaVinci to import the timeline automatically (as I've already showcased in my last post).
I've updated the render tutorial with new information about the new render preview, as well as the timeline export. You can check it out in the latest release!
Tutorial Feedback
I've enhanced the tutorial system by a direct feedback functionality:
I will collect any feedback I get and try and use it to improve the tutorials for the future, so please make use of it!
I've also fixed a bunch of AMD-related crash issues, so if you ran into any of those, it should hopefully work now!
October 2023 Progress Report
A new stable release is available on GitHub!
Tutorials
Aside from a lot of general improvements and additions to the existing tutorials and the tutorial system, I have added three new ingame tutorials:
- Dynamic Lighting: A general tutorial on how to work with light sources in PFM.
- Static Lighting: How to bake static lightmaps with Cycles X.
- Character Posing with IK: How to use the Quick-IK system and IK rigs. It doesn't cover how to create custom IK rigs, that will be for a future tutorial.
They're available in the latest release if you want to give them a try.
I was hoping to add the tutorial for constraints in this release as well, but I ran into a few bugs that need fixing first, so that will have to wait for the next update.
I'll also start uploading the tutorials as videos to YouTube next week. If you want your name in the credits ticker, please make sure to set your credits name in the supporter settings if you haven't already!
Graph Editor
Sequence Import
A lot of models come with their own animations. You can now import these as raw animation data into PFM:
Moreover, by using the "Generate Keyframes" feature, a curve fitting algorithm is applied on the animation data, which will turn it into a keyframe-based animation. This allows you to make adjustments to the animation, which is usually not possible with raw animation data.
This also works with other sources of raw animation data, such as from VR recordings or motion capture, or when importing a glTF model with animations (e.g. from Blender).
Curve Drawing
I've also added a curve drawing mode to the graph editor, which allows you to draw animation curves by hand:
The curves are automatically smoothed, and keyframes are generated, which allows you to manipulate the curves more easily after you have drawn them.
You can draw the entire curve, or just specific segments, which allows you to quickly make small, controlled adjustments to the flow of the curve.
Undo/Redo System
The old undo/redo system was very basic and only covered a handful of actions that could be undone, so I've developed a new undo/redo system. You should now be able to undo/redo most actions, including keyframe and animation operations.
The maximum number of undo steps is set to 100 by default, but can be changed in the PFM setings. On top of that, the new system allows the undo stack to be saved with the project. This means that if you save your project, close it, and open it some time in the future, you will still be able to undo your last actions. This can be particularly useful in cases where PFM crashes and you load an autosave, in which case you would normally lose all of your undo steps.
Godot Renderer
Originally I had much bigger plans for the rendering capabilities in Pragma, but unfortunately I likely won't be able to put any additional time into Pragma's rendering systems, so I've been weighing my options. I'm currently experimenting with adding the Godot Engine as a renderer to PFM. Technically it's not designed to be used like that, but that doesn't mean it's not possible. So far I only whipped up a simple test as a proof-of-concept:
(The UI is still rendered by Pragma, just the game scene is rendered using Godot.)
It's just an experiment for now and I don't know if it'll go anywhere. Depending on how things go, I may add it as a renderer for PFM only, or replace Pragma's main renderer entirely, or end up not using it at all. I still need to do a lot more testing to see how viable it is.
DaVinci Resolve
Since PFM can only render image sequences, you still need to use a video editing software to create the final video. I want to make this process easier, so I'm working on a script for DaVinci Resolve. If you're unfamiliar with DaVinci Resolve, it's a video editing software like Adobe Premiere or Sony Vegas, but free: https://www.blackmagicdesign.com/products/davinciresolve
More importantly, it has a great scripting API I can make use of. The script is currently still a work-in-progress and just a test, but once complete, you'll be able to easily import a rendered PFM animation into DaVinci Resolve, including render settings (framerate, VR settings, etc.), the rendered images, and the audio:
Misc
Some of the other changes include:
- PFM is now available in Italian and Polish
- Intro tutorial is now available in German and Japanese (including audio)
- Lots of bug fixes and general improvements
July 2023 Progress Report
A new release is available on GitHub: https://github.com/Silverlan/pragma/releases/tag/v1.1.0
Ingame Tutorials
The tutorial system that I've mentioned in my last progress report is now complete 😄! Here's a preview:
As you can see, the tutorials are also voiced now, using the ElevenLabs AI. This should make it easier to follow the instructions of the tutorials. The tutorials are currently only available in English, but I've set up the system so that voices could be added for other languages relatively easily.
If you want to try the tutorials yourself, you can download the latest version and just start "pfm.exe". There should be a popup after a few seconds, which will lead you to the intro tutorial by clicking it, which will then tell you how to find the other tutorials.
Here's an overview of all of the tutorials I have currently planned, as well as their completion percentage:
- Intro (100%): Introduction to PFM and the basic interface
Interface (Series)
- Viewport (100%)
- Asset Catalogs (100%)
- Render (100%)
- Web Browser (100%)
- Actor Editor (100%)
Lighting (Series)
- Dynamic Lighting (0%)
- Static/Baked Lighting (0%)
Animating (Series)
- Animating Basics (100%): How to animate basic properties and how to use the graph editor
- Character Posing with IK (90%)
- Constraints (0%)
- Math expressions (0%)
- Full Body IK (0%)
- Animation Drivers (0%)
- Retargeting (0%)
- VR Animating (0%)
- Motion Capture (0%)
Rendering
- Cel Shading (0%)
- Decals (0%)
- Depth of Field (0%)
- Motion Blur (0%)
- Sky (0%)
- Volumetric Spot Lights (0%)
Workflows
- Pragma Renderer (0%)
- SFM Import (0%)
- Scenebuilds (0%)
- Prelewd Projects (0%)
Misc
- Material Overrides (0%)
- Particle Editor (0%)
- UDM Editor (0%)
As you can see, most tutorials are still a work-in-progress, only the interface series is fully complete, as well as the first animating tutorial. I was hoping to get more done with this release, but creating new tutorials is pretty time-consuming, so it'll have to wait a bit longer. Finishing the lighting and animation series is my main priority for the moment.
If anyone would like to see any tutorials that aren't listed, please let me know. I could also use some feedback on the completed tutorials, it's hard for me to tell if they do a good job of explaining things or not 😄.
Animating
Inverse Kinematics
The new IK system is now fully implemented (based on BEPUik), with the exception of one pesky bug I have not been able to fix yet, but here's a small showcase:
IK Rig Editor
The IK rig editor allows you to set up a custom IK rig using various constraint types and limits:
You can restrict the range of rotation for each axis, which helps to prevent unnatural poses. The same method can be used to create full-body IK rigs, but I have to fix the aforementioned bug before I can showcase that.
Here's an actual usage example:
Tutorials coming up soon-ish!
VR Animating
If you have a VR headset with controllers, you can now use them for basic motion capture:
The way it works is, you can assign an ik control (like a hand) to a VR controller and then animate that in first-person. The system should be compatible with any VR headset, but I've only tested it with a Vive. You should also be able to use custom trackers, like the VIVE tracker (e.g. if you want to animate feet as well), but that is also untested.
I also still have to implement a curve fitting algorithm, so that the resulting animation can be edited in the graph editor, as well as a tutorial, but otherwise the system is fully operational.
Video Motion Capture
In addition, I've also been working on adding support for motion capture from video or webcam using the mediapipe library. This is an experimental feature and still in an early development stage:
(Please ignore the hands.)
In theory it allows tracking of facial movements, body poses, as well as finger tracking, but it is somewhat unstable. I'm also not sure if I'll have the time to finish this feature, so no promises yet.
Misc
Localization
I have set up some scripts to fully automate the translation of PFM into other languages using the ChatGPT API. This will make it significantly easier for me to add (and maintain) support for other languages in PFM. Using this system, PFM is now fully localized for French, Spanish and Chinese (simplified), in addition to the previous languages. I can add more languages on request.
Auto-Updater
The standalone version of PFM now has an auto-updater, so you don't have to download the latest release from GitHub every time. It will notify you whenever there's a new update available. You can also enroll for experimental updates in the PFM settings, though I generally would not recommend it:
Window Layouts
I have added a new system to customize the layout of PFM. For instance, you can change it to a three-column layout like this:
If you detach any windows or resize them you can also save that layout state as the default, so it will be restored the next time you start PFM. The layout state can also be saved with a PFM project, so you can have individual layout setups for specific projects (similar to Blender). The intro tutorial explains how it works if you want to know more.
Conclusion
I don't have any more plans at the moment for new features and will be focusing on the remaining tutorials, bug fixes and quality-of-life improvements for the foreseeable future. There's still a ton that could be implemented of course, but I feel like all of the core features are there now and just have to be cleaned up a little. I'm also way overdue for a new Prelewd release, but I needed to get some other stuff out of the way first. I do plan on putting a lot of time into that next month though🎉!
March 2023 Progress Report
Ingame Tutorials
I've implemented a new system for interactive in-game tutorials:
It's still work-in-progress, but it should hopefully make it much easier to learn how PFM works. So far I have only (mostly) finished two tutorials, but I'm planning on creating one for most of PFM's features. Compared to wiki- or video-tutorials, there are several advantages:
- The in-game tutorials can be localized easily into other languages
- If there are interface or functional changes, the in-game tutorials don't become outdated
- It's a more hands-on experience. It's much easier to learn if you're actively doing something compared to watching a video or reading an article.
- They're a part of PFM, so even if the wiki is ever shut down, they'll still be around.
There will be an introductory tutorial, which will lead to several tutorial series covering UI, render effects, common workflows (like importing SFM sessions), etc. This will be my main priority for the next few weeks, as I think it will make a big difference and it'll be worth the time investment 😄.
Animating
Constraints
There's a new constraint system with several different types of constraints for animating:
- Copy Location/Rotation/Scale: A set of constraints to copy the position, rotation, or scale of an actor to another actor.
- Limit Location/Rotation/Scale: A set of constraints to restrict the position, rotation, or scale of an actor to a certain range or axis.
- Limit Distance: A constraint that limits the distance between two actors in the scene, ensuring they remain within a specific range of each other. You can choose to make them stay within a certain radius to each other, exactly at a specific radius, or a minimum distance away from each other.
- Look-at: A constraint that causes an actor to face towards a target, orienting itself to always point in its direction.
- Child-of: A constraint that links two actors together in a parent-child relationship, causing one actor to follow the other's movements and transformations as if it were a child of the parent object.
I used Blender's constraints as a reference point, but I think they should work largely the same as the ones in SFM as well.
(No IK here, just constraints.)
Any two properties of any two actors can be constrained together, as long as they're transform-types (Vector3/Quaternion/etc.). All constraints have some base properties:
- influence: This property determines how much the constraint affects the driven actor. It is a value between 0 and 1, where 0 means no influence and 1 means full influence.
- driverSpace: This property specifies the coordinate space in which the driver actor (the actor that controls the constraint) is defined. Possible spaces are world/local/object.
- drivenObjectSpace: This property specifies the coordinate space in which the driven actor (the actor that is affected by the constraint) is defined. Possible spaces are world/local/object.
- orderIndex: This property determines the order in which multiple constraints are applied to the same object. It is an integer value that can be used to prioritize constraints.
Depending on the constraint type, some additional options are available. Blender also has a "custom space" option for the driverSpace and drivenObjectSpace, which may come in handy. I haven't added something like that yet, but I may do so.
Inverse Kinematics
The new (full-body) IK system is now technically fully integrated, however I still have to do a lot of testing and tweaking, so I can't show it off properly yet.
Unfortunately there is also no way for me to add support for SFM IK rigs, since the IK system is a fundamentally different one, and since SFM's IK rigs are python-based, which can't be converted automatically. The good news is I put in a lot of effort to try and simplify the process for creating IK rigs in PFM:
IK Rig Editor
There's a new editor for creating custom IK rigs. The general approach is very different compared to SFM, but hopefully less convoluted since you don't have to mess around with scripting:
The editor is primarily for creating full-body IK rigs, as well as VR Body IK rigs. If you're in a hurry and just want to set up a quick IK chain, there's of course still the option to do so by right-clicking a bone in the actor editor and selecting the desired chain length:
I will showcase these features properly once they're completed.
Improved Lightmaps (again)
Not much to say here, other than that I've once again made some more improvements to the quality of baked lighting:
Before:
After:
I'm quite happy with the results now. The lighting is distributed more evenly, and I fixed some issues that would cause some areas to appear dark (or completely black), as well as some other minor issues.
glTF Scene Import
Reminder: glTF is an asset format which can contain model and scene data (with multiple objects, cameras and light sources). It's the primary format for importing/exporting assets to/from Pragma. (More information here.)
I have made some more improvements to the glTF asset import. Previously importing a glTF asset into Pragma would simply create a single model out of it:
In cases like this where all the parts belong together, or it's just a single character, it makes sense to do this.
For cases where the glTF contains an entire scene, I've now added an alternative import method. With this method, all of the scene objects are imported as individual models, as well as a map containing the objects with their original poses:
(Every object is also imported as a separate model.)
There's also been a bunch of fixes to object scaling and coloring, etc. There's still no way to export an entire PFM scene as glTF (only individual models), but I'll get around to that eventually.
Cel Shading Outline
A minor new feature but still worth mentioning I think. I added a simple cel-shading outline effect which can be added to actors:
It's currently just the outline though, there is no toon shader for characters at the moment.
You can customize the size, color and emissivity of the outline, but it only works when rendering with the Pragma renderer (i.e. not with Cycles).
Tiled Rendering
I've added tiled rendering support for the Pragma renderer. This allows you to render images at any resolution with high-quality SSAA, regardless of available VRAM:
https://pragma-engine.com/share/patreon/23-03-30/tiled_rendering_example.png (Warning: 165 MiB image)
It's currently not very fast, so I still have to work on some performance improvements before I can publish it with the next update. It also doesn't work for VR renders yet, those are going to need some additional treatment.
Actor Editor Improvements
I've made a bunch of quality-of-life improvements to the actor editor:
- Most properties now have descriptive tooltips
- Components, properties and tooltips are now localized (i.e. available in other languages)
- There are new icons, depending on whether a property is animated, has constraints, a math expression or an animation driver. Clicking on the icon will directly lead to whatever its refering to (e.g. the constraint actor).
Map Scenebuilds
PFM projects can now be exported as maps. This will take all of the static actors (and light sources/baked lighting) from the project and generate a map from it.
Basically the general idea is that you can create a scenebuild in PFM (i.e. a scene with only static props and static lighting and no animated actors) and export it as a map. This allows you to easily re-use the same scenebuild for different projects, or share it with other people, without having to copy the actors from one project to another.
You can also take an existing map, import it into a PFM project, make some changes to it, and then export the result as a new map. This way you could also merge multiple maps into one if you wanted to.
Lua Debugging with Visual Studio Code
I stumbled upon some great Lua extensions for Visual Studio Code. Previously I had already added support for the ZeroBrane Lua IDE, but unfortunately that one is no longer in development, so Visual Studio Code will be the recommended IDE for Lua development in Pragma from now on. I added support for the extensions to Pragma, which enables code auto-completion, step-by-step debugging, conditional breakpoints, etc:
It also works great with GitHub Copilot (the AI-assistant by GitHub), which was actually the main reason I wanted to give it a shot. If nothing else, this will make my life a little easier for sure.
There's a tutorial on how to set up on the wiki, but it's not quite complete yet and won't work until the next update.
Conclusion
Unfortunately the new features are not published yet. Some of the new features are not quite finished yet, I still have to do a bunch of testing, work on performance improvements, bug fixing, code cleanup, etc., so I won't be working on any new features (other than the tutorials) until that's all completed. I'll do my best to get all of that done asap.
I have also purchased a new domain for Prelewd, prelewd.com, in preparation for the next Prelewd release. It's still under construction, but once I got all of the new features and tutorials completed, I do have a bunch of things planned.
Changelog
I don't have time to write a changelog by hand at the moment, but I'm experimenting with generating changelogs automatically.
You can find the full changelog over here, but it may include some older or duplicate features/changes.
December 2022 Progress Report
Full-Body IK
This one has been a long time coming, but the IK system is finally getting a much-needed upgrade. I was hoping to get it done by the end of 2022, but it's not quite there yet. Here's a sneak peek:
(Please ignore the random sparkling)
The new system supports full-body IK with branching IK trees as well as IK constraints with limits (e.g. to prevent arms from bending in unnatural ways), IK locking, etc. It still needs some tweaking and I haven't integrated it into PFM yet, but I should be able to get that done this month. Needless to say this will also significantly improve VR tracking for Prelewd!
Linux Support
Pragma and PFM (and Prelewd with the next update) are now finally available on Linux! Special thanks to SlawekNowy, who's been helping significantly in getting it all set up and running.
The Linux version is available in the GitHub releases: https://github.com/Silverlan/pragma
The build system is fully automated, just like with the Windows version, which means a new Linux release will be automatically generated every time new changes are added to Pragma/PFM.
That being said, there are still some issues:
- The internal web browser for PFM isn't functional yet
- There are some occasional rendering artifacts
- Particle systems behave strangely
- Several crash instances
- etc.
It will probably still be a few months before it's fully usable, but with the automated build system I should at least be able to ensure that the Linux version stays up to date without much time investment from my side.
Building Pragma
This one's not very interesting for anyone who isn't a programmer (sorry!), but it's a significant change, so I wanted to mention it:
I've significantly simplified the building process for Pragma to the point where Pragma can be built with just a few simple commands, both on Windows and Linux:
git clone https://github.com/Silverlan/pragma.git --recurse-submodules && cd pragma && python build_scripts/build.py --with-pfm --with-all-pfm-modules --with-vr
This will clone the Pragma repository and run the Python build script, which will download and build all dependencies, configure CMake and build and install the core project and binary modules. There are also lots of build parameters available for configuring the build (e.g. if you want to build Pragma without PFM or VR support).
More information on GitHub: https://github.com/Silverlan/pragma#build-instructions
This should make it much easier for anyone wishing to contribute to the Source Code.
Binary Modules
This is another change to simplify contributions to Pragma. Binary modules can be used to add features to Pragma without having to change the core Source Code. Some examples for binary modules are:
- pr_chromium: Adds an integrated Chromium-based Web Browser to Pragma
- pr_openvr: Adds virtual reality support to Pragma
- pr_bullet: Adds support for the Bullet physics engine to Pragma
- pr_physx: Adds support for the PhysX physics engine to Pragma
- pr_curl: Adds support for the curl library to Pragma
- pr_sqlite: Adds SQLite support to Pragma
The module system itself has been around for ages, but creating custom binary modules has now also been made much more simple. There is now a Pragma module template repository, which can be used to set up a new module, including automated builds and releases (nightly and stable) for Windows and Linux, in just a few minutes (assuming that a Pragma build has been set up first).
For more information, check out the wiki article.
Misc
Other note-worthy changes:
PFM Collections
PFM now has collections for better organization within a project:
UDM Editor
PFM now includes the UDM editor, which is a simple key-value interface for editing Pragma asset files:
It's similar to the element viewer in SFM, but you can use it to edit any of Pragma's asset files, including PFM project files, models, materials, maps, particles, configuration files, etc.
More information on the wiki: https://wiki.pragma-engine.com/books/pragma-filmmaker/page/udm-editor
Prelewd Scenebuild Improvements
I've created a new scenebuild for one of the Prelewd animations, since the old one looked pretty bad. This also served as another test for the new directional lightmap system and I think it came out pretty good:
Will be available with the next Prelewd update!
Japanese Localization
Pragma, PFM and Prelewd will be available with Japanese translations with the next update. This was a bit of an experiment, as all of the translations were generated using the ChatGPT AI. They're not perfect, but as far as I can tell they're serviceable, so I will be using this approach for adding more languages in the future, maybe even for the wiki!
Material Overrides
You can now add material overrides for individual actors by either overriding individual material properties, or an entire material.
More information on the wiki: https://wiki.pragma-engine.com/books/pragma-filmmaker/page/material-overrides
Touch Feedback
Another experiment, not sure if it'll go anywhere:
If it works out, I can use this system in combination with IK for realistic touch feedback in VR, but I can't make any promises on that yet.
August 2022 Progress Report
Pragma Renderer
Next to Cycles X and LuxCoreRender, I've now added Pragma as a renderer option. Unsurprisingly, this renderer uses Pragma's internal rendering system. The main purpose for the Pragma renderer is for animations, since render times with Cycles X and LuxCoreRender are excessively high for large image sequences, even on modern hardware (days, weeks or even months depending on hardware, scene complexity and framerate).
To make Pragma actually viable as a renderer, I've added some new features:
Lightmapping
The lightmap system has been significantly improved, and now includes directional lightmaps. The direct and indirect components are baked with Cycles X, while the directional component is using my own baking implementation. Without going into too much detail, this (along with other improvements) allows for much prettier lightmaps than before:
For comparison, here is a pure Cycles X render of the same scene:
The pure Cycles X render still looks slightly better, but I think the baked version is a pretty damn good substitute. I am not entirely sure why the colors look more intense in the baked version, that is something I will still have to investigate.
Lightmap baking still takes some time, but the major advantage is that it only has to be done once per scene, regardless of how many frames you render. Obviously this only works for static lighting, but it's still a pretty major milestone. For dynamic / animated actors you would still use dynamic light sources with a baked reflection probe.
Once lightmaps are baked, the rendering with the Pragma renderer is practically real-time, so the only render time to worry about is the actual lightmap baking. Baking the lightmaps for the example scene above at a 4K resolution took about 8 hours with my GTX 1050 Ti, but a resolution of 2K would probably be sufficient for a scene like this (which would reduce the render time to ~2 hours).
Since baked lightmaps are very cheap to render during real-time playback, Prelewd will also heavily benefit from this.
Motion Blur
I've added support for camera, object and skeletal animation motion blur, however this is currently implemented for the Pragma renderer only.
(If the difference in the video is too hard to spot, try pausing it.)
There are still some artifacts in some cases (like the Medic's finger in the right example), but it's not very noticeable in motion.
Technically the same motion blur implementation could be used for Cycles X/LuxCoreRender renders, but I don't think I'll have time to implement that any time soon, so it's restricted to the Pragma renderer for now.
Misc
Some misc features include:
- SSAA: The Pragma renderer uses SSAA for anti-aliasing. Looks good, but does require a fair amount of VRAM.
- Color Correction: You can use OpenColorIO color transforms with the Pragma renderer. Default is filmic-blender, just like for the Cycles X / LuxCoreRender renderers.
- Virtual Reality: Of course the Pragma renderer also has full support for rendering image sequences for VR:
New Transform Gizmo System
I've completely overhauled the transform gizmo system, since the previous one was... severely lacking in many ways. The new one is significantly more pleasant to use, and has some new features:
- Snap-to-grid (both for translations and rotations)
- Transforming multiple selected objects at once (not supported for scaling yet)
- Viewport now supports rectangle-select by clicking +dragging mouse cursor
Smart Move
There is also a new "smart" move system, which allows you to quickly move objects around while keeping their relative orientation to the environment:
Decals
Not much to say here. I already implemented decals a while ago, but I never got around to add them to PFM until now:
They can correctly wrap around most surfaces, doesn't work with animated actors at the moment though.
Other Changes
- Undo-redo system: Not much to say here other than that undoing and redoing actions is now implemented. The maximum number of undo steps can be controlled with the "pfm_max_undo_steps" console command. Some actions (like adding new actors or components) don't have undo support yet.
- Map Import: You can "import" a map, which adds all of the map's props (and the world), light sources, etc. as actors to the current project. You can use this if you want to use parts of different maps in the same project, for example.
- Improved viewport interaction: I've added an object BVH system for fast raycasts. Effectively this means that selecting actors in the viewport is significantly faster and more accurate now.
- Various UI improvements and fixes
- Lots of general bug fixes and minor improvements
Tutorials
I've added a bunch of new tutorials on the wiki:
Some are more complete than others, but Getting Started is a good starting point. The Rendering Animations workflow describes how to effectively use the new lightmap system.
Going Forward
With that I unfortunately also have some bad news. In part thanks due to the current economic crisis, I can't actually afford to continue working on this project for much longer, unless I can somehow get significantly more supporters on board 😕. For that end I will have to make some changes going forward..
Primarily this means that, starting next month, Prelewd will become my main priority. I know that's hardly ideal considering progress on the Filmmaker/Engine has already been pretty slow, but sadly I just don't have any other options at the moment. If I can use Prelewd to reach some of my milestones, I may be able to put more time into the project as a whole again, but for now that's somewhat up in the air. With prices absolutely skyrocketing over here, and things likely becoming worse come winter, unfortunately this is a compromise I have to make at this point 😅. I will continue to squeeze in as much time as I can into the Filmmaker and the Engine, but there will likely not be any major new features for either for some time, at least none that don't also benefit Prelewd in some way. I'm sorry, but I hope you understand.
Full Changelog
Latest release is available on GitHub: https://github.com/Silverlan/pragma/releases/tag/nightly
(For previous changelogs, see https://wiki.pragma-engine.com/books/pragma-engine/page/changelog)
Version 1.0.5 [2022-08-30]
Filmmaker v0.4.6
- Added Pragma Renderer
- Added SSAA
- Added motion blur
- Added directional light maps
- Added volumetric spot-lights
- Virtual Reality support
- Added new transform gizmo system
- Added/Improved viewport actor interaction
- Added undo-redo system
- Added decals
- Added tutorials
- Added option for importing map into project
- Added new actor context menu options
- Added support for rendering legacy Eye shader with Cycles X
- General UI improvement updates
- Significantly improve quality of baked lightmaps
- Added components:
- pfm_baked_lighting
- pfm_cuboid_bounds
- pfm_pragma_renderer
- pfm_motion_blur
- pfm_rt_mover
- pfm_overlay_object
- pfm_camera_actor_link
- pfm_selection_wireframe
- pfm_cone_wireframe
Engine
- Added motion blur effect
- Added object BVH system for fast scene intersection tests
- Added directional lightmap baking
- Improved volumetric spot-light effect
- Fixed bloom effect appearing stretched on widescreen resolutions
- Fixed white edges around objects with masked alpha transparency
- Added entity components:
- renderer_pp_bloom, renderer_pp_dof, renderer_pp_fog, renderer_pp_fxaa, renderer_pp_tone_mapping
- optical_camera
- bvh, static_bvh_cache, static_bvh_user
- light_map_data_cache
- Fixed various crashes
Lua
- Added table.count, table.is_empty
- Added gui.Element:FindAncestorByClass, :SetAutoSizeToContents, :UpdateAutoSizeToContents, :ShouldAutoSizeToContentsX, :ShouldAutoSizeToContentsY
- Added game.Model:GetEyeball, .Load
- Added ents.EyeComponent:FindEyeballIndex, :GetEyeballProjectionVectors
- Added ents.ClickComponent.find_entities_in_kdop
- Added ents.BvhComponent:IntersectionTestKDop
- Added ents.BaseBhvComponent:RebuildBvh, :FindPrimitiveMeshInfo, .HitInfo:CalcHitNormal
- Added ents.DecalComponent:ApplyDecal
- Added util.ImageBuffer:SetPixelColor
- Added game.Model.Mesh.Sub:HasVertexWeights
- Added python library
- Added prosper.util.record_resize_image, .create_generic_image_descriptor_set
- Added Model.Mesh.Sub:MakeVerticesUnique, :SetVertices, :SetIndices
- Added asset.get_asset_state
- Added vector.calc_spherical_stereo_transform
- Added ents.LightMapComponent.DataCache:GetInstanceIds, :GetInstancePose
- Added ents.BaseEnvLightSpotComponent:CalcConeFalloff, :CalcDistanceFalloff
- Added ents.BaseEnvLightPointComponent:CalcDistanceFalloff
- Added util.ThreadPool:WaitForCompletion
- Added ents.citerator, ents.get_all_c, ents.IteratorFilterFunction
- Added classes ents.LightMapDataCacheComponent, ents.LightMapComponent.DataCache
May 2022 Progress Report
GitHub Beta Releases
First things first, a few changes on how I'll be doing beta releases in the future:
I've set up automated builds via continuous integration (CI) using GitHub actions for the Pragma repository.
This means that from now on every time I commit new changes to the source code, there will be an automatically generated beta-release with those changes available on GitHub a few hours later:
https://github.com/Silverlan/pragma/releases/tag/nightly
These releases always include the latest features, as well as the latest version of the Filmmaker. There will be a notification in the channel on Discord whenever a new version is available.
Please remember that these are beta-versions, which means they're not necessarily stable and some things may not work properly or suddenly break in an update. If you want to be on the safe side, you can wait for the next stable release, however I don't have an eta for the next one at the moment.
If you have the Steam version with the preview beta-test DLC, you'll still get regular updates like before.
Prelewd will get a similar treatment soon, but I haven't quite finished the setup for that yet.
Linux Support
I've also been working on and off on adding Linux support to Pragma/PFM. Most of the libraries are Linux-compatible now (indicated by the on the GitHub repositories), but there's still a lot of work ahead for the core repository.
I'm hoping the new CI integration will make that easier for me, but it'll likely still be quite a while, since it's a low priority.
Filmmaker
Graph Editor
The graph editor is now mostly complete and functional. It supports:
- Constant, linear and bezier interpolation
- Aligned, free and vector handle types
- Same easing types and modes as Blender (Sinusoidal, Cubic, Exponential, Bounce, etc.)
Cycles X & Improved live raytracing
Cycles X is a new major update to the Cycles renderer that was added to Blender last year. A few months ago they also made it available as a stand-alone version, so I took some time to upgrade to it. Some of the changes include:
- There should no longer be rendering issues with certain GPU models
- Rendering should be significantly faster now
- Adaptive sampling is enabled by default when rendering with Cycles X in PFM, which should decrease render times even further
- The OptiX denoiser is used by default if available
- Cycles X can now be used for the live raytracing render viewport, which is almost in real-time:
You can edit the scene while live raytracing is enabled, but only some changes to the camera and light sources are updated automatically for the time being. Other changes don't appear in the live raytracing view until it's reloaded.
Internal Web-Browser
I've added an internal web-browser to the Filmmaker interface:
It has bookmarks to several big SFM and Blender content websites (e.g. SFMLab, SmutBase, etc.) and any files you download through it will automatically be analyzed by Pragma. If Pragma detects any asset files in the download (e.g. models, maps, etc.), they will automatically be imported and will be usable immediately. This works with most downloads from most websites, although some archive types (e.g. .rar
) can cause some issues.
Wetness shader
I've had several requests for this, so I added a "wetness" shader for rendering with Cycles X.
To use it, all you have to do is crank up the "wetness" slider for the material you want to use it for in the material editor:
The effect only applies when rendering with Cycles X at the moment, and will create the appearance of wet skin:
It's not perfect, but it's significantly better than to just rely on the roughness slider. If anyone has experience with Cycles and has some ideas for other neat effects, let me know, I'd be happy to implement them!
Fur / Hair rendering with Cycles X
Fur and hair rendering is now fully functional with Cycles X as well (previously only LuxCoreRender).
(From left to right: No hair → Increased levels of hair.)
This one doesn't look great with this particular model, but I don't have any other examples right now and I think you get the gist:
IK Posing
The IK posing I added a while back is now finally integrated into the filmmaker interface:
That being said, IK limits (e.g. to prevent an arm from bending more than 90 degrees) are currently not supported.
Animation with IK should also be functional, but hasn't been tested much so far.
Misc Changes
Some other changes that aren't as interesting by still worth mentioning:
Improved asset import support
Alongside the web-browser, asset import has been improved overall significantly. On top of the previously supported formats, new supported formats include: blend, fbx, dae, x3d, obj, abc, usd. (You can find the full list here.)
Support for pmx (MMD) models has also been improved and now supports animations and morph targets.
Additionally, you can also now just drag-and-drop an entire compressed archive onto the model asset explorer and all of the assets within will be detected and imported automatically.
Detachable Windows
You can arrange your workspace however you want by detaching windows from the primary window:
This is particularly handy if you have multiple monitors available. In addition, there's also support for multiple viewports now (up to three):
Copying actors
Actors (including animation data) can now be easily copied between projects through the actor editor:
When you copy an actor, it is copied as a string to the clipboard. This string is just regular text, which means you can, for instance, send that string to someone else (via chat), and they can then just use it to insert the actor into a project on their side. This makes sharing actors/animations with other people significantly easier.
Controlling light sources using work camera
Spot light-sources can be controlled using the work camera, just like in SFM:
New PFM project format
PFM has a new project file format, the old format is no longer supported.
Without going into too much detail, the new format is easier to work with and significantly faster for loading and saving. There is also an auto-save system now that automatically saves the project every 10 minutes, so you don't lose too much progress in case of a crash.
Rebindable keybinds
PFM keybinds can now be remapped via the "pfm_bind" and "pfm_unbind" console commands. There will be an interface for that (like the one in SFM) in the future as well, but for now it's console only.
Engine Updates
Support for high-poly Meshes
The vertex count of meshes was previously limited to 65535 vertices per mesh. The limit has been increased to 1872457 vertices, which should cover the vast majority of models.
This means that models with a high mesh complexity that weren't working before, should now be fully supported. This mostly relates to some Source 2 and Blender models, since Source 1 models have significantly fewer vertices.
Support for the Source Engine "Eyes" shader
Not a major update, but I've finally added support for the old "eyes" shader from the Source Engine.
Basically, the Source Engine has two different ways of rendering eyes, an older version ("Eyes", used by older Source games, like Half-Life 2, as well as a lot of custom models), and a newer version ("EyeRefract", used by TF2 and newer Source games). Previously there was only support for the new shader and not the old one, which meant that the eyes of characters using the old versions would not be rendered correctly. The old shader is now fully supported as well:
Fixes
I've fixed and upgraded up a bunch of old Engine systems that have broken over time due to one reason or another. Some of these include:
Particles
Particle rendering is (mostly) functional again, and blob particles have received some updates (like support for PBR properties (roughness, metalness, ...)):
Skies
Skies now support equirectangular HDRI textures (previously only cubemaps) and can be rotated and animated:
Water
Water rendering, buoyancy physics, fog, 3d skies and portals are fully functional again:
New asset manager system
I've completely overhauled the engine's asset management system(s). I don't want to bore anyone with the details, but the most important change is that it's now fully multi-threaded, which means that asset loading (in particular models and textures) should be significantly faster now, especially for projects or maps with a lot of models.
Prelewd
Unfortunately there's still no new version of Prelewd yet, but I do have some exciting news for the near future!
I've recently acquired the usage rights to a large amount of high quality VR SFM and Blender animations by MetsSFM (a retired SFM animator). I haven't had the time to integrate them into Prelewd yet, but I will get started on that later next month.
I have also set up an automated build and release system for Prelewd as well, but that isn't active yet. Once it's active there will be regular notifications on the Prelewd Discord server about new pre-releases (hopefully starting later next month as well).
Other than that, there have been some UI overhauls and performance improvements, but I can't show those off quite yet. Some of the new PFM changes (like the asset web browser) will also be part of the next Prelewd update!
Full Changelog
(For previous versions, see https://wiki.pragma-engine.com/books/pragma-engine/page/changelog)
Filmmaker v0.4.6
- Replaced Cycles with Cycles X (With OptiX and OptiX denoising)
- Significantly improved performance of live raytracing render
- Live raytracing render now automatically updates on certain scene changes (e.g. lighting)
- Graph Editor is now mostly functional and can be used for animating
- Added internal Web-Browser which automatically detects and imports downloaded assets
- Added new project file format (old format is no longer supported)
- Added reflection probe and lightmap baking
- Added option to copy/paste and share actors with animation data between projects
- Added secondary and tertiary viewports
- Significantly reduce real-time peformance impact of retargeted actors
- Sky settings have been moved to "sky" actor component to allow animating sky properties
- Sky overrides and angles can now be previewed in the game viewport
- Actors and actor components can now be removed
- Improved asset explorer filter
- "emission_factor" entry field in material editor is now a color field instead of a simple slider
- General load and save performance improvements
- Added quicksave and autosave
- Added new rebindable hotkey system and default hotkeys
- Bones can now be animated with transform widgets in 3D viewport
- Support for volumetric spotlights when rendering with Cycles
- Generated model asset icons now zoom in and focus on the character head for character models
- Added IK configs, IK posing and animating with IK
- Actors can now be right-clicked in game viewport to edit materials directly
- Fixed timeline zoom issues and improved zooming behavior
- Fixed incorrect camera FOV values when importing a SFM session
- Lots of crash, interface, general bug fixes, improvements and QOL changes
Engine
- Added support for meshes with more than 65535 vertices
- Significantly improved asset loading times
- Added model asset import support for formats: blend, fbx, dae, x3d, obj, abc, usd, pmx (MMD)
- Assets can now be automatically detected and imported from archive files
- Added support for Source Engine "Eyes" shader
- Added support for "$alpha" VMT parameter
- Added console commands:
- asset_multithreading_enabled
- asset_file_cache_enabled
- render_enable_verbose_output
- debug_dump_font_glyph_map
- locale_localize
- util_convert_cubemap_to_equirectangular_image
- util_convert_equirectangular_image_to_cubemap
- Added "-console" launch parameter arguments: "gui", "guid"
- Console command launch parameters that appear after "+map" are now executed after the map has been loaded
- Added entity components:
- game_animation_player, game_animation_recorder
- func_portal, portal
- liquid_surface, liquid_volume, buoyancy, surface, liquid
- weapon_physcannon
- wireframe_camera
- Added maps: test_3d_skybox, test_ai_nav, test_fog, test_mirror, test_physics, test_portal, test_water, test_particles
- Added gravity gun script
- Added support for rotating GUI elements
- Added support for UTF8 fonts and localization
- Added "local view target factor" for controlling character eyes
- Updated particle system to new renderer
- Various blob particle improvements
- Fixed water buoyancy physics
- Fixed fog not rendering
- Fixed 3D skybox not rendering
- Fixed water not rendering
- Fixed issue where light source could appear as turned on despite being turned off or removed previously
- Fixed crash when loading models with custom activity names
- Added Fortress Forever to default mount list
- Added support for equirectangular skyboxes and sky angles
- Fixed crash when attempting to export model asset with invalid flex rules
- Fixed some model meshes not being rendered
- Maps in new-game menu are now split into native maps and external maps
- General performance improvements
-
Spot-light inner cone angle has been replaced with blend fraction
-
Spot-light outer cone angle has been changed from half-angle to full-angle
- prop_dynamic entities no longer spawn with physics
- General crash fixes and improvements
Lua
- Lua-defined component members can now be animated
- Add "prepared render command buffer" system for issuing multi-threaded render commands
- Component member flags can now be specified as strings
- Added Component member meta data information
- Added function bindings:
- asset.find, asset.clear_unused, asset.normalize_asset_name, asset.load, asset.reload, asset.precache, asset.is_supported_extension, asset.wait_until_loaded, asset.wait_until_all_pending_jobs_complete, asset.poll, asset.poll_all
- ents.Entity:GetUri, :GetMemberValue, :SetMemberValue, :DebugPrintComponentProperties
- ents.EntityComponent:Log, :GetUri, :GetMemberUri, :GetDynamicMemberIndices, :GetStaticMemberCount, :GetMemberIndices
- ents.ModelComponent:ReloadRenderBufferList, :IsDepthPrepassEnabled, :SetDepthPrepassEnabled, :IsAutoLodEnabled, :SetAutoLodEnabled
- ents.BaseEnvLightSpotComponent:GetBlendFractionProperty, :GetOuterConeAngleProperty, :GetConeStartOffsetProperty
- ents.CameraComponent:GetFocalDistance, :SetFocalDistance, :GetFocalDistanceProperty
- ents.PanimaComponent:DebugPrint, :GetCurrentTime, :SetCurrentTime, :GetCurrentTimeFraction, :SetCurrentTimeFraction, :ReloadAnimation
- ents.LightComponent:SetLightIntensityType, :SetLightIntensity
- ents.ReflectionComponent:GetLocationIdentifier, :GenerateFromEquirectangularImage
- ents.LightComponent:IsBaked, :SetBaked
- ents.add_component_creation_listener
- ents.find_installed_custom_components, ents.get_registered_entity_types
- ents.RenderComponent:IsInPvs
- ents.TransformComponent:Teleport
- ents.WorldComponent:RebuildRenderQueues
- ents.ModelComponent:UpdateRenderMeshes
- file.is_empty
- debug.render_mesh
- game.get_number_of_scenes_queued_for_rendering, game.get_queued_scene_render_info, game.set_gameplay_control_camera, game.reset_gameplay_control_camera, game.get_gameplay_control_camera, game.clear_gameplay_control_camera, game.get_primary_camera_render_mask
- geometry.calc_rect_circle_touching_position
- gui.create_render_target, gui.create_color_image, gui.register_default_skin, gui.set_focus_enabled, gui.is_focus_enabled
- game.DrawSceneInfo:AddSubPass
- gui.Base:CheckPosInBounds
- gui.DropDownMenu:FindOptionIndex
- gui.Element:GetRelativePos, :SetLocalAlpha, :GetLocalAlpha, :IsRemovalScheduled, :ResetRotation, :GetRotationMatrix, :SetRotation, :SetStencilEnabled, :IsStencilEnabled, :SetLocalRenderTransform, :ClearLocalRenderTransform, :DrawToTexture, :GetLocalRenderTransform, :AnchorWithMargin, :ClearFocus, :SetParentAndUpdateWindow
- gui.Text:GetTextHeight, :UpdateSubLines, :SetMaxLineCount, :GetMaxLineCount
- gui.Shape:ClearBuffer, :SetShape, :GetBuffer, :SetBuffer, :GetVertexCount
- gui.WIContextMenu:IsPopulated
- gui.ProgressBar:SetLabelVisible
- input.InputBindingLayer, input.add_input_binding_layer, input.get_input_binding_layers, input.get_input_binding_layer, input.remove_input_binding_layer, input.get_core_input_binding_layers, input.update_effective_input_bindings, input.get_effective_input_bindings, input.set_binding_layer_enabled, input.is_binding_layer_enabled, input.is_binding_layer_enabled, input.InputBindingLayer:FindBoundKeys
- locale.localize
- math.snap_to_gridf, math.get_power_of_2_values, math.calc_bezier_point
- math.Mat4.create_reflection
- math.Quaternion:MirrorAxis
- math.Transform:ToPlane, math.Transform:Reflect
- math.Vector2:GetAngle, math.Vector:Reflect
- Model:GetExtensionData, :GetSubMesh, :FindSubMeshId
- Model.Mesh.Sub:GetTriangle, :GetIndexType, :SetIndexType, :AddIndex, :SetIndex, :GetIndex, :HasUvSet, :GetExtensionData, :ReverseIndices, IndexType and MaxIndex enums
- Renamed Model.Mesh.Sub:GetTriangles to :GetIndices
- panima.Animation.load, :RemoveChannel
- panima.Channel:Resize, :GetSize, :SetTime, :SetValue, :ClearValueExpression, :GetValueExpression, :RemoveValue, :FindInterpolationIndices, :FindIndex, :RemoveValueRange, :AddValueRange, :SortValues, :GetInterpolatedValue, :FindIndexRangeInTimeRange
- prosper.blur_texture
- prosper.RenderTarget:GetColorAttachmentTexture, :GetDepthStencilAttachmentTexture
- prosper.Window:GetMonitorBounds, :Maximize, :IsMaximized
- shader.BaseTexturedLit3D:IsDepthPrepassEnabled, :SetDepthPrepassEnabled
- table.is_empty, table.table_to_map
- util.File:GetSize, util.import_assets, util.generate_hair_file, util.generate_hair_data
- udm.is_numeric_type, is_generic_type, is_non_trivial_type, type_to_string, get_numeric_component, lerp, get_numeric_component_count, is_vector_type, is_matrix_type, get_matrix_row_count, get_matrix_column_count, is_array_type, get_class_type, parse
- input.is_ctrl_key_down, is_alt_key_down, is_shift_key_down
- udm.Array:ToTable, udm.PropertyWrapper:ToTable, :ToAscii
- udm.Property:AddValueRange, :RemoveValueRange, :SetValueType, :RemoveValue, :Copy
- Material:SetLoaded
- Added classes/enums:
- util.ThreadPool
- util.ZipFile
- gui.DrawToTextureInfo
-
asset.AssetLoadFlags
-
shader.BindState
- Fixed EntityComponent:GetMemberValue, :SetMemberValue not working correctly for some member types
- Fixed util.remove not removing all objects in table correctly in some cases
- Fixed Lua-defined component members of type string not working correctly