Void Destroyer 2

Void Destroyer 2

Not enough ratings
How to import/export ships for Void Destroyer 2 using Blender
By Stratos
In this guide, I will show you how to export your own ships for Void Destroyer 2 using Blender. I will also show you how to import Void Destroyer 2 ships into blender, so you can modify them.

Please note:
I won`t show you how to create a ship model, this tutorial is about importing and exporting with blender. If you want to learn how to use blender to create 3d models, there are plenty of tutorials on youtube and other websites. A good series to start with is this one: https://www.youtube.com/watch?v=xT2mtoDnSzM

This Tutorial is made for Blender 2.7x . If you're using Blender 2.8x or higher some instructions may not work out. If you are not an advanced user, I suggest to download and use the 2.79 version of blender.

(Free) Software you need:

Blender - https://www.blender.org/download/
blender2ogre - https://github.com/OGRECave/blender2ogre
OgreCommandLineTools - http://wiki.ogre3d.org/OgreXmlConverter
assimp - https://github.com/assimp/assimp/releases/tag/v3.3.1/
   
Award
Favorite
Favorited
Unfavorite
Installation and Configuration
Step 1
Download and install/extract Blender[www.blender.org]. If you are running a 64bit OS, use the 64bit version and vice versa.

Step 2
Next, download the OgreCommandLineTools[wiki.ogre3d.org] and extract it anywhere. Just make sure to find it again.

Step 3
Download blender2ogre[github.com]

Open the archieve and extract the 'io_ogre' folder into your Blender addons folder.
If you didn`t change the path for Blender in the installation, the path should look like 'C:\Program Files\Blender Foundation\Blender'.

The addons folder should be located under 'Blender\2.76\scripts\addons' (I`m using Blender 2.76, if you use another version the subfolder will have the name of the version you are using)

Step 4
  1. Start Blender. On the top bar, click on File->User Preferences.
  2. Click on Add-ons.
  3. There is a Searchfield at the top left, search for 'ogre'
  4. You will see an entry that's called something like 'Import-Export: OGRE Exporter (.scene, .mesh, .skeleton) and RealXtend (.txml)
  5. On the right side, next to the name should be a checkbox, enable it. Please note: We could set-up the path to the OgreXMLConverter, but I don`t recommend it. Later on I will explain why
  • 6. Click on 'Save User Settings'

    Step 5 (Optional)
    This step is only necessary if you want to convert existing Void Destroyer models into a format that can be edited with blender.
    Download and install assimp[github.com].
Applying Material & Texture on your Ship
In this section I will show you how to apply the original VD2 Material on your ship and how to use the original diffuse map to color your ship. The advantage of using this method is that all the shader magic that happens ingame will be applied on your ship, giving it glossiness, nice outlining and smooth shadows.

Step 1
Open your ship in blender.

Step 2
Create a new Material and call it 'Hull\001EM' - double check the name! If you name the material differently it won't apply ingame and your ship will appear plain white.

More details how to do that:

1. Make sure that your ship is selected, selected objects have an orange outline in the 3D editor.


2. In the properties window, open the materials tab and click on new.


3. Name it 'Hull\001EM'

Step 3
Now it is time to apply the texture, we will use the original Hull Diffuse Texture. You can find it in Void Destroyer 2\Media\materials\textures - it is called hullDiffuse001.png.

Alright, go back to blender.


1. Apply the texture to your Material, in the materials secton, scroll down to the surface part and click on the button next to the color, choose Image Texture and click on open, now use the filebrowser to open the texture file.


2. Open a new section and switch it to UV/Image Editor and open the hullDiffuse001.png


3. Select your ship in 3D view, press tab to enter the edit mode, press A to select all faces, press U to open the Unwrap quick menu and click on Smart UV Project.


4. Your faces should be visible in the UV/Image Editor now. Move your mouse cursor inside the UV Editor, press A to select all faces, press S to enter scaling mode and scale them down until they fit inside a single color. You can move them around by pressing the G key. Congratulations, you`ve just given your ship a new color.

Step 4


The preparations have been made, now it is time to color your ship! To do that, select the faces you want to color, move them on the right color in the UV/Image Editor and continue until your whole ship is colored - and make sure to have your Viewport Shading set to Texture / Material or you won`t be able to see the color on your ship.

Preparing and Exporting
Your ship is completely colored? Good! Then you are ready to export it.. almost...


Before we can export it we have to make sure that the ships scale and rotation are applied. We also have to make sure that its origin is at the center, but one step after another.

Step 1
Before applying anything, make sure that the ship has the scale you want it to have and that it is
facing forward.
Checking if your ship is facing in the right direction can be done the following way:

Make sure that your orientation is set to Global (you can find this control at the bottom of the 3D viewport screen). Now all you have to do is to rotate your ship until its front is facing in the direction of the green (Y axis) arrow.

Step 2

Now we can apply the rotation and the scale. Select your ship in object mode (Tab Key for switching) and press CTRL+A to open the apply dialog. Apply the rotation and the scale. Without applying rotation and scale the game would display the ship facing the wrong direction and with wrong size.

Step 3
The last step before exporting is to make sure that the objects origin is on the right position. The origin is the 'center of rotation' for the object, if it is not centered, the object will not turn around itself, instead it will turn around the origin, resulting in a really weird rotation. Camera placement will be wrong, too etc.


To re-center the origin of your ship, select your ship in object mode, press CTRL+SHIFT+ALT+C and click on 'Origin to Geometry'.

Step 4
Now we are ready to export our creation. To do so, on the top bar, click on File->Export->Ogre3D. If you can`t find the Ogre3D button, check the installation instructions again.. Maybe you forgot something. Select a folder and un-check the 'export scene' checkbox on the left bottom of the file dialog. (We don`t need it)

