Comments (8)
And if i add the extension .fbx i get the following error:
An unhandled exception of type 'Microsoft.Xna.Framework.Content.ContentLoadException' occurred in FNA.dll
Additional information: Could not load Ship.fbx asset!
Looks like it's not even supporte internally
if (typeof(T) == typeof(Texture2D) || typeof(T) == typeof(Texture))
{
Texture2D texture = Texture2D.FromStream(
graphicsDeviceService.GraphicsDevice,
stream
);
texture.Name = assetName;
result = texture;
}
else if ((typeof(T) == typeof(SoundEffect)))
{
result = SoundEffect.FromStream(stream);
}
else if ((typeof(T) == typeof(Effect)))
{
byte[] data = new byte[stream.Length];
stream.Read(data, 0, (int) stream.Length);
result = new Effect(graphicsDeviceService.GraphicsDevice, data);
}
else if ((typeof(T) == typeof(Song)))
{
// FIXME: Not using the stream! -flibit
result = new Song(modifiedAssetName);
}
else if ((typeof(T) == typeof(Video)))
{
// FIXME: Not using the stream! -flibit
result = new Video(modifiedAssetName, graphicsDeviceService.GraphicsDevice);
}
else
{
stream.Close();
throw new ContentLoadException("Could not load " + assetName + " asset!");
}
no mention of Model type :/
from fna.
We can't read raw FBX files, they need to be compressed by the XNA content pipeline.
from fna.
Oh that sucks :/
from fna.
Yeah. Feel free to write your own reader though, I think the MGCB has a parser for it.
from fna.
FBX support is no easy problem to solve. Official SDK isn't permissive and assimp doesn't support it very well. There's OpenFBX these days, it's usable but relatively young. Not sure what MGCB uses.
from fna.
If someone wants to come up with Model.FromStreamEXT
I'd be willing to merge it, but you have a few requirements:
- Must be permissive (so yeah, SDK is out)
- Must support the very old 2006.11 format, per the XNA specification
- Must not add any new DLLs, or must load the new DLL dynamically with Assembly.Load (so if we add assimp that's how we'll integrate it)
MGCB may have something we can use, but our goal needs to be to contribute to existing model loading code and simply push that through the equivalent of XNA's ModelProcessor. In doing this, we may be able to add other formats as well (obj and the like).
from fna.
I read here that MonoGame uses assimp to import FBX files. There's even a 3D model viewer that uses assimp to load 3d models.
Is this something we could use or integrate on FNA ?
from fna.
At this point in time we have absolutely no interest in supporting an official path for model loading. You are more than welcome to pull a library into your project to handle this.
from fna.
Related Issues (20)
- Fn HOT 2
- [MojoShader] Preshaders with bool outputs aren't supported HOT 3
- mono_thread_internal_set_priority: unknown policy 5
- Expose FAudioContext or Device Handle HOT 3
- arm64 fnalibs for Apple Silicone Macs HOT 3
- Add GitHub Actions HOT 1
- Terraria: sigsegv when using vulkan renderer in newer versions of FNA HOT 3
- Add DPI Awareness hint for Windows
- Do a second take of #442 HOT 1
- Support for net8.0-ios targets HOT 2
- Incorrect Wiki instructions: Chapter 5 Creating New Projects HOT 1
- SharpFont + SpriteFont HOT 2
- VertexPositionColorNormalTexture HOT 3
- System.NullReferenceException when using BasicEffect HOT 2
- Question about the process of porting NativeAOT to Consiles HOT 3
- Newer Shader Models
- Add extension method for loading mipmap texture from stream HOT 3
- White artifacts on certain color values in DDS HOT 5
- [BUG] Can't download clone the Wiki HOT 1
- Proxy Blade Zero (313980): Black Screen issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fna.