Jump to content
  • entries
    941
  • comments
    5,894
  • views
    871,256

About this blog

Learn about game development technology

Entries in this blog

First Vulkan Performance Results

Using my box test of over 100,000 boxes, I can compare performance in the new engine using OpenGL and Vulkan side by side. The results are astounding. Our new engine uses extensive multithreading to perform culling and rendering on separate threads, bringing down the time the GPU sits around waiting for the CPU to nearly zero. Hardware: Nvidia GEForce GTX 1070 (notebook) OpenGL: ~380 FPS Vulkan 700+ FPS. FRAPS does not work with Vulkan, so the only FPS counter I have is

Josh

Josh

Buffers in Vulkan

I've now got the Vulkan renderer drawing multiple different models in one single pass. This is done by merging all mesh geometry into one single vertex and indice buffer and using indirect drawing. I implemented this originally in OpenGL and was able to translate the technique over to Vulkan. This can allow an entire scene to be drawn in just one or a few draw calls. This will make a tremendous improvement in performance in complex scenes like The Zone. In that scene in Leadwerks the slow step i

Josh

Josh

Memory Management in Vulkan

Vulkan gives us explicit control over the way data is handled in system and video memory. You can map a buffer into system memory, modify it, and then unmap it (giving it back to the GPU) but it is very slow to have a buffer that both the GPU and CPU can access. Instead, you can create a staging buffer that only the CPU can access, then use that to copy data into another buffer that can only be read by the GPU. Because the GPU buffer may be in-use at the time you want to copy data to it, it is b

Josh

Josh

The Asset Loader Class

In Turbo (Leadwerks 5) all asset types have a list of asset loader objects for loading different file formats. There are a number of built-in loaders for different file formats, but you can add your own by deriving the AssetLoader class or creating a script-based loader. Another new feature is that any scripts in the "Scripts/Start" folder get run when your game starts. Put those together, and you can add support for a new model or texture file format just by dropping a script in your project.

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

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

Tessellation in Action

With tessellation now fully implemented, I was very curious to see how it would perform when applied to arbitrary models. With tessellation, vertices act like control points for a Bezier mesh that is subdivided dynamically in screen space. Could tessellation be used to add new details to any low-poly model? Here is a low-res character model with a pointy head and obvious sharp edges all around his silhouette: When tessellation is enabled, the sharp edges go away and the mes

Josh

Josh

Leadwerks 5 beta 2D Redux

Previously, we saw how the new renderer can combine multiple cameras and even multiple worlds in a single render to combine 3D and 2D graphics. During the process of implementing Z-sorting for multiple layers of transparency, I found that Vulkan does in fact respect rasterization order. That is, objects are in fact drawn in the same order you provide draw calls to a command buffer. Furthermore, individual primitives (polygons) are also rendered in the order they are stored in the indice b

Josh

Josh

Leadwerks 5 beta first-person shooter template

The best way to test the new engine is to use it to make something. I am messing around with the beginnings of a new first-person shooter template. I'm telling everyone involved "We are remaking Doom, but a little differently" and it actually works really well. Everyone understand what it should look like, and there is no need to establish a new visual style. We can tell when we have it right, and when we have it wrong. And the original game gives us a sort of benchmark for quality and performan

Josh

Josh

Leadwerks 5 beta Update

What's new EAX audio effects for supported hardware. Source class renamed to "Speaker". Plane joint for 2D physics, so now you can make Angry Birds with Vulkan graphics. Fixed DPI issues with fullscreen mode. Added impact noise to barrels, fixed Lua collision function not being called. Script functions now start with "Entity:" instead of "Script:", i.e. Entity:Update() instead of Script:Update(). Additionally, four examples can be run showing var

Josh

Josh

Leadwerks at I/ITSEC 2019

I'm back from I/ITSEC. This conference is basically like the military's version of GDC. VR applications built with Leadwerks took up about half of Northrop Grumman's booth. There were many interesting discussions about new technology and I received a very warm reception. I feel very positive about our new technology going forward. I am currently reworking the text field widget script to work with our persistent 2D objects. This is long and boring but needs to be done. Not much else to

Josh

Josh

Beginning with Particles

I wanted to work on something a bit different, and this sure is different. I've got a framework of a new particle system worked out. What's really special about this system is the amount of interactivity the particles will allow. Particle-world collisions. Particle-particle collisions (repulsion) Particle-particle cohesion (fluids with surface tension) Instead of just being a visual effect, I want our new particles to be fully interactive with physics so that particl

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

Voxel Cone Step Tracing - Emission and Motion

