All Projects → turanszkij → Wickedengine

turanszkij / Wickedengine

Licence: other
3D engine focusing on modern rendering techniques and performance.

Programming Languages

lua
6591 projects
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
POV-Ray SDL
72 projects
HLSL
714 projects
CMake
9771 projects

Projects that are alternatives of or similar to Wickedengine

zig-gamedev
Building game development ecosystem for @ziglang!
Stars: ✭ 1,059 (-66.36%)
Mutual labels:  vulkan, raytracing, bullet-physics, directx12
Vk raytrace
Ray tracing glTF scene with Vulkan
Stars: ✭ 91 (-97.11%)
Mutual labels:  vulkan, raytracing, pbr, gltf
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (-31.96%)
Mutual labels:  vulkan, raytracing, pbr, directx12
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (-92.53%)
Mutual labels:  vulkan, raytracing, pbr
Rust Game Development Frameworks
List of curated frameworks by the **Game Development in Rust** community.
Stars: ✭ 81 (-97.43%)
Mutual labels:  vulkan, audio, entity-component-system
Quartz
Vulkan RTX path tracer with a declarative ES7-like scene description language.
Stars: ✭ 367 (-88.34%)
Mutual labels:  vulkan, raytracing, pbr
Vulkan Gltf Pbr
Physical based rendering with Vulkan using glTF 2.0 models
Stars: ✭ 438 (-86.09%)
Mutual labels:  vulkan, pbr, gltf
Raytracedshadows
This demo implements BVH construction and GPU traversal for rendering hard shadows.
Stars: ✭ 107 (-96.6%)
Mutual labels:  vulkan, raytracing
Lionengine
Java 2D Game Engine
Stars: ✭ 106 (-96.63%)
Mutual labels:  audio, network
Filament
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
Stars: ✭ 13,215 (+319.79%)
Mutual labels:  vulkan, pbr
Vk raytracing tutorial
Vulkan ray tracing tutorials
Stars: ✭ 144 (-95.43%)
Mutual labels:  vulkan, raytracing
Lugdunum
[UNMAINTAINED] A modern cross-platform 3D engine built with Vulkan, glTF 2.0 and modern C++14.
Stars: ✭ 230 (-92.69%)
Mutual labels:  vulkan, pbr
Minimal Gltf Loader
A minimal, engine-agnostic JavaScript glTF Loader.
Stars: ✭ 148 (-95.3%)
Mutual labels:  pbr, gltf
Suohai
Audio input/output source lock/switcher for macOS.
Stars: ✭ 100 (-96.82%)
Mutual labels:  audio, input
Code Vr
🐍 Program and explore real applications with virtual reality! Learn how to program, compete to build apps, and even collaborate with other people in realtime, in game or not!
Stars: ✭ 131 (-95.84%)
Mutual labels:  vulkan, gltf
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-97.52%)
Mutual labels:  vulkan, raytracing
Ashes
WebGL2.0 3D Engine & ECS & RayTracing
Stars: ✭ 191 (-93.93%)
Mutual labels:  raytracing, gltf
Gltf To Usdz Research
Research and proof of concept of converting glTF to USDZ for AR Quick Look (iOS 12+).
Stars: ✭ 164 (-94.79%)
Mutual labels:  pbr, gltf
The Forge
The Forge Cross-Platform Rendering Framework PC Windows, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Stars: ✭ 2,710 (-13.91%)
Mutual labels:  vulkan, directx12
Yave
Yet Another Vulkan Engine
Stars: ✭ 211 (-93.3%)
Mutual labels:  vulkan, pbr

Wicked Engine

License: MIT Discord chat Patreon follow on Twitter
Github Build Status Appveyor Build status Store


Wicked Engine is an open-source C++ engine focusing on modern rendering techniques and performance. Use this as a framework for your graphics projects, or learning. Some programming skills are required for the best experience, but some simple tools like an Editor are also included. It is free to be used for anything good.
This project is hosted on GitHub.

You can download the source code by using Git and cloning the repository, or downloading it as zip. You can also choose to download a pre-built version of the Editor or Tests applications, which will allow you to try out features, load content and execute LUA scripts.
Tip: try loading models or scripts from the Content folder using the Editor app to see how everything works.

Platforms:

  • Windows 10 or newer
  • Linux
  • UWP

How to build:

Windows

To build Wicked Engine for Windows 10, use Visual Studio and the provided WickedEngine.sln solution file. There are a couple of projects that you can run up front: Editor, Tests and Template. You just have to set either as startup project and press F5 in Visual Studio to build and run. For optimal performance, choose Release mode, for the best debugging experience, choose Debug mode.

