Jump to content

Blogs

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

How to attach C++ Actors in Leadwerks 4

For some reason, I've been seeing a lot of questions on how to add actors created into C++ recently. My first attempt on this was in 2016 with Crawler's Den; A modern remake of the SDK example level. That was on a version of Leadwerks in which there was no official Actor system in place. Today, the engine has an Actor class which can be attached to any entity, but besides some loose examples, it's not well documented. Also there is no official way on linking your entities in the editor with your

reepblue

reepblue

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

Parsing, Saving, Window Creation

Before we were all locked in our homes, I was working on a lot of code for Leadwerks 4 for a reboot of concept I've made back in 2017. While I decided to shelf it again to wait for the new engine (Because the game will run faster, look better, VR, etc) I'm going to share you some of my core code which is cross compatible between the new and old engine. I'm sharing this as I see most people just using stock example code for window creation and setting saving without knowing how it all works. This

reepblue

reepblue

New project: offroad game.

I focused my imagination on game art, trying to create a beautiful world where players may want to explore and drive. The first quest could be: Find a way out of the forest. Here is a little showcase of what I made:   Edit: 27.04.2020 The goal was to get the better I could out of a 4096x4096 map, after months work trying all possibilities I obtained a good decor and great area for an offroad game. Performances are a bit slow but so much models was added -

Marcousik

Marcousik

Creating hills + terrain + paint from script

Example:   I could strangely find nothing about terrain generation from script except for LE5...  So here is an example that will run with LE4.6 on how you can generate 2 little  hills on a terrain and paint it from script. Can be usefull for games with random generated landscape. The script I modified is from here: https://www.leadwerks.com/community/topic/15715-minimap-generator/?do=findComment&comment=104697 So first install the minimap shader to run this:

Marcousik

Marcousik

Leadwerks 5 Feature Spotlight: glTF Models

Leadwerks Game Engine 5 will be backwards-compatible with asset file formats used in version 4. In addition, we are adding support for glTF 2.0 (GL Transmission Format), a new open-spec model format from Khronos with support for skinned animation and PBR materials. glTF will be our main 3D model format, for both development and final published models. What's so great about the glTF file format? Documented and Human-Readable Unlike the "black box" FBX file format, which can only be re

Admin

Admin

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

Vulkan Voxels

I have resumed work on voxel-based global illumination using voxel cone step tracing in Leadwerks Game Engine 5 beta with our Vulkan renderer. I previously put about three months of work into this with some promising results, but it is a very difficult system and I wanted to focus on Vulkan. Some of features we have gained since then like Pixmaps and DXT decompression make the voxel GI system easier to finish. I previously considered implementing Nvidia's raytracing techniques for Vulkan bu

Josh

Josh

Advanced Lua Debugging

