XNA 4.0 Import .X Model easily
After fighting a number of battles with importing models, I was looking for an easy way to import simple 3d models into XNA. 3D Rad Exporter is a free plug-in for Google SketchUp allowing you to save your 3d models as Microsoft DirectX/XNA (.x) files.
Download the plugin from here http://www.3drad.com/files/3DRadExporter.zip
Unzip the 3D Rad Exporter plug-in to the Sketchup Plugin Directory
C:\Program Files\Google\Google SketchUp 8\Plugins
Note that the path to the Google SketchUp plug-in folder may be different if you have installed the program to a location other than the default, or if you use a x86-64 bit version of Windows.
- Press [Ctrl]+[A] to select all the elements in the scene
- Select Edit -> X Entities (X in model) -> Explode
- The plug-in will be available under Plugins and not under Files -> Export, in the Google SketchUp pull-down menu.
To use the image: Open your XNA project, and from the Billboard Content -> right Click -> Add New Item -> Then add your model.x file.
Then add any texture images using Windows Explorer to the content directory manually - if they are not there, compilation will Error.
Assuming, you have your camera and basic game already coded, you can now just load the model using the ContentManager.Load
Attachment | Size |
---|---|
reference.png | 23.23 KB |
Comments
Post new comment