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.
NavMesh Pathfinding
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.
What's new:
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.
T
Hello again. Implemented UTF8 support for LE4. Works fine?.
context->SetBlendMode(Blend::Alpha);
context->DrawText(u8"Привет мир! Hello world!", 25.0f, 25.0f);
context->SetBlendMode(Blend::Solid);
Add yours symbols to "familychars" and make own "family" in Font.cpp
if (family==Font::English)
{
familychars = L"abcdefghijklmnopqrstuvwxyzабвгдеёжзийклмнопрстуфхцчшщъыьэюя АБВГДЕЁЖЗИКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!@#$%^&*()_+[]\\{}|;':\",./<>
Using joints Hinge()
Joints are funny and powerful to build machines. They allow to use mass (gravity), different masses on different part of the machine depends on what you need, frictions, and limits.
By this machine, the only enabled motor is the first big oval cylinder, which is turning. The rest is articulated with disabled hinge joints.
Hello community, long time no see. I am working on my own graphical user interface, for my super duper rpg game :). The use separate textures for each button state, etc. I consider it not effective!
It is better to load the texture with the atlas of the whole GUI once. And use her.
In order to draw a texture from the atlas, we need to slightly modify the standard shader (drawimage), and save it under a different name (drawimagerect).
Shader
#version 400
uniform vec4 drawcolor
A new beta update to Leadwerks Game Engine 5 is available now.
New stuff:
Streaming terrain
CopyRect and Texture::SetSubPixels
Texture saving
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
Hellö
Here are a few thoughts about finding the best way to create a dense forest, with different models, quickly, dense and allowing good performances by walking and driving.
I first try with the vegetation tool. https://www.leadwerks.com/community/profile/15151-marcousik/?status=10763&type=status
I got good results but not by driving and I find that the collision checked causes the lost of 40 FPS (from 60 by to 20) making the game unplayable.
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:
Build Texture
Build Cubemap
SetSubPixels
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.
Creating Terrain
Terrain can be treated as an editable object, which i
Textures in Leadwerks don't actually store any pixel data in system memory. Instead the data is sent straight from the hard drive to the GPU and dumped from memory, because there is no reason to have all that data sitting around in RAM. However, I needed to implement texture saving for our terrain system so I implemented a simple "Pixmap" class for handling image data:
class Pixmap : public SharedObject
{
VkFormat m_format;
iVec2 m_size;
shared_ptr<Buffer> m_pixels;
int
I wanted to see if any of the terrain data can be compressed down, mostly to reduce GPU memory usage. I implemented some fast texture compression algorithms for BC1, BC3, BC4, BC5, and BC7 compression. BC6 and BC7 are not terribly useful in this situation because they involve a complex lookup table, so data from different textures can't be mixed and matched. I found two areas where texture compression could be used, in alpha layers and normal maps. I implemented BC3 compression for terrain alpha
A new update is available for beta testers. This adds a new LOD system to the terrain system, fixes the terrain normals, and adds some new features. The terrain example has been updated ans shows how to apply multiple material layers and save the data.
Terrain in LE4 uses a system of tiles. The tiles are rendered at a different resolution based on distance. This works great for medium sized terrains, but problems arise when we have very large view distances. This is why it is okay to
Documentation in Leadwerks 5 will start in the header files, where functions descriptions are being added directly like this:
/// <summary>
/// Sets the height of one terrain point.
/// </summary>
/// <param name="x">Horizontal position of the point to modify.</param>
/// <param name="y">Vertical position of the point to modify.</param>
/// <param name="height">Height to set, in the range -1.0 to +1.0.</param>
virtual void SetHeight(const int x
A new update is available for beta testers.
Terrain
The terrain building API is now available and you can begin working with it, This allows you to construct and modify terrains in pure code. Terrain supports up to 256 materials, each with its own albedo, normal, and displacement maps. Collision and raycasting are currently not supported.
Fast C++ Builds
Precompiled headers have been integrated into the example project. The Debug build will compile in about 20 seconds the first run