User Tools

Site Tools


modding:tutorials:add-model

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
modding:tutorials:add-model [2021/05/03 20:09] – created jazzymodding:tutorials:add-model [2021/07/25 12:46] (current) nikkeh
Line 1: Line 1:
-//This tutorial is coming soon!//+//More information coming soon, however in the meantime please take a look at this [[https://www.youtube.com/watch?v=k7mKmCAKVtc|video]].// 
 + 
 +There are a few steps to getting a model in game, this will walk you through the basics.  
 + 
 +Note: this tutorial assumes you already have a FBX model.  
 + 
 +(Written by Nikkeh - on SH Version 26) 
 + 
 +===== 01: Preparing ===== 
 +Before you get started there are a few tools you'll need to install.  
 +  - [[Blender]][[https://www.blender.org/|link]] 
 +  - [[MGCB Editor]][[https://docs.monogame.net/articles/tools/mgcb_editor.html|link]] 
 +  - [[Visual Studio + Model Editor]][[https://docs.microsoft.com/en-us/visualstudio/designers/model-editor?view=vs-2019|link]](Optional, used for troubleshooting) 
 +  - A program to create texture artwork in (Photoshop, GIMP, MS Paint etc) 
 + 
 +===== 02: Blender ===== 
 +When working in blender there are a few things to note: 
 +  * Keep your Tris below 200k if you can 
 +  * You'll need to remove any Materials and Texture Paints attached to the model before exporting 
 +  * Your model will need a UV Map before exporting 
 + 
 +UV Mapping 
 + 
 + Before you can move on to texture painting you'll need to have your model fully UV mapped.  
 + To unwrap your model:  
 +   - In Edit Mode, select ONLY the model you want to UV map 
 +   - Under UV, select Smart UV Project 
 +   - Leave the settings at default and click OK 
 +   - Congrats your model is now unwrapped! 
 + You may have to do this a few times, modifying the unwrap settings as you go. To see your UV Map head over to the UV Editing tab. (Note: there are more advanced ways to unwrap a model, please see YouTube for video tutorials on this.) 
 + 
 +Materials & Texture Paints 
 + 
 + Feel free to use them during the design/building phase of your model, just know that you'll need to remove them before exporting. I suggest Versioning your files to keep track of this. i.e. FileNameV1.2, FileNameV2.3NoTextureNoMaterials, etc.  
 + 
 + Now that you have a model with a UV mapping you can begin working on the texture paint! There are two ways of doing this, 1. Painting in Blender via the Texture Paint tab, 2. Exporting the UV map out to a different tool (Photoshop, etc). (See this tutorial for more info: [[https://www.youtube.com/watch?v=u9nE2Xg6Jgk|video guide]]) 
 + 
 +Getting ready for Export 
 + 
 + Due to the way MGCB and SH need the files setup we'll need to do some clean up of our Blender file first. 
 +   - Export the texture file as a jpg 
 +   - Remove the texture from the blender model (See this guide: [[https://cgcookie.com/questions/10024-blender-2-8-how-to-delete-a-texture-slot-in-texture-paint-mode|link]]) 
 +   - Remove any materials from the blender model 
 +   - Click on your model(s) 
 +   - File > Export > FBX 
 +   - Select "Limit to Selected Objects" 
 +   - Unselect everything in Object types besides "Mesh" 
 +   - Click Export FBX 
 + 
 +===== 03: MGCB Editor ===== 
 +Follow this video guide for using the MGCB Editor: [[https://www.youtube.com/watch?v=k7mKmCAKVtc|video]] 
 + 
 +Tips: 
 +  * Make sure to check 'Generate Tangents True' 
 +  * Texture file should be it's own file in the texture folder 
 +  * Once you've built the files, move them over to your module folder. 
 + 
 +===== 04: in the Mission Designer ===== 
 +We'll need to setup a few things before you'll be able to see the model in game. 
 +Adding the Model file: 
 +  - Your Module > World Building > Models 
 +  - Add A Model 
 +  - Name = the name you'll use to refer to this model throughout the module 
 +  - Source = the file that the model is built from, do not include file extensions or folder paths. 
 +  - Shader = the shader type used behind the scenes for lighting/shadow/etc, leave it as Hydra 
 +  - Tags = used to reference this model thought out the module, comma separated list 
 +  - Add Mesh 
 +  - Shader = used Hydra 
 +  - Texture = the texture file for your model, do not include file extensions or folder paths.  
 + 
 +Creating a Vessel: 
 +  - Your Module > World Building > Vessels 
 +  - Add A New Vessel Class 
 +  - Name = the name that will be shown in the Gallery, used throughout the module 
 +  - Sub Class = a way to subdivide your vessels, text field 
 +  - Company = a drop down that is populated by the World Building > Companies section 
 +  - Mask = what is pulled in game for text, can use the variable [NAME] to pull the name field above, can also put other designators here i.e. HMS [NAME] or USS [NAME] etc. 
 +  - Designation = Normally 3 letters followed by 3 or 4 digits, ie. CA-586, or NCC-1701 
 +  - Description = description field, you can describe the ship here 
 +  - Rarity = 0 for never spawns, 1 for common 
 +  - Playable = is this ship able to be used by a player 
 +  - Spawnable = is this ship able to be spawned using the GM screen 
 +  - Visible = Unsure, need explanation from Auric 
 +  - Show in Gallery = is this ship visible in the ship gallery? 
 +  - Size 
 +  - Hull = Base Ship HP? @Auric 
 +  - Tonnage = tonnage of this vessel 
 +  - Max Cargo = Max units of cargo 
 +  - Max Crew = Max number of crew 
 +  - Core > Model 
 +  - Model = Select the model we entered on the previous screens 
 +  - Scale = start with 1, can modify this later if the ship is too small/large. 
 +  - Hit Save 
 +  - Exit Starship Horizons, and reopen it.  
 +  - Now you'll be able to view your model in the Gallery 
 + 
 +===== 05: Troubleshooting ===== 
 +Is your model a black screen? Just the star background? Other issues? 
 + 
 +Using Visual Studio + the Model editor, open up your FBX file. 
 + 
 +Any issues loading? Any duplicate models?  
 +Remove/Edit and follow step 3 again, update the model name in Your Module > World Building > Model if necessary. Update your vessel if the Model name changes as well.  
 + 
 +Tried this with no luck? Try reducing your model's tris in Blender (See this tutorial: [[https://www.youtube.com/watch?v=JqoIGxUrLbw|video]]) Try steps 3-5 again.  
 + 
 +Still no luck? ask for help in the #modding channel. 
 + 
 +Back to [[modding:tutorials|Tutorials]].
modding/tutorials/add-model.1620072561.txt.gz · Last modified: 2021/05/03 20:09 by jazzy