Skip to content

Latest commit

 

History

History
108 lines (81 loc) · 3.94 KB

File metadata and controls

108 lines (81 loc) · 3.94 KB

MoerEngine

Engine for Realtime Rendering

| 简体中文 | English |

This README is outdated. If you need English version, please raise an issue. We will update it as soon as possible.

Dependencies

  • OS
    • Windows 10 or 11
  • Compiler
    • MSVC == 19.44.*
    • or clang(待测试)
  • CMake >= 3.26.0 且 < 4.0.0 (download link)
  • Git (download link)

How to Build & Run

MoerEngine

  • Method 1: Command Line

    # Clone the repo
    # Tip: If you don't have configured SSH, replace `git@xxx` with `https://github.com/NJUCG/MoerEngine.git`
    git clone --branch dev-rhi-remake git@github.com:NJUCG/MoerEngine.git
    cd MoerEngine
    
    # Ignore some specific commits (formatting changes)
    git config --local blame.ignoreRevsFile .git-blame-ignore-revs
    
    # Download Sponza scene to `./asset/scenes/`
    git clone --branch scene/sponza --depth 1 git@github.com:NJUCG/MoerEngine.git ./asset/scenes/sponza
    
    # Configure the engine (use default settings)
    cp template.MoerEngine.toml MoerEngine.toml
    
    # Build
    cmake -B build
    cmake --build build -j16 # change 16 to your cpu core count
    
    # Run
    ./target/bin/Debug/MoerEditor.exe
    • If you have installed just, you can run the following commands to build and run the engine.
      just setup
      just gbr # generate build run
  • Method 2: Rider

    • TODO

CUDA, LibTorch, and TensorRT

Needs to be updated from Chinese Version

  • CUDA

  • LibTorch and TensorRT

    • If you want to enable them, you need to install them manually, and tell Moer Engine where they are.

    • First, install LibTorch and TensorRT.

    • Then, run cp source/cuda/template.LibTorch_TensorRT.cmake source/cuda/LibTorch_TensorRT.cmake

    • Modify LibTorch_TensorRT.cmake

    • Add /path/to/torch/lib and /path/to/tensorRT/lib to your PATH

      • image-20250920204538099
    • Finally, recompile, and it should work.

  • IntelliSense

    • You can set Environment Variables CUDA_PATH, LIBTORCH_PATH, TENSORRT_PATH. Then, vscode will load corresponding include path to IntelliSense.
    • Detailed in .vscode/c_cpp_properties.json
    • Example
      • image-20250920201137320
      • image-20250920201248463

How to use

How to render other scenes

  • Method 1: GUI

    • Select Open Scene in GUI
  • Method 2: Config

    • If you succeed to run Moer Engine, open the configuration file ./target/bin/Debug/config/MoerEngine.toml.
    • Then, change scene_path to any other scene files in your machine.
      • Such as scene_path = E:\Data\Models\BlueArchive\aris\CH0200.fbx.
    • Run ./target/bin/Debug/MoerEditor.exe again, you will see the new scene.
    • Tip: ./target/bin/Debug/config/* will be replaced with ./source/configs/*, every time you compile.

Camera Controlling

  • The camera control method of Moer Engine is very similar to Unreal Engine's.
    • When dragging the mouse, press W/A/S/D/Q/E to move the camera.
    • Drag right mouse button to rotate the camera.
    • Drag left mouse button to rotate the camera and move forward/backward.
    • Drag both mouse buttons or middle button to move the camera.
  • Press F to control camera without dragging.
  • Press or to change the speed of camera.
  • Scroll the mouse wheel to change FOV.