A basic 3D scene implemented with various engines, frameworks or APIs.

Overview

Here be dragons

Hic sunt dracones.

This repository contains multiple implementations of the same 3D scene, using different APIs and frameworks on various platforms. The goal is to provide a comparison between multiple rendering methods. This is inherently biased due to the variety of algorithms used and available CPU/GPU configurations, but can hopefully still provide interesting insights on 3D rendering. You can check a video of all current versions runnning here (Youtube)

The following versions are currently available:

The following versions are (tentatively) planned:

  • DirectX, OpenGL ES
  • other console hardwares
  • another raytracing

In the directory of each version, one can find the source code, the corresponding resources (as each method has its own format/quality constraints), along with a readme describing the method and a few examples. The only exception is the OpenGL project, which is described below.

Resources

The scene is composed of four main elements:

  • a plane representing the ground, with a pavement texture.
  • a dragon (the Stanford dragon).
  • a monkey head ('Suzanne') rotating around its vertical axis.
  • a skybox surrounding the scene, textured with a cloudy sky.

Additionally, the sun is simulated by using a directional light, and the camera should be able to rotate around the scene. The initial 3D models and textures are contained in the opengl/resources directory.

Other implementations

Here you can find implementations using some of the above APIs combined with other programming languages, submitted by awesome people!

Comments
  • Antialiasing disabled, bilinear filtering enabled

    Antialiasing disabled, bilinear filtering enabled

    Antialiasing isn't worth the performance tradeoff here - forced bilinear filtering instead of nearest neighbour filtering for a tangible texture improvement. May add an option to bump res to 640x480 at progressive output for crisper image.

    opened by TheMrIron2 2
  • Resolution correction

    Resolution correction

    640x512 is standard 50Hz PAL resolution however the demo appears to be running at 60Hz (480i) - I have corrected the resolution to be 640x448 as per standard 60Hz PS2 games (not 640x480, 640x448 for overscan compensation). This may free up a little more VRAM (40,000 less pixels after all) and probably yield marginally better performance?

    opened by TheMrIron2 1
  • PS2 Optimisations

    PS2 Optimisations

    Some future ideas for more optimal circumstances on PS2:

    • The PS2 GPU memory is fast enough to flush and refill textures multiple times per frame, according to the developers of Metal Gear Solid 2 - who had up to 10MB of textures on-screen at times inside the 4MB VRAM (total, not including memory used for buffers). It may be possible to use similar techniques to achieve better results in this demo.
    • I feel better looking textures could be used with the above method and storing these in the main 32MB RAM and sending them to the GPU as needed - the PS2 has a 3.6GB/s memory bus so the potential is undoubtedly there.
    • Using recent gsKit tools available on github may also give the code some cleaner syntax and possibly expand the available libraries?
    • Different video modes; I would say that a 640x448i mode and a 640x480p mode would be optimal, however 640x540 at 1080i would also be very interesting - a few games used this for a 1080i mode, and this could look great on HDTVs possibly with antialiasing.

    Keep this project up, though. It's nice to see demos like this arise on the PS2. I recommend you check out the gsKit "hi-res" sample code for an idea of what you might be able to do - this seems like a relatively simple scene, and one programmer was able to get a rotating 3D teapot running at native 1920x1080, a 1920x1080 background texture and all with antialiasing at 60FPS. Would be cool to see some improvements here from code like that.

    opened by TheMrIron2 7
  • Info: the PS2 demo runs on real hardware

    Info: the PS2 demo runs on real hardware

    I've tried launching the PS2 version of this demo using uLaunchELF on my PAL PS2 slim, and it seems to work without any issues.

    It might be worth adding that the PS2 demo was tested on real hardware as well. I can provide photos of it running as well if there's interest.

    information 
    opened by UwUnyaa 4
  • Add DirectX Toolkit version

    Add DirectX Toolkit version

    I'm adding this as an issue mostly because I want to do it but I can't commit any time to it yet or rather can't predict when I'll find some time to do it.

    However, it should be a good exercise for anyone.

    DirectXTK: https://github.com/Microsoft/DirectXTK

    additional version 
    opened by speps 1
  • WebGL Code cleanup?

    WebGL Code cleanup?

    There's a few, um, less than best practices in the WebGL code. I didn't look at the others

    2 examples

    • looking up uniform and attribute locations every frame at render time instead of once at init time

    • assigning properties to WebGLObjects that could be null

    There's also questionable issues like forcing 800x600. That might make sense on desktop PCs where you'd be hard pressed to find a display that's only 800x600 but it makes far less sense on a browser that might be viewed in a phone where the phone is trying to emulate 320x568 resolution.

    Another is using devicePixelRatio. Does that happen on your c++ version? In other words if you open an 800x600 window are you getting 800x600 pixels or 800x600 * devicePixelRatio

    Other random stuff

    Setting the size of the canvas directly is kind of an anti-pattern. You should let CSS choose the size on the web.

    Vertex Buffer Objects are available pretty much universally on WebGL

    http://webglstats.com/webgl/extension/OES_vertex_array_object?platforms=0000dfffcfbfabfd01

    In fact it's only IE and Edge that, not the actual hardware so if you want to use them you can either just use them and tell IE and Edge users they're S.O.L. or you can use polyfill that will just fill it in on IE and EDGE.

    Would you be interested in a PR that deals with those issues?

    opened by greggman 2
