Jump to content

Blogs

Finalizing Terrain

I'm wrapping up the terrain features now for the initial release. Here's a summary of terrain in Ultra Engine. Terrains are an entity, just like anything else, and can be positioned, rotated, or scaled. Non-square terrains are supported, so you can create something with a 1024x512 or whatever resolution. (Power-of-two sizes are required.) Editing Terrain Ultra Engine includes an API that lets you modify terrain in real-time. I took something very complicated and distilled it down

Josh

Josh in Articles

Smart Tessellation

I've actually been doing a lot of work to finalize the terrain system, but I got into tessellation, and another rabbit hole opened up. I've been thinking about detailed models in VR. Tessellation is a nice way to easily increase model detail. It does two things: Curved surfaces get smoother (using point-normal triangles or quads) A displacement map can be used to make small geometric detail to a surface. These are really nice features because they don't require a lot of mem

Josh

Josh in Articles

The Cyclone Demo is now live!

From its initial concept in 2017 through the last sixteen months of development, I am ecstatic to announce that the free demo of Cyclone is now available in preparation for the June Steam Next Fest!  This demo includes three maps from the main game showcasing the functionalities of Cyclone and various puzzle elements.   The demo is available right on the Steam Store page! Cyclone on Steam (steampowered.com) While this is both an exciting and a scary time. I can't stress enough tha

reepblue

reepblue in Cyclone

Better Intellisense in Ultra Engine

Ultra Engine makes much better use of class encapsulation with strict public / private / protected members. This makes it so you can only access parts of the API you are meant to use, and prevents confusion about what is and isn't supported. I've also moved all internal engine commands into separate namespaces so you don't have to worry about what a RenderMesh or PhysicsNode does. These classes won't appear in the intellisense suggestions unless you were to add "using namespace UltraRender" to y

Josh

Josh in Articles

Cyclone Participating in Steam Next Fest 2022

I'm excited to announce that Cyclone will be participating in Steam Next Fest 2022! While I'll not be live streaming, a playable demo will be available during the festival. The demo will act like an even softer release than the Early Access release, which should roll into the planned release date of June 23rd, 2022!   Add it to your wish list on Steam: https://store.steampowered.com/app/1803590/Cyclone/ Check out the itch.io Page: https://reepblue.itch.io/cyclone Join my publ

reepblue

reepblue in Cyclone

Shadow Filtering

Happy Friday! I am taking a break from global illumination to take care of some various remaining odds and ends in Ultra Engine. Variance shadow maps are a type of shadowmap filter technique that use a statistical sample of the depth at each pixel to do some funky math stuff. GPU Gems 3 has a nice chapter on the technique. The end result is softer shadows that run faster. I was wondering where my variance shadow map code went, until I realized this is something I only prototyped in OpenGL a

Josh

Josh in Articles

Finalizing Shaders and Real-time Global Illumination Progress

I'm finalizing the shaders, and I was able to pack a lot of extra data into a single entity 4x4 matrix: Orthogonal 4x4 matrix RGBA color Per-entity texture mapping offset (U/V), scale (U/V), and rotation Bitwise entity flags for various settings Linear and rotational velocity (for motion blur) Skeleton ID All of that info can be fit into just 64 bytes. The shaders now use a lot of snazzy new function like this: void ExtractEntityInfo(in uint

Josh

Josh in Articles

Multiple Light Bounces

I have more than one light bounce working now, and it looks a lot nicer than single-bounce GI. The ambient light here is pure black. All light is coming off from the direct light, and bouncing off surfaces. It will take some time to get the details worked out, and more bounces will require more memory. I'm actually kind of shocked how good looking it is. This is just a single 128x128x128 volume texture at 0.25 meters per voxel. Light leaks seem to be not a problem, even at that low re

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

Real-time Global Illumination: Introducing Latency

Since previously determining that voxels alone weren't really capable of displaying artifact-free motion, I have been restructuring the GI system to favor speed with some tolerance for latency. The idea is that global illumination will get updated incrementally in the background over the course of a number of frames, so the impact of the calculation per frame is small. The new GI result is then smoothly interpolated from the old one, over a period of perhaps half a second. Here's a shot of the r

Josh

Josh in Articles

Windows, UAK and GLEW.

So, I was lurking around the forums looking for some action, you know ... some real crazy action. That kind of action you get from watching a Michael Bay movie, and I got it alright. I got it real good. Some homies chatting right here, wanting to know how they can get GLEW playing nice with UAK: Well guess what guys, strap your eyeballs in ... cos I'm about to take them for the ride of their lives! Lets kick things off by starting up a fresh, raw, uncensored ... raw? Visual Studi

Finalizing Direct Lighting

