A model viewer for Quake 1 and Hexen 2 with a focus on accurate representation.

Related tags

Game LunarViewer
Overview

LunarViewer

Windows (x64) Linux (x64)

A model viewer for Quake 1 and Hexen 2 with a focus on accurate representation.

Powered by raylib and dear imgui!

Features

  • Support for Quake 1 (IDPO) and Hexen 2 (RAPO) model formats
  • Hardware-accelerated with OpenGL, while still maintaining the software renderer look
  • Vertices are transformed and animated all on the GPU via a vertex shader
  • Supports previewing animations with interpolation

Known issues

  • Linux doesn't have a File Select Dialog yet. The model needs to be loaded via a launch argument (like LunarViewer ~/id1/progs/shambler.mdl). I'm planning on implementing one using ImGui that wouldn't require platform specific implementations and it would allow me to add model previews within that.
  • Sometimes when switching the render mode, the model's texture will get unloaded. Switching the render mode again a few times will fix it.
  • Models with animated textures (groupskins) are not supported yet
  • Models with groupframes are not supported yet
  • You can't change the skin that's being previewed
  • No config of any kind is saved (apart from imgui)
  • There's a slight offset on the UVs that I need to look into
  • The code is an absolute mess that needs to be cleaned up

Building

On Windows

Run premake-2019.bat to create a Visual Studio 2019 solution!

On Linux/Mac

Run premake-linux.sh to create the Makefiles and then run make to build! (You can do make config=release_x64 to make a release build)

Helpful resources used in the making of this project

Loading Quake 1 MDL files - http://tfc.duke.free.fr/coding/mdl-specs-en.html

Credits

  • Quake Mapping Discord (specifically Spoike and Paril) - help with the RAPO model format and flags
  • MissLav - testing on Linux with Wine
  • Joshua Barrett - help with getting the application working on Linux

Used open source projects and libraries

raylib

https://github.com/raysan5/raylib/

Used as the rendering backend. The app also uses normal OpenGL code to do stuff that raylib itself doesn't expose.

The code was modified to fix the normal matrix (it was in view space and not world space) and to allow for the use of the stencil buffer.

ImGui

https://github.com/ocornut/imgui

Used for the main UI

raylib backend for ImGui

https://github.com/oskaritimperi/imgui-impl-raylib

PhysicsFS

https://github.com/icculus/physfs

Not used for anything yet, but the goal is to use it to read files from PAKs and other archive formats it supports

glslang

https://github.com/KhronosGroup/glslang

Used for preprocessing the shader files

Premake

https://premake.github.io/

'nuff said

