Jump to content
  • entries
    941
  • comments
    5,894
  • views
    872,272

About this blog

Learn about game development technology

Entries in this blog

Cryptocurrency Now Accepted in Store and Marketplace

We now accept popular cryptocurrencies in our store and Marketplace through Coinbase Commerce. That's right, you can now buy software like Ultra App Kit using Bitcoin, Ethereum, Litecoin, Dai, or Bitcoin Cash (if you can figure it out!). Right now it's a novelty, but it's worth trying. Maybe by 2022 it will be your only option? Sadly, Dogecoin is not one of the currently supported coins. Soon?

Josh

Josh in Articles

Creating a VR Teleporter: Part 3

The final step to our VR teleporter mechanic is to make the beam arc. This allows us to climb up to areas above our head. The trick to this is to take our single beam picking mechanic and split it up into a lot of little segments, for both the intersection test and the visual display. I decided to make a kind of simple physics simulation for this, rather than using bezier curves or another method. The basic idea is you have a starting position and a velocity. You move a point along tha

Josh

Josh

Creating a VR Teleporter: Part 2

The next step is to put our scene into VR and look at everything. I'm about six feet tall and the player model seems the same height, so that all looks right. The controllers, as you can see below, are all working with full articulation of all controls. The teleport indicator looks good too. Now we're going to start our VR player script. We start with a new script and initialize the VR environment in the Start() function. A camera is also created in code, and I deleted the camera

Josh

Josh

Creating a VR Teleporter

I'm building the VR project template for Leadwerks 4.5.  Although you can enable VR in any project, this template is specifically designed to provide some of your most common room-scale VR features: Teleportation movement, which prevents motion sickness. Picking up and throwing objects. (It's actually really fun!) To start with I am creating the art assets for the teleport effect. This is basically what I want: Your controller shoots a beam which ends in an indicato

Josh

Josh

Correction: Game Launcher installs

I previously reported that Leadwerks Game Launcher had obtained 4000 users. My records in Steam have changed and it now reflects a user base of 1765 users. I think the reporting for free applications was not working correctly, because this number is much closer to what I would expect based on game subscriptions.   The application is still in early release mode and has not been officially launched, and it will have low visibility before the final release. This gives us a period of time to wo

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

Convex Decomposition Made Useful

Physics simulations typically require physical geometry to be provided in a series of convex hulls that approximate the shape of the object. This is because the intersection of two convex objects can be calculated fast enough for use in real-time simulations.   One solution for creating this type of physical geometry is to create a low-detail model of the object in a modeling program. However, this process can be tedious and is often overlooked by artists. Auto-generating this type of geome

Josh

Josh

Continued Development

At this point I would like to share some plans with you on continued development over the next several months. I generally avoid detailed roadmaps for two reasons: It's more fun to announce something with a short notice than to say "we're going to do X, Y, and Z, by these dates...". If people know too far in advanced they sort of take it for granted, and it doesn't have as big an impact. Plans change. When they do, people often consider cancelled plans to be "promised features". I like

Josh

Josh

Connecting Actors

To make an entity in Leadwerrks3D behave, you can drag a script from the asset browser to the actors list in the entity properties editor. Each entity can have multiple scripts attached to it. Each script can have different variables exposed, with control for the GUI they are displayed in. For example, you can specify upper and lower limits of a spinner or a list of choices for a drop down box. Each script attached to an entity, along with its set of properties, is called an "actor" because.

Josh

Josh

Cone Step Tracing

Now that we have our voxel light data in a 3D texture we can generate mipmaps and perform cone step tracing. The basic idea is to cast a ray out from each side of each voxel and use a lower-resolution mipmap for each ray step. We start with mipmap 1 at a distance that is 1.5 texels away from the position we are testing, and then double the distance with each steo of the ray. Because we are using linear filtering we don't have to make the sample coordinates line up exactly to a texel center, and

Josh

Josh

Compressed Vertex Arrays

