Skip to content

SE Blender Setup

MrMors edited this page Sep 2, 2019 · 1 revision

Notes

This guide was built on the recommendations from the following locations:

This whole guide will be based on your modding folder being located at D:\Modding and being structured as follows. You can deviate from this and store the files in different locations, but there will be a number of edits and changes needed through out this document. I will note changes needed to change D:\Modding to C:\Modding, but I will not necessarily note all changes needed to change the folder structure. Also not all scripts have been tested to support folder paths with spaces, so be cautious if changing paths.

D:\ (Or C:\)
+- Modding
   +-- SpaceEngineers
   ¦   +-- Mods
   ¦   ¦   +-- Assets
   ¦   ¦   +-- Template
   ¦   ¦   +-- Mod1
   ¦   ¦   +-- Mod2
   ¦   +-- Source
   ¦   ¦   +-- bin64
   ¦   ¦   +-- Content
   ¦   +-- Utils
   ¦   ¦   +-- BlenderPlugins
   ¦   ¦   ¦   +-- Havox
   ¦   ¦   ¦   +-- HavokFBXImport
   ¦   ¦   ¦   +-- MwmBuilder
   ¦   ¦   +-- SourcePrograms
   ¦   ¦   ¦   +-- <Source ZIP and EXE Files for Later use>
   ¦   ¦   +-- TextureConverter
   ¦   ¦   +-- Build-Blender-textures.ps1
   +-- SomeOtherProject1
   +-- SomeOtherProject2

Prepare the Environment

  1. Start by creating the folder structure above. The following commands run inside Command Prompt will create all the folders needed.

    mkdir D:\Modding\SpaceEngineers\Mods\Assets
    mkdir D:\Modding\SpaceEngineers\Mods\Template
    mkdir D:\Modding\SpaceEngineers\Mods\FirstMod
    mkdir D:\Modding\SpaceEngineers\Source
    mkdir D:\Modding\SpaceEngineers\Utils\BlenderPlugins\Havox
    mkdir D:\Modding\SpaceEngineers\Utils\BlenderPlugins\HavoxFBXImport
    mkdir D:\Modding\SpaceEngineers\Utils\BlenderPlugins\MwmBuilder
    mkdir D:\Modding\SpaceEngineers\Utils\SourcePrograms
    mkdir D:\Modding\SpaceEngineers\Utils\TextureConverter
    
  2. Open Steam and Install Blender. Blender is free and if installed through Steam it will auto update.

  3. Download all the following items to D:\Modding\SpaceEngineers\Utils\SourcePrograms

    1. Harag's Plugin - https://github.com/Shaostoul/se-blender/releases/tag/0.8.0 Download the Source code (.zip)

    2. Havok Content Tools - The free offering of these tools by Intel has been discontinued when Microsoft took over Havok. Thanks to the SE community we have both versions (32-bit and 64-bit) available to download. The following links are from Shaostoul’s Modding Tutorial - Setup Ep1 V3 video. If these links die, then do some searching on the SE Forums. You only need to download the version that matches your OS, most likely the 64-bit one. 32-Bit Download 64-Bit Download

    3. HavokFBXimporter - https://github.com/harag-on-steam/fbximporter/releases/tag/havok2013.1-fbx2015.1 Download the fbximporter-havok2013.1-fbx2015.1.zip

    4. MwmBuilder - https://www.dropbox.com/s/3ytd1nzp2oqej20/MwmBuilder.zip?dl=0 Click the Downlaod v button in the upper right hand corner, and then Direct download

      MwmBuilder does come with the SE ModSDK, but was found to be unusable and this older version was needed. Once again the link comes from the Shaostoul’s Modding Tutorial - Setup Ep1 V3 video

    5. Visual C++ Redistributable for VS 2012 U4 - https://www.microsoft.com/en-us/download/details.aspx?id=30679 You only need to download the version that matches your OS, most likely the 64-bit one.

    6. DirectXTex - https://github.com/Microsoft/DirectXTex/releases Download the texconv.exe

    7. ImageMagick - https://imagemagick.org/script/download.php#windows

      Download ImageMagick-#.#.#-##-Q16-x64-dll.exe

    8. Assets and Template - https://git.mors.io/bpg/wiki/blob/master/Assets_and_Template.zip