If everything went right, you should find a .mesh.xml file at the destination you chose for the export.
Conversion & Script
It is time to explain you why we are doing this little extra step. Actually you could have set up the converter path for your export plugin and everything would have been done automatically. Unfortunately, the ogre exporter changes the material name from Hull\001EM to Hull_001EM. Which would result in no appliance of the material ingame. To fix that we have to manually edit the mesh.xml and change that.

Step 1

1. Open your exported mesh.xml with any texteditor, I`m using Notepad++ but it doesn`t matter which one you use.

2. Press CTRL+F to open the Quick Search and search for 'Hull_001EM'. If your editor doesn`t support search, use another one!
3. Replace all entries you can find with 'Hull\001EM'.
4. Save the file.

Step 2
We are ready for converting


Open the your OgreCommandLineTools folder and copy your mesh.xml in there, then just drag your file onto the XMLConverter.exe and it will convert it into a .mesh for you, which is ready to use in Void Destroyer 2!

Step 3
Copy the new .mesh file into 'Void Destroyer 2\Mod\Media\models\ships'
You might have to create the subfolders on your own.

Step 4

1. Do you know an already existing ship that is the most similar to yours?
If yes, go into 'Void Destroyer 2\Data\Ships' and find it in the shipclass subfolder.
If not, just find any ship that is the same 'class' as your ship.

2. Now that you've picked a ship, copy its xml file and paste it into
Void Destroyer 2\Mod\Data\Ships\Class
Replace Class with the shipclass of your ship.

3. Rename the .xml to the name of your own ship and open it with any texteditor. A texteditor with XML Syntax support is recommended (Visual Studio Code or Notepad++ e.g.)

Please note: I will not explain scripting, just show you how to quickly get a view on your ship ingame. Scripting is pretty self-explaining. Just go ahead and experiment. Check out all the available ships and you will learn it pretty fast. If there is enough interest (write a comment), I might add a section for the scripting part.

Depending on the ship you chose, the file should look something like this:

<?xml version="1.0" encoding="utf-8"?> <objectType attr1="ship"/> <name attr1="Duelist"/> <objectID attr1="duelist"/> <faction attr1="rockGuys"/> <shipClass attr1="fighter"/> <shipClassSize attr1="heavy"/> <meshName attr1="Duelist.mesh"/> <wireframeMaterial attr1="WF/Hunter"/> <descriptionText attr1="A heavy fighter."/> <descriptionText attr1=" "/> <descriptionText attr1="A fighter whose construction relies on the use of an asteroid, allowing for quick and cheap production. Yielding a surprisingly sturdy frame."/> <descriptionText attr1=" "/> <descriptionText attr1="Primarily armed with a scatter gun type weapon. A mining tool heavily modified for combat, best used at close range. The equipped missile launcher helps deal with opponents at longer ranges."/> <descriptionText attr1=" "/> <descriptionText attr1="The Duelist served well in the MU rebellion and the Outsider conflict."/> <descriptionText attr1=" "/> <descriptionText attr1="[colour='FFFFFF00']Secondary weapon:[colour='FFFFFFFF'] Push shot."/> <descriptionText attr1=" "/> <descriptionText attr1="Fires a rail gun like projectile designed to cause a physical impulse. Knocking a ship off course usually means it can't effectively fire back."/> <creditCost attr1="45000"/> <cruiseSpeed attr1="95.0"/> <timeTillCruise attr1="1.8"/> <yaw attr1="85.0"/> <pitch attr1="85.0"/> <roll attr1="85.0"/> <bGravityDrive attr1="1"/> <cockpitActualPos x="0.21" y="-0.6" z="6.11"/> <cockpitActualMesh attr1="cockpitDuelist.mesh"/> <cockpitInitPos x="-8.24" y="0.87" z="13.6"/> <cockpitTransLimit x="0.75" y="0.75" z="0.75"/> <chaseInitPos x="0" y="19.68" z="100"/> <chaseTransLimit x="6" y="3" z="3"/> <health attr1="1400.0"/> <armor attr1="1.00"/> <buildTime attr1="25.0"/> <crew attr1="1"/> <energy attr1="150.0"/> <ore attr1="225.0"/> <damage> <pitch attr1="-20.0"/> <roll attr1="-65.0"/> <yaw attr1="23.0"/> <position x="1.085" y="1.977" z="13.326"/> </damage> <deathTimer attr1="2"/> <deathSpin x="-0.7" y="0.4" z="0.7"/> <debrisInfo> <debris> <debrisID attr1="duelistD00"/> <debrisMomentum attr1="5"/> <debrisAngular attr1="5"/> </debris> </debrisInfo> <explosionID attr1="explodeRed02"/> <preExplosionID attr1="mHit00"/> <preExplosionID attr1="explode00"/> <tacticalExplosionID attr1="tacExp15_40"/> <engineSoundID attr1="eng-00"/> <propulsionRibbonID attr1="shipRibbon00"/> <propulsion> <propulsionEffectID attr1="propulsion035"/> <position x="-0.05" y="2.04" z="15.19"/> </propulsion> <propulsion> <propulsionEffectID attr1="propulsion035"/> <position x="-0.05" y="-0.94" z="15.37"/> </propulsion> <afterburner> <soundID attr1="ab-01"/> <tailSoundID attr1="ab-01-tail"/> <multiplier attr1="6.25"/> <capacity attr1="10.0"/> <recharge attr1="12.5"/> </afterburner> <collisionShape attr1="simple_convex"/> <isMassInfinite attr1="0"/> <bPlayerSharedFire attr1="1"/> <weapon> <weaponType attr1="projectile"/> <hardpointID attr1="duelistSG"/> <weaponPosition x="0.17" y="-5.75" z="-9.28"/> </weapon> <weapon> <weaponType attr1="instant"/> <hardpointID attr1="duelistRG"/> <weaponPosition x="0.17" y="-5.75" z="-9.28"/> <weaponFire attr1="secondary"/> </weapon> <turret> <turretID attr1="duelistMT"/> <turretOrientation attr1="top"/> <position x="0.0" y="0.0" z="0.0"/> <turretRole attr1="parents_target"/> </turret> <upgrades> <activeUpgradeCapacity attr1="2"/> <upgradeID attr1="cKP00"/> <upgradeID attr1="ammoCap00"/> <upgradeID attr1="refireRate00"/> <upgradeID attr1="fArmor00"/> <upgradeID attr1="fUpgradeRecharge00"/> <upgradeID attr1="burnerCap00"/> <upgradeID attr1="fAUCharge00"/> <upgradeID attr1="gDriveTrigger00"/> <upgradeID attr1="fArmorBoostAU00"/> <upgradeID attr1="rapidRepair00"/> <upgradeID attr1="fSpeed02"/> <upgradeID attr1="sensorShield00"/> <upgradeID attr1="targetScramble00"/> <upgradeID attr1="heavyFighterPUS00"/> <upgradeID attr1="heavyFighterAUS00"/> <upgradeID attr1="convertPtA00"/> <upgradeID attr1="convertAtP00"/> <upgradeID attr1="addPUS00"/> <upgradeID attr1="addAUS00"/> </upgrades> <shipHangarPosition x="-0.59" y="-0.4" z="-6.44"/> <shipHangarYOffset attr1="5"/> <rockSubPosition attr1="1"/>

The most important parts for the beginning are:

<objectID attr1="duelist"/>
This is the ID of the ship, make sure to change it to a unique name. If two ships share the same ID, one will override the other.

<meshName attr1="Duelist.mesh"/>
This line defines the name of the 3d file. Change it to the name of your mesh file.

<name attr1="Duelist"/>
This line is for the display name of your ship in-game.

For a quick test of your model, make sure to change the faction of the ship to a faction that
1. owns at least one base
2. is not hostile to you.

change this line to the faction you want it to be sold by:
<faction attr1="civilian"/>

Available Factions with bases:
beggar
civilian
hazardInc
kind
reborn
rockGuys
shadowTraders
thePride

Also make sure that if the xml file contains this line:
<bNotSoldUnlessOwnedBase attr1="0"/>
That it is set to 0, because if not you won`t be able to buy this ship unless you own the base.