If you want to develop an application that uses Wicked Engine, you can build the WickedEngine static library project for the appropriate platform, such as WickedEngine_Windows and link against it. Including the "WickedEngine.h" header will attempt to link the binaries for the appropriate platform, but search directories should be set up beforehand. For example, you can set additional library directories to $(SolutionDir)BUILD\$(Platform)\$(Configuration) by default. For examples, see the Template, Tests, and Editor projects.

You can also dowload prebuilt and packaged versions of the Editor and Tests here: Github Build Status

If you have questions or stuck, please use the windows communication channel on Discord: Discord chat

Note: Building 32-bit and ARM versions should be possible, but no longer provided by default. You will need to configure the solution for these platforms yourself if you want this. For ARM platform, also use the -DBT_USE_DOUBLE_PRECISION=1 definition when compiling.

Cmake: It is possible to build the windows version with Cmake, but the recommended way is to use the provided WickedEngine.sln file with Visual Studio.

Linux

To build the engine for Linux, use Cmake. You can find a sample build script for Ubuntu 20.04 here (in the linux section). You might need to install some dependencies, such as Cmake (3.7 or newer), g++ compiler (C++ 17 compliant version) and SDL2. For Ubuntu 20.04, you can use the following commands to install dependencies:

sudo apt update
sudo apt install libsdl2-dev
sudo apt install build-essential

To build the engine, editor and tests, use cmake and then make:

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make

If you want to develop an application that uses Wicked Engine, you will have to link to libWickedEngine.a and #include "WickedEngine.h" into the source code. For examples, look at the Cmake files, or the Tests and the Editor applications.

You can also dowload prebuilt and packaged versions of the Editor and Tests here: Github Build Status

If you have questions or stuck, please use the linux communication channel on Discord: Discord chat

Examples:

Initialization (C++):

// Include engine headers:
#include "WickedEngine.h"

// Create the Wicked Engine application:
wi::Application application;

// Assign window that you will render to:
application.SetWindow(hWnd);

// Run the application:
while(true) {
   application.Run(); 
}

Basics (C++):

wi::RenderPath3D myGame; // Declare a game screen component, aka "RenderPath" (you could also override its Update(), Render() etc. functions). 
application.ActivatePath(&myGame); // Register your game to the application. It will call Start(), Update(), Render(), etc. from now on...

wi::scene::LoadModel("myModel.wiscene"); // Simply load a model into the current global scene
wi::scene::GetScene(); // Get the current global scene

wi::scene::Scene scene2; // create a separate scene
wi::scene::LoadModel(scene2, "myModel2.wiscene"); // Load model into a separate scene
wi::scene::GetScene().Merge(scene2); // Combine separate scene with global scene

myGame.setFXAAEnabled(true); // You can enable post process effects this way...

wi::RenderPath2D myMenuScreen; // This is an other render path, but now a simple 2D one. It can only render 2D graphics by default (like a menu for example)
application.ActivatePath(&myMenuScreen); // activate the menu, the previous path (myGame) will be stopped

wi::Sprite mySprite("image.png"); // There are many utilities, such as a "sprite" helper class
myMenuScreen.AddSprite(&mySprite); // The 2D render path is ready to handle sprite and font rendering for you

wi::audio::Sound mySound;
wi::audio::CreateSound("explosion.wav", &mySound); // Loads a sound file
wi::audio::SoundInstance mySoundInstance;
wi::audio::CreateSoundInstance(&mySound, &mySoundInstance); // Instances the sound file, it can be played now
wi::audio::Play(&mySoundInstance); // Play the sound instance
wi::audio::SetVolume(0.6, &mySoundInstance); // Set the volume of this soundinstance
wi::audio::SetVolume(0.2); // Set the master volume

if (wi::input::Press(wi::input::KEYBOARD_BUTTON_SPACE)) { wi::audio::Stop(&mySoundInstance); } // You can check if a button is pressed or not (this only triggers once)
if (wi::input::Down(wi::input::KEYBOARD_BUTTON_SPACE)) { wi::audio::Play(&mySoundInstance); } // You can check if a button is pushed down or not (this triggers repeatedly)

Scripting (LUA):

-- Set a rendering path for the application
path = RenderPath3D;
application.SetActivePath(path);    -- "application" is created automatically by wi::Application

-- Load a model entity into the global scene:
entity = LoadModel("myModel.wiscene");

-- Load a model entity into a separate scene:
scene2 = Scene()
entity2 = LoadModel(scene2, "myModel2.wiscene");

-- Combine the separate scene with the global scene:
scene.Merge(scene2);

-- Get the current global scene:
scene = GetScene();

-- Move model to the right using the entity-component system:
transform = scene.Component_GetTransform(entity);
transform.Translate(Vector(2, 0, 0));

-- Print any WickedEngine class information to the backlog:
getprops(application);	-- prints the application methods
getprops(scene);	-- prints the Scene class methods
getprops(path);	-- prints the deferred render path methods