Comments
  • Missing font file

    Missing font file

    I build the current main branch on Ubuntu with premake-linux.sh. It build successfully but on startup the follwoign error appears.

    Host machine is little endian
    WARNING: IMAGE: Data is not valid to load texture
    WARNING: GLFW: Window icon image must be in R8G8B8A8 pixel format
    LunarViewer: imgui/imgui_draw.cpp:2150: ImFont* ImFontAtlas::AddFontFromFileTTF(const char*, float, const ImFontConfig*, const ImWchar*): Assertion `(0) && "Could not load font file!"' failed.
    Aborted (core dumped)
    

    What font do I need for running the viewer?

    opened by aggsol 2
  • Tweaks to make the program compile on Linux.

    Tweaks to make the program compile on Linux.

    This should make LunarViewer fully compile on linux.

    The one snag is that I had to move the man project up to C++20, which may break things on windows, if something was deprecated. Other than that, windows compatibility should theoretically remain unaltered (although of course it should be tested).

    opened by jjbarr 0
  • LoadColormap() error on Linux

    LoadColormap() error on Linux

    Compiled from latest source on Debian Linux but get a variation of this error for every model I try to view:

    $ ./bin/Release/LunarViewer path/to/armour.mdl 
    Host machine is little endian
    WARNING: IMAGE: Data is not valid to load texture
    WARNING: GLFW: Window icon image must be in R8G8B8A8 pixel format
    ERROR: Main.cpp:133 -> LoadColormap()
    Failed to load palette! Not enough entries!
    Trace/breakpoint trap
    
    opened by hemebond 0
  • Add a File Dialog that also works in Linux

    Add a File Dialog that also works in Linux

    This could be useful and I could add a model preview through the info pane! https://github.com/aiekick/ImGuiFileDialog

    There's also this project that would let me use native file dialogs on any OS it supports. https://sourceforge.net/projects/tinyfiledialogs/

    enhancement 
    opened by TheEnbyWitch 0
  • Add support for CLI-only usage

    Add support for CLI-only usage

    Some features would include:

    • reporting model data to use in an automation system for example
    • editing model files without having to go through the GUI (check #5)
    enhancement 
    opened by TheEnbyWitch 0
  • Editing MDL files

    Editing MDL files

    Suggestions from the Quake Mapping Discord related to editing MDL files:

    • Ability to save MDL files
    • Frame reordering
    • Skin replacement/addition
    • Group skins from multiple skins to create an animated texture
    • Group frames from multiple simple frames
    • Edit flags (already kinda implemented, but there's no ability to save)
    enhancement 
    opened by TheEnbyWitch 0
Owner
Luna Ryuko Zaremba
Gamedev currently working @ REIKON GAMES | She/They
Luna Ryuko Zaremba
Cytopia is a free, open source retro pixel-art city building game with a big focus on mods.

Cytopia is a free, open source retro pixel-art city building game with a big focus on mods. It utilizes a custom isometric rendering engine based on SDL2.

CytopiaTeam 1.6k Dec 30, 2022
A Vulkan game engine with a focus on data oriented design

The Fling Engine aims to be a cross platform Vulkan game engine that will experiment with the following: Low-level engine systems such as render API a

Fling Engine 316 Jan 7, 2023
A cycle-accurate Game Boy and Game Boy Color Emulator, with rewind feature.

Azayaka is a free and open-source Game Boy and Game Boy Color emulator written in C++. Features Cycle-Accurate emulation. Console based Debugg

Zach Collins 23 Dec 3, 2022
SameBoy DX is a Qt-based interface of SameBoy, a free, highly accurate Game Boy and Game Boy Color emulator.

SameBoy DX SameBoy DX is a Qt-based interface of SameBoy, a free, highly accurate Game Boy and Game Boy Color emulator. Build requirements: CMake Pyth

Snowy 7 Oct 2, 2022
Quake GPL Source Release

This is the complete source code for winquake, glquake, quakeworld, and glquakeworld. The projects have been tested with visual C++ 6.0, but masm is

id Software 3.9k Jan 1, 2023
Quake 2 GPL Source Release

This is the complete source code for Quake 2, version 3.19, buildable with visual C++ 6.0. The linux version should be buildable, but we haven't test

id Software 2.2k Jan 7, 2023
Quake 4 SDK integrated with Doom 3

Quake4Doom Quake 4 SDK integrated with Doom 3 GPL release This project is a code integration of the Quake 4 SDK against the Doom 3 GPL codebase. This

null 57 Dec 11, 2022
Quake II on Dx12

QuakeIIDXXII Quake II on Dx12. It has been tarted from https://github.com/oraoto/quake2-vs2015 because it is the original code and it was compiling ou

SebH 26 Sep 20, 2022
TrenchBroom is a modern cross-platform level editor for Quake-engine based games.

TrenchBroom is a modern cross-platform level editor for Quake-engine based games.

TrenchBroom 1.3k Jan 8, 2023
Combination of various small tweaks/mods for Quake Enhanced

QETweaks A collection of "tweaks" (small mods) for Quake Enhanced multiplayer servers. Enabling tweaks Set saved1 console variable to desired value be

CK 1 Dec 29, 2021
An in-game hitbox viewer for Guilty Gear Strive.

Screenshot Usage Run striveinjector.exe after starting the game. strivehitboxes.dll must be in the same folder. Box colors Green = Hurtbox Cyan = Hurt

null 74 Jan 1, 2023
Replace Minecraft entity with MMD model.

KAIMyEntity Replace Minecraft entity with MMD model. KAIMyEntitySaba 将Github项目 benikabocha/saba (https://github.com/benikabocha/saba) 魔改成一个以JNI形式Expor

null 30 Oct 16, 2022
A Binary Clock. Written 3 different ways. C and SDL, Python and PyGame, Python and PyGame Zero.

Super Clock A Binary Clock. Written 3 different ways. Python with PyGame Zero, Python with PyGame and C with SDL2. Time is displayed in 3 groups of 8

null 3 Dec 8, 2021
Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more

EnTT is a header-only, tiny and easy to use library for game programming and much more written in modern C++. Among others, it's used in Minecraft by

Michele Caini 7.6k Jan 4, 2023
Powerful, mature open-source cross-platform game engine for Python and C++, developed by Disney and CMU

Panda3D Panda3D is a game engine, a framework for 3D rendering and game development for Python and C++ programs. Panda3D is open-source and free for a

Panda3D 3.6k Dec 31, 2022
OGRE is a scene-oriented, flexible 3D engine written in C++ designed to make it easier and more intuitive for developers to produce games and demos utilising 3D hardware.

OGRE (Object-Oriented Graphics Rendering Engine) is a scene-oriented, flexible 3D engine written in C++ designed to make it easier and more intuitive for developers to produce games and demos utilising 3D hardware. The class library abstracts all the details of using the underlying system libraries like Direct3D and OpenGL and provides an interface based on world objects and other intuitive classes.

null 3.1k Jan 3, 2023
Minecraft 4k: decompiled, translated to C using SDL for graphics and input, and improved upon

M4KC Minecraft 4K - C Rewrite For those who don't know, Minecraft 4K was a stripped down version of Minecraft submitted by Notch to the Java 4K Game P

Sasha Koshka 38 Oct 9, 2022
an AI and gameplay editor for game development, written by c++ , suppport lua and python

an AI and gameplay editor for game development, written by c++ , suppport lua and python

null 26 Dec 14, 2022
A multi core friendly rigid body physics and collision detection library suitable for games and VR applications.

Jolt Physics Library A multi core friendly rigid body physics and collision detection library suitable for games and VR applications. A YouTube video

null 2.5k Dec 31, 2022