#monogame #demo #sample #tutorial #gltf #csharp #animation #skinning #gamedev

vpenades 39e3cb8820 nugets++ 2 年之前
.config 06aab96352 fixed android demo 2 年之前
.github e730563b66 enable funding 4 年之前
MonoGame de42d579cb Updated nuget packages 3 年之前
demos a38a591b2d updated iOS to use portrait mode 2 年之前
src 39e3cb8820 nugets++ 2 年之前
.gitignore cee5978372 added missing files. 4 年之前
LICENSE 9cc1ff6fd2 Added MIT license 3 年之前
MonoGameDemo.jpg 4c0ef7391d readme relocated 5 年之前
MonoGameDemoPBR.jpg 8c39c59f60 updated readme 5 年之前
MonoScene.iOS.slnf 61df699197 updated ios project [wip] 2 年之前
MonoScene.sln 1edbf858fa Added iOS demo [WIP] 2 年之前
NuGet.config fb6bda09dc fixed solution 2 年之前
README.md d8358a411a +readmes 2 年之前

README.md

# MonoScene Framework

A MonoGame 3D Model alternative.

MonoGame Demo

⚠️ Before using MonoScene ⚠️

This library was my attempt to modernize MonoGame's 3D support, and eventually to have something useful to use in Virtual Reality projects, provided MonoGame would have supported VR at some point.

Eventually, I hit the limits of what MonoGame can do with graphics. MonoGame prioritizes backwards compatibility and consoles over adding new features, which is not neccesarily a bad thing, but it's indeed hurting MonoGame to keep up with the competition.

To overcome MonoGame limitations, the path many choose is to fork MonoGame to add additional features, but IMHO this only leads to a fragmented and broken ecosystem. So it's not a good solution either.

My objective is to keep this project compatible with the official MonoGame, so I'm limited to what its outdated graphics subsystem can do, which led me to stop development of this library (except for maintenance) until MonoGame improves on the missing features or another fork takes the lead.

PRs are welcome, though.

Overview

MonoScene is a framework that replaces the very outdated 3D model architecture currently available in MonoGame, providing a number of much needed features:

  • PBR effect shaders.
  • Full skeleton animation.
  • Loading asset models at runtime (No Pipeline required)
  • Basic Scene management

Requirements

  • Visual Studio 2022 required for Net6.
  • MonoGame 3.8.1.303 for Net6.0
  • MonoGame 3.8.1.1825-develop for NetStandard 2.1

This project requires compiling a huge number of techniques that surpassed what was possible with MonoGame 3.8.0, so it absolutely needs the shader compiler that comes with MonoGame 3.8.1

This framework also has third party dependencies that might prevent this project to be ported to consoles.

Limitations

MonoGame's Content Pipeline

Right now, It is not possible to import glTFs through MonoGame's content pipeline.

Unfortunately, MonoGame's (XNA) content pipeline is designed in a way that prevents processing many of the glTF models in the wild, also MonoGame's built in model importer uses Assimp, which is only able to handle a small subset of glTF models, and it's missing lots of key features.

So glTFs need to be loaded at runtime, which means that only projects able to consume MonoScene.Pipeline.GLTF library and its dependencies will be able to load glTFs.

Textures

Textures are loaded using Monogame's Texture2D.FromStream, which means all of its limitations apply:

  • No Mipmaps
  • glTF texture formats WEBP and Universal Basis KTX2 are not supported.

Not having a content pipeline means the same asset is loaded on all platforms, which might not be optimal. This could be mitigated if KTX2 texture format would be supported, because it's a texture compression format similar to DDS with cross platform capabilities.

Animations
  • Due to limitations in the Effects and Shaders 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.
Scene

Scene management is extremely basic and it's more an example than an actual framework, and it's missing some key features:

  • Scene culling for models outside the view area
  • LOD management
  • Animation blending (it's supported under the hood, but not exposed yet)
Shaders

Shaders are missing three features that I think are key to be able to do decent looking renders:

  • Shadows
  • Glow effect
  • glTF style Vertex Morphing

Vertex Morphing is not supported because it exceeds what MonoGame can do right now. Shadows and Glow might be possible, though.

I'm not an shaders expert, so it's unlikely I'll do more work with the shaders.

Additinal documentation can be found here:

Credits