Author Topic: How to add my owns 3D models to the Machines Simulator models gallery  (Read 14283 times)

EasyPLC_Master

  • Developer
  • Administrator
  • *****
  • Posts: 960
  • Nirtec
    • The EasyPLC Project
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!.
« Last Edit: January 16, 2017, 06:09:18 PM by EasyPLC_Master »

fredz0003

  • Jr. Member
  • **
  • Posts: 56
Re: How to add my owns 3D models to the Machines Simulator models gallery
« Reply #1 on: April 01, 2012, 10:21:11 PM »
Any update on when are we going to be able to use XNA 4.0 and Visual Studio 2010 to compile models?

EasyPLC_Master

  • Developer
  • Administrator
  • *****
  • Posts: 960
  • Nirtec
    • The EasyPLC Project
Re: How to add my owns 3D models to the Machines Simulator models gallery
« Reply #2 on: April 02, 2012, 07:43:23 AM »
So far no date.

minDark

  • Newbie
  • *
  • Posts: 6
Re: How to add my owns 3D models to the Machines Simulator models gallery
« Reply #3 on: September 06, 2013, 07:08:02 PM »
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

  • Developer
  • Administrator
  • *****
  • Posts: 960
  • Nirtec
    • The EasyPLC Project
Re: How to add my owns 3D models to the Machines Simulator models gallery
« Reply #4 on: September 07, 2013, 12:44:03 PM »
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

  • Newbie
  • *
  • Posts: 6
Re: How to add my owns 3D models to the Machines Simulator models gallery
« Reply #5 on: September 09, 2013, 09:04:18 AM »
Ok, thanks! It works...

minDark

  • Newbie
  • *
  • Posts: 6
Re: How to add my owns 3D models to the Machines Simulator models gallery
« Reply #6 on: September 09, 2013, 12:59:44 PM »
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

  • Developer
  • Administrator
  • *****
  • Posts: 960
  • Nirtec
    • The EasyPLC Project
Re: How to add my owns 3D models to the Machines Simulator models gallery
« Reply #7 on: September 09, 2013, 01:31:05 PM »
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

  • Newbie
  • *
  • Posts: 5
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

  • Developer
  • Administrator
  • *****
  • Posts: 960
  • Nirtec
    • The EasyPLC Project
For Microsoft XNA 4 Game Studio only is possible use Visual Studio 2010.