-- Play a sound:
sound = Sound()
audio.CreateSound("explosion.wav", sound)
soundinstance = SoundInstance()
audio.CreateSoundInstance(sound, soundinstance)  -- several instances can be created from one file
audio.Play(soundinstance)
audio.SetVolume(0.6, soundinstance)  -- sets the volume of this soundinstance
audio.SetVolume(0.2)  -- sets the master volume

-- Check for input:
if(input.Press(KEYBOARD_BUTTON_LEFT)) then
   audio.Play(soundinstance); -- this will play the sound if you press the left arrow on the keyboard
end

(You can enter lua scripts into the backlog (HOME button), or the startup.lua script which is always executed on application startup if it is found near the app, or load a script via dofile("script.lua") command)

For more code samples and advanced use cases, please see the example projects, like the Template_Windows, Tests, or Editor project. There are also sample models and scripts included with Wicked Engine in the Content/models and Content/scripts folders. Check them out to learn about more features.

Scripting API:

You can use a great number of engine features through the Lua scripting api, which can even be used real time while the program is running. The included applications, like the Editor, contain a scripting input method toggled by the "Home" key. A blue screen will be presented where the user can type in LUA commands. It is very minimal in regards to input methods. For further details, please check the scripting API documentation: Wicked Engine Scripting API

Model import/export:

The native model format is the WISCENE format. Any application using Wicked Engine can open this format efficiently.

In addition, the Editor supports the importing of some common model formats (the list will potentially grow):

  • OBJ
  • GLTF 2.0

The preferred workflow is to import models into the Editor, and save them as WISCENE, then any Wicked Engine application can open them.

Graphics API:

The default renderer is DirectX 12 on Windows and Vulkan on Linux. The DirectX 11 renderer is no longer available starting from version 0.57.0, but it can be found on the dx11-backup branch. You can specify command line arguments (without any prefix) to switch between render devices or other settings. Currently the list of options:

Argument Description
dx12 Use DirectX 12 rendering device
vulkan Use Vulkan rendering device
debugdevice Use debug layer for graphics API validation. Performance will be degraded, but graphics warnings and errors will be written to "Output" window
gpuvalidation Use GPU Based Validation for graphics. This must be used together with the debugdevice argument. Currently DX12 only.
alwaysactive The application will not be paused when the window is in the background.


Other software using Wicked Engine

  • Game Guru MAX: Easy to use game creator software
  • Flytrap: Demoscene production by qop
  • Your project: add your project to this readme and open a pull request

Troubleshooting

If you are having trouble getting the applications to run, make sure that you satisfy the following conditions:

  • If you built the application with Visual Studio, run it from the Visual Studio environment, where the executable working directory is set up to be the Project directory (not the build directory where the exe will be found)
  • If you want to run an application without Visual Studio, either copy the executable from the BUILD directory to the correct project directory, or set the working directory appropriately. You can also check the Working directory setting in Visual Studio to find out the right working directory of every project.
  • If starting the application on Windows and you get the error: Failed to load dxcompiler.dll!, you might be missing the Visual C++ redistributable package, that you can get from here for your system: https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 . An other option is to run with the vulkan command line argument to use the Vulkan renderer instead of DirectX 12 (as Vulkan doesn't require dxcompiler.dll).
  • If you want to build UWP application, then you will first need to build the shaders into a shader dump. For that, build and run the offlineshadercompiler project with the hlsl6 shaderdump command line arguments. If the wiShaderDump.h file is successfully generated, rebuilding the engine will embed all the shader files so they are not loaded separately. But embedded shaders also cannot be recompiled during runtime.

Screenshots:

Sponza scene with voxel GI enabled: Sponza

Damaged Helmet sample model imported from GLTF: Sponza

Bokeh Depth of Field (Lain model by woopoodle at Sketchfab): DepthOfField

Motion blur (fighting game sample): MotionBlur

Stochastic Screen Space Reflections: ScreenSpaceReflections

Real time ray traced shadows and ambient occlusion (DXR, VK_KHR_raytracing): RaytracedShadows

Bloom: Bloom

Path tracing in the living room (model from Morgan McGuire's graphics archive): LivingRoom

City scene with a light map (model by Michael Gallie at CgTrader): City

Path tracing in the city: Balcony

Path traced caustics: Caustics

Vegetation particle system and depth of field: Vegetation

Bistro scene from Amazon Lumberyard (model from Morgan McGuire's graphics archive): Bistro_out

Bistro scene from the inside: Bistro_in

Parallax occlusion mapping: ParallxOcclusionMapping

Large scale particle simulation on the GPU: ParticleSimulation

Tiled light culling in the Bistro: TiledLightCulling

GPU-based BVH builder: GPU_BVH

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].