Code Monkey home page Code Monkey logo

gkern's Introduction

๐Ÿซง gkern: Graphics Kernel

gkern is a flexible, highly configurable, and extensible render engine. It's designed for both realtime and offline rendering, with a focus on robustness, performance, and ease of use. It is written in C so it is easy to use with other languages.

๐Ÿ“Œ Currently the library renders using OpenGL. I'm trying to integrate with Metal, Vulkan, DirectX

HISTORY: The main purpose was render AssetKit content. Then it became general purpose rendering and graphics library.

Features:

  • Similar scene data structure with COLLADA/glTF
  • Shader generator for common materials (phong, blinn, lambert, const)
    • This generator also supports textures, shadowmaps ... all feeatures to render scene perfectly and fast
  • Shader manager (currently for common profile)
  • Transform caching
  • Uniform location caching
  • Built-in trackball
  • Multi-pass rendering
  • Rendering to Texture
  • Multiple Render Targets
  • Textures
  • State Manager / Caching
  • Frustum Culling
  • Configurable shadowmaps: Yes you can select which technique to use! More techniques may be supportted by time
    • Basic/Simple Shadow Maps
    • Cascaded Shadow Maps (PSSM)
  • Order Independent Transparency
    • Weighted, Blended OIT
    • Some other techniques aill also be supported natively
  • PBR materials
    • Metallic-Roughness Workflow
    • Specular-Glossiness Workflow
  • Simple animations
  • Skeletal animations
  • Morph animations
  • ...
  • and some built-in helpers for many common tasks and more by fetures time...

Todo

  • Real-Time Path Tracing
  • Order objects before rendering
  • PBR
  • Transparency
  • Occlusion Culling
  • Level of Detail for mesh
  • Multithread rendering
  • Instanced Rendering
  • Animations
    • Autoreserve animations
    • Play count...
    • Simple Animations
    • Keyframe animations
      • Animate float/vec3/vec4
      • Interpolations
        • STEP
        • LINEAR
        • CUBIC BEZIER SPLINE
        • CUBIC HERMITE SPLINE
        • B-SPLINE
        • CARDINAL SPLINE
    • Skeletal animations (working on this)
    • Morph animations
  • ...

Screenshots

Build

todo

Notes

  • This library is still unshaped, wait this until AssetKit finished.
  • After finished this AssetKit and library, I'll publish documentation and update README.
  • Also check simple-collada-viewer repo to see an example to how to use this

gkern's People

Contributors

recp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gkern's Issues

Shadows

  • Basic shadowmap
    • Shadowmap for Directional Lights
    • Shadowmap for Spot Lights
    • Shadowmap for Point Lights
  • Cascaded shadowmap
    • Shadowmap for Directional Lights
    • Shadowmap for Spot Lights
    • Shadowmap for Point Lights

SceneGraph: Node hierarchy re-design

The current implementation of node hierarchy can be improved by making graph linear (I don't know if this is the right word)

Current impl:

Randomly allocated nodes:

    Scene
      |
     Node
    /   \
Node      Node
           \
           ....

Considered impl:

Array:

Scene  -  [ Node | Node | Node | ... ]

Currently I'm working on frustum culling; accessing nodes recursively for every operation or in every render frame is not what I want, also it is not effective because you need to switch to another function due to recursion... Maybe making this linear / array would also make exec faster because of cache locality and less memory consumption

Custom Material Definition Format, File and a Shading Language

We must define custom material definition format and file, plus a Sharing Language like Google did for Filament:
https://google.github.io/filament/Materials.md.html#overview/coreconcepts or bsl in banshee3d: https://docs.banshee3d.com/Native/bsl.html

File extension could be .gpumat or .mat or .gkmat or .gmat, .effect ...

Desired properties:

  • Provide builtin compiler for that material
  • Ability to compile at runtime
  • Allow multiple passes
  • Support all glTF and COLLADA materials

This project will use gpu (this is private repo for now) library as backend. So GPU library may use .gpumat. Also GPU library may provide a shading language or gk could do that.

Build system is missing

There's no build system. How do you build gk?

I can contribute Meson build files if that helps.

Supply basic example project

Hello,

I was wondering if / when a basic example will be provided. I would like to contribute to this project, but I don't know where to begin. As documentation hasn't been created yet, having an example implementation of some of the features would be greatly appreciated so I could better understand how things should be put together.

Thanks.

Transparency

Today I implemented weighted, blended order independed transparency.

It is time to implement COLLADA's transparency with all opaque modes. At first it seemed difficult to implement but now I think I understand how to implement it. Maybe implementing all opaque modes may be problem with OIT transparency but I will give a try.

it is all about setting blending functions/equations correctly

Render Targets

  • Multiple render targets
  • Off screen [multiple] framebuffers
  • Render target manager
  • Framebuffer manager

Create generic shader manager and generator

A shader manager could provide a compiled program or collect combinations of shaders then compile them as program.

This will be used for COMMON profiles/techniques.

  • Shader manager
    • Shader manager for common materials; mesh/primitives must use same program/shaders if all attribs, features are same
    • Custom shaders?
  • Shader generator
    • Shader generator common materials
      • constant
      • lambert
      • blinn
      • phong
    • Shader generator PBR materials
      • Metallic-Roughness
      • Specular Glossiness

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.