Leadwerks Game Engine is the easiest way to build 3D games. With a rapid development pipeline, support for Lua and C++ programming, and plenty of learning materials, Leadwerks is the perfect way to learn to make games.

Post news Report RSS A run-down of Leadwerks

This article basically tells you what-is-what about Leadwerks.

Posted by on

Introduction

Leadwerks Engine 2.3 features roads, a brand new scene editor, Lua scripting, and more.
Our dynamic lighting system removes the need for any pre-processing or compiling; scenes can be edited in real-time, and the results are instantly visualized.
Leadwerks Engine requires a minimum of an NVidia GEForce 6 or ATI Radeon X2000 series graphics card. An internet connection is required for installation.

Below, we cover some of the basic Engine Features, in this order;

  • Rendering
  • Materials & Shaders
  • Programming
  • Models
  • Physics
  • Audio
  • Terrain
  • Tools
  • Networking

Enjoy!
- Azkanan
(User of Leadwerks, in no way otherwise related)


Rendering

A deferred lighting system with dynamic soft shadows makes Leadwerks Engine one of the most advanced real-time renderers on the market. Every object can cast, receive, and self-shadow. More than one million triangles can be drawn each frame in real-time.

<!-- SCREENSHOTS -->

Lighting
Leadwerks Engine features a unified lighting system with dynamic soft shadows. There is no limit to the depth and complexity of lighting interactions. Lamps can be knocked over, lights can be turned on and off at will, and dynamic day/night cycles can be used to render real-time sunsets and weather changes. Using a dynamic lighting system removes the need for any pre-processing or compiling; scenes can be edited in real-time, and the results are instantly visualized, significantly streamlining the development process.

Deferred lighting is basically a way of rendering lights and shadows in a post-processing step. Its strength is that it only processes lighting for the final screen pixels. Therefore it will run at the exact same speed whether there is one or one million polygons onscreen. This allows Leadwerks Engine to display dozens of dynamic lights at a very low performance cost.

Download our article on Deferred Lighting

Post-Processing Effects
Advancements in graphics hardware now allow full-screen effects to be performed on a rendered image, to create a wide variety of special effects. When used properly, post-processing effects can give a cinematic quality to computer graphics.

Leadwerks Engine features a low-level buffer and shader system which allows rendering of any kind of post-processing effect. Although this requires a deeper understanding of shaders than a simple "turn bloom on" system, it allows far greater flexibility. New post-processing effects can be added without having to modify the engine source code.

The following are just some of the post-processing effects supported:

  • Desaturation
  • Depth of field
  • Motion blur
  • Gaussian blur
  • Bloom
  • Screen-space ambient occlusion
  • Volumetric light scattering

Depth of field effect with control for near and far ranges.


Screen-space ambient occlusion provides a real-time approximation of global illumination.


To render post-processing effects, we use an additional buffer. We first render the scene to the gbuffer, then render lighting onto the postbuffer. In the last step, we draw the postbuffer color texture onto the back buffer, with post-processing effects applied, as shown in the diagram below:

Advanced Effects
The engine's render buffer system allows the programmer to upload buffer components to a shader and use them for advanced effects, including the following:

  • Refraction and reflection
  • Soft particles
  • Water effects

New effects can be implemented without requiring any changes in the main engine source code.

Occlusion Culling
Leadwerks Engine uses per-pixel hierarchal occlusion culling performed on the GPU. There's no need for complicated BSP systems or visibility compiling; If you can't see it, it doesn't get drawn.
Related Lessons:
Introduction to Meshes
Camera Controls
Materials and Shaders
Rendering Sky
Post-Processing Effects


Materials & Shaders

Real-time surface rendering has come a long ways since the days of plain diffuse textures and lightmaps. Per-pixel lighting, reflection and refraction effects, and even GPU ray tracing are now possible, thanks to the programmable rendering pipeline. Of course, this added flexibility comes at a cost of increased complexity. Convincing materials are a combination of both good artwork and skilled programming. Leadwerks Engine includes a library of advanced shader effects an artist can choose from, as well as a flexible framework with which new effects can be added.

<!-- SCREENSHOTS -->

Editor
The Leadwerks Engine SDK includes a real-time material editor. Edit shaders in an external text editor, then press the compile button to instantly visualize the results. Or choose from our library of effects include normal mapping, specular reflection, cube mapping, parallax occlusion mapping, and more.

Shaders
Each material can have two shaders. The rendering shader is used for rendering the material on screen. The shadow shader is used when shadow maps are rendered. The shadow shader is usually a simplified version of the rendering shader. Most of the time, a fragment (pixel) shader is not used, since shadowmaps only store depth information. An exception is the case of plant and tree materials, where an alpha map is used to discard parts of the shadow. Shaders in Leadwerks Engine are written in standard GL Shading Language (GLSL), with one important addition, the Include keyword, which can be used to include code from another file.

Advanced Effects
We provide examples of reflection, refraction, soft particles, water, and other render-to-texture effects.

Asset Management

All media assets are automatically instanced and managed by the engine. When the user calls LoadMesh("mymesh.gmf") twice, an instance of the reference object is automatically returned and rendered with fast GPU batching. The moment a mesh, model, texture, shader, or material are no longer referenced by the user or any other objects (i.e. a material applied to a mesh) the asset will be deleted from memory. The abstract file system allows the user to load any kind of file without knowing exactly where in the game directory it exists. This is done by specifying the "abstract" file protocol.

For example, the following two lines will both return instances of the same material:

  • LoadMaterial( "meshes\vehicles\car01.mat" );
  • LoadMaterial( "abstract::car01.mat" );

