Jump to content

Blogs

Advanced Tessellation in Vulkan

Previously I talked about the technical details of hardware tessellation and what it took to make it truly useful. In this article I will talk about some of the implications of this feature and the more advanced ramifications of baking tessellation into Turbo Game Engine as a first-class feature in the  Although hardware tessellation has been around for a few years, we don't see it used in games that often. There are two big problems that need to be overcome. We need a way to preven

Josh

Josh

Vulkan Tessellation Made Practical

Now that I have all the Vulkan knowledge I need, and most work is being done with GLSL shader code, development is moving faster. Before starting voxel ray tracing, another hard problem, I decided to work one some *relatively* easier things for a few days. I want tessellation to be an every day feature in the new engine, so I decided to work out a useful implementation of it. While there are a ton of examples out there showing how to split a triangle up into smaller triangles, useful discus

Josh

Josh

Shock absorbers !!

There is always something new to learn, and when my native language is not English, there is a way of learning called brute force, this leads to two things, first, you learn, and second a high percentage is learning to do things wrong, of course not always. Today I had a kind of Eureka, I actually discovered how to properly implement the sliding joints to create springs for a vehicle, the point here is to get to understand how this should work and I think I've achieved it. In the end I'm le

Yue

Yue

Vulkan renderer updated with shadow maps

Shadow maps are now supported in the new Vulkan renderer, for point, spot, and box lights! Our new forward renderer eliminates all the problems that deferred renderers have with transparency, so shadows and lighting works great with transparent surfaces. Transparent objects even receive lighting from their back face automatically! There is some shadow acne, which I am not going to leave alone right now because I want to try some ideas to eliminate it completely, so you neve

Josh

Josh

car physics test

I'm still spending hours of tests, changing and seeking properties to obtain the best balanced car driving experience possible. It's something between the mass used, the joints values, and the smoothing force.  This until now the best I get with a car, which is even performing a salto jump at 2.30 and other somersault crashing at 3.15 The FPS are nice, I'm happy with this.  

Marcousik

Marcousik

Trials and Tribulations

After about four days of trying to get render-to-texture working in Vulkan, I have everything working except...it doesn't work. No errors, no clue what is wrong, but the renderer is not even clearing the depth attachment, which is why the texture read shown here is flat red. There's not much else to say right now. I will keep trying to find the magic combination of cryptic obscure settings it takes to make Vulkan do what I want. This is very hard stuff, but once I have it working

Josh

Josh

Starting with Shadowmaps on Vulkan

Now that we have lights working in our clustered forward Vulkan renderer (same great technique the latest DOOM games are using) I am starting to implement shadow maps. The first issue that came up was managing render-to-texture when the texture might still be in use rendering the previous frame. At first I thought multiple shadowmaps would be needed per light, like a double-buffering system, but that would double the number of shadow textures and video memory. Instead, I created a simple object

Josh

Josh

Coroutine Sequences

I am experimenting with a system for creating a sequence of actions using Lua coroutines. This allows you to define a bunch of behavior at startup and let the game just run without having to keep track of a lot of states. You can add coroutines to entities and they will be executed in order. The first one will complete, and then the next one will start. A channel parameter allows you to have separate stacks of commands so you can have multiple sequences running on the same object. For

Josh

Josh

Ultra Engine (Leadwerks 5) beta updated

A new beta is available. In this build I cleaned up a lot of internal stuff. I removed some parts of the engine that I want to redesign in order to clean up the source. JSON material files loaded from MDL files are now supported. Added ActiveWindow() command. if the game window is not the foreground window this will return null. The Steamworks and all dependent classes are temporarily removed. There's a lot of stuff in there I don't intend to use in the future like all the Worksho

Josh

Josh

Evolution

This is a good time to write about some very broad changes I expect to come about over the next year in our community as our new engine "Turbo" arrives. Turbo Game Engine, as the name suggests, offers really fast performance using a groundbreaking Vulkan-based renderer, which is relevant to everyone but particularly beneficial for VR developers who struggle to keep their framerates up using conventional game engines. I want to help get you onboard with some of the ideas that I myself am processi

Josh

Josh

Ultra Engine (Leadwerks 5) beta updated with strip lights and texture scrolling

A new update is available for beta subscribers. What's new Added support for strip lights. To create these just call CreateLight(world, LIGHT_STRIP). The entity scale on the Z axis will determine the length of the line, and the outer range will determine the radius in which light shows. Added new properties to the JSON material scheme. "textureScroll" is a float value that can animate a texture to make it smoothly move. "textureScrollRotation" is an angle to control which dir

Josh

Josh

Light Strips in Vulkan Renderer

It's always fun when I can do something completely new that people have never seen in a game engine. I've had the idea for a while to create a new light type for light strips, and I got to implement this today. The new engine has taken a tremendous amount of effort to get working over two years, but as development continues I think I will become much more responsive to your suggestions since we have a very strong foundation to build on now. Using this test scene provided by @reepblue you ca

