Code Monkey home page Code Monkey logo

fury3d's Introduction

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)

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 +

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

fury3d's People

Contributors

sindney avatar

Watchers

James Cloos avatar junliang avatar

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.