Jump to content

Guide : using unity to edit props in IVA


Recommended Posts

I've made a little guide on setting up a workspace to change the inside of the vessels and cockpits in KSP.

There are quite a few tutorials on this site but they all seemed either incomplete or too complex.
I just wanted to be able to open an IVA config file and move around some props, not make new ones !
There are a lot of superb IVA models around that could be made even better by adding RasterPropManager/MAS/ASET props to them.
So here is how I managed to set up an IVA workspace :

 

1) Install Unity editor :
KSP works with Unity 2017.1.3p1 (download here). You can use the free version, but you still need to make an account in order to start the editor. A service like mailinator can be useful if you dont want to give your real email adress.

Then you need to download KSP PartTools 1.5 (download here). Unzip the file and put it somewhere.

Start Unity and go to Assets->Import Package->Custom Package in the menu. Select the file you unzipped previously (PartTools_AssetBundles.unitypackage)

Click on Tools->KSP Part Tools in the Unity menu bar. Then click on "Setup" in the new "Part Tools" window. Click on "Set Data Dir" and select the GameData folder in your KSP install directory. This should populate the "Spaces" and "Props" submenus with the IVAs and Props of your kerbal installation. If this fails try again with a new KSP installation as it seems certain mods can block the importation process.

At this point you should be able to open an IVA (Spaces->Spawn) and add some Props (Props->Spawn) ! You can move props by clicking on them, or copy them by selecting them in the hierarchy menu on the left side.

The changes can be saved by clicking on Inspector->Internal Space->Save to config

 

2) File locations :
The IVA files can be found in GameData\Squad\Spaces\*\*.cfg or in the .cfg files of various mods. They list all the used props and their positions.

 

3) Texture fix :
KSP uses .dds textures but the Unity editor isn't able to load them, so you will get a lot of "texture not found" errors. The .dds textures can be converted with the open source tool ImageMagick. This is not strictly necessary : unity will work fine without textures.

Download ImageMagick here (scroll down to get to the windows installer).

Make a copy of your KSP installation (you don't want to start converting files in your original KSP directory, that could break things !)

Start a new Command Prompt (type cmd in the start menu). Go to the GameData folder in the KSP copy you made previously (example : "cd C:\Games\KSP-IVA-Copy\GameData")

Verify that you are in the right folder ! The Command Prompt can be a fickle beast and you dont want to convert the wrong files !

Copy paste this script in the Command Prompt that is open in your KSP GameData copy :

FOR /R %f IN (*.dds) DO mogrify -verbose -flip -format png "%f"

Wait on the conversion to finish, this can take a few minutes. The script adds a png version of all the dds files it finds, it doesn't delete anything. Make sure Part Tools in Unity is pointed to the GameData folder with the converted images. You now have IVA/Props textures in Unity !

 

If you want more info on how to use IVA Props in Unity you can also check out this tutorial by Noah Sans Ark : https://youtu.be/PrjTcv9WmRQ

Link to comment
Share on other sites

  • 2 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...