That should be all. Go ahead, start the game, dock at a base of the faction producing this new shiptype and have a look at it!

Importing a Void Destroyer (2) ship into Blender
If you didn't install assimp yet, go back to the Installation section and do that.

Step 1
Open Assimp Viewer.

Click on Viewer->Open Asset and choose a .mesh file inside the Void Destroyer 2 Folder.

You can find all ships in 'Void Destroyer 2\Media\models\ships'


After opening you should see the ship. Now just click on 'Export->Wavefront OBJ' format and choose a folder to export.

Step 2
Open Blender.

Click on File->Import->Wavefront and choose your .obj file.

That's it. You've successfully imported a VD2 ship.
To apply the texture, just follow the same steps you did for your own ship.
Final Words
I hope I was able to help you creating your own ships for Void Destroyer 2!

This is my first bigger steam guide. So if you find some mistakes or some parts that are hard to understand - please let me know and I will work on them!

I hope to see more modders for Void Destroyer 2 soon :)
24 Comments
Judgement 18 Mar @ 4:20am 
Also I wanted to ask, the grid on the over world map, is that a mesh file and if so, if I edit it could I make it bigger?
chaosavy  [developer] 17 Mar @ 3:54pm 
Cool :)
Judgement 17 Mar @ 5:24am 
Thank you, I was able to find the issue, with your help my version of Ogre Tools was outdated
Judgement 17 Mar @ 5:05am 
This is what is says right after I select the ship in the log.

