Jump to content
  • entries
    941
  • comments
    5,894
  • views
    866,484

About this blog

Learn about game development technology

Entries in this blog

Streaming Terrain Data Fetching

Previously, I showed how to create a terrain data set from a single 32768x32768 heightmap. The files have been uploaded to our Github account here. We will load data directly from the Github repository with our load-from-URL feature because this makes it very easy to share code examples. Also, even if you fly around the terrain for a long time, you are unlikely to ever need to download the complete data set. Think about Google Earth. How long would it take you to view the entire planet at full r

Josh

Josh

Streaming Terrain Data Preparation

Being able to support huge worlds is great, but how do you fill them up with content? Loading an entire planet into memory all at once isn't possible, so we need a system that allows us to stream terrain data in and out of memory dynamically. I wanted a system that could load data from any source, including local files on the hard drive or online GIS sources. Fortunately, I developed most of this system last spring and I am ready to finish it up now. Preparing Terrain Data The first st

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

Leadwerks 5 Beta Update Available

A beta update is available. The ray tracing system is now using a smaller 128x128x128 grid. There is still only one single grid that does not move. Direct lighting calculation has been moved to the GPU. The GI will appear darker and won't look very good. Additional shader work is needed to make the data look right, and I probably need to implement a compute shader for parts of it. The system is now dynamic, although it current has a lot of latency. GI renders only get triggered when somethi

Josh

Josh

Voxel ray tracing and motion

So far the new Voxel ray tracing system I am working out is producing amazing results. I expect the end result will look like Minecraft RTX, but without the enormous performance penalty of RTX ray tracing. I spent the last several days getting the voxel update speed fast enough to handle dynamic reflections, but the more I dig into this the more complicated it becomes. Things like a door sliding open are fine, but small objects moving quickly can be a problem. The worst case scenario is whe

Josh

Josh

Starting with a Bang

Crowdfunding campaigns are a great way to kick off marketing for a game or product, with several benefits. Free promotion to your target audience. Early validation of an idea before you create the product. A successful crowdfunding campaign demonstrates organic consumer interest, which makes bloggers and journalists much more willing to give your project coverage. Oh yeah, there's also the financial aspect, but that's actually the least important part. If you make $1

Josh

Josh in Articles

Dynamic Voxel Updates

I've been working to make my previously demonstrated voxel ray tracing system fully dynamic. Getting the voxel data to update fast enough was a major challenge, and it forced me to rethink the design. In the video below you can see the voxel data being updated at a sufficient speed. Lighting has been removed, as I need to change the way this runs. I plan to keep two copies of the data in memory and let the GPU interpolate smoothly in between them, in order to smooth out the motion

Josh

Josh

Leadwerks 5 Beta Update Available with Faster Raytracing

A new beta update is available. The raytracing implementation has been sped up significantly. The same limitations of the current implementation still apply, but the performance will be around 10x faster, as the most expensive part of the raytrace shader has been precomputed and cached. The Material::SetRefraction method has also been exposed to Lua. The Camera::SetRefraction method is now called "SetRefractionMode". The results are so good, I don't have any plans to use any kind of sc

Josh

Josh

Leadwerks 5 Beta Update Available

An update is available for beta testers. All Lua errors should now display the error message and open the script file and go to the correct line the error occurs on. The voxel raytracing system is now accessible. To enable it, just call Camera:SetGIMode(true). At this time, only a single voxel grid with dimensions of 32 meters, centered at the origin is in use. The voxel grid will only be generated once, at the time the SetGIMode() method is called. Only the model

Josh

Josh

Fast Voxel Raytracing with Vulkan

PBR materials look nice, but their reflections are only as good as the reflection data you have. Typically this is done with hand-placed environment probes that take a long time to lay out, and display a lot of visual artifacts. Nvidia's RTX raytracing technology is interesting, but it struggles to run old games on a super-expensive GPU, My goal in Leadwerks 5 is to have automatic reflections and global illumination that doesn't require any manual setup, with fast performance. I'm on the fi

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

Advanced Transparency and Refraction in Vulkan

Heat haze is a difficult problem. A particle emitter is created with a transparent material, and each particle warps the background a bit. The combined effect of lots of particles gives the whole background a nice shimmering wavy appearance. The problem is that when two particles overlap one another they don't blend together, because the last particle drawn is using the background of the solid world for the refracted image. This can result in a "popping" effect when particles disappear, as well

Josh

Josh in Articles

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

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

Leadwerks 5 beta update adds Visual Studio Code Integration for Lua

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 Fixed 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: "MultipassCubemap": false, "MaxTextures": 512, "MaxCubemaps": 16, "MaxShadowmaps": 64, "MaxIntegerTextures": 32, "MaxUIntegerTe

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 adds model saving and static shadow caching

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: Collider::ClosestPoint Collider::Collide Collider::GetBounds Collider::IntersectsPoint Collider::Pick The PluginSDK now supports model saving and an OBJ save

Josh

Josh

Leadwerks 5 Beta Update Available

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

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

Documentation Sneak Peak

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

Josh

Josh

Current Work

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

Josh

Josh

Load files from URL

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

Josh

Josh

Voxel GI: GPU Acceleration, corrected bounces, and reflections

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

Josh

Josh

Voxel GI: Light Bounces

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

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

×
×
  • Create New...