Jump to content
Entries in this blog
A new update is available to beta testers. This makes some pretty big changes so I wanted to release this before doing any additional work on the post-processing effects system.
Terrain system is working again, with an example for Lua and C++.
New Configuration Options
New settings have been added in the "Config/settings.json" file:
A new update is available that adds post-processing effects in Leadwerks 5 beta.
To use a post-processing effect, you load it from a JSON file and apply it to a camera like so:
auto fx = LoadPostEffect("Shaders/PostEffects/SSAO.json");
You can add as many effects as you want, and they will be executed in sequence.
The JSON structure looks like this for a simple effect:
A new update is available for beta testers.
The dCustomJoints and dContainers DLLs are now optional if your game is not using any joints (even if you are using physics).
The following methods have been added to the collider class. These let you perform low-level collision tests yourself:
The PluginSDK now supports model saving and an OBJ save
A new update is available to beta testers.
I updated the project to the latest Visual Studio 16.6.2 and adjusted some settings. Build speeds are massively improved. A full rebuild of your game in release mode will now take less than ten seconds. A normal debug build, where just your game code changes, will take about two seconds. (I found that "Whole program optimization" completely does not work in the latest VS and when I disabled it everything was much faster. Plus there's the precompile
The Leadwerks 5 beta has been updated.
A new FileSystemWatcher class has been added. This can be used to monitor a directory and emit events when a file is created, deleted, renamed, or overwritten. See the documentation for details and an example. Texture reloading now works correctly. I have only tested reloading textures, but other assets might work as well.
CopyFile() will now work with URLs as the source file path, turning it into a download command.
Undocumented class method
I am happy to show you a preview of the new documentation system I am working on:
Let's take a look at what is going on here:
It's dark, so you can stare lovingly at it for hours without going blind.
You can switch between languages with the links in the header.
Lots of internal cross-linking for easy access to relevant information.
Extensive, all-inclusive documentation, including Enums, file formats, constructors, and public members.
Data is fetch
All this month I have been working on a sort of academic paper for a conference I will be speaking at towards the end of the year. This paper covers details of my work for the last three years, and includes benchmarks that demonstrate the performance gains I was able to get as a result of the new design, based on an analysis of modern graphics hardware.
I feel like my time spent has not been very efficient. I have not written any code in a while, but it's not like I was working that whole t
I have been spending most of my time on something else this month in preparation for the release of the Leadwerks 5 SDK. However, I did add one small feature today that has very big implications for the way the engine works. You can load a file from a web URL:
local tex = LoadTexture("https://www.github.com/Leadwerks/Documentation/raw/master/Assets/brickwall01.dds")
Why is this a big deal? Well, it means you can post code snippets that can be copied and pasted without requiring download o
The old-timers on this site will remember a time before Steam, when leadwerks.com had a native image gallery as part of our site. The gallery is gone but all the images were saved on Google Drive here. This was replaced with the Steam-based image gallery which has accrued a massive amount of content (about 1800 screenshots).
With Steam flooding the market with new products there is pressure for developers to release more different products to occupy digital shelf space. For this reason, our
I've moved the GI calculation over to the GPU and our Vulkan renderer in Leadwerks Game Engine 5 beta now supports volume textures. After a lot of trial and error I believe I am closing in on our final techniques. Voxel GI always involves a degree of light leakage, but this can be mitigated by setting a range for the ambient GI. I also implemented a hard reflection which was pretty easy to do. It would not be much more difficult to store the triangles in a lookup table for each voxel in order to
I implemented light bounces and can now run the GI routine as many times as I want. When I use 25 rays per voxel and run the GI routine three times, here is the result. (The dark area in the middle of the floor is actually correct. That area should be lit by the sky color, but I have not yet implemented that, so it appears darker.)
It's sort of working but obviously these results aren't usable yet. Making matters more difficult is the fact that people love to show their best scr
The polygon voxelization process for our voxel GI system now takes vertex, material, and base texture colors into account. The voxel algorithm does not yet support a second color channel for emission, but I am building the whole system with that in mind. When I visualize the results of the voxel building the images are pretty remarkable! Of course the goal is to use this data for fast global illumination calculations but maybe they could be used to make a whole new style of game graphics.
I have resumed work on voxel-based global illumination using voxel cone step tracing in Leadwerks Game Engine 5 beta with our Vulkan renderer. I previously put about three months of work into this with some promising results, but it is a very difficult system and I wanted to focus on Vulkan. Some of features we have gained since then like Pixmaps and DXT decompression make the voxel GI system easier to finish.
I previously considered implementing Nvidia's raytracing techniques for Vulkan bu
I've had some more time to work with the Lua debugger in Leadwerks Game Engine 5 beta, and it's really amazing. Adding the engine classes into the debug information has been pretty simple. All it takes is a class function that adds members into a table and returns it to Lua.
sol::table Texture::debug(sol::this_state ts) const
auto t = Object::debug(ts);
t["size"] = size;
t["format"] = format;
t["type"] = type;
t["flags"] = flags;
t["samples"] = samples;
t["faces"] = faces;
Leadwerks Game Engine 5 Beta now supports debugging Lua in Visual Studio Code. To get started, install the Lua Debugger extension by DevCat.
Open the project folder in VSCode and press F5. Choose the Lua debugger if you are prompted to select an environment.
You can set breakpoints and step through Lua code, viewing variables and the callstack. All printed output from your game will be visible in the Debug Console within the VS Code interface.
Having first-class support for
A new update is available for beta testers. This adds navmesh pathfinding, bone attachments, and the beginning of the Lua debugging capabilities.New commands for creating navigation meshes for AI pathfinding are included.
In Leadwerks Game Engine 5 you can create your own navmeshes and AI agents, with all your own parameters for player height, step height, walkable slope, etc.:
shared_ptr<NavMesh> CreateNavMesh(shared_ptr<World> world, const float wi
In Leadwerks Game Engine 4, bones are a type of entity. This is nice because all the regular entity commands work just the same on them, and there is not much to think about. However, for ultimate performance in Leadwerks 5 we treat bones differently. Each model can have a skeleton made up of bones. Skeletons can be unique for each model, or shared between models. Animation occurs on a skeleton, not a model. When a skeleton is animated, every model that uses that skeleton will display the same m
An update is available for beta testers.
GLTF animations now work! New example included. Any models from Sketchfab should work.
Added Camera::SetGamma, GetGamma. Gamma is 1.0 by default, use 2.2 for dark scenes.
Fixed bug that was creating extra bones. This is why the animation example was running slow in previous versions.
Fixed bug where metalness was being read from wrong channel in metal-roughness map. Metal = R, roughness = G.
A new beta update to Leadwerks Game Engine 5 is available now.
CopyRect and Texture::SetSubPixels
Note that the "SharedObject" class has been renamed to "Object" and that math classes (Vec3, Vec4, Plane, Mat3, etc.) no longer derive from anything.
The terrain system in Leadwerks Game Engine 4 allows terrains up to 64 square kilometers in size. This is big enough for any game where you walk and most driving games, but is not sufficient for flight simulators or space simulations. For truly massive terrain, we need to be able to dynamically stream data in and out of memory, at multiple resolutions, so we can support terrains bigger than what would otherwise fit in memory all at once.
The next update of Leadwerks Game Engine 5 beta suppo
A new beta is available in the beta forum. This adds new texture and pixmap features, Basis texture support, and support for customized project workflows. Use of Basis textures brought the download size down to less than 300 megabytes. New Lua examples are included:
The new engine features advanced image and texture manipulation commands that allow a much deeper level of control than the mostly automated pipeline in Leadwerks Game Engine 4. This article is a deep dive into the new image and texture system, showing how to load, modify, and save textures in a variety of file formats and compression modes.
Texture creation has been finalized. Here is the command:
shared_ptr<Texture> CreateTexture(const TextureType type, const int width, const in
It's funny how all of the various features in the new engine are interconnected and development just flows from one to another. I was working on terrain, and I needed to save out some texture data so I implemented Pixmaps, and I wanted to add Basis support and DXT decompression, and then I started converting texture formats, and now I need a way to manage this all. This is an idea I have had for several years and I finally got to try it out.
Leadwerks Game Engine 4 has a strictly defined wo
Last year Google and Binomial LLC partnered to release the Basic Universal library as open-source. This library is the successor to Crunch. Both these libraries are like OGG compression for textures. They compress data very well into small file sizes, but once loaded the data takes the same space in memory as it normally does. The benefit is that it can reduce the size of your game files. Crunch only supports DXT compression, but the newer Basis library supports modern compression formats like B
In Leadwerks Game Engine 4, terrain was a static object that could only be modified in the editor. Developers requested access to the terrain API but it was so complex I felt it was not a good idea to expose it. The new terrain system is better thought out and more flexible, but still fairly complicated because you can do so much with it. This article is a deep dive into the inner workings of the new terrain system.
Terrain can be treated as an editable object, which i