My work with the MD3 format and its funny short vertex positions made me think about vertex array sizes. (Interestingly, the Quake 2 MD2 format uses a single char for vertex positions!) Smaller vertex formats run faster, so it made sense to look into this. Here was our vertex format before, weighing in at 72 bytes: struct Vertex { Vec3 position; float displacement; Vec3 normal; Vec2 texcoords[2]; Vec4 tangent; unsigned char color[4]; unsigned char boneweights[4]; unsigned char b

Josh

Josh

Common Bottlenecks

Leadwerks 4.3 brings a big performance boost to your games. In this blog I am going to talk about some of the common problems you can eliminate to make your games run faster. When slow performance is encountered, it is typically one really bad mistake that is slowing everything down. Here's a few common bottlenecks for performance you can create in your games, how to identify them, and how to fix them. Shadow Updates Shadow rendering is cheaper than regular renders because no text

Josh

Josh

Command Buffer Synchronization in Vulkan

The Vulkan graphics API is unbelievably complex. To create a render context, you must create a series of images for the front and back buffers (you can create three for triple-buffering). This is called a swap chain. Now, Vulkan operates on the principle of command buffers, which are a list of commands that get sent to the GPU. Guess what? The target image is part of the command buffer! So for each image in your swap chain, you need to maintain a separate command buffer  If anything changes in y

Josh

Josh

Collision Decisions

As I was implementing the collision commands for Leadwerks3D, I noticed a few things that illustrate the differences between the design philosophies of Leadwerks Engine and Leadwerks3D.   You'll easily recognize the new collision commands, although they have been named in a more verbose but logical manner: void ClearCollisionResponses(); void SetCollisionResponse(const int& collisiontype0, const int& collisiontype1, const int& response); int GetCollisionResponse(const int& c

Josh

Josh

Colliders in Ultra Engine

I haven't been blogging much because I am making so much progress that there would be too much to cover. In this article I will talk about one little system I spent the last week on and show the improvements I have made to the workflow over Leadwerks. In the asset editor, when the root of a model is selected, a "Collider" field appears in the physics properties. You can use this to quickly calculate and apply a collider to the model. The convex hull collider includes an option fo

Josh

Josh in Articles

Collapsing Models

I frequently come across models that have an excessive hierarchy of unnecessary limbs. This causes rendering to be slower and memory usage to be higher than it needs to be. If great numbers of the model are used in the scene, these problems can be significant. The windmill model below contains a pretty complex hierarchy.     A new tool is being added in the model editor to collapse all limbs of a model into a single object. Select the Tools > Collapse menu item and your model will be

Josh

Josh

Coders Gonna Code, Haters Gonna Hate

Lately I've been talking a lot about making non-programmers happy, so here's something for the coders. B)   For Leadwerks3D documentation, I considered three possibilities: -IPB-based docs -Wiki -Offline CHM files   Each has their own strengths and weaknesses, as always seems to be the case.   IPB A bit slower, harder to organize, harder to edit, looks really good and consistent with the site, search requires quite a few clicks to get where you want to go, missing table of contents is

Josh

Josh

Code, babes, clowns, and an inflatable dinosaur. Just a typical night at Hacker Lab.

I've been following Eric's progress with this idea since last spring, and it's really great to see what started as a fuzzy concept turn into reality.   http://www.youtube.com/watch?v=pK_yjZpOs6w   About Hacker Lab We believe that technology can change the world and the starting point is education. Hacker Lab aims to educate folks and seed startups with community driven resources. Collectively we can build a brighter future using lean methods in both education and business.   We Provide

Josh

Josh

Clustered Forward Rendering Victory

I got the remaining glitches worked out, and the deal is that clustered forward rendering works great. It has more flexibility than deferred rendering and it performs a lot faster. This means we can use a better materials and lighting system, and at the same time have faster performance, which is great for VR especially. The video below shows a scene with 50 lights working with fast forward rendering One of the last things I added was switching from a fixed grid size of 16x16x16 t

Josh

Josh

Clustered Forward Rendering Progress

In order to get the camera frustum space dividing up correctly, I first implemented a tiled forward renderer, which just divides the screen up into a 2D grid. After working out the math with this, I was then able to add the third dimension and make an actual volumetric data structure to hold the lighting information. It took a lot of trial and error, but I finally got it working. This screenshot shows the way the camera frustum is divided up into a cubic grid of 16x16x16 cells. Red an

Josh

Josh

Clustered Forward Rendering - Multiple Light Types

I added spotlights to the forward clustered renderer. It's nothing too special, but it does demonstrate multiple light types working within a single pass. I've got all the cluster data and the light index list packed into one texture buffer now. GPU data needs to be aligned to 16 bytes because everything is built around vec4 data. Consequently, some of the code that handles this stuff is really complicated. Here's a sample of some of the code that packs all this data into an array.

Josh

Josh

Clustered Forward Rendering - Fun with Light Types

By modifying the spotlight cone attenuation equation I created an area light, with shadow. And here is a working box light The difference here is the box light uses orthographic projection and doesn't have any fading on the edges, since these are only meant to shine into windows. If I scale the box light up and place it up in the sky, it kind of looks like a directional light. And it kind of is, expect a directional light would either use 3-4 different box lights set at rad

Josh

Josh

Clustered Forward Rendering - First Performance Metrics

I was able to partially implement clustered forward rendering. At this time, I have not divided the camera frustum up into cells and I am just handing a single point light to the fragment shader, but instead of a naive implementation that would just upload the values in a shader uniform, I am going through the route of sending light IDs in a buffer. I first tried texture buffers because they have a large maximum size and I already have a GPUMemBlock class that makes them easy to work with. Becau

Josh

Josh

Clustered Forward Rendering

I decided I want the voxel GI system to render direct lighting on the graphics card, so in order to make that happen I need working lights and shadows in the new renderer. Tomorrow I am going to start my implementation of clustered forward rendering to replace the deferred renderer in the next game engine. This works by dividing the camera frustum up into sectors, as shown below. A list of visible lights for each cell is sent to the GPU. If you think about it, this is really another v

Josh

Josh

Clipping and Resizing

In Leadwerks GUI, any widget can be the child of another widget. If the child goes outside of the parent widget's area it will be clipped for both rendering and mouse events. Below you can see the button in the upper-left corner and the progress bar and slider on the right are clipped by the parent tabber.     A parent widget can also have a padding value which indents the area. The tabber uses padding on the top to display the tabs and make sure children don't appear on top of the tabs.

Josh

Josh

×
×
  • Create New...