Skip to content
/ vxr Public

General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)

License

Notifications You must be signed in to change notification settings

avilapa/vxr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vxr engine logo version 0.7.0

What is vxr?

vxr is a project that emerged from the desire to build a general purpose rendering tool that I could use to implement anything I was curious about or wanted to learn about.

As it stands now, it is a multithreaded 3D game development engine written in C++ and oriented to support different rendering backends. It has its own PBR material model based on the standard microfacet BRDF, but extended to support other visual properties of materials such as iridescence or clear coat. The engine has two different APIs for development:

  • A lower level API based on render display list commands that can be used to build small but efficient applications.
  • A higher level API built on top of the lower level one, which abstracts it to provide a rendering agnostic and component oriented API.

Project webpage: https://avilapa.github.io/vxr-engine/

material model Material Model (from left to right): std, std + clear coat, std + iridescence, std + iridescence + clear coat.

Building

[A vs2017 + opengl Solution is provided by default]

This project uses GENie.lua to create the project solution. Open a CMD in the root directory and execute the following commands to re-create a solution:

cd project
..\tools\genie [parameters] <vs2017|vs2015>

The solution will be located in project/vs/VXR-Engine.sln.

A list of example projects are provided within the solution to showcase the engine's capabilities. To create a new project, add a call to the function 'makeProject("yourProjectName");' at the end of the file project/genie.lua and build.

Parameters

  • --gl: Build with OpenGL backend.
  • --debug_tracing: Build with minitrace and enable trace.json file creation.
  • --no-console: Do not launch a console with the graphic window.
  • --no-threading: Launch rendering on the same thread as the logic + no async loading tasks.
  • --no-ui: Disable all the UI (will still compile ImGui though).

Examples

01-HelloWorld

01-HelloWorld

02-Instancing

02-Instancing

03-Framebuffers

03-Framebuffers

04-Mesh

04-Mesh

05-Materials

05-Material

06-Procedural

06-Procedural

07-Physics

07-Physics

Features

  • Multithreaded agnostical graphics API.
  • Command Based Rendering, allowing to build the render commands in advance to be run in a separate thread.
  • GameObjects with the following components currently implemented (each component is controlled and updated by a specific system):
    • Transform: Containing the object's transformation and position in the scene's hierarchy.
      • Quaternions!
    • Mesh Filter: Reference to the mesh the object will be rendered with.
    • Renderer: Reference to the Material Instance the object will be rendered with.
      • Current Materials:
        • Standard Lit (PBR)
          • Microfacet BRDF + Thin Film Iridescence + Clear Coat + Anisotropy
        • Unlit
        • Wireframe
        • Skybox
        • Screen
        • Planet (only in the PlanetEditor example!)
        • Add your own!
    • Rigidbody: Adds rigidbody physics to an object and can be applied forces and velocities.
    • Collider: Adds a particular shape to the object to detect collisions with other rigidbodies with a collision shape.
    • Light: Turns the object into a source of light.
      • Directional and Punctual lights supported.
    • Image Based Light: Calculates irradiance of the scene to be used by all PBR materials in the engine.
      • Takes either a cubemap texture or a 2D equirectangular texture.
    • Camera: Adds to an object all the functionality needed to render from its point of view with its unique parameters.
      • Camera Composer: Organizes all post-processing needed for any specific camera, and handles updates automatically.
        • Postprocessing Materials:
          • One-Pass-Filters: Grayscale, Negative.
    • Custom Component: Similar to Unity's MonoBehaviour, allows the user to create custom reusable components with specific behaviours.
  • Model loading (.obj).
  • Lazy Loading: All resources are loaded in different threads to prevent the engine from freezing.
  • UI Editor.

Support

Platforms

  • Windows

Backends

  • OpenGL
  • WIP: DirectX3D 11

Dependencies

The project includes some 3rd party dependencies, but not all of them are necessary (e.g. you won't need GLEW if you generate the project to use DirectX3D 11, you won't need minitrace if you don't want trace debugging, etc).

Optional Dependencies

  • glew - If you are building with OpenGL (--gl)
  • glfw - If you are building with OpenGL (--gl)
  • minitrace - If you are building with debug tracing (--debug-tracing)
  • px_sched.h - If you are not building with single threading (--no-threading)

Contributing

This is the first project I have made open source, therefore I am wide open to feedback from the community and contributions :^)

Acknowledgements

Contact

Mail: [email protected]

Twitter: https://twitter.com/97torvic

Portfolio: https://avilapa.github.io/portfolio