AnKi 3D Engine - Vulkan and D3D12, modern renderer, scripting, physics and more

#game-engine #gamedev #engine #3d #rendering #opengl #vulkan #glsl #hlsl #cpp

Panagiotis Christopoulos Charitos 434d4d469d Fix a bug in frustum calculation for the cascades & optimize the bounds of cascades to reduce the number of drawcalls 2 年之前
.github 0674fe776d Try fixing the build 2 年之前
AnKi 434d4d469d Fix a bug in frustum calculation for the cascades & optimize the bounds of cascades to reduce the number of drawcalls 2 年之前
Docs 60fc9edd56 Convert a few more shaders to HLSL 2 年之前
EngineAssets 042b1520bf Enable positions compression 3 年之前
Samples 4edb404342 Fix some bugs in the GLTF importer 2 年之前
Sandbox 00f2562ad8 Improve tracing a bit 2 年之前
Tests 3c2e2714a7 Add the new job manager 2 年之前
ThirdParty 7f19daff18 Update Linux's DXC and remove a workaround 2 年之前
Tools 97946cf77d Imported fixes 2 年之前
.clang-format 2f699aa49b Change the code style. Increase the column size to 150 2 年之前
.clang-format-hlsl 2f699aa49b Change the code style. Increase the column size to 150 2 年之前
.editorconfig d4d26890bc Nothing important 3 年之前
.gitattributes 2c35d66589 Update the .gitattributes 2 年之前
.gitignore bb6f5ea3cf Add missing files. Damn gitignore 3 年之前
.gitmodules 338688407a - Rename DLSSCtx to GrUpscaler looking into the future 3 年之前
AnKi.natvis dc15130af7 Add some code for light/probe visibility 2 年之前
CMakeLists.txt dd41629717 Android fixes 2 年之前
LICENSE 557d7a2e6c Update copyright year 2 年之前
README.md a089b63617 Bye GLSL bye glslang 2 年之前

README.md

AnKi logo

Official website: anki3d.org

Twitter development news feed: twitter.com/anki3d

AnKi 3D engine is a Linux, Windows and Android opensource game engine that runs on Vulkan.

Video

1 License

AnKi's license is BSD. This practically means that you can use the source or parts of the source on proprietary and non proprietary products as long as you follow the conditions of the license.

See the LICENSE file for more info.

2 Building AnKi

Build Status Linux Build Status Windows Build Status Android

To checkout the source type:

git clone https://github.com/godlikepanos/anki-3d-engine.git anki

AnKi's build system is using CMake. A great effort was made to ease the building process that's why the number of external dependencies are almost none.

2.1 On Linux

Prerequisites:

  • Cmake 3.10 and up
  • GCC 5.0 and up or Clang 6.0 and up
  • libx11-dev installed
  • libxrandr-dev installed
  • libx11-xcb-dev installed
  • [Optional] libxinerama-dev if you want proper multi-monitor support

To build the release version:

$cd path/to/anki
$mkdir build
$cd ./build
$cmake .. -DCMAKE_BUILD_TYPE=Release
$make

To view and configure the build options you can use ccmake tool or other similar tool:

$cd path/to/anki/build
$ccmake .

This will open an interface with all the available options.

2.2 On Windows

Prerequisites:

  • Cmake 3.10 and up
  • Python 3.0 and up
    • Make sure that the python executable's location is in PATH environment variable
  • Microsoft Visual Studio 2017 and up
    • Make sure that Windows 10 SDK (xxx) for Desktop C++ [x86 and x64] component is installed

To build the release version open PowerShell and type:

$cd path/to/anki
$mkdir build
$cd build
$cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release
$cmake --build . --config Release

Alternatively, recent Visual Studio versions support building CMake projects from inside the IDE:

  • Open Visual Studio
  • Choose the "open a local folder" option and open AnKi's root directory (where this README.md is located)
  • Visual Studio will automatically understand that AnKi is a CMake project and it will populate the CMake cache
  • Press "build all"

2.3 For Android

Prerequisites:

  • Android Studio
  • From Android Studio's package manager you need to install NDK and CMake
  • Having built AnKi for your host operating system (Linux or Windows)

Android builds work a bit differently from Linux and Windows. First you need to have built AnKi for your host operating system. That's because Android builds requires the ShaderCompiler/ShaderCompiler.exe to compile the shaders for Android. Then you have to generate a gradle project per build target.

For example, if you want to generate a project for the Sponza sample just type from a Linux terminal:

$cd path/to/anki
$./Samples/Sponza/GenerateAndroidProject.sh path/to/Binaries/ShaderCompiler

or from a PowerShell terminal on Windows:

$cd path/to/anki
$./Samples/Sponza/GenerateAndroidProject.bat path/to/Binaries/ShaderCompiler.exe

The GenerateAndroidProject scripts will generate a project in the root directory of AnKi. So for the Sponza sample the script will create a directory named AndroidProject_Sponza.

Then you can open the AndroidProject_Sponza project from Android Studio and build it, debug it, run it etc.

3 Next steps

This code repository contains 4 sample projects that are built by default (ANKI_BUILD_SAMPLES CMake option):

  • Sponza: The Crytek's Sponza scene
  • SimpleScene: A simple scene (Cornell box)
  • PhysicsPlayground: A scene with programmer's art and some physics interactions
  • SkeletalAnimation: A simple scene with an animated skin

You can try running them and interacting with them. To run sponza, for example, execute the binary from any working directory.

On Linux:

$./path/to/build/Binaries/Sponza

On Windows just find the Sponza.exe and execute it. It's preferable to run the samples from a terminal because that prints some information, including possible errors.

4 Contributing

There are no special rules if you want to contribute. Just create a PR. But before you do that, carefully read the code style guide.