3D Solar System Scene

This was my Computer Graphics' project. In this i used OpenGL and Glut to create a 3D Solar System Scene. Its without textures and wrapping. Just the most basic functionalities.

Hassan Shahzad 7 Jun 20, 2022
A set of open c++ game development tools that are lightweight, easy-to-integrate and free to use. Currently hosting a magicavoxel .vox full scene loader.

open game tools Open game tools is a set of unencumbered, free, lightweight, easy-to-integrate tools for use in game development. So far it contains:

null 288 Nov 26, 2022
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal

Low Level Graphics Library (LLGL) Documentation NOTE: This repository receives bug fixes only, but no major updates. Pull requests may still be accept

Lukas Hermanns 1.5k Nov 28, 2022
NVRHI (NVIDIA Rendering Hardware Interface) is a library that implements a common abstraction layer over multiple graphics APIs

NVRHI Introduction NVRHI (NVIDIA Rendering Hardware Interface) is a library that implements a common abstraction layer over multiple graphics APIs (GA

NVIDIA GameWorks 430 Nov 29, 2022
Source Code for "Ray Tracing Gems: High-Quality and Real-Time Rendering with DXR and Other APIs" by Eric Haines and Tomas Akenine-Möller

Apress Source Code This repository accompanies Ray Tracing Gems: High-Quality and Real-Time Rendering with DXR and Other APIs by Eric Haines and Tomas

Apress 851 Nov 21, 2022
A personal project that uses DX12 to implement various render techniques to ultimately create breathtaking real-time visuals

D3D12Playground (Real Time) A personal project that uses DX12 to implement various render techniques to ultimately create breathtaking real-time visua

null 3 Apr 27, 2022
ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources

ZBar Bar Code Reader is an open source software suite for reading bar codes from various sources

null 2.4k Nov 28, 2022
My computer graphics playground. Currently has a raytracer implemented with D3D11 compute shader.

Graphics Playground I use this project as my "toy" engine. I'll be implementing various graphics projects in this repository. The code here is not sui

Berk Emre Sarıbaş 4 Aug 26, 2021
Canny edge detection, one of the efficient edge detection algorithms is implemented on a Zedboard FPGA using verilog

In this project, Canny edge detection, one of the efficient edge detection algorithms is implemented on a Zedboard FPGA using verilog. The input image is stored on a PC and fed to the FPGA. The output processed image is displayed on a VGA monitor.

Jeffrey Samuel 3 Nov 16, 2022
A minimalist library with basic facilities for developing interactive real-time 3D applications, with a strong emphasis on simplicity and ease of use.

SlimEngine A minimalist and platform-agnostic base project for interactive graphical applications (2D/3D) with a strong emphasis on simplicity, ease o

Arnon Marcus 67 Oct 29, 2022
vkfetch is a fetch-program that displays basic information about your vulkan-compatible graphic card(s)!

vkfetch vkfetch is a fetch-program that displays basic information about your vulkan-compatible graphic card(s)! vkfetch will also display some vendor

Wunk 19 Oct 27, 2022
Demonstrates basic advantages of integrating the Data Distribution Service (DDS) and Time-Sensitive Networking (TSN) Ethernet.

ROS2-DDS-TSN integration demo This repository demonstrates basic advantages of integrating the Data Distribution Service (DDS) and Time-Sensitive Netw

NXP 56 Nov 19, 2022
OpenGL®-Starter is a template for your upcoming OpenGL Projects which has been compiled to run the most basic Hello World OpenGL Program from LearnOpenGL.com.

OpenGL®-Starter OpenGL®-Starter is a template for your upcoming OpenGL Projects which has been compiled to run the most basic Hello World OpenGL Progr

Kushagra 9 Sep 7, 2022
Im3d is a small, self-contained library for immediate mode rendering of basic primitives

Im3d is a small, self-contained library for immediate mode rendering of basic primitives (points, lines, triangles), plus an immediate mode UI which provides 3d manipulation 'gizmos' and other tools. It is platform and graphics API agnostic and designed to be compatible with VR.

John Chapman 825 Nov 24, 2022
Basic framework for D3D11 init, model/texture loading, shader compilation and camera movement.

reed-framework Basic framework for D3D11 init, model/texture loading, camera movement, etc. Instructions: #include <framework.h> Link with framework.l

Nathan Reed 34 May 18, 2022
Telepati 2 Nov 29, 2021
nicegraf-shaderc is a command-line tool that transforms HLSL code into shaders for various graphics APIs.

User Manual Table of Contents Introduction Project Status Obtaining the Source Code and Building Running Defining Techniques Generated Header File Pip

nicebyte 95 Oct 24, 2022
Utility to install kexts, Frameworks and PrivateFrameworks in the System of macOS. For macOS Monterey 12 and Big Sur 11

Command-Line-SnapShot-Mounter Credit: chris1111 Apple This utility uses the macOS terminal Command Line SnapShot Mounter is an utility that allows you

chris1111 22 Oct 14, 2022
Latte is a dock based on plasma frameworks that provides an elegant and intuitive experience for your tasks and plasmoids.

Latte is a dock based on plasma frameworks that provides an elegant and intuitive experience for your tasks and plasmoids. It animates its contents by using parabolic zoom effect and trys to be there only when it is needed.

KDE GitHub Mirror 1.3k Nov 30, 2022