Activity

Hat Dealer

Mobile support, styling and a new page

Added

  • New guide page for rendering a first triangle
  • Phone support with a different UI

Reworked

  • Polished up styling like better text breaks with and much more
Attachment
0
Hat Dealer

First prototype

I made the first prototype using Svelte and SvelteKit to parse .md files with a basic UI. I also made WebGL rendering components that can dynamically render OpenGL code on a canvas to showcase how OpenGL works. I also made components for notes, warnings etc. There is also a dynamic sidebar that shows you where are you currently reading

3 of these hours were done for the gap year interview processes

Attachment
0
Hat Dealer

Planetary physics !

Added

  • Mesh colliders (similar to convex hull colliders but restrictive in other ways)
  • Compound colliders (making a complex collider from simple ones)
  • Kinematic physics layer
  • Gravity sources
    • I can have multiple gravity sources act on each individual object in the scene

Reworked

  • Many bugfixes and tweaks

The gif shows an objject being on a planet that is a sphere and interacting correctly. The colliders arent perfect but that does not matter that much rn

Attachment
1

Comments

Hat Dealer
Hat Dealer 6 days ago

oh the gif isnt animated :/ It did show to be animated when I uploaded it and as a file on my PC and I cannot change it after I have posted my devlog

Hat Dealer

Physics !!

It was a lot of hard work but I have a basic Jolt Physics integration for my project

Added

  • Multiple collider types like Mesh, Sphere, Box, Compound, Convex Hull and more
  • Ability to interact with the colliders like putting a force on them
  • Safe physics callbacks

Reworked

  • Multiple bugfixes mainly for the transform component

In the GIF you can see my camera collider interact with the teapods collider. You can even see it interact with my custom lighting pipeline. The friction and other values have not been tweaked

Attachment
0
Hat Dealer

Compilation and code health

this update was to prepare me for adding physics soon

Added

  • Jolt Physics library and a bit of setup
  • Some comments where I thought they were needed
  • FixedUpdate (I thought it was implemented but it wasnt :P)
  • Precompiled headers for faster compilation

Reworked

  • BaseMeshRender is now a proper base class for MeshRender
  • ImGui is now fetched using vcpkg like the rest of packages

Fixed

a lot of stuff but here are some examples

  • Material cloning
  • Transform matrix missalignment with the previous state

Not much to show for the update so here is a picture of sunrise from the planet POV

Attachment
0
Hat Dealer

Rendering pipeline rework

Having multiple classes just for rendering was starting to become bulky. I solved that issue by making a dynamic material class that modifies the rendering pipeline for each object at runtime
The result should look the same but it allows my code to be much more versitile

Added

  • Single mesh renderer class
  • Dynamic materials

Reworked

  • Ambiend occlusion a little

Removed

  • Multiple rendering classes for each object that had special effects
    • Skybox, Atmosphere and Planet renderer for example
Attachment
0
Hat Dealer

Shipped this project!

Hours: 100.37
Cookies: 🍪 2983
Multiplier: 29.72 cookies/hr

I made a C++ engine from scratch that uses OpenGL with self-made rendering pipeline. The Engine also has ECS which is similar to Unity Component System so it allows me to easily play around with different stuff

I used PBR calculations along with other self-made implementations like FXAA, MLAA and TAA anti-aliasing and much more

The engine can also generate a planet similar to earth procedurally

Hat Dealer

Ambient Occlusion

Added

  • SSAO (Screen Space Ambient Occlusion)
    • SSAO is used to create soft shadows around sharp corners where light realistically doesnt reach that well

Reworked

  • Fixed clamping around border of framebuffers
Attachment
1

Comments

aloyak
aloyak 25 days ago

This is really cool!!

Hat Dealer

Point light shadows

Added

  • Complex shader class
    • I can now easily make more advanced shaders than just vertex directly to fragment shader
  • Point light sources now have a cubemap to form shadows
  • PCF shadow filtering for smoother shadows

Reworked

  • Lighting shader to support multiple point light shadows
  • Framebuffers to support cubemaps for depth buffer
Attachment
0
Hat Dealer

Directional shadows

Added

  • Shadows for the directional light
    • along with PFC filtering and other bells and whistles
  • Rendering of the frustum culling spheres

Fixed

  • Sometimes the frustum culling was acting up which it will no longer do

Next Update?

I wanna add point light shadows next but that is gonna be a bit bigger project I think

Attachment
Attachment
0
Hat Dealer

Physics Based Rendering (PBR)

Reworked

  • the rendering no longer uses the Blinn-Phong rendering method but instead more complicated and more recent PBR
    PBR is more realistic and allows me to be more versatile with how light interact with everything
    The new implementation does not look much more different from the old one but its a start for much more interesting lighting stuff
Attachment
0
Hat Dealer

Making a child

This update was mostly fixes and stuff but there are some interenting things added

