How to add my owns 3D models to the Machines Simulator models gallery

Started by EasyPLC_Master, December 09, 2009, 01:51:44 PM

Previous topic - Next topic

EasyPLC_Master

To add new 3D models to the Machines Simulator Model Gallery, you will need to install the Microsoft Visual Studio C# 2010 Express Edition, and the Microsoft XNA Game 4 Studio (Important: you must use the XNA Game version 4), this tools are of free use, search on Microsoft web site to download freely this tools.

1. Open Microsoft Visual C# 2010 Express Edition.
2. Click File -> New Project
3. Select XNA 4 Game Studio like type of project and select Windows Game (4.0) like project template
4. Type a name of your new project, for example ModelsCreator



Now you must know that the 3D models accepted by XNA 4 Game Studio are the Direct X models (x extensions) and Autodesk FBX (fbx extensions). There are a lot of 3D utilities programs that make conversions between differents kind of 3d format models, then if you have your model with a different extension, you must to convert it to Direct X or Autodesk fbx format.

Once you have your model in X or FBX format you must to search the folder created for your project, then go to the Content folder and there copy your model file and IMPORTANT all the texture files used by your model.

5. On the right Solution Explorer window, right click on the Content folder -> select Add -> select existing element



6. Select the file X or FBX copied previously in this folder



7. Then you can see how the model is added to you content folder in the Solution Explorer tree


Now you have made all the work, now only need to press F6 or select from the ide C# menu Generate -> Generate Solution.

When the compilations ends go to the next folder:

D:\Temp\ModelsCreator\ModelsCreator\bin\x86\Debug\Content\ (In this example, could be different on your machine in function the path you have type in the project creation)

There you will find all the texture files and your model file compiled and ready to use with Machines Simulator, see how the extension has been changed for xnb.

Now search your Machines Simulator installation folder and go to the Content\Models\ folder, there you will see differents folders, you must copy the previously generated files in the folder more appropiate for your model category.

Now your model is available to use with Machines Simulator!.

fredz0003

Any update on when are we going to be able to use XNA 4.0 and Visual Studio 2010 to compile models?

EasyPLC_Master


minDark

Hi! I see it's old topic but, there is a way to build xnb files without VS2005? Because i cannot install (officially is not available anymore) and is to much for me to install hole package just for build xnb files. There is no tool to build xnb files (like XNA Formatter, but for XNAGS 2.0)??

EasyPLC_Master

No, is not possible to create xnb files without VS2005.
Still is possible to download the Visual Studio 2005 Express edition, try search in microsoft web site.
For instance: http://msdn.microsoft.com/es-es/express/aa975050.aspx


minDark

One more question: I create my model in Blender, use generated texture and materials (i  need only color to be changed) and exported in FBX format. After i compile the model and imported in Machines Simulator "Models" folder. In Component Editor when i open the same model, in preview window is shown textured, with all colors ok but when is imorted to the scene  it lose all textures (it's not textured). Do you know what i can do???

EasyPLC_Master

The models preview window use a different render mechanism.
In Machines Simulator all graphic entities with model property has also a texture property, this is due all models can be repamed with a different texture by the user.
Then you need to texture your model in order to be correctly renderer by Machines Simulator.
Note: if you want not to texture your model, you can use a solid texture (provided by Machines Simulator) and use the System Light (Material Properties) in order to give the same apparience that Blender or other graphical softwares.

sky_nyx

hi? how to use the visual  studio 2017 to build xnb files? because in the  microsoft web site is can't download the visual studio 2010 .

EasyPLC_Master

For Microsoft XNA 4 Game Studio only is possible use Visual Studio 2010.