-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load FBX #48
Comments
And if i add the extension .fbx i get the following error:
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 :/ |
We can't read raw FBX files, they need to be compressed by the XNA content pipeline. |
Oh that sucks :/ |
Yeah. Feel free to write your own reader though, I think the MGCB has a parser for it. |
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. |
If someone wants to come up with
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). |
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 ? |
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. |
Hello
I tried to load a simple FBX but it can't find the file? I get a ('System.IO.FileNotFoundException')
Is this a bug or i'm missing something?
Here is the FBX i used: http://rbwhitaker.wikidot.com/local--files/model-library/SimpleShip.zip
The text was updated successfully, but these errors were encountered: