Jump to content
  • entries
    941
  • comments
    5,894
  • views
    868,038

About this blog

Learn about game development technology

Entries in this blog

Debugging Lua with Visual Studio Code in Leadwerks Game Engine 5 Beta

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

Josh

Josh

Vulkan Voxels

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

Josh

Josh

Voxel GI: Colors and Fast Downsampling

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.

Josh

Josh

Leadwerks 5 Beta Update

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

Josh

Josh

Leadwerks 5 beta update adds post-processing effects system

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"); camera->AddPostEffect(fx); 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: { "postEffect": { "subpasses": [ {

Josh

Josh

Leadwerks 5 Beta Update Available

A new update is available that improves Lua integration in Visual Studio Code and fixes Vulkan validation errors. The SSAO effect has been improved with a denoise filter. Similar to Nvidia's RTX raytracing technology, this technique smooths the results of the SSAO pass, resulting in a better appearance. It also requires far fewer sample and the SSAO pass can be run at a lower resolution. I lowered the number of SSAO samples from 64 to 8 and decreased the area of the image to 25%,

Josh

Josh

Optimizing the Vertex Pipeline

In my work with NASA we visualize many detailed CAD models in VR. These models may consist of tens of millions of polygons and thousands of articulated sub-objects. This often results in rendering performance that is bottlenecked by the vertex rather than the fragment pipeline. I recently performed some research to determine how to maximize our rendering speed in these situations. Leadwerks 4 used separate vertex buffers, but in Leadwerks 5 I have been working exclusively with interleaved v

Josh

Josh

Transparency and Refraction in Vulkan

One of the downsides of deferred rendering is it isn't very good at handling transparent surfaces. Since we have moved to a new forward renderer, one of my goals in Leadwerks 5 is to have easy hassle-free transparency with lighting and refraction that just works. Pre-multiplied alpha provides a better blending equation than traditional alpha blending. I'm not going to go into the details here, but it makes it so the transparent surface can be brighter than the underlying surface, as you can

Josh

Josh

Leadwerks 5 Beta Update Available

An update is available that adds the new refraction effect. It's very easy to create a refractive transparent material: auto mtl = CreateMaterial(); mtl->SetTransparent(true); mtl->SetRefraction(0.02); The default FPS example shows some nice refraction, with two overlapping layers of glass, with lighting on all layers. It looks great with some of @TWahl's PBR materials. If you want to control the strength of the refraction effect on a per-pixel basis add an alpha channel

Josh

Josh

Reflection Colors

An update is available for Leadwerks 5 beta on Steam that adds a World::SetSkyColor() command. This allows you to set a gradient for PBR reflections when no skybox is in use. I learned with Leadwerks 4 that default settings are important. The vast majority of screenshots people show off are going to use whatever default rendering settings I program in. We need a good balance between quality and performance for the engine to use as defaults. Therefore, the engine will use SSAO and bloom effe

Josh

Josh in Articles

GUI Work

The terrain streaming / planet rendering stuff was the last of the feature creep. That finishes out the features I have planned for the first release of the new engine. My approach for development has been to go very broad so I could get a handle on how all the features work together, solve the hard problems, and then fill in the details when convenient. The hard problems are all solved so now it's just a matter of finishing things, Consequently, I don't think my blogs are going to make any

Josh

Josh in Articles

Leadwerks 5 Editor Extension Example

Our new editor is being designed to support user-created extensions written in Lua. I want Lua to work in our new editor the way MaxScript works in 3ds Max, to allow an endless assortment of new tools you can create and use. Now that the editor GUI system is well underway, I want to start thinking about how user-created extensions will work with our new editor. I'm going to lay out some theoretical code for how a road creation tool might integrate into the editor. First we declare a st

Josh

Josh in Articles

Ultra App Kit Beta Updated

An update is available for the Ultra App Kit beta on Steam. Menu open / close behavior is finished and is now working bug-free. Fixed problem where list boxes were only showing the first item. A submenu item is demonstrated in the example program. A progress bar widget is added in the example program. A label widget is added in the example program. A second radio button is added in the example program. Still to do: Work out some scaling i