12:00:47: Mesh: Loading Valhalla.mesh.
12:00:47: OGRE EXCEPTION(7:InternalErrorException): Cannot find serializer implementation for mesh version [MeshSerializer_v1.100] in MeshSerializer::importMesh at ..\..\..\..\OgreMain\src\OgreMeshSerializer.cpp (line 182)
12:00:47: Unregistering ResourceManager for type Font
12:00:47: DefaultWorkQueue('Root') shutting down on thread 2c70.
chaosavy  [developer] 16 Mar @ 7:45pm 
Not looking for the xml converter log - but the in game log. The OgreLogfile.log
Judgement 16 Mar @ 2:34pm 
21:33:24: Reading geometry...
21:33:25: Geometry done...
21:33:25: Reading submeshes...
21:33:25: Submeshes done.
21:33:25: Reading mesh names...
21:33:25: Mesh names done.
21:33:25: XMLMeshSerializer import successful.
21:33:25: MeshSerializer writing mesh data to stream ...
21:33:25: File header written.
21:33:25: Writing mesh data...
21:33:25: Writing submesh...
21:33:25: Exporting submesh texture aliases...
21:33:25: Submesh texture aliases exported.
21:33:25: Submesh exported.
21:33:25: Exporting bounds information....
21:33:25: Bounds information exported.
21:33:25: Exporting submesh name table...
21:33:25: Submesh name table exported.
21:33:25: Mesh data exported.
21:33:25: MeshSerializer export successful.
21:33:25: Unregistering ResourceManager for type Skeleton
21:33:25: Unregistering ResourceManager for type Material
21:33:25: Unregistering ResourceManager for type Mesh
Judgement 16 Mar @ 2:34pm 
OrgeXMLConverter.log says this:

21:33:24: Creating resource group General
21:33:24: Creating resource group OgreInternal
21:33:24: Creating resource group OgreAutodetect
21:33:24: Registering ResourceManager for type Mesh
21:33:24: Registering ResourceManager for type Material
21:33:24: Registering ResourceManager for type Skeleton
21:33:24: XMLMeshSerializer reading mesh data from C:\Users\James\Desktop\Valhalla.mesh.xml...
chaosavy  [developer] 16 Mar @ 2:26pm 
OgreLogfile.log might tell you what's missing - something is missing or in the wrong place. Check spelling and file locations/etc.
Judgement 16 Mar @ 1:05pm 
Okay, I followed all these steps, even making my first ship a repainted version of another to make it easier for my first one, but second I try and select it anywhere in game crashes to desktop
Ponyus 18 Mar, 2021 @ 3:12am 
Okay, so i'm completely stuck. I did step 1 and downloaded blender 2.79 and went on to the next step, where you said to download OgreCommandLineTools, but the link only leads to a manual? There's nothing to download.

So i went on to the next step and downloaded blender2ogre from your link. Extracted the "io_ogre" folder to C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons.

When i went to activate the addon in Blender, it wouldn't allow me. Giving me this error:

https://i.imgur.com/UHgrKHq.png

I'm guessing the links are just completely outdated and/or broken, preventing me from getting into modding.