Added

  • Rendering a specific part of the G-Buffer (2nd picture)
  • Parent-child relations
    • A child follows its parents position, rotation etc

Reworked

  • Framebuffers can now have the type of their depth buffer set easily
Attachment
Attachment
0
Hat Dealer

Virtual pottery with model loading

Added

  • Rendering of models, not just meshes
  • Model loading with assimp
  • FPS counter and other minor stuff

Reworked

  • Wireframe mode now always works

Utah teapot

The model shown here is called the Utah teapot. It is commonly known as the “hello world” of graphical programming
It is the first proper model ever made. It was sketched on paper and vertices calculated by hand but the version here is a bit more modern with normals and CCW vertices winding

Attachment
Attachment
1

Comments

Simon
Simon about 2 months ago

Super cool stuff, keep going
This looks like it has potential

Hat Dealer

Culling my frustum, TAA and spinning in 4D

Added

  • Frustum culling to not render objects I cannot see
  • TAA - Temporal anti-aliasing (the coolest one out of the 3 I did)

Reworked

  • Quaternion rotation. It used to be really wierd and now its less wierd
    • it was so much pain to do since quaternions are 4D dimensional matrices and are wierd. the rotation thats implemented now isnt perfect and I will have to look at it again later

Images

The first image is of the velocity buffer used for TAA and the second image is a representation of a quaternion

Attachment
Attachment
0
Hat Dealer

Who made that mess?

During this update I mainly fixed up stuff I broke switching to deferred rendering
Also worked on anti-aliasing and the current solutions arent perfect but when I add TAA it should make everything 1000x better

Added

  • FXAA (fast approximate anti-aliasing) and MLAA (Morphological anti-aliasing)
    • I used to have MSAA (multisampled anti-aliasing) but that would not work well with deferred shading
  • Rendering should now be properly done in sRGB instead of RGB

Fixed

  • The post-processing pipeline
  • phong rendering (and specular lighting inside of it)

