Importing .max or .obj file format in GoblinXNA solution

Jan 12, 2011 at 6:33 PM

Hello,

I just wanted to ask whether it is possible to import .max or .obj file formats in GoblinXNA project and whether you can provide any tutorial that I can follow to import such file formats. I need it urgently please.

Thanks

Coordinator
Jan 12, 2011 at 11:06 PM

Take look at this tutorial

http://create.msdn.com/en-US/education/catalog/sample/custom_model_importer

Ohan

Jan 13, 2011 at 3:25 AM
Thanks a lot for your reply..It is really helpful
I just had some problems when I tried to implement that to my code. I added the ObjImporter project to the solution, and added the necessary stuff in the Game.cs. I added also all the necessary references but I got the following errors:

Error 1 'GoblinXNA.Graphics.Model' does not contain a definition for 'Bones' and no extension method 'Bones' accepting a first argument of type 'GoblinXNA.Graphics.Model' could be found (are you missing a using directive or an assembly reference?)

Error 2 'GoblinXNA.Graphics.Model' does not contain a definition for 'CopyAbsoluteBoneTransformsTo' and no extension method 'CopyAbsoluteBoneTransformsTo' accepting a first argument of type 'GoblinXNA.Graphics.Model' could be found (are you missing a using directive or an assembly reference?)

Error 3 'GoblinXNA.Graphics.Model' does not contain a definition for 'Meshes' and no extension method 'Meshes' accepting a first argument of type 'GoblinXNA.Graphics.Model' could be found (are you missing a using directive or an assembly reference?)


also when I tried to comment these errors,,I got a runtime error saying that
Error loading "Tank". File contains Microsoft.Xna.Framework.Graphics.Model but trying to load as GoblinXNA.Graphics.Model.

can you please advise me what to do

Thanks a lot



Best Regards,
Sophia Wadie
The American University in Cairo (AUC)
Computer Science Student


On Thu, Jan 13, 2011 at 2:06 AM, ohanoda <notifications@codeplex.com> wrote:

From: ohanoda

Read the full discussion online.

To add a post to this discussion, reply to this email (goblinxna@discussions.codeplex.com)

To start a new discussion for this project, email goblinxna@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Jan 13, 2011 at 3:25 AM

 

Thanks a lot for your reply..It is really helpful

I just had some problems when I tried to implement that to my code. I added the ObjImporter project to the solution, and added the necessary stuff in the Game.cs. I added also all the necessary references but I got the following errors:
Error 1 'GoblinXNA.Graphics.Model' does not contain a definition for 'Bones' and no extension method 'Bones' accepting a first argument of type 'GoblinXNA.Graphics.Model' could be found (are you missing a using directive or an assembly reference?)

Error 2 'GoblinXNA.Graphics.Model' does not contain a definition for 'CopyAbsoluteBoneTransformsTo' and no extension method 'CopyAbsoluteBoneTransformsTo' accepting a first argument of type 'GoblinXNA.Graphics.Model' could be found (are you missing a using directive or an assembly reference?)

Error 3 'GoblinXNA.Graphics.Model' does not contain a definition for 'Meshes' and no extension method 'Meshes' accepting a first argument of type 'GoblinXNA.Graphics.Model' could be found (are you missing a using directive or an assembly reference?)


also when I tried to comment these errors,,I got a runtime error saying that
Error loading "Tank". File contains Microsoft.Xna.Framework.Graphics.Model but trying to load as GoblinXNA.Graphics.Model.
can you please advise me what to do
Thanks a lot
Coordinator
Jan 17, 2011 at 3:05 AM

What exactly is your code?

The only thing you have to do is to change the ModelImporter of your .obj file in the VS solution explorer to ObjImporter.

It looks like you're trying to load the .obj as GoblinXNA.Graphics.Model, which is incorrect.

The importer models are in Microsoft.Xna.Framework.Graphics.Model format, and these format are converted to GoblinXNA.Graphics.Model in the ModelLoader class.

Ohan