work in progress 3d renderer based on sdl2

Related tags

Graphics renderer
Overview

work in progress 3d software renderer based on SDL. (Only supports wireframe view for now)

Building

On Linux, install libsdl2 and then run the folowing command g++ -c ./*.cpp -g -Wall && g++ *.o -o ./main -L -lSDL2main -lSDL2

On Window, you can move the SDL2 files into C:/MinGW/lib and run the build.bat file.

Once you did that, you can run ./main Monkey.txt to view the Monkey in wireframe view.

Loading an OBJ file

Before loading an obj file you need to run the following command to extract face vertices

python parser.py <OBJ file> <new OBJ filename>

Once you do this, run the main file as ./main <new OBJ filename>

Here's a screenshot of Monkey

img file

Credits

https://github.com/ssloy/tinyrenderer

Issues
  • Vertex indexing off by one

    Vertex indexing off by one

    Based on Wikipedia's docs about the .obj format, f lines are 1-indexed.

    It doesn't look like the loader takes that into account: https://github.com/threadException/renderer/blob/dea960baa39c9d5e1a1dcf1305ad36d919c05235/model.cpp#L24-L29 so the indices in the mesh function are probably also wrong. https://github.com/threadException/renderer/blob/dea960baa39c9d5e1a1dcf1305ad36d919c05235/model.cpp#L36-L40

    That could explain the stray lines from the monkey's chin to its ear in https://raw.githubusercontent.com/threadException/renderer/main/screenshot.png ...

    opened by akx 1
Owner
Jayachandra Kasarla
I like electronics and signal processing :)
Jayachandra Kasarla
A real-time DirectX 11 renderer. The renderer is named by my girlfriend's english name.

sophia Sophia is a real-time DirectX 11 renderer. It is not quite a rich graphics engine, only packages some low-level DirectX functions and contains

BB 6 Dec 11, 2021
physically based renderer written in DX12 with image-based lighting, classic deffered and tiled lighting approaches

Features Classical Deferred Renderer Physically Based shading Image Based Lighting BRDF Disney model (Burley + GGX) Tangent space normal mapping Reinh

Alena 35 Jun 2, 2022
A modern C++ physically based renderer

The Dakku Renderer Warning: This project is currently under developing and does not guarantee any consistency. About Dakku is a physically based rende

xehoth 6 Apr 15, 2022
Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.

pbrt, Version 3 This repository holds the source code to the version of pbrt that is described in the third edition of Physically Based Rendering: Fro

Matt Pharr 4.2k Aug 6, 2022
A toy renderer written in C using Vulkan to perform real-time ray tracing research.

This is a toy renderer written in C using Vulkan. It is intentionally minimalist. It has been developed and used for the papers "BRDF Importance Sampl

Christoph Peters 261 Jul 24, 2022
2D GPU renderer for dynamic UIs

vger vger is a vector graphics renderer which renders a limited set of primitives, but does so almost entirely on the GPU. Works on iOS and macOS. API

Audulus LLC 121 Jul 29, 2022
PainterEngine is a application/game engine with software renderer,PainterEngine can be transplanted to any platform that supports C

PainterEngine is a application/game engine with software renderer,PainterEngine can be transplanted to any platform that supports C

DBinary 1.4k Jul 29, 2022
Ipsys Particle System Yey letS go, very cool particle system generator and fast renderer

ipsys - Ipsys Particle System Yey letS go About Ipsys is a piece of software that focuces on running and displaying cool randomly generated particule

Anima Libera 5 May 26, 2022
A Simple Spectral Renderer

Simple Spectral This is a simple multithreaded spectral pathtracer implementing the algorithm (linear combination of bases) described in our EGSR 2019

Ian Mallett 157 Jul 11, 2022
An immediate-mode, renderer agnostic, lightweight debug drawing API for C++

Debug Draw An immediate-mode, renderer agnostic, lightweight debug drawing API for C++. License This software is in the public domain. Where that dedi

Guilherme Lampert 435 Jul 24, 2022
A dx12 river renderer using wave particles with interactive vortices.

Wave Particles with Interactive Vortices Final Result Overview In game industry water can be divided into two domains, ocean and river. This project f

ACskyline 207 Jul 27, 2022
nsfminer is an Ethash GPU mining application: with nsfminer you can mine every coin which relies on an Ethash Proof of Work.

nsfminer (no stinkin' fees) Ethereum (ethash) miner with OpenCL, CUDA and stratum support nsfminer is an Ethash GPU mining application: with nsfminer

Jean M. Cyr 511 Aug 2, 2022
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics

Yocto/GL: Tiny C++ Libraries for Data-Oriented Physically-based Graphics Yocto/GL is a collection of small C++17 libraries for building physically-bas

Fabio Pellacini 2.3k Jul 29, 2022
An OCR Library based on PaddleOCR & OnnxRuntime

An OCR Library based on PaddleOCR & OnnxRuntime

Daniel 0 Mar 27, 2021
Vision-based quadrotor fault-tolerant flight controller.

This repository contains the flight controller, and the vision-based state estimator for a quadrotor subjected to complete failure of a single

Robotics and Perception Group 126 Jul 27, 2022
A path tracer based on hardware ray tracing

GoldenSun GoldenSun is a GPU path tracer. It uses hardware ray tracing APIs to do the tracing. As an experimental project, there is no release plan, n

Minmin Gong 20 Feb 27, 2022
[WIP] A media playback library for Dart & Flutter apps on Windows & Linux. Based on libVLC & libVLC++.

dart_vlc Bringing power of VLC to Flutter & Dart apps on Windows & Linux Installation dependencies: ... dart_vlc: ^0.0.1 Documentation Create a ne

Hitesh Kumar Saini 353 Aug 2, 2022
Vulkan physically based raytracer including denoising

VulkanPBRT Vulkan physically based raytracer including denoising. The GPU raytracer is based on Vulkan only, as well as for the denoising only the Vul

null 15 May 26, 2022
SoL (for Speed of Light, or sun in Spanish) is a Physically-based rendering library written in modern C++

SoL (for Speed of Light, or sun in Spanish) is a small rendering library written in C++20. Its goal is to strike a good balance between performance and usability, and allow easy experimentation for rendering researchers.

Arsène Pérard-Gayot 10 May 19, 2022