Josh

Josh in Articles

Scenes, prefabs, and the Lua state serialization that loves them

The beta testers and I are are discussing game programming in the new engine. I want to see C++, Lua, and C# all take a near-identical approach that steals the best aspects of modern game programming and ditches the worst, to create something new and unique. To that end, we are developing the same simple game several times, with several different methodologies, to determine what really works best. One thing I realized quickly was we really need a way to load prefabs from files. I started im

Josh

Josh in Articles

2020 Year in Code

2020 was the most intellectually challenging year in my career. Many major advancements were invented, and 2021 will see those items refined, polished, and turned into a usable software product. Here is a partial list of things I created: Streaming hierarchal planet-scale terrain system with user-defined deformation and texture projection. Vulkan post-processing stack and transparency with refraction. Vulkan render-to-texture. Major progress on voxel ray tracing.

Josh

Josh in Articles

Vulkan Viewport in a GUI Application

Before finalizing Ultra App Kit I want to make sure our 3D engine works correctly with the GUI system. This is going to be the basis of all our 3D tools in the future, so I want to get it right before releasing the GUI toolkit. This can prevent breaking changes from being made in the future after the software is released. Below you can see our new 3D engine being rendered in a viewport created on a GUI application. The GUI is being rendered using Windows GDI+, the same system that draws the

Josh

Josh in Articles

Ultra App Kit 1.2 Released

Ultra App Kit 1.2 is now available on our site and on Steam. This is a bug fix update that resolves numerous small issues reported in the bug reports forum. To download the latest version, see My Purchases.

Josh

Josh in Articles

Built-in Shaders

In Leadwerks, required files were always a slightly awkward issue. The engine requires a BFN texture and a folder of shaders, in order to display anything. One of my goals is to make the Ultra Engine editor flexible enough to work with any game. It should be able to load the folder of an existing game, even if it doesn't use Ultra Engine, and display all the models and scenes with some accuracy. Of course the Quake game directory isn't going to include a bunch of Ultra Engine shaders, so what to

Josh

Josh in Articles

KTX2 Texture Support

A while back I wrote enthusiastically about Basis Universal super compression. KTX2 is a texture file format from Khronos, makers of the Vulkan and glTF specifications. Like DDS files, KTX2 can store multiple mipmaps, as well as memory-compressed texture formats like DXT5 and BC7. However, KTX2 now supports Basis compressed data as well, which makes it the all-in-one universal texture format. glTF has an official extension for KTX2 textures in glTF files, so it can be combined with Draco mesh co

Josh

Josh in Articles

Sparse Voxel Octree Reflections

I've now got basic specular reflections working with the sparse voxel octree system. This uses much less memory than a voxel grid or even a compressed volume texture. It also supports faster optimized ray tests, for higher quality reflections and higher resolution. Some of the images in this article were not possible to produce in my initial implementation that used volume textures. This shot shows the reflection of just the diffuse color. Notice the red column is visible in three reflectio

Josh

Josh in Articles

Real-time Global Illumination: Background Updating

Previously I wrote about introducing latency to the voxel cone step tracing realtime global illumination system. The idea here is to improve performance and quality, at the cost of a small delay when the GI calculation gets updated. The diffuse GI lighting gets cached so the final scene render is very fast. Here's what a gradual GI update does. Of course, this will be running unseen in the background for the final version, but this shows what is actually happening: My new video pro

Josh

Josh in Articles

Building Universal Game Assets

I have two goals for the art pipeline in the new game engine. Eliminate one-way 3D model conversions. Use the same game asset files on all platforms. In Leadwerks, 3D models get converted into the proprietary MDL format. Although the format is pretty straightforward and simple, there is no widespread support for loading it back into 3D modeling programs. This means you need to keep a copy of your 3D model in FBX and MDL format. You may possibly want to keep an additional fi

Josh

Josh in Articles

×
×
  • Create New...