still broken :(

  • TAA (Temporal Anti-Aliasing) is still not implemented
  • the MLAA is a bit wierd but I have no idea if it should look like that or no
  • The lighting is still a bit hack-y until I do a big lighting rework
Attachment
1

Comments

Hat Dealer
Hat Dealer about 2 months ago

the image compression is not doing the best for the image showcase lol
nothing I can do sadly

Hat Dealer

Deferred shading with a side of vectors

Added

  • Deferred shading pipeline - WIP
  • Pipeline for transparent and special shaders since they cant be used with deferred shading
  • Quaternion rotation is now a lot more influential
    • I can for example set my feet to point towards the planet and move like normal

Reworked

  • a lot of shaders were reorganised

Broke

with the new rendering pipeline I broke the following:

  • anti-aliasing
  • post-processing effects

Deferred shading?

Deferred shading is a different rendering pipeline which renders a scene into several buffers and then computes shading for them as another step. It can be somewhat more efficient and versitile but rn its really WIP and holding with ducktape but it works!

Attachment
Attachment
1

Comments

kewlcactus13
kewlcactus13 2 months ago

this is so cool! i love the way you’ve setup the depth colouring for water, sand, grass and mountains!

Hat Dealer

Sky in a box

Added

  • Ability to set exposure (kinda similar to gamma)
  • An OpenGL wrapper for 2D textures
  • An OpenGL wrapper for cubemaps
  • Skybox

Reworked

  • Reworked the README so its not just some basic info with compilation steps
Attachment
0
Hat Dealer

Mild shader preprocessor rework

Added

  • Added a #var preprocessor directive which allows me to specify a variable that can change on the CPU and it will get automatically updated on the GPU
    • In the gif it can be seen as the ambient color changing and it instantly updating the planets tint without any syncing code for the color specifically

Reworked

  • Tidied up some shaders and the preprocessor code

Fixed

  • Rendering of the planet is now correct no matter where it is positioned
Attachment
2

Comments

hack.clubber
hack.clubber 2 months ago

Awesome project dude. pretty cool Idea too.
It would be better if you added more docs to your repo.

Hat Dealer
Hat Dealer 2 months ago

tyy <3 im totally planing to add more stuff to the readme before shipping

Hat Dealer

Framing my buffer

Added

  • Added a Framebuffer OpenGL wrapper so I can easily create and manipulate frame buffers
    • This needed quite a lot of work to integrate with MSAA multisampling
  • Thanks to framebuffers I added a very basic compatibility for post-processing effects
  • Gamma correction
    • It looks bad with my color palette so I won’t be using it too much but its there

Framebuffers?

Framebuffers are a type of buffer used for rendering where all draw calls render to that specific framebuffer (specifically its textures/renderbuffers). Making my own allows me to make my own post-processing effects etc.

“But the image is ugly! :< I hate you!” I hear you say

The image is using a really basic shader I slapped together in like 5 minutes to have something to showcase. It just inverts the colors on half of the screen and then puts the other half in grayscale. Its just the tip of the iceberg of what I can do and make now

Attachment
0
Hat Dealer

Atmospheric atmosphere

Added

  • Two separate rendering pipelines for the atmosphere
    • The atmosphere now uses two shaders, one for when inside the atmosphere and one for outside of the atmosphere

Reworked

  • Atmosphere shader and split them into two separate
    • I tried to make it as pretty as possible without any bugs but I am still not happy with how the atmosphere looks like from space but the transition between the shaders is pretty good I think
Attachment
Attachment
2

Comments

aloyak
aloyak 3 months ago

this is pretty cool bro, you’re cooking!

Hat Dealer
Hat Dealer 3 months ago

tyyy <3

Hat Dealer

Spheres with atmospheres

Added

  • ImGui support for all components
    • Any component can now display their own ImGui window
  • Added an atmosphere renderer along with shaders for it
  • Added support for transparent objects

Reworked

  • Reworked the planet generator to make the planet terrain and colors look even better
  • Planet terrain now uses proper materials for each layer instead of just colors
  • Reworked some shaders a bit to look somewhat better
Attachment
1

Comments

Hat Dealer
Hat Dealer 3 months ago

also there are too many mountains in the gif, I fixed that shortly after for the terrain to be more grassy

Hat Dealer

Straight up shaderin’ it

Reworked

  • Reworked the planet rendering shader
    • It now uses a per-pixel color assignment instead of vertex
  • Updated the README to have a tutorial for compiling
  • The planet noise texture is now made from several overlayed noise textures for better detail

Added

  • A planet color palette for the reworked shader
Attachment
0
Hat Dealer

I made a basic planet

Added

  • Planet related components
  • Random and value noise
  • Basic ImGui
  • New rendering pipeline for planets with lighting interactions

Removed

  • Mesh components. The Mesh object is now directly linked to a rendering component instead of a mesh object inbetween
Attachment
0
Hat Dealer

Sphere mesh generation from spherifying a cube

Added

  • RGB(A) classes
  • Upgraded Phong lighting algorithm to Blinn-Phong which is a bit more realistic
  • A generator for spherified cube mesh with settable amount of subdivisions

Spherified cube??

When thinking of a cube some people may think about an Ico sphere or UV sphere but these all have their own downsides. A spherified cube is a cube with many subdivisions thats forced to have all the points the same lenght away from the center. This makes it a lot easier to later implement more subdivisions the closer it is to the player and its easier to map a noise map to it as it wont have artifacts

Attachment
0
Hat Dealer

Cube mesh generation

Added

  • directional light source
  • mesh and vertices generator
    • generates UV and normal maps
  • dependency checks for components

Mesh generator

The mesh generator can generate vertices and then calculate their normal maps, indices and UV maps. This will be later used to generate planets and their meshes

Dependency checks

A component now has a list of dependencies that it needs to have access to or else it throws an error. For example you cannot have a camera without a transform component as the transport components tell the camera component where it is and which direction its facing

Attachment
1

Comments

Hat Dealer
Hat Dealer 3 months ago

also the lights have a color of the light they are emitting but thats a small change xd

Hat Dealer

Phong lighting

Added

  • Phong lighting algorithm
  • materials with different reflectivity, color, etc
  • point light attenuation

Point light attenuation

It basically means that the more away a light is, the less it shines based on three values which signify a constant, linear and quadratic dropoff

Attachment
0
Hat Dealer

Basic lighting

Added

  • ambient lighting
  • point light lighting
  • components related to light sources

Other

It took me a while to fix the rotation. The normal vectors were getting rotated wierdly but it turned out that the problem was me rotating it using a 4x4 matrix instead of 3x3

Attachment
0
Hat Dealer

Movement with camera

Added

  • An input system
  • movement component
  • camera rotation support
  • rotations updated from euler angles (3D) to quaternions (4D)

Quaternions

Quaternions are a 4D vector which is a special way to interpret rotation. Its more smooth and easier to work with in relation to OpenGL than normal euler angles (yaw, pitch, roll)

0
Hat Dealer

Going 3D

Added

  • Projections and views
  • A cube mesh
  • A camera which moves away
1

Comments

toderodavi
toderodavi 3 months ago

This looks like a really cool idea! Gave it a follow!

Hat Dealer

Basic project

Added

  • ECS (Entity Component System)
  • OpenGL wrappers I made myself so I dont have to work with OpenGL directly
  • Some basic stuff to get things to render like a quad, shaders etc

ECS

Entity Component System allows me to make an object and then add components to it kinda similar to Unity. I can for example make an object with a transform component so that it has position, rotation etc, then add a rendering component and a mesh component and I will have an object that renders. Then I can later give it another component that for example makes it move with my inputs

Attachment
1

Comments

Hat Dealer
Hat Dealer 3 months ago

the square is spinning btw lol