I've had some more time to work with the Lua debugger in Leadwerks Game Engine 5 beta, and it's really amazing.  Adding the engine classes into the debug information has been pretty simple. All it takes is a class function that adds members into a table and returns it to Lua. sol::table Texture::debug(sol::this_state ts) const { auto t = Object::debug(ts); t["size"] = size; t["format"] = format; t["type"] = type; t["flags"] = flags; t["samples"] = samples; t["faces"] = faces;

Josh

Josh

Debugging Lua with Visual Studio Code in Leadwerks Game Engine 5 Beta

Leadwerks Game Engine 5 Beta now supports debugging Lua in Visual Studio Code. To get started, install the Lua Debugger extension by DevCat. Open the project folder in VSCode and press F5. Choose the Lua debugger if you are prompted to select an environment. You can set breakpoints and step through Lua code, viewing variables and the callstack. All printed output from your game will be visible in the Debug Console within the VS Code interface. Having first-class support for

Josh

Josh

Leadwerks Game Engine 5 Beta Updated with Pathfinding, Bone Attachments, and more...

A new update is available for beta testers. This adds navmesh pathfinding, bone attachments, and the beginning of the Lua debugging capabilities.New commands for creating navigation meshes for AI pathfinding are included. NavMesh Pathfinding In Leadwerks Game Engine 5 you can create your own navmeshes and AI agents, with all your own parameters for player height, step height, walkable slope, etc.: shared_ptr<NavMesh> CreateNavMesh(shared_ptr<World> world, const float wi

Josh

Josh

Bone Attachments

In Leadwerks Game Engine 4, bones are a type of entity. This is nice because all the regular entity commands work just the same on them, and there is not much to think about. However, for ultimate performance in Leadwerks 5 we treat bones differently. Each model can have a skeleton made up of bones. Skeletons can be unique for each model, or shared between models. Animation occurs on a skeleton, not a model. When a skeleton is animated, every model that uses that skeleton will display the same m

Josh

Josh

Leadwerks Game Engine 5 Beta Update

An update is available for beta testers. What's new: GLTF animations now work! New example included. Any models from Sketchfab should work. Added Camera::SetGamma, GetGamma. Gamma is 1.0 by default, use 2.2 for dark scenes. Fixed bug that was creating extra bones. This is why the animation example was running slow in previous versions. Fixed bug where metalness was being read from wrong channel in metal-roughness map. Metal = R, roughness = G. T

Josh

Josh

UTF8 Support!

Hello again. Implemented UTF8 support for LE4. Works fine?. context->SetBlendMode(Blend::Alpha); context->DrawText(u8"Привет мир! Hello world!", 25.0f, 25.0f); context->SetBlendMode(Blend::Solid); Add yours symbols to "familychars" and make own "family" in Font.cpp if (family==Font::English) { familychars = L"abcdefghijklmnopqrstuvwxyzабвгдеёжзийклмнопрстуфхцчшщъыьэюя АБВГДЕЁЖЗИКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-=!@#$%^&*()_+[]\\{}|;':\",./<>

IgorBgz90

IgorBgz90

How to construct own machines with joints.

Using joints Hinge() Joints are funny and powerful to build machines. They allow to use mass (gravity), different masses on different part of the machine depends on what you need, frictions, and limits. By this machine, the only enabled motor is the first big oval cylinder, which is turning. The rest is articulated with disabled hinge joints.    

Marcousik

Marcousik

Texture Atlas & Animation

Hello community, long time no see. I am working on my own graphical user interface, for my super duper rpg game :). The use separate textures for each button state, etc. I consider it not effective! It is better to load the texture with the atlas of the whole GUI once. And use her. In order to draw a texture from the atlas, we need to slightly modify the standard shader (drawimage), and save it under a different name (drawimagerect). Shader #version 400 uniform vec4 drawcolor

IgorBgz90

IgorBgz90

Leadwerks Game Engine 5 Beta Update

A new beta update to Leadwerks Game Engine 5 is available now. New stuff: Streaming terrain CopyRect and Texture::SetSubPixels Texture saving Note that the "SharedObject" class has been renamed to "Object" and that math classes (Vec3, Vec4, Plane, Mat3, etc.) no longer derive from anything.

Josh

Josh

Streaming Terrain in Leadwerks Game Engine 5

The terrain system in Leadwerks Game Engine 4 allows terrains up to 64 square kilometers in size. This is big enough for any game where you walk and most driving games, but is not sufficient for flight simulators or space simulations. For truly massive terrain, we need to be able to dynamically stream data in and out of memory, at multiple resolutions, so we can support terrains bigger than what would otherwise fit in memory all at once. The next update of Leadwerks Game Engine 5 beta suppo

Josh

Josh

Random generated Forest: About performances.

Hellö Here are a few thoughts about finding the best way to create  a dense forest, with different models, quickly, dense and allowing good performances by walking and driving.   I first try with the vegetation tool. https://www.leadwerks.com/community/profile/15151-marcousik/?status=10763&type=status           I got good results but not by driving and I find that the collision checked causes the lost of 40 FPS (from 60 by to 20) making the game unplayable.    

Marcousik

Marcousik

Leadwerks 5 Beta Update

A new beta is available in the beta forum. This adds new texture and pixmap features, Basis texture support, and support for customized project workflows. Use of Basis textures brought the download size down to less than 300 megabytes. New Lua examples are included: Build Texture Build Cubemap SetSubPixels

Josh

Josh

×
×
  • Create New...