I have not used the engine outside the editor in a while, but I needed to for performance testing, so now I am back to real-time rendering. During the development of the GI system I broke most of the light types, so I had to spend a couple of days getting those to work again. While doing this, I decided to resolve some longstanding issues I have put off. First, the PBR lighting will use a default gradient in place of the skybox, if no reflection map is set for the world. This is based off t

Josh

Josh in Articles

Voxel Cone Step Tracing Refinement

Before proceeding with multiple GI volumes, I decided to focus on just getting the lighting to look as close to perfect as possible, with a single stage. Injecting the ambient light into the voxel data made flat-lit areas appear much more "3D", with color bleeding and subtle contours everywhere. Lighting only: Lighting + albedo Some adjustments to the way the sky color is sampled gave a more lifelike appearance to outdoor lighting. Before: After. N

Josh

Josh in Articles

Upgraded car physics (demo)

> This is defintely the best result I obtained with Leadwerks physics to build a car; I think this car is good enough so that it could be used in a game. > The car reacts depending on terrain, feeling different if climbing or driving down. The car allows speed driving until 140-160 kmh > The dampers became an upgrade that give me the possibility to construct car over 200 kg. That means simply that the cars drive now with much more stability and give for the player heavier feel

Voxel Cone Step Tracing - Follow the Camera

Until now, all my experiments with voxel cone step tracing placed the center of the GI data at the world origin (0,0,0). In reality, we want the GI volume to follow the camera around so we can see the effect everywhere, with more detail up close. I feel my productivity has not been very good lately, but I am not being too hard on myself because this is very difficult stuff. The double-blind nature of it (rendering the voxel data and then using that data to render an effect) makes development ver

Josh

Josh in Articles

Extras 2

Here's some more extra shaders. I had a lot of fun with these. Some playing with normals. Some post-effects. Some experimental stuff. Just a mixed batch of noob adventures.   This first shader is pretty simple and is a nice noob move to add more detail to any scene. You start with the base shader and simply mix it with another normal texture. You can easily see the effect it produces and this is useful if you want to add small details to a material - like for instance making skin or ro

havenphillip

havenphillip in Shaders

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

Voxel Cone Step Tracing - Cascaded Volumes

I had to spend several weeks just eliminating light leaks and other artifacts, and getting the results I wanted in a variety of scenes. The results are looking good. Everyone who tries implementing this technique has problems with light leaks but I have fortunately been able to avoid this with careful planning: Now that I have nice results with a single volume texture centered at the origin, it's time to add additional stages. The idea is to have a cascading series of volume textures

Josh

Josh in Articles

Global Illumination with Voxel Cone Step Tracing

Finally, finally, finally, finally, for the first time since I started working on this feature several years ago, finally we have real-time global illumination with a second light bounce: Below you can see the direct light hitting the floor, bounding up to the ceiling, and then being reflected back down on the floor again. Performance is still good and I have not started fine-tuning optimization yet. I was just trying to get the effect working at all, which was quite difficult to do,

Josh

Josh in Articles

Cyclone's New Menu

The time finally came to revamp the main menu for Cyclone. Doing menu work for me is really hard to get into but once I'm knee deep into it, it's all I want to do. I decided now is the time to work on a semi-final menu system due to the following. I just finished Steam Input and the menu wasn't compatible. The white text on a bright background was hard to make out. I only had a "New Game" option. There was no way to jump to a map you wanted to play without the console enabl

reepblue

reepblue in Cyclone

Reflections on Reflections

Now that I have the downsampled reflection data working, I can start casting rays. The cone step tracing is not a 100% perfect representation of physical light, but it gives a very favorable balance of quality and performance. Somehow I came up with a few formulas that eliminate light leaks and other artifacts. Quite honestly I did not think the results would be this good. Indoor / outdoor scenes with thin walls are very difficult to prevent light leaks in, but somehow it's working ve

Josh

Josh in Articles

GPU Voxel Downsampling with Compute Shaders

For downsampling of GI voxel data, I found that a compute shader offers the best performance. The first step was to add support for compute shaders into Ultra Engine.  I've never used these before but I was able to get them working pretty quickly. I think the user API will look something like this: //Load compute shader auto module = LoadShaderModule("Shaders/Compute/test.comp.spv"); auto shader = CreateShader(); shader->SetModule(module, SHADER_COMPUTE); //Create work group int wor

Josh

Josh in Articles

GPU Voxelization

After testing and some discussion with other programmers, I decided to try performing voxelization on the GPU instead of the CPU. The downside is the memory usage is much higher than a sparse voxel octree, but I found that sparse voxel octrees were very slow when it came to soft reflections, although the results of the sharp raycast were impressive: You can read the details of GPU voxelization here if you wish. Initially I thought the process would require rendering the

Josh

Josh in Articles

×
×
  • Create New...