Skip to content

sindney/fury3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fury3D

中文简体

Introduction

Fury3d is a cross-platform rendering engine written in c++11 and modern opengl.

Works on windows && osx operating systems currentlly.

Please note, this is just a simple project for study purpose.

Features:

  • Use modern opengl.
  • C++11 smart pointers made memory management easier.
  • Flexible signal message system. (use function pointers, so it won't accept lambdas, sry)
  • Support fbx model format, you can load static meshes, skinned meshes and lights directlly.
  • Easy rendering pipeline management through json serialization functionality.
  • Build-in light-pre pass rendering pipeling.
  • Intergates powerful gui library ImGui.
  • Support Shadow Mapping For Dir/Point/Spot Light.
  • Support custom scene format, can save to json and can be compressed.

Plans:

  • Add shadow maps. (Done, need improvements)
  • Add skeleton animation support. (Done, but need improvements)
  • Implement GLTF file format parsing, dropping support for FbxSDK.
  • Implement HDR rendering pipeline, and support PBR material.

Compatibility

Tested compilers:

  • MSVC 2013 Community
  • Apple LLVM version 7.0.2 (clang-700.1.81)

Because fbxsdk only offers MSVC builds on windows (FBXSDK is optional, you can load scene using engine's custom scene format), so you must use MSVC to build the library.

Should work with any graphic card that supports opengl 3.3 +

Tested libraries:

  • Rapidjson 1.1.0
  • SFML 2.4.1

Screenshots

Shadows

PolyScene

Examples

You can setup custom rendering pipeline using json file, check it out.

A simple demo should look like this:

// This is the root of our scene
auto m_RootNode = SceneNode::Create("Root");

// You can load scene from fbx file.
FbxParser::Instance()->LoadScene("Resource/Scene/scene.fbx", m_RootNode, importOptions);

// Or from fury's scene format.
FileUtil::LoadCompressedFile(m_Scene, FileUtil::GetAbsPath("Resource/Scene/scene.bin"));

// You can iterate a certain type of imported resources.
Scene::Manager()->ForEach<AnimationClip>([&](const AnimationClip::Ptr &clip) -> bool
{
	std::cout << "Clip: " << clip->GetName() << " Duration: " << clip->GetDuration() << std::endl;
	return true;
});

// And you can simply find an resource by it's name or hashcode.
auto clip = Scene::Manager()->Get<AnimationClip>("James|Walk");

// Setup octree
auto m_OcTree = OcTree::Create(Vector4(-10000, -10000, -10000, 1), Vector4(10000, 10000, 10000, 1), 2);
m_OcTree->AddSceneNodeRecursively(m_RootNode);

// Load pipeline
auto m_Pipeline = PrelightPipeline::Create("pipeline");
FileUtil::LoadFile(m_Pipeline, FileUtil::GetAbsPath("Path To Pipeline.json"));

// Draw scene
m_Pipeline->Execute(m_OcTree);

Special thanks

  • FbxSdk - for loading fbx model
  • Rapidjson - for loading pipeline setups
  • Plog - for log implimentation
  • ThreadPool - for threadpool implimentation
  • Stbimage - for image loading
  • LZ4 - for file compressing/decompressing
  • Sfml - for os related window/input/context handling
  • ASSIMP - for mesh optimization
  • Ogre3d - for octree implimentation
  • ImGui - for debuging gui
  • RenderDoc - for debuging opengl

One more thing

If you use sublimetext, you can try my GLSLCompiler plugin to debug glsl code :D