2
0
Vicente Penades 5 жил өмнө
parent
commit
8c39c59f60
2 өөрчлөгдсөн 42 нэмэгдсэн , 21 устгасан
  1. BIN
      MonoGameDemoPBR.jpg
  2. 42 21
      README.md

BIN
MonoGameDemoPBR.jpg


+ 42 - 21
README.md

@@ -1,45 +1,66 @@
 # MonoGame realtime rendering demo
 
-![MonoGame Demo](MonoGameDemo.jpg)
+![MonoGame Demo](MonoGameDemoPBR.jpg)
 
 ### Overview
 
 This is an example of loading and rendering glTF files with MonoGame.
 
-This demo is just a stripped down copy of the original example code [which can be found here](https://github.com/vpenades/SharpGLTF/tree/master/examples/MonoGameScene). I've created this repository to showcase the minimum requirements to make this example work.
+This demo was originally intended to be an example of how to use SharpGLTF to load glTF models into MonoGame, since then, it has evolved into a full graphics library that helps loading and rendering PBR Animated models into monogame.
 
-Although we're using this library in production code in our internal projects, this is a library made out of necessity, due to the lack of proper glTF support in MonoGame.
+The main features of the project, compared with in-built 3D features of MonoGame are:
 
-The primary objectives of this demo is to showcase that MonoGame is indeed able to handle glTF files, and to provide a temporary solution for those that need some glTF support right now. But our hope is that over time, MonoGame will be able to handle glTF files on its own, so this library will no longer be needed.
+- Loading glTF models at runtime, without any pipeline processing.
+- PBR materials support
+- Animated models, out of the box.
 
-Special care has been taken to support full animation features of glTF, so animation support is available out of the box.
 
-### Running the demo:
+### Architecture:
 
-The project depends on [SharpGLTF.Runtime.MonoGame](src/SharpGLTF.Runtime.MonoGame), which also depends on [SharpGLTF.Core](https://www.nuget.org/packages/SharpGLTF.Core), that's everything you need to load and render glTF models into MonoGame.
+The project is split into 4 different packages that can be used independently.
 
-Currently, the demo is using `MonoGame.Framework.DesktopGL` Version 3.7.1.189 , if you need a different monogame backend/version, you need to download this demo, and manually replace all MonoGame.Framework references with the framework you need.
+Notice that the package names and namespaces are **temporary** and subject to change.
 
-This example has been tested with `MonoGame.Framework.DesktopGL` and `MonoGame.Framework.WindowsDX`.
+- MonoGame.Framework.Graphics.EffectsPBR
+- MonoGame.Framework.Graphics.Model3D
+- MonoGame.Framework.Graphics.Scene3D
+- MonoGame.Framework.Pipeline.GLTF
 
-### Demo limitations
+##### Graphics.EffectsPBR
 
-MonoGame typically preprocesses all graphics resources through its content pipeline, and all assets are converted to XNB files, which is what the runtime is able to load.
+Defines glTF compatible, PBR effects:
 
-This is not the case of this demo; the glTF files are loaded at runtime without any preprocessing.
+- AnimatedEffect (abstract base class)
+  - UnlitEffect
+  - PBREffect (abstract)
+    - PBRMetallicRoughnessEffect
+    - PBRSpecularGlossinessEffect
 
-The reason to bypass monogame's content pipeline is to allow some glTF features that are simply not possible to be processed by the content pipeline in its current state, but as a consequence of loading glTFs at runtime, there's some other limitations:
+These effects can be used on their own, and dont' require anything from the rest of libraries.
 
-In order to keep this example as simple as possible I avoided using custom shaders, the library uses monogame's default BasicEffect and SkinnedEffect objects, which means:
-- PBR materials are not supported, and are converted/downgraded to basic materials.
-- Morphing is not supported.
-- Skinned meshes with more than 72 bones will probably fail.
+##### Graphics.Model3D
 
-Also, textures are loaded at runtime with no preprocessing, so:
-- They might lack mipmapping
-- They might not load at all if they exceed monogame's runtime limits.
+Defines a number of classes to represent 3D models, using a new architecture that can handle
+animated models in a modern way.
 
-Loading at runtime requires using SharpGLTF.Core, which does heavy use of advanced c# features, it is currently aimed for Monogame on Desktop and probably Android, But any project requiring BRUTE, will not be able to use this project.
+##### Graphics.Scene3D
 
+This is a package that can be optinally used, and simplifies drawing scenes with multiple objects.
 
+##### Pipeline.GLTF
 
+This library depends on [SharpGLTF.Core](https://www.nuget.org/packages/SharpGLTF.Core) and loads
+glTF models and converts them to the structures defined in Graphics.Model3D.
+
+When loading the models, it is recomended to use EffectsPBR effects, because that would give
+the visual results expected by glTF, but it's also possible to fall back to BasicEffect and
+SkinnedEffect, in which case the loader will do a "best effort" to convert the materials from
+PBR to classic diffuse-specular materials.
+
+
+### limitations
+
+- Right now, It is **not possible** to load glTFs through the content pipeline, glTFs need to be loaded
+at runtime, so only projects able to consume Pipeline.GLTF library will be able to load glTFs.
+- Due to limitations in the rendering API of MonoGame, glTF's morphing features are not supported.
+- Maximum number of bones is limited to 72 bones with SkinnedEffect (as usual) and 128 bones with PBR effects.