<!-- LESSONS --> Related Lessons:
Materials and Shaders


Programming

Leadwerks Engine was designed from the beginning to be as easy to use as possible, without ever sacrificing power. The engine is offered as both a dynamic linked library (DLL) and BlitzMax module. Official support is included for C, C++, C#, and BlitzMax, as well as community-supported extensions for Delphi and Purebasic. A header is provided for pure procedural C, while the LEO (Leadwerks Engine Objects) library provides an object-oriented framework for advanced programmers.

<!-- SCREENSHOTS -->

Code the Way You Want
The Leadwerks Engine DLL can be used with virtually any programming language. Choose from a procedural or object-oriented interface.

New Lua Integration
Leadwerks Engine now features support for the popular scripting language Lua. Scripts can be attached on a per-object basis, or an entire program can be written in Lua.


<!-- LESSONS --> Related Lessons:
Introduction to Bodies
Making a Spectator
Character Controllers
Collision and Raycasting


Audio

Sound is second only to sight as our most important sensory experience. In games, sound subtly communicates information about our surroundings to us, like where we are and even the material our surroundings are made of. Sound is provided in Leadwerks Engine with OpenAL. The engine provides sound and source classes which are thin wrappers on top the OpenAL buffer and source objects.

<!-- SCREENSHOTS -->

3D Spatialization
Because our world is 3D, we need sounds to be heard in 3D as well. 3D spatialization gives us auditory clues about where a sound is emanating from.

EAX Effects
Leadwerks Engine provides support for hardware EAX effects. This allows the programmer to add echo and reverb to a sound, to simulate the acoustic environment of a tiled bathroom or a spooky cave.

Asset Management
All media assets are automatically instanced and managed by the engine. When the user calls LoadMesh("mymesh.gmf") twice, an instance of the reference object is automatically returned and rendered with fast GPU batching. The moment a mesh, model, texture, shader, or material are no longer referenced by the user or any other objects (i.e. a material applied to a mesh) the asset will be deleted from memory. The abstract file system allows the user to load any kind of file without knowing exactly where in the game directory it exists. This is done by specifying the "abstract" file protocol.

For example, the following two lines will both return instances of the same material:

  • LoadMaterial( "meshes\vehicles\car01.mat" );
  • LoadMaterial( "abstract::car01.mat" );

<!-- LESSONS --> Related Lessons:
Introduction to Sound


Terrain

Leadwerks Engine features a powerful terrain system with support for huge landscapes up to 33 million triangles. Assign texture layers with constraints and sculpt the terrain in real-time. Or paint meshes directly onto the terrain. Of course terrains can cast and receive soft real-time shadows, just like everything else in Leadwerks Engine.

<!-- SCREENSHOTS -->

Texture Layers
Create textures layers and paint them onto the terrain, or enter constraints for slope and height and let the engine automatically paint the terrain as you sculpt. Texture layers constraints are handled in the terrain pixel shader, so you can instantly visualize your changes.

Mesh Layers
Render billions of instances of grass and trees with our powerful mesh layer system. Grass instances are dynamically generated around the camera as you move throughout the scene, and never stored in memory. Mesh layers can be aligned to the terrain normal or can always stick straight up.

Editor
Leadwerks Sandbox allows terrain editing with instant lighting and shadows visualization. Create textures layers and paint them onto the terrain, or enter constraints for slope and height and let the engine automatically paint the terrain as you sculpt. Texture layers constraints are handled in the terrain pixel shader, so you can instantly visualize your changes. Erosion filters can transform a rough sketch of a terrain into a realistic landscape.


Tools

The Leadwerks Engine SDK includes a set of tools to give you full control of game authoring. Our flagship tool Leadwerks allows you to assemble a scene with real-time lighting and physics. The material editor allows real-time material building, and the model viewer provides an easy way to view .gmf (Game Model Format) files. Leadwerks Engine also loads 3D World Studio maps directly.

<!-- SCREENSHOTS -->

<!-- VIDEO -->


Model Placement
Click and drag to create new models. The 3D interface makes it easy to position and orient objects

Lighting
Move lights around and instantly visualize the results. There's no need to calculate lightmaps or process visibility information; everything just works instantly.

Terrain Editing
Create textures layers and paint them onto the terrain, or enter constraints for slope and height and let the engine automatically paint the terrain as you sculpt. Texture layers constraints are handled in the terrain pixel shader, so you can instantly visualize your changes. Erosion filters can transform a rough sketch of a terrain into a realistic landscape.

Physics
Edit and interact with physics in real-time, or create chain reactions of events. Physics can be turned on and off with the push of a button.

Mesh Layers
Render billions of instances of grass and trees with our powerful mesh layer system. Grass instances are dynamically generated around the camera as you move throughout the scene, and never stored in memory. Mesh layers can be aligned to the terrain normal or can always stick straight up.

Material Editor
A visual material editor allows artists to adjust settings and select shaders.

Model Viewer
View .gmf models in the Leadwerks Model Viewer with real-time lighting.

Other Tools

  • Phygen - generate physics collision shapes
  • b3d2gmf - convert .b3d files to .gmf format
  • Leadwerks Texture Tools - generate .dds textures and normal maps
  • Unwrap3D - .gmf exporter
  • GMFDump - for analyzing .gmf file contents


Networking

Leadwerks Engine provides an easy-to-use networking command set. Send and receive data with fast UDP messaging and optional reliable and ordered packets. You can even publish your session on a public list of servers so other players can find and join your game.

Networking Commands

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: