ksp modding This is a topic that many people are looking for. khurak.net is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, khurak.net would like to introduce to you KSP Modding Tutorial – Vol 1, Ep 2 – Game Models and Textures. Following along are instructions in the video below:
“Hello everyone. This is nifty. 2 55. And welcome to my ksp modding.
Tutorial series series vol. 1 custom parts episode 2 game models and textures in today s episode will discuss how to export textured 3d models into the correct formats and how to import them into the game itself but first let s go over what you will need to create your own parts keep in mind that this tutorial will assume you know how to operate the program shown or their equivalents or at least can look up tutorials for them. The first thing. You will need is a 3d modelling program.
You can use either blender. Which is free or 3ds. Max which you must purchase i will be using blender version 26. 3 for this tutorial in order to download blender.
You must go to wwe. Org you will find the download button for version 27. In the right area of the banner. If you want to download an older version such as the one.
I am using you will find an older versions link to the immediate right of the download button next. You will need an image editing program. You can use either adobe photoshop. Which must be purchased or gimp.
Which is free. I will be using adobe photoshop cc. Which is subscription based rather than requiring a large one time purchase however since most will not have access to photoshop. I will show you where to get gimp in order to download gimp you will need to go to wwg iymp org.
You will find the download button at the bottom right part of the banner next you will need the unity game engine version 43. Or higher. We must use this because. Kerbal.
Space program is built from this engine and thus. All the game models are also built from it also note. There is both a free and a paid version of unity known as indie and pro you do not need the pro version to create your custom parts in order to download unity you must go to wwe unity 3d comm you will find a link to the download page at the right of the navigation bar click the download button to begin your download the last thing you will need is a package of files for unity called part tools we will go into details on the download and setup of this tool later all of the links to these programs and tools can be found in the description of this video now that we have our programs let s get started the first step in creating a model is determining the size of your desired part 1 unit in. Blender is equal to 125.
Meters in kerbal space program using that conversion rate. It s easy to get any other size in the game for example. You can see here. That my part is 2 units.
Wide and blender thus in kerbal space program. My part will be 2 and 1 2 meters wide. Which is the same size as the jumbo 64 fuel tank. Because of this my part is considered a size 2 part.
If you are creating a part that can be attached radially. Then it is easiest if you first make cylinders of various sizes to see how your part looks attached to each one also you will have to consider vertical. Sizes as you can see in this. Image my 15.
Unit. Tall. Part is exactly as tall as the x 216 fuel tank. Which is considered a half size part for comparison.
Here are the x 208. And the x 232. Which are considered quarter and full size respectively in case. This is all a bit too much here is a handy spreadsheet to show various sizes that parts can be now that you have created your model.
It is time to create a collision mesh. This will be a second model in the same file with a lower polygon count than your actual model this will tell to kerbal space program how your part interacts physically with other parts in the ground in order to show you my part model. I have moved my collision mesh. A few units down.
Here is where my collision mesh should be now that your collision. Mesh is made you may add animations to your model. If you wish in order to show you how to handle animations in the export process. I have included one which is little more than an opening and closing door.
If you are finished with your model its animations and its collision mesh. We can move on to the next step texture making textures are an image that are applied to models through a technique called uv unwrapping in which a model is taken apart. Using certain marked edges called seams and laid flat. As if it were an image here is a simple example of uv.
Unwrapping and this is how my model. Which has two meshes looks unwrapped note that your collision mesh does not need to be unwrapped. A cool feature of blender. That i recently found myself is the ability to export outlines of your uv maps to images for use as guides when you create your texture to do this first ensure that you have created an image data block by clicking the new button select your image size.
But be aware that all textures must be sized by a power of 2 and square. Such as 512 by 512 or 102. 4. By 102 4.
Next. Make sure everything in your map is selected click the uvs menu and select the export uv layout. The next screen will allow you to save the image any place you choose you may now open this image in your image. Editing software.
If you have multiple meshes and you v s you may find it difficult to line them up properly in your program. If this happens it may be best to add a few small marks in each corner to trick. The program into thinking that you need the entire selection. Even if most of it is empty space using these guidelines.
You can now easily create your texture here is mine after you saved your texture you need to apply it to your model select your model in blender and add a material next add a texture change the texture type to image or movie. After you ve done so click the open button navigate to and select your texture image now open the mapping section and change coordinates to uv next click the map drop down and select uv map leave projection as flat at this point your texture should now be applied. You can preview your model now by pressing f12 or by opening the render menu in the top left and clicking rendered image be sure that if you decide to preview that you move your collision mesh out of the way and that you move it back when you re done now that your model is made and textured. We can begin the export and import process after saving your word be sure that all meshes that you want to export including the collision mesh are selected.
Open the file menu in the top left and hover over export you can either export as colada or as autodesk fbx. But for consistency. We will export as fbx since i m not too sure how well coolatta supports animation click the fbx option in the next screen you will notice some settings on the left leave all of these as they are except the selected objects checkbox. Enable this so that the extra objects in the scene like lamps and such are not also exported after you ve saved your model.
We can import it into unity when you first open unity. You will likely be greeted with a dialog similar to this unity being a game engine divides everything up by projects. Because of this you must create a new project in order to convert your models into format kerbal space program. Accepts browse to the location.
You want your project to reside create a new empty folder titled part exporter select. It and then click select folder next you will notice that the dialog shows a list of packages to import. We will be using a package. But not any of these leave all of them unchecked and click create now we must get that part tools package.
I mentioned earlier in order to download the part tools package you will need to go to the kerbal space program forms a link to which will be provided both as an annotation to this video and in the description. Once you have downloaded the package open up unity and then open up your part tools zip folder extract this zip folder double click part tools and drag these three folders into this block here in unity wait for it to load. After unity has finished importing the assets you will notice that underneath the assets folder. Which is automatically created with your project now has three folders editor lib and shaders these are the ksp part tools next.
We will begin importing our part a quick thing worth noting is that your layout may not look like mine. It may look like it or it may look similar to this the key in importing the part tools package is to ensure that you are dropping them into the project window under the assets folder. I m going back to my favorite layout. Now that the part tools package has been imported you need to add two folders to the assets folder right click create folder this one will be named models the second folder will be named textures.
Now select the models folder navigate to the model that you export. It and drag it into unity notice that it has also created a materials folder. This is absolutely fine next. We will import our texture now we need to properly configure our model first go to the model itself you will notice there are three tabs if you are not animating your model you will not need to worry about the rig or animations tabs.
However you still need to change your scale factor to one to ensure that your part does not come out tiny also if your part is cylindrical or spherical you may need to change the normals to calculate in order to smooth out your part properly click apply since my part has animations. I will need to configure my rig and animation steps go to rig if you have animations and change animation type from generic to legacy click apply and go to animations now since the fbx format. Only accepts one animation clip and you may need multiple animations. The normal practice is to place all animations in a single clip.
Unity provides the ability to separate those animation clips once the model has been imported. I have two animations so i need to add two more clips. The first one i will call open and set the proper keyframes and i can preview down here by pressing play to ensure that i have the right keyframes looks good now we need to add my second animation named closed set the keyframes and preview. This looks fine to me click apply next we need to configure our materials go to the materials folder.
If your collider has a material you do not need to worry about it it will be removed later but not from the project go to the material that will be used for rendering and change the shader from diffuse to the ksp diffuse shader. If you have bump maps you may also add bump maps or specular. And even emissive particles and alpha shaders. But since my part only has diffuse texture.
I will use ksp diffuse next. We need to assign the texture to this material click on the shaders folder and drag your texture into the material. Now that our part has been properly configured. It is time to begin the export process in order to do so we need to create an empty game object go to the game.
Object menu create empty and then we will add a component go to the ksp and select part tools this game. Object will act as the exporter for our part go ahead and click the set game data directory. And this window will pop up click the set data directory. Button.
And i will export my part here and a new empty folder labeled processed models now that that has been set go ahead and close that window and drag your model into the empty game object you will now see it in the scene. But you will also see the collider we need to fix that open your part and go to the collider and remove the mesh renderer by right clicking and selecting remove component. But now the collider doesn t collide anything we need to also add a component go to physics and select mesh collider in case. This does not select the mesh automatically you may need to click this circle and select the proper mesh.
The last thing you need to do is select the convex checkbox since mine has animations. I also need to configure the animation component that has been set on my model. I need to click the animations drop down. And i can see that it has already been set for me.
The only modification. I need to make to this is to deselect play automatically. Unless you want one of the animations to play automatically the final step to this process is to select the game object change your model name to model since this is typical of squad made parts changing the texture format from gda smallest to mbm since that is also the format that kerbal space program uses and then clicking write your part is now been created. But we also need to make a simple config file for your part.
Once you have written your part and then navigated to the place to which you have written it you will notice that there are two files model mu the model itself and the texture. I have also included a part configuration file. It is easiest to copy one from something else and then modify. It to your needs a set of key components.
That you will need in your configuration. File are named model author. The mesh and the node definitions for attaching note that depending on the size of your part you may need to adjust these nodes for example. My part being a size 2 part needed adjustments on where they connected also note that ksp will scale your part down by 10 thus.
When you are adjusting these nodes. Make sure that your dimensions are also scaled by 10 such that since the y coordinate of the top part of my part was point 7 5. I needed to adjust that to 7 point. 5.
Also since the radius of my part is 1 unit. I needed to adjust for that by 10 units more key components that you will need to worry about are those such as tech required entry cost as well as category. This will place it in one of the tabs currently my part will be in utility. The title of your part this is what the user will see the manufacturer.
The description also the attachment rules. This defines what another part can do to attach to yours for example. This part stacks. It attaches on the surface in other words on the side.
It allows stacking. It allows surface attachments such that those can be attached on the side. But it does not allow collision more various key variables are those such as mass drag model type. Which is normally left to default.
The crash tolerance the maximum temperature braking force and braking torque lastly for demonstration purposes. I have added an animation generic module that simply allows my doors to open and close by right clicking on my part in all reality. This is all it does but using custom module behavior. Which will be discussed in another episode.
We can begin to make these animations do better things the very last thing you need to do in order to successfully import your part into kerbal space program is package it up so create a new folder label. It the name of your part for example. Me. It will be test.
Part and then add those three files into that folder then copy this folder into one of the following locations. There are two options you have to do this you can either set it in parts as it is or you can go to game. Data. Create your own folder title for example.
The name of your mod. And then create a parts folder within that so as a repeat. You can simply place it into the top level parts folder. Or you can create your own.
Mod folder. And then a parts folder within that and then insert your part into that since i like organization. I normally create my own mod folder and insert it there and that s it your part should now be included in the game. Let s see if we can find it in there real quick alrighty now we re in the game.
And we re going to begin searching for our part. So i have a save preset here just going to hit up this vab and since my part is a size 2. I m going to start with the water mark 1 2. Command pod.
I m going to look under utility and sometimes you ll find your part right up here at the beginning. Sometimes you ll find it at the end and as you can see it s in the game. It s right there it s functioning and now. I m going to take it out onto the launchpad to test the physics and make sure my collider has been configured correctly.
So far it hasn t fallen through the world and as a final test. I m going to make sure that my animation works and ever things set congratulations. You ve just made your own custom part you ve taken it through unity to process it into the correct format. And you ve imported it into the game.
Thank you very much for watching this tutorial and i apologize for the delay in releasing this video. If you d like to see more please leave a comment or a thumbs up until next episode this has ” ..
Thank you for watching all the articles on the topic KSP Modding Tutorial – Vol 1, Ep 2 – Game Models and Textures. All shares of khurak.net are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.