Installing the Tools

  1. In your SourcePrograms folder run vcredist_x86 or vcredist_x64 based on which one you downloaded.

  2. Extract MwmBuilder.zip to D:\Modding\SpaceEngineers\Utils\BlenderPlugins\MwmBuilder

    • MwmBuilder.exe should be located at D:\Modding\SpaceEngineers\Utils\BlenderPlugins\MwmBuilder\MwmBuilder.exe
  3. Extract fbximporter-havok2013.1-fbx2015.1.zip to D:\Modding\SpaceEngineers\Utils\BlenderPlugins\HavokFBXImport

    • FBXImporter.exe should be located at D:\Modding\SpaceEngineers\Utils\BlenderPlugins\HavokFBXImport\FBXImporter.exe
  4. Install Havok2013.1 - 32bit.exe or Havok2013.1 - 64bit.exe based on which one you downloaded.

    • When asked what components to install, unless you use Max, Maya, or Xsi just accept the defaults and click Next.
    • When asked for the destination folder enter D:\Modding\SpaceEngineers\Utils\BlenderPlugins\Havok
  5. Install ImageMagick-#.#.#-##-Q16-x64-dll.exe and accept default options.

  6. Move texconv.exe to D:\Modding\SpaceEngineers\Utils\TextureConverter

    • texconv.exe should be located at D:\Modding\SpaceEngineers\Utils\TextureConverter\texconv.exe
  7. Download and Extract this repo to D:\Modding\SpaceEngineers\Mods

    • Assets folder should be located at D:\Modding\SpaceEngineers\Mods\Assets
    • Template folder should be located at D:\Modding\SpaceEngineers\Mods\Template
  8. Now we need to build our Source Directory of the SE ModSDK.

    • Blender does not natively support the format that SE stores its textures. If we would like to be able to view SE textures in Blender we need to convert them from a format called BC7 to a format called BC3. By building this Source directory we are taking the ModSDK and creating a copy that is more friendly to for modding with Blender. We will also copy over all the FBX files to this Source folder so that all SDK files we might need are in one location. Due note that the Source folder will be around 15GB in size.
    1. Launch Steam and hover your mouse over Library in the drop down that appears select Tools

    2. In the list of tools search for and select Space Engineers - Mod SDK

    3. Right click Space Engineers - Mod SDK and select Install

      • Note the location that it is installed too. We will need this later.
    4. Navigate to D:\Modding\SpaceEngineers\Mods\Assets

    5. Open Build-Blender-textures.ps1 with Notepad or your preferred editor. In the first few lines there are 4 variables you may need to update.

      • $texconv_raw: This should point to your texconv.exe, update this path to where you stored the file. If you used all the same paths as this guide, then this file should already have the proper path.
      • $game_dir_raw: This should point to the SpaceEngineers install folder on your system. If you don’t modify where Steam installs games then the path would be C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers. How ever if you have moved this folder to like a second drive you will need to change this path. I have my Steam Library on my D drive at D:\Steam so I entered D:\Steam\steamapps\common\SpaceEngineers
      • $sdk_dir_raw: This should point to the SpaceEngineersModSDK install folder on your system. If you don’t modify where Steam installs games then the path would be C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineersModSDK. How ever if you have moved this folder to like a second drive you will need to change this path. I have my Steam Library on my D drive at D:\Steam so I entered D:\Steam\steamapps\common\SpaceEngineersModSDK
      • $resource_dir_raw: This should be set to D:\Modding\SpaceEngineers\Source if you are following the paths in this document.
    6. Save and close the file.

    7. Now right click the file and chose Run with PowerShell

      • This does not need admin rights as long as you have full access to the D:\Modding folder and read access to your Steam Library folder.

      • Unless you have previously told PowerShell that it is allowed to run scripts you may get an error that says “Build-Blender-textures.ps1 cannot be loaded because the execution of scripts is disabled on this system.” If you get this error you will need to open an Admin PowerShell and run the following command bypass the execution policy. I recommend this options instead of just disabling your execution policy due to security.

        powershell -ExecutionPolicy ByPass -File D:\Modding\SpaceEngineers\Mods\Assets\Build-Blender-textures.ps1
        
      • This may take 10 or more minutes to run based on the speed of your computer. We are copying/creating ~13,000 files.

      • Any time SE has a major update you can run this script again to update your source file with any new textures and models.

  9. The last item to install is Hagar’s Blender Plugin

    1. Launch Blender
    2. Once Blender is open click File > User Preferences… and click the Add-ons tab.
      • I recommend Maximizing this window.
    3. On the bottom left of the Blender User Preferences window click Install Add-on from File…
    4. Navigate to and double click D:\Modding\SpaceEngineers\Utils\SourcePrograms\space_engineers_fixed_collision.zip
    5. On the left hand list of Categories select Space Engineers
    6. Click the checkbox next to Space Engineers: Block Tools and then click the v drop down arrow. Enter the following items:
      • Game Directory: D:\Modding\SpaceEngineers\Source\
      • MWM Builder: D:\Modding\SpaceEngineers\Utils\BlenderPlugins\MwmBuilder\MwmBuilder.exe
      • Material Reference XML: D:\Modding\SpaceEngineers\Source\Content\Materials\Materials.xml
      • FBX Importer: D:\Modding\SpaceEngineers\Utils\BlenderPlugins\HavokFBXImport\FBXImporter.exe
      • Standalone Filter Manager: D:\Modding\SpaceEngineers\Utils\BlenderPlugins\Havok\HavokContentTools\hctStandAloneFilterManager.exe
      • After you enter all these, if everything up to this point has been done correctly, none of the fields should be red. If you have a field that is red. Some step was skipped in this guide, or something did not run properly.
      • Click Save User Settings