Adding emission into the cascaded voxel cone step tracing global illumination and dynamic reflections system (SEO ftw) was simple enough: There's some slight trailing but it looks okay to me. There is a bit of a "glitch" in that when the emissive surface gets near the wall, the ambient occlusion kicks in, even though the sphere is self-illuminating. This happens because the emission color is mixed with the light voxel during the rasterization step. I could fix this by storing emis

Josh

Josh in Articles

Entering data...

I did not expect this many upgrades over the weekend! I'm entering data as fast as I can.   Already I can see the private sections are a big improvement. It totally changes the feel of the forum. It feels like it's more our own area, instead of just a random bulletin board floating around in cyberspace. If that makes any sense.

Josh

Josh

Apple Adopting OpenGL3

This is great news. I was a bit worried about the state of OpenGL on the Mac, since they presently only support version 2.1. With OpenGL3 support, we can have a uniform graphics API on Macintosh, Linux, Windows XP, Windows Vista, and Windows 7. http://www.theinquirer.net/inquirer/news/1585830/apple-slowly-opengl

Josh

Josh

Multisampled Shadowmaps

Because variance shadow maps allow us to store pre-blurred shadow maps it also allows us to take advantage of multipled textures. MSAA is a technique that renders extra pixels around the target pixel and averages the results. This can help bring out fine lines that are smaller than a pixel onscreen, and it also greatly reduces jagged edges. I wanted to see how well this would work for rendering shadow maps, and to see if I could reduce the ragged edge appearance that shadow maps are sometimes pr

Josh

Josh

New Update Available

A maintenance update has been uploaded. You can run the Leadwerks updater to get only the changed files since your last update. See the bug reports forum for recently resolved issues.   One new command has been added: static std::string FileSystem::GetAppDataPath()   This will return the application read/write directory for storing settings, high score tables, etc. In order for this to work, you need to update your project. (Open the Project Manager, select your project, and press t

Josh

Josh

Optimization

That was one crazy weekend! Things were hectic at times, but we managed to process all orders and get people started with Leadwerks for Android. Well, everyone except YouGroove. I've got to do some tests on a clean install of Windows, so I will figure out exactly what JRE to install, since that part can be confusing.   I uploaded new builds for Windows, Mac, and Android just now with performance improvements. Darkness Awaits is playable now on my Samsung Galaxy Tab 2, though I know I can

Josh

Josh

Leadwerks dedicated server

We've transferred the site data to a dedicated server hosted with wiredtree. I've filed a ticket with invision power services to configure the new server. When that is confirmed to be working I'll retransfer the database to make sure all posts are saved and change the domain nameservers and A record.   I also have an update for the site skin that is supposed to fix most of the issues reported, but I want to make sure things are working right before installing it.   Then we'll get back to w

Josh

Josh

Lua and C++ Debugger

The C++ object debugger for Lua is working now. It was a little tricky, but I implemented a method to view all members of C++ objects. The debugger does handle dynamic object fetching, so if you expand a node in the debug tree representing a C++ object, the contents of that object will be loaded and displayed. Let's say you have an entity parented to another entity. This allows you to expand the parent member of the child, then find the child in the parent's child list, and so on, ad infinit

Josh

Josh

Apple and Leadwerks

I was thinking this morning how Apple has influenced my life and the company Leadwerks. You might ask why I am talking about this, since we are only now coming out with our first product for any Apple operating system. Well, before Windows existed, back in the 1980's, this was my first computer:     The first "game" I ever made was in Macintosh Paint. I drew a road from a top-down view, with barriers randomly placed on either side. I drew a race car, zoomed in the image, and used the se

Josh

Josh

An Eventful Weekend

The windows class on OSX has been a bit neglected, so i spent some time getting it ready for the final release. Creating a full-screen window on Mac is a little funny. There's a fullscreen mode that's been around a while, but it locks the system so that CMD+TAB doesn't work. That means if your application crashes, or you don't program it to close with the escape key, you'll be stuck in fullscreen mode, with no way out but a computer restart!   You can create a window on top of everything e

Josh

Josh

Android Guts

I spent most of today getting the Android library more polished, especially when handling application switching. It's a little tricky because Android doesn't automatically manage your sound channels and OpenGL resources, so these need to be reloaded when an app regains focus. Here's a video, which I obviously had way too much fun with in iMovie:

Josh

Josh

Docs

I spent the day manually setting entry categories in the new documentation database. This was needed to make the docs actually use the nice breadcrumb bar in the website header. Our content management system doesn't exactly support hierarchical pages, so some clever PHP scripting was used to make it work. The whole point is simply to make navigation easier, and it works well. I also wrote some PHP code that does a search and replace with class names, so class names are always links to the pa

Josh

Josh

×
×
  • Create New...