Josh

Josh

Transparency with Premultiplied Alpha

A new update is available for beta subscribers. Transparent materials are now supported. Unlike the old deferred renderer, our new clustered forward renderer supports transparency really really well! You can add these in a JSON material file with a Boolean property called "transparent" set to true: "transparent": true There are no separate blend modes now, since pre-multiplied alpha allows alpha and additive blending in a single pass. This is actually a really simple technique but for som

Josh

Josh

Turbo Game Engine (Leadwerks 5) beta updated

An update for the beta of the new engine is now available with the following changes: GLTF loader is now working for most models. A large collection of GLTF files are available online for free from many sources, and they can be loaded right into the engine without any adjustment for materials or textures. Single-file GLB files also work. Added support for GLTF extension KHR_materials_pbrSpecularGlossiness. Disabled PNG loader gamma correction. world->SetSkybox(tex

Josh

Josh

Turbo Game Engine (Leadwerks 5) beta updated

A new beta update is available for subscribers. What's new? Lighting Point and spot lights are now supported in the new Vulkan renderer, with either PBR or Blinn-Phong lighting. Lighting is controlled by the shader in the material file. There are two main shaders you can use, "Shaders/PBR.spv" and "Shaders/Blinn-Phong.spv". See below for more details. JSON Materials Materials can now be loaded from JSON files. I am currently using the .json file extension instead of "mat",

Josh

Josh

PBR Lighting in Vulkan

I now have point and spot lights working (without shadows) in the Vulkan renderer. Here are the results, with both "Physically-based rendering" (PBR) and Blinn-Phong shaders: Without the IBL contribution it's not terribly impressive, but this is progress.

Josh

Josh

Early Z-Pass in Vulkan

Vulkan is pretty wonderful because I can take all the optimal techniques I worked out in OpenGL and it just makes everything much faster. I've successfully completed the implementation of early Z-pass, which is important for our lighting system. We are using a forward clustered renderer, similar to the technique id Software's new DOOM games use. Because the fragment shader is fairly intensive, a depth pre-pass is rendered to ensure we only process each screen pixel once. This techniqu

Josh

Josh

Lighting in Vulkan

I have basic point lights working in the Vulkan renderer now. There are no shadows or any type of reflections yet. I need to work out how to set up a depth pre-pass. In OpenGL this is very simple, but in Vulkan it requires another complicated mess of code. Once I do that, I can add in other light types (spot, box, and directional) and pull in the PBR lighting shader code. Then I will add support for a cubemap skybox and reflections, and then I will upload another update to the beta. S

Josh

Josh

Turbo Game Engine (Leadwerks 5) beta updated with Vulkan renderer

The beta of our new game engine has been updated with a new renderer built with the Vulkan graphics API, and all OpenGL code has been removed. Vulkan provides us with low-overhead rendering that delivers a massive increase in rendering performance. Early benchmarks indicate as much as a 10x improvement in speed over the Leadwerks 4 renderer. The new engine features an streamlined API with modern C++ features and an improved binding library for Lua. Here's a simple C++ program in Turbo:

Josh

Josh

Little racing car game demo

This little game is here free to play: https://1drv.ms/u/s!AiVBgjDAyIXLs1khcglU6UKFbI_4?e=4oK8Sj   1] First step: Adapting the Spline tool to build what we need:  I combined some of the possibilities that offers the Spline Tool (great thing) to obtain all this in one: - Cars align and follow the roads (rotation) - While using Physics, and so collisions - While using reverse travel (cars go back on the road)     2] next step: 

Marcousik

Marcousik

New Texture Compression Formats

The Vulkan renderer now supports new texture compression formats that can be loaded from DDS files. I've updated the DDS loader to support newer versions of the format with new features. BC5 is a format ATI invented (originally called ATI2 or 3Dc) which is a two-channel compressed format specifically designed for storing normal maps. This gives you better quality normals than what DXT compression (even with the DXT5n swizzle hack) can provide. BC7 is interesting because it uses the sam

Josh

Josh

Multiple shaders in Vulkan

I have it worked out now where the new engine will handle multiple shaders. The renderer groups meshes (renamed from "surfaces" in Leadwerks) by shader. A single draw call renders many batches of instances, with different materials applied. It's a very advanced and complex system, so something that was simple before, changing the shader, now requires a lot of code to make work! You can see here the barbed wire is using an alpha-discard shader that removes pixels while the rest of the scene uses

Josh

Josh

Textures and materials in Vulkan

I now have different materials with textures working in Vulkan. The API allows us to access every loaded texture in any shader, although some Intel chips have limitations and will require a fallback. This is interesting because some of our design decisions in Leadwerks 4 were made because we had a limit of 16 textures a shader could access. Terrain clipmaps were a good solution to this problem, but since the same limitations no longer exist it may be time to revisit this design. We could, for ex

Josh

Josh

×
×
  • Create New...