Recommend Blender Settings

  1. Launch Blender
  2. Once Blender is open click File > User Preferences…
    • I recommend Maximizing this window.
  3. Click the Editing tab and enter the following:
    • Steps: 256
    • Click Save User Settings
  4. Click the Input tab and enter the following:
    • Blender is currently backwards compared to other modeling tools and normal Windows use in regards to mouse clicks. By default in Blender you select with a right click, not a left click. If you would like to change that, change Select With: to Left
    • Click Save User Settings
  5. Click the Add-ons tab and enter the following:
    • I recommend ensuring the following add-ons are enabled:
      • Import-Export: FBX format
      • Import-Export: UV Layout
      • Material: Materials Utils Specials
      • Render: Cycles Render Engine
    • Click Save User Settings
  6. Click the Themes tab and enter the following:
    • Presets: I recommend the Elsyiun theme, but you do you.
    • Click Save User Settings
  7. Click the File tab and enter the following:
    • Fonts: C:\Windows\Fonts\
    • Textures: D:\Modding\SpaceEngineers\Source\Content\Textures\Models\
    • Click Save User Settings
  8. Click the System tab and enter the following:
    • If you would like to use GPU rendering change Cycles Computer Device: to CUDA and chose your GPU.
    • Click Save User Settings
  9. Click Save User Settings and you can now close this window.
  10. Maximize Blender
  11. On the top bar change Blender Render to Cycles Render
  12. If the Tools menu on the left is not showing press T
  13. Select the Create tab and scroll down to the Space Engineers section.
  14. Click Set up Grid
  15. Click the File tab and select Save Startup File, and then again click Save Startup File

Updating Blend Asset and Template Files

  1. Navigate to D:\Modding\SpaceEngineers\Mods\Assets\
  2. Open Materials.blend
    1. Select File then External Data and then click Find Missing Files
    2. This will open a folder explorer in Blender. Navigate to D:\Modding\SpaceEngineers\Source\ and click Find Missing Files
    3. Select File then External Data and then click Make all Paths Absolute
    4. All Material files should now be properly linked.
    5. Save and close.
  3. Open Template.blend
    1. Select File then External Data and then click Make all Paths Absolute
    2. All Blend files should now be properly linked.
    3. Save and close.
  4. Open Generate-icons.ps1 with Notepad or your preferred editor. In the first few lines there is 1 variable you may need to update.
    • $texconv_raw: This should point to your texconv.exe, update this path to where you stored the file. If you used all the same paths as this guide, then this file should already have the proper path.
    • Save and close the file.
  5. Copy Template.blend to D:\Modding\SpaceEngineers\Mods\Template\Template.blend
  6. Navigate to D:\Modding\SpaceEngineers\Mods\Template\
  7. Open Deploy.bat with Notepad or your preferred editor. In the first few lines there is 2 lines you may need to update.
    • On the first two lines update D:\Modding\SpaceEngineers\MrMors\Assets\ to be D:\Modding\SpaceEngineers\Mods\Assets\
    • Save and close the file.

Clone this wiki locally