<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://zero-k.info/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Darloth3</id>
	<title>Zero-K - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://zero-k.info/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Darloth3"/>
	<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/Special:Contributions/Darloth3"/>
	<updated>2026-04-09T20:31:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Magpie&amp;diff=9036</id>
		<title>Magpie</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Magpie&amp;diff=9036"/>
		<updated>2023-12-06T18:24:15Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Better than nothing, right?  There's probably a tool to generate these, but instead, I copied it by hand from the game infobox and the lua definition.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''{{PAGENAME}}''' is a tactical strike bomber from the [[Airplane Plant]].{{ Infobox zkunit&lt;br /&gt;
| name = Magpie&lt;br /&gt;
| defname = bomberstrike&lt;br /&gt;
| description = Tactical Strike Bomber&lt;br /&gt;
| image = http://manual.zero-k.info/unitpics/bomberstrike.png&lt;br /&gt;
| icontype = bomberskirm&lt;br /&gt;
| cost = 220&lt;br /&gt;
| hitpoints = 900&lt;br /&gt;
| movespeed = 252&lt;br /&gt;
| sight = 780&lt;br /&gt;
| altitude = 240&lt;br /&gt;
| weapons = &lt;br /&gt;
	{{ Infobox zkweapon&lt;br /&gt;
	| name = Heavy Missiles&lt;br /&gt;
	| type = MissileLauncher&lt;br /&gt;
	| damage = 180 × 2&lt;br /&gt;
	| reloadtime = 18&lt;br /&gt;
	| range = 550&lt;br /&gt;
	| aoe = 24&lt;br /&gt;
	| homing = 75&lt;br /&gt;
	| projectilespeed = 400&lt;br /&gt;
	}}&lt;br /&gt;
}}==Description==&lt;br /&gt;
The Magpie launches short-range homing missiles at ground and air targets.  It makes up for its low damage and long reload time by boasting the range and manoeuverability to hit dangerous targets and make it back to base.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Tactics and Strategy==&lt;br /&gt;
(none yet)&lt;br /&gt;
&lt;br /&gt;
{{Navbox units}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Airplane_Plant&amp;diff=9033</id>
		<title>Airplane Plant</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Airplane_Plant&amp;diff=9033"/>
		<updated>2023-12-04T14:08:10Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Added missing link to magpie.  I've no idea how a unit page is generated, but at least now people will know there ought to be one.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''{{PAGENAME}}''' is a factory that produces airplanes.{{ Infobox zkunit&lt;br /&gt;
| name = Airplane Plant&lt;br /&gt;
| defname = factoryplane&lt;br /&gt;
| description = Produces Airplanes&lt;br /&gt;
| image = http://manual.zero-k.info/unitpics/factoryplane.png&lt;br /&gt;
| icontype = facair&lt;br /&gt;
| cost = 700&lt;br /&gt;
| hitpoints = 4000&lt;br /&gt;
| sight = 273&lt;br /&gt;
| abilities = &lt;br /&gt;
	{{ Infobox zkability construction&lt;br /&gt;
	| buildpower = 10&lt;br /&gt;
	}}&lt;br /&gt;
}}==Description==&lt;br /&gt;
The Airplane Plant offers a variety of fixed-wing aircraft to suit your needs. Choose between multi-role fighters that can double as light attackers or specialized interceptors, and between precision bombers for taking down specific targets or their saturation counterparts for destroying swarms. The plant also comes bundled with one rearm pad.&lt;br /&gt;
&lt;br /&gt;
The Airplane Plant builds:&amp;lt;dl&amp;gt;&lt;br /&gt;
{{icon unit def|planecon|Crane|Construction Aircraft}}&lt;br /&gt;
{{icon unit def|fighter|Swift|Multi-role Fighter}}&lt;br /&gt;
{{icon unit def|planeheavyfighter|Raptor|Air Superiority Fighter}}&lt;br /&gt;
{{icon unit def|unknown|Magpie|Tactical Bomber}}&lt;br /&gt;
{{icon unit def|bomberprec|Raven|Precision Bomber}}&lt;br /&gt;
{{icon unit def|bomberriot|Phoenix|Saturation Napalm Bomber}}&lt;br /&gt;
{{icon unit def|bomberdisarm|Thunderbird|Disarming Lightning Bomber}}&lt;br /&gt;
{{icon unit def|bomberheavy|Likho|Singularity Bomber}}&lt;br /&gt;
{{icon unit def|planescout|Owl|Radar/Sonar Plane}}&lt;br /&gt;
{{icon unit def|planelightscout|Sparrow|Light Scout Plane}}&lt;br /&gt;
&amp;lt;/dl&amp;gt;{{clear}}&lt;br /&gt;
==Tactics and Strategy==&lt;br /&gt;
&lt;br /&gt;
The Airplane Plant provides the most unique array of units of any factory in Zero-K; the Planes are more like a support force, as opposed to combat units. Both the speed of the Planes and their first-strike capability is unparalleled. The Swift is the Planes' main air-to-air option, while the Raven, Thunderbird and Likho bombers punish any poorly-covered ground forces.&lt;br /&gt;
&lt;br /&gt;
In contrast to the Gunships, the Airplane bombers deliver their damage in a very short period of time, so anti-air which relies on prolonged engagements is less effective against them. On the other hand, the bombers have to return to base and rearm before making another run. The Swift fighter relies on similar hit-and-run tactics against enemy air forces.&lt;br /&gt;
&lt;br /&gt;
=== Example Unit Combinations ===&lt;br /&gt;
&lt;br /&gt;
Once your fleet of Swifts is large enough, add a few Raptors for more sustained damage. Make sure your Swifts are in position to protect the Raptors' flank and rear.&lt;br /&gt;
&lt;br /&gt;
Fly a Swift or two over enemy territory before a bombing run to soak up a few missiles and scout for an unexpected concentration of anti-air. Losing a Swift or two is far less painful than losing a Likho.&lt;br /&gt;
&lt;br /&gt;
Follow up a Thunderbird strike with swift ground units such as the [[Glaive]] or [[Scorcher]] to capitalise while the enemy is disarmed. &lt;br /&gt;
&lt;br /&gt;
Use Owls to scout for your artillery pieces like the [[Sling]], [[Emissary]] or [[Lance]].&lt;br /&gt;
&lt;br /&gt;
Owls jam enemy radar in an area around and below them. Order a line of Owls to fly circles behind your team's front lines to provide radar, line of sight, and to hide your allies from enemy radar.&lt;br /&gt;
&lt;br /&gt;
=== Bombing Mechanics ===&lt;br /&gt;
&lt;br /&gt;
The Airplane Plant provides its owner with access to four bombers, being the [[Raven]], [[Phoenix]], [[Thunderbird]], and [[Likho]]. Upon attacking they will drop their payload, which differs between the different types of bomber.&lt;br /&gt;
&lt;br /&gt;
*The [[Raven]] will drop a single gliding bomb, dealing 800 damage. &lt;br /&gt;
*The [[Phoenix]] will drop 15 napalm bomblets, each doing 25 damage on impact and another 150 damage per unit hit as it burns. The bomblets are dropped over a wide area, which means small units may dodge the majority of bomblets, whereas large groups may be hit multiple times.&lt;br /&gt;
*The [[Thunderbird]] releases disarming lightning from its belly towards the ground in a line, with the center of the line at the ordered point of attack or target unit. The Thunderbird is free to change direction while firing, and can be manually fired (default 'D').&lt;br /&gt;
*The [[Likho]] drops a single homing implosion bomb dealing approximately 2000 damage. &lt;br /&gt;
&lt;br /&gt;
The four different bombers will move differently during their payload release. As mentioned above, [[Thunderbird]]s will happily continue flying in a straight line unless ordered not to. The [[Phoenix]] is the exact opposite, and will prefer to drop its payload in a J-shape unless given a move order to continue on in the direction it came from. The [[Likho]] launches its bomb at 500 range before turning around immediately. The [[Raven]] will simply drop its bomb and turn around.&lt;br /&gt;
&lt;br /&gt;
After releasing their payload, bombers will seek out the closest [[Airpad]], Airplane Plant, or [[Reef]] aircraft carrier to rearm. If they are given a move order after attacking, either by putting a move order into their command queue or by manually ordering them to move, they will first complete their move order before proceeding to a repair pad. If they are instead given a second attack order, they will first return to a repair pad to rearm before executing this attack.&lt;br /&gt;
&lt;br /&gt;
=== Bombing Strategy and Tactics ===&lt;br /&gt;
&lt;br /&gt;
====General tips:====&lt;br /&gt;
&lt;br /&gt;
*When selecting Ravens and Likhos, a line on the right of the selection panel will inform you about how much damage your total selection can perform in one run (Burst Damage). Use this to gauge whether your currently selected bomber wing can destroy the high value target of your choosing (A default strike commander, for example, takes 4 Ravens). &lt;br /&gt;
*Use move orders after bombing to make your bombers take the shortest way out of enemy anti-air coverage. Often it is safer to make a 90 degree turn and fly out to the side than to turn the full 180 degrees inside enemy anti-air cover.&lt;br /&gt;
*Raven bombs will pass through water surfaces, allowing you to bomb submerged units. Phoenix bomblets explode on the surface.&lt;br /&gt;
*Owls provide sonar coverage as well as radar, making them invaluable for spotting submerged units.&lt;br /&gt;
*Be careful bombing around EMP units such as [[Venom]]s or [[Faraday]]s! Stunned planes will slowly drift down to the ground, where they can be shot to pieces by any old unit that happens by.&lt;br /&gt;
*Using the 'Force fire' command (Default {{key press|F}}), and holding down the left mouse button allows you to draw a circle. Release to order your bombers to attack enemy units inside this circle in turn.&lt;br /&gt;
*Hold down {{key press|Ctrl}} while issuing the above command to tell your bombers to pick a unit inside the circle to bomb. This distributes your bombers between units. It is especially useful against [[Lotus]]es, [[Picket]]s, or light mobile units which all do not warrant multiple [[Raven]] bombs. Consider using this with [[Phoenix]]es to spread them over a larger mass of enemy units.&lt;br /&gt;
*Use the Area Attack command (Default {{key combo|Alt|A}}) to designate an area in which to bomb. When enemy units enter this area, they will be bombed by your bombers. When there are no enemy units to be found, your bombers will bomb random points of terrain in the area. Consider combining with [[Phoenix]]es to hunt down suspected cloaked units.&lt;br /&gt;
&lt;br /&gt;
==== Raven tips: ====&lt;br /&gt;
&lt;br /&gt;
[[Raven]]s are the workhorse of the Airplane Plant. They're the cheapest bombers, they deal a lot of damage, and have the most hit points for their cost. &lt;br /&gt;
*Sometimes it's worth it to channel your inner World War 2 British bomber command officer and sacrifice some of your Ravens to take out an important enemy target. With five ravens you can bomb a [[Razor]] anti air turret to pave the way for more bombers to follow them. Or you can strike at a [[Singularity Reactor]] deep within enemy territory. If five of your bombers make it through, you will cripple your enemy's economy and perhaps take out a large portion of their base. Or if your allies are facing a particularly deadly unit, like a [[Dante]], you could turn the tide in favour of your allies with a well-timed bomb run. &lt;br /&gt;
*If your enemy pushes out from under their AA cover, a quick wing of Ravens using the spread attack command (Default {{key combo|Ctrl|A}}) can quickly soften the enemy units up for a follow-up by ground forces, or take care of the units on their own if used in sufficient numbers.&lt;br /&gt;
&lt;br /&gt;
==== Phoenix tips: ====&lt;br /&gt;
&lt;br /&gt;
[[Phoenix]]es are more vulnerable than other bombers. They are also more dangerous to vulnerable units.&lt;br /&gt;
*While the low initial damage of the Phoenix is underwhelming, the 10-second burn can make quick work of lighter units like [[Dart]]s even when they dodge most initial damage.&lt;br /&gt;
*Burn damage will reset the countdown for units with regenerative abilities like [[Glaive]]s or [[Reaver]]s, as well as keep units with a cloak from disappearing from sight. &lt;br /&gt;
*Be careful when using Phoenixes around allied units, as the same properties that make them useful against enemy hordes make them a liability in a chaotic front line.&lt;br /&gt;
&lt;br /&gt;
==== Thunderbird tips: ====&lt;br /&gt;
&lt;br /&gt;
[[Thunderbird]]s do not deal damage themselves, but provide utility on the battlefield that can make the difference between a successful assault or a complete catastrophe.&lt;br /&gt;
* If you can spare the time to micro, it is often much more effective to manually give your Thunderbird move orders and to deploy its lightning attack (Default {{key press|D}}) when it is going to be most effective. &lt;br /&gt;
* Do not hesitate to inform your team that you're about to disarm the units they're fighting, so they can rush them just as you finish your attack run.&lt;br /&gt;
* Be careful not to fly over allied units on your attack run. There's not much point to disarming your enemies if your allies are also disarmed. Though sometimes it can be worth it just to buy your team some time to react.&lt;br /&gt;
&lt;br /&gt;
==== Likho tips: ==== &lt;br /&gt;
&lt;br /&gt;
The [[Likho]] is your heavy-duty end-game bomber. It can survive enemy fire that would destroy two [[Raven]]s, but costs as much as 6.5 of them. Depending on what you find yourself having to deal with, you may be better off with more Ravens!&lt;br /&gt;
&lt;br /&gt;
*The Likho is especially useful against units that like to clump together into balls, like units from the [[Shieldbot Factory]], [[Ravager]]s, and [[Blitz]]es.&lt;br /&gt;
*The Likho's large cost means that it's a prime target for reclamation if you do lose it. Try not to lose it over enemy territory! If possible, lose it as close to your own front lines as you can! Better still, do not lose it at all.&lt;br /&gt;
*The homing bomb of the Likho means it's much less likely to miss moving targets than the bombs the Raven drops. This also means it doesn't have to get so close to the enemy and can be more safely used against units with low range but high damage like [[Reaver]]s, [[Mace]]s, or [[Ogre]]s.&lt;br /&gt;
&lt;br /&gt;
=== Beating Airplanes ===&lt;br /&gt;
&lt;br /&gt;
Anti-air units or structures which deliver high  burst damage are generally more effective against Planes than those with sustained damage. The [[Picket]] is generally preferred over the [[Hacksaw]] due to its larger range and flexibility to engage ground targets. The range of the [[Chainsaw]] and [[Artemis]] makes them effective against any air threat, though they are more expensive. &lt;br /&gt;
&lt;br /&gt;
You'll generally need a few mobile anti-air units to shoot down bombers, although the [[Flail]], [[Crasher]], [[Vandal]] and [[Angler]]'s high burst damage is helpful here.&lt;br /&gt;
&lt;br /&gt;
The most important thing to keep in mind when playing against Planes is not to over-extend. Valuable units may be sniped by Ravens, and if you move a large raiding group or army beyond the range of your anti-air it will likely be disarmed by a Thunderbird and destroyed. Don't stick anything outside anti-air range unless you're prepared to lose it. The best defence against bombers is to have your own Swift planes, since they are fast enough to defend you anywhere on the map.&lt;br /&gt;
&lt;br /&gt;
If you are using Gunships against a player with Planes, don't move your anti-ground gunships away from anti-air protection unless you're prepared to lose them. Try to make the Airplane player engage you in a direct fight, since your air-to-air units are tougher than theirs.&lt;br /&gt;
&lt;br /&gt;
If you are playing the Airplane mirror match-up, try to have more Swifts than they do, while still making things happen in the ground war using the cheaper bombers if you can (Raven, Phoenix and Thunderbird). Hold your Swift boost in reserve as long as possible to counter enemy bombing runs or to escape from a losing fighter battle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Navbox buildings}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7036</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7036"/>
		<updated>2020-10-21T18:25:49Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Fixed mistakes, expanded bits, specified version of mod file.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  &lt;br /&gt;
&lt;br /&gt;
You can certainly import any old texture and work with it, but if you are importing textures already used by Spring you should know that they are somewhat unusual.&lt;br /&gt;
&lt;br /&gt;
Spring has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Green channel and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
Nowadays Spring can read .dae (Collada) files directly via the use of Assimp (Asset Importer).  This means the export process is reasonably simple. &lt;br /&gt;
&lt;br /&gt;
Either clean your scene of everything you do not want to be exported, or select only the things you want exported.  Go to the File-&amp;amp;gt;Export menu and select Collada (.dae) format.  A file browser will open with various export settings on the right hand side.&lt;br /&gt;
&lt;br /&gt;
You should pick Selection Only from the Main tab of export options if you want to limit it to selection.&lt;br /&gt;
&lt;br /&gt;
Make sure that the orientation settings are correct.  You want to tell the exporter what axes you've been modelling with, not the axes you're looking for.  These are the default options and should usually be right, Spring/Assimp will then adjust them for use in engine, but if after checking things in Spring your object is oriented wrongly, you can try adjusting these and exporting again.  If all else fails, you can parent the root object(s) to an empty placed at the origin and rotate that. [[File:collada_default_export.png]]&lt;br /&gt;
&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
Although Collada (.dae) files do support exporting animation, you should not do this as Spring cannot read the animation data.  Instead, animations in Zero-K are handled by a lua animation script known as LUS.&lt;br /&gt;
&lt;br /&gt;
Although you cannot export the animations to Collada, you can still do your animations in Blender and use the Blender2Lus export script linked earlier to export a starting animation script.  It has several limitations, such as only exporting the active action from each object in the scene, but running it several times and tweaking and combining the generated scripts can reduce the amount of work in generating animation scripts immensely.  Further use of this script is, for the moment, outside the scope of this tutorial (because I haven't done it myself yet - feel free to replace this with detailed explanation if you have, though!)&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
Although Spring can read .dae files and the contained UV map, it does not support any sort of material or texture import, so you have to specify these manually.  Since at this point you have already set Blender up with a reasonable approximation of the texture process it should not be especially difficult.&lt;br /&gt;
&lt;br /&gt;
You will need to provide a .dae.lua file with the same name as your model file, in the same directory, to tell Spring which texture files and associated data to use with the model.&lt;br /&gt;
&lt;br /&gt;
For example, if your model export is snazzyUnit.dae and it is present under the /objects3d folder of your testing mod, you should make a snazzyUnit.dae.lua file and place that at /objects3d/snazzyUnit.dae.lua .&lt;br /&gt;
&lt;br /&gt;
The documentation for these metadata files is [https://springrts.com/wiki/3DModels:AssimpMetadata here], but they are reasonably simple and a minimal example file is provided below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
	tex1 = &amp;quot;core_color.dds&amp;quot;,&lt;br /&gt;
	tex2 = &amp;quot;core_other.dds&amp;quot;,&lt;br /&gt;
	invertteamcolor = false&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Obviously if you are not using the atlas textures you will need to replace those names with the actual texture files you intend to use.  There are several other things that may need to be in this file, but as these differ per-unit you will need to decide what, if anything, to provide.  You should probably also decide on a radius to set - leaving it out autogenerates a large radius covering the entire model, but for many reasons it's not always appropriate.  Examine similar units in game (ctrl-alt-B shows collision bounds, radius is the grey sphere) and match them if necessary.&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
To get Zero-K to see your files and locally test your units (new or otherwise) you can use a mod, or download all the source and point your original version at it.  I will use a mod.&lt;br /&gt;
&lt;br /&gt;
This is selectable in local skirmish mode (and theoretically you can distribute them to test in multiplayer) which allows you to check everything works in the engine without requiring any changes to the official repositories or a local development copy of the game - all you need is a working copy of Zero-K.  You should eventually check it works with a properly set up dev copy (and that copy can be used for many changes, if necessary) but for now a mod is simpler.&lt;br /&gt;
&lt;br /&gt;
=== Making the mod ===&lt;br /&gt;
Inside the Zero-K folder there is a games subfolder.  Inside that are numerous things, but if you make a new subfolder with a name ending in .sdd it will be read by the engine on startup.  A base mod is available to download [File:BaseMod.sdd.zip here] to build from if you would like an example.  More details on mod creation can be found here: [[Mod Creation]]&lt;br /&gt;
&lt;br /&gt;
Create a mod and fill out the modinfo.lua, making sure to change the name and description so you can tell it apart when you are selecting it.  If the depends tag is listed as [[rapid:/zk:stable]] you will have to manually change it to the latest ZK version in this format:&lt;br /&gt;
&amp;lt;pre&amp;gt;depend = {&lt;br /&gt;
		[[Zero-K v1.8.10.0]]&lt;br /&gt;
	},&amp;lt;/pre&amp;gt;&lt;br /&gt;
Update the version number appropriately.&lt;br /&gt;
&lt;br /&gt;
=== File locations ===&lt;br /&gt;
Like many mods, the file structure downwards from the modname.sdd folder should exactly match the Zero-K internal virtual file system, and if there are any files in your mod that match names with base files, Zero-K will use your mod's file instead of the base file.&lt;br /&gt;
&lt;br /&gt;
This allows you to selectively replace any files with whatever changed version you want, which is ideal for our purposes of testing a mod.  Any ''new'' files will also be loaded, allowing you to test entirely new units - although you may have to modify the buildoptions list of an existing factory or constructor to allow them to build your new unit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;AN IMPORTANT NOTE:&lt;br /&gt;
You should keep all of filenames and folder names lower case, as the virtual file system lowercases everything.  Double check your filenames, it needs to match exactly if you are replacing things.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing your mod ===&lt;br /&gt;
Once you have filled out your folders and files, probably (but not exclusively) using /objects3d , /units and /unittextures , you can progress to actually testing it works in-engine.&lt;br /&gt;
&lt;br /&gt;
Load up Zero-K and go to singleplayer, then Skirmish.  The map and opponents do not especially matter, though if you are testing a lot you probably want to use an inactive AI (check through main lobby options for additional AI types if it's not there by default).&lt;br /&gt;
&lt;br /&gt;
Go into Adv Options, and pick 'Select Mod'.  If the folder and modinfo are correct you should see your mod on the list.  If you do not, download the base mod, unzip it to the appropriate place and check if that shows up - if it does, the problem is with your mod.  If it does not, then something is probably in the wrong place.&lt;br /&gt;
&lt;br /&gt;
Once you've selected your mod you should start the skirmish and attempt to test whatever you've actually changed.  At one point while doing this, Zero-K would not load because the interpreter for the mod's unitdef files was more strict than the main game's, so you may wish to follow the format used in the base mod (it overwrites lotus turrets) more exactly if you have this problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
Do not expect everything to be perfect.  This is a very complicated process and something is probably broken somewhere - either way, check everything, and get used to the idea that you may have to edit, re-export, then restart the game a lot to retry with changes quite often.  Although unit definitions and such may be reloaded without quitting the game (TODO: what is the command to do this?  How reliable is it?) you should eventually restart Zero-K to do a round of final testing just to ensure that everything loads correctly from startup.&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal takes to fade out of existence&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of the decal's X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of the decal's Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;br /&gt;
Unit pictures in the buildmenu are generated by an automated script.  This script lives as a Lua gadget within the Zero-K base content, so if you have your mod working you can load that up and generate a buildpic.&lt;br /&gt;
&lt;br /&gt;
First, press F8 to show the debug console, then turn on cheats with /cheat (or !cheats in multiplayer, which will require host permissions.)&lt;br /&gt;
&lt;br /&gt;
Then run &amp;lt;pre&amp;gt;/luarules buildicon {unitname}&amp;lt;/pre&amp;gt;. You can run it with no unit name and instead buildicons if you want to generate buildicons for every unit in the game.  It should output the icons to your Zero-K folder under the /buildicons folder.  You will then have to move it to the /unitpics folder of your mod, name it appropriately, and check it works.&lt;br /&gt;
&lt;br /&gt;
=== Developer mode test with full file system ===&lt;br /&gt;
&lt;br /&gt;
Now is the time to test against the full developer mode run - see [[Developing]] for information on how to set that up.  Copy your files to an up to date copy of the latest source files from GitHub and check if they work there.  &lt;br /&gt;
&lt;br /&gt;
Once they do you should be ready to make a pull request.  If you forked from the development version as the linked instructions suggest, you should be able to use your fork to do this.&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7032</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7032"/>
		<updated>2020-10-16T08:24:25Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: I was wrong, red does not need to be inverted.  Oops.  Will upload new version of shader soon.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  &lt;br /&gt;
&lt;br /&gt;
You can certainly import any old texture and work with it, but if you are importing textures already used by Spring you should know that they are somewhat unusual.&lt;br /&gt;
&lt;br /&gt;
Spring has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Green channel and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
Nowadays Spring can read .dae (Collada) files directly via the use of Assimp (Asset Importer).  This means the export process is reasonably simple. &lt;br /&gt;
&lt;br /&gt;
Either clean your scene of everything you do not want to be exported, or select only the things you want exported.  Go to the File-&amp;amp;gt;Export menu and select Collada (.dae) format.  A file browser will open with various export settings on the right hand side.&lt;br /&gt;
&lt;br /&gt;
You should pick Selection Only from the Main tab of export options if you want to limit it to selection.&lt;br /&gt;
&lt;br /&gt;
Make sure that the orientation settings are correct.  You want to tell the exporter what axes you've been modelling with, not the axes you're looking for.  These are the default options and should usually be right, Spring/Assimp will then adjust them for use in engine, but if after checking things in Spring your object is oriented wrongly, you can try adjusting these and exporting again.  If all else fails, you can parent the root object(s) to an empty placed at the origin and rotate that. [[File:collada_default_export.png]]&lt;br /&gt;
&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
Although Collada (.dae) files do support exporting animation, you should not do this as Spring cannot read the animation data.  Instead, animations in Zero-K are handled by a lua animation script known as LUS.&lt;br /&gt;
&lt;br /&gt;
Although you cannot export the animations to Collada, you can still do your animations in Blender and use the Blender2Lus export script linked earlier to export a starting animation script.  It has several limitations, such as only exporting the active action from each object in the scene, but running it several times and tweaking and combining the generated scripts can reduce the amount of work in generating animation scripts immensely.  Further use of this script is, for the moment, outside the scope of this tutorial (because I haven't done it myself yet - feel free to replace this with detailed explanation if you have, though!)&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
Although Spring can read .dae files and the contained UV map, it does not support any sort of material or texture import, so you have to specify these manually.  Since at this point you have already set Blender up with a reasonable approximation of the texture process it should not be especially difficult.&lt;br /&gt;
&lt;br /&gt;
You will need to provide a .dae.lua file with the same name as your model file, in the same directory, to tell Spring which texture files and associated data to use with the model.&lt;br /&gt;
&lt;br /&gt;
For example, if your model export is snazzyUnit.dae and it is present under the /objects3d folder of your testing mod, you should make a snazzyUnit.dae.lua file and place that at /objects3d/snazzyUnit.dae.lua .&lt;br /&gt;
&lt;br /&gt;
The documentation for these metadata files is [https://springrts.com/wiki/3DModels:AssimpMetadata here], but they are reasonably simple and a minimal example file is provided below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
	tex1 = &amp;quot;core_color.dds&amp;quot;,&lt;br /&gt;
	tex2 = &amp;quot;core_other.dds&amp;quot;,&lt;br /&gt;
	invertteamcolor = false&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Obviously if you are not using the atlas textures you will need to replace those names with the actual texture files you intend to use.  There are several other things that may need to be in this file, but as these differ per-unit you will need to decide what, if anything, to provide.&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
To get Zero-K to see your files and locally test your units (new or otherwise) you should use a mod.&lt;br /&gt;
&lt;br /&gt;
This is selectable in local skirmish mode (and theoretically you can distribute them to test in multiplayer) which allows you to check everything works in the engine without requiring any changes to the official repositories or even building a local development copy of the game - all you need is a working copy of Zero-K.&lt;br /&gt;
&lt;br /&gt;
=== Making the mod ===&lt;br /&gt;
Inside the Zero-K folder there is a games subfolder.  Inside that are numerous things, but if you make a new subfolder with a name ending in .sdd it will be read by the engine on startup.  A base mod is available to download [File:BaseMod.sdd.zip here] to build from if you would like an example.  More details on mod creation can be found here: [[Mod Creation]]&lt;br /&gt;
&lt;br /&gt;
Create a mod and fill out the modinfo.lua, making sure to change the name and description so you can tell it apart when you are selecting it.&lt;br /&gt;
&lt;br /&gt;
=== File locations ===&lt;br /&gt;
Like many mods, the file structure downwards from the modname.sdd folder should exactly match the Zero-K internal virtual file system, and if there are any files in your mod that match names with base files, Zero-K will use your mod's file instead of the base file.&lt;br /&gt;
&lt;br /&gt;
This allows you to selectively replace any files with whatever changed version you want, which is ideal for our purposes of testing a mod.  Any ''new'' files will also be loaded, allowing you to test entirely new units - although you may have to modify the buildoptions list of an existing factory or constructor to allow them to build your new unit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;AN IMPORTANT NOTE:&lt;br /&gt;
You should keep all of filenames and folder names lower case, as the virtual file system lowercases everything.  Double check your filenames, it needs to match exactly if you are replacing things.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing your mod ===&lt;br /&gt;
Once you have filled out your folders and files, probably (but not exclusively) using /objects3d , /units and /unittextures , you can progress to actually testing it works in-engine.&lt;br /&gt;
&lt;br /&gt;
Load up Zero-K and go to singleplayer, then Skirmish.  The map and opponents do not especially matter, though if you are testing a lot you probably want to use an inactive AI (check through main lobby options for additional AI types if it's not there by default).&lt;br /&gt;
&lt;br /&gt;
Go into Adv Options, and pick 'Select Mod'.  If the folder and modinfo are correct you should see your mod on the list.  If you do not, download the base mod, unzip it to the appropriate place and check if that shows up - if it does, the problem is with your mod.  If it does not, then something is probably in the wrong place.&lt;br /&gt;
&lt;br /&gt;
Once you've selected your mod you should start the skirmish and attempt to test whatever you've actually changed.  At one point while doing this, Zero-K would not load because the interpreter for the mod's unitdef files was more strict than the main game's, so you may wish to follow the format used in the base mod (it overwrites lotus turrets) more exactly if you have this problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
Do not expect everything to be perfect.  This is a very complicated process and something is probably broken somewhere - either way, check everything, and get used to the idea that you may have to edit, re-export, then restart the game a lot to retry with changes quite often.  Although unit definitions and such may be reloaded without quitting the game (TODO: what is the command to do this?  How reliable is it?) you should eventually restart Zero-K to do a round of final testing just to ensure that everything loads correctly from startup.&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal takes to fade out of existence&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of the decal's X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of the decal's Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;br /&gt;
Unit pictures in the buildmenu are generated by an automated script.  This script lives as a Lua gadget within the Zero-K base content, so if you have your mod working you can load that up and generate a buildpic.&lt;br /&gt;
&lt;br /&gt;
First, press F8 to show the debug console, then turn on cheats with /cheat (or !cheats in multiplayer, which will require host permissions.)&lt;br /&gt;
&lt;br /&gt;
Then run &amp;lt;pre&amp;gt;/luarules buildicon {unitname}&amp;lt;/pre&amp;gt;. You can run it with no unit name and instead buildicons if you want to generate buildicons for every unit in the game.  It should output the icons to your Zero-K folder under the /buildicons folder.  You will then have to move it to the /unitpics folder of your mod, name it appropriately, and check it works.&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7026</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7026"/>
		<updated>2020-10-15T11:29:58Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Unit pic and other bits.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  &lt;br /&gt;
&lt;br /&gt;
You can certainly import any old texture and work with it, but if you are importing textures already used by Spring you should know that they are somewhat unusual.&lt;br /&gt;
&lt;br /&gt;
Spring has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Red and Green channels and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
Nowadays Spring can read .dae (Collada) files directly via the use of Assimp (Asset Importer).  This means the export process is reasonably simple. &lt;br /&gt;
&lt;br /&gt;
Either clean your scene of everything you do not want to be exported, or select only the things you want exported.  Go to the File-&amp;amp;gt;Export menu and select Collada (.dae) format.  A file browser will open with various export settings on the right hand side.&lt;br /&gt;
&lt;br /&gt;
You should pick Selection Only from the Main tab of export options if you want to limit it to selection.&lt;br /&gt;
&lt;br /&gt;
Make sure that the orientation settings are correct.  You want to tell the exporter what axes you've been modelling with, not the axes you're looking for.  These are the default options and should usually be right, Spring/Assimp will then adjust them for use in engine, but if after checking things in Spring your object is oriented wrongly, you can try adjusting these and exporting again.  If all else fails, you can parent the root object(s) to an empty placed at the origin and rotate that. [[File:collada_default_export.png]]&lt;br /&gt;
&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
Although Collada (.dae) files do support exporting animation, you should not do this as Spring cannot read the animation data.  Instead, animations in Zero-K are handled by a lua animation script known as LUS.&lt;br /&gt;
&lt;br /&gt;
Although you cannot export the animations to Collada, you can still do your animations in Blender and use the Blender2Lus export script linked earlier to export a starting animation script.  It has several limitations, such as only exporting the active action from each object in the scene, but running it several times and tweaking and combining the generated scripts can reduce the amount of work in generating animation scripts immensely.  Further use of this script is, for the moment, outside the scope of this tutorial (because I haven't done it myself yet - feel free to replace this with detailed explanation if you have, though!)&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
Although Spring can read .dae files and the contained UV map, it does not support any sort of material or texture import, so you have to specify these manually.  Since at this point you have already set Blender up with a reasonable approximation of the texture process it should not be especially difficult.&lt;br /&gt;
&lt;br /&gt;
You will need to provide a .dae.lua file with the same name as your model file, in the same directory, to tell Spring which texture files and associated data to use with the model.&lt;br /&gt;
&lt;br /&gt;
For example, if your model export is snazzyUnit.dae and it is present under the /objects3d folder of your testing mod, you should make a snazzyUnit.dae.lua file and place that at /objects3d/snazzyUnit.dae.lua .&lt;br /&gt;
&lt;br /&gt;
The documentation for these metadata files is [https://springrts.com/wiki/3DModels:AssimpMetadata here], but they are reasonably simple and a minimal example file is provided below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
	tex1 = &amp;quot;core_color.dds&amp;quot;,&lt;br /&gt;
	tex2 = &amp;quot;core_other.dds&amp;quot;,&lt;br /&gt;
	invertteamcolor = false&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Obviously if you are not using the atlas textures you will need to replace those names with the actual texture files you intend to use.  There are several other things that may need to be in this file, but as these differ per-unit you will need to decide what, if anything, to provide.&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
To get Zero-K to see your files and locally test your units (new or otherwise) you should use a mod.&lt;br /&gt;
&lt;br /&gt;
This is selectable in local skirmish mode (and theoretically you can distribute them to test in multiplayer) which allows you to check everything works in the engine without requiring any changes to the official repositories or even building a local development copy of the game - all you need is a working copy of Zero-K.&lt;br /&gt;
&lt;br /&gt;
=== Making the mod ===&lt;br /&gt;
Inside the Zero-K folder there is a games subfolder.  Inside that are numerous things, but if you make a new subfolder with a name ending in .sdd it will be read by the engine on startup.  A base mod is available to download [File:BaseMod.sdd.zip here] to build from if you would like an example.  More details on mod creation can be found here: [[Mod Creation]]&lt;br /&gt;
&lt;br /&gt;
Create a mod and fill out the modinfo.lua, making sure to change the name and description so you can tell it apart when you are selecting it.&lt;br /&gt;
&lt;br /&gt;
=== File locations ===&lt;br /&gt;
Like many mods, the file structure downwards from the modname.sdd folder should exactly match the Zero-K internal virtual file system, and if there are any files in your mod that match names with base files, Zero-K will use your mod's file instead of the base file.&lt;br /&gt;
&lt;br /&gt;
This allows you to selectively replace any files with whatever changed version you want, which is ideal for our purposes of testing a mod.  Any ''new'' files will also be loaded, allowing you to test entirely new units - although you may have to modify the buildoptions list of an existing factory or constructor to allow them to build your new unit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;AN IMPORTANT NOTE:&lt;br /&gt;
You should keep all of filenames and folder names lower case, as the virtual file system lowercases everything.  Double check your filenames, it needs to match exactly if you are replacing things.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing your mod ===&lt;br /&gt;
Once you have filled out your folders and files, probably (but not exclusively) using /objects3d , /units and /unittextures , you can progress to actually testing it works in-engine.&lt;br /&gt;
&lt;br /&gt;
Load up Zero-K and go to singleplayer, then Skirmish.  The map and opponents do not especially matter, though if you are testing a lot you probably want to use an inactive AI (check through main lobby options for additional AI types if it's not there by default).&lt;br /&gt;
&lt;br /&gt;
Go into Adv Options, and pick 'Select Mod'.  If the folder and modinfo are correct you should see your mod on the list.  If you do not, download the base mod, unzip it to the appropriate place and check if that shows up - if it does, the problem is with your mod.  If it does not, then something is probably in the wrong place.&lt;br /&gt;
&lt;br /&gt;
Once you've selected your mod you should start the skirmish and attempt to test whatever you've actually changed.  At one point while doing this, Zero-K would not load because the interpreter for the mod's unitdef files was more strict than the main game's, so you may wish to follow the format used in the base mod (it overwrites lotus turrets) more exactly if you have this problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
Do not expect everything to be perfect.  This is a very complicated process and something is probably broken somewhere - either way, check everything, and get used to the idea that you may have to edit, re-export, then restart the game a lot to retry with changes quite often.  Although unit definitions and such may be reloaded without quitting the game (TODO: what is the command to do this?  How reliable is it?) you should eventually restart Zero-K to do a round of final testing just to ensure that everything loads correctly from startup.&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;br /&gt;
Unit pictures in the buildmenu are generated by an automated script.  This script lives as a Lua gadget within the Zero-K base content, so if you have your mod working you can load that up and generate a buildpic.&lt;br /&gt;
&lt;br /&gt;
First, press F8 to show the debug console, then turn on cheats with /cheat (or !cheats in multiplayer, which will require host permissions.)&lt;br /&gt;
&lt;br /&gt;
Then run &amp;lt;pre&amp;gt;/luarules buildicon {unitname}&amp;lt;/pre&amp;gt;. You can run it with no unit name and instead buildicons if you want to generate buildicons for every unit in the game.  It should output the icons to your Zero-K folder under the /buildicons folder.  You will then have to move it to the /unitpics folder of your mod, name it appropriately, and check it works.&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7025</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7025"/>
		<updated>2020-10-15T11:19:05Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* Set up Zero-K mod that contains and uses your files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  &lt;br /&gt;
&lt;br /&gt;
You can certainly import any old texture and work with it, but if you are importing textures already used by Spring you should know that they are somewhat unusual.&lt;br /&gt;
&lt;br /&gt;
Spring has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Red and Green channels and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
Nowadays Spring can read .dae (Collada) files directly via the use of Assimp (Asset Importer).  This means the export process is reasonably simple. &lt;br /&gt;
&lt;br /&gt;
Either clean your scene of everything you do not want to be exported, or select only the things you want exported.  Go to the File-&amp;amp;gt;Export menu and select Collada (.dae) format.  A file browser will open with various export settings on the right hand side.&lt;br /&gt;
&lt;br /&gt;
You should pick Selection Only from the Main tab of export options if you want to limit it to selection.&lt;br /&gt;
&lt;br /&gt;
Make sure that the orientation settings are correct.  You want to tell the exporter what axes you've been modelling with, not the axes you're looking for.  These are the default options and should usually be right, Spring/Assimp will then adjust them for use in engine, but if after checking things in Spring your object is oriented wrongly, you can try adjusting these and exporting again.  If all else fails, you can parent the root object(s) to an empty placed at the origin and rotate that. [[File:collada_default_export.png]]&lt;br /&gt;
&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
Although Collada (.dae) files do support exporting animation, you should not do this as Spring cannot read the animation data.  Instead, animations in Zero-K are handled by a lua animation script known as LUS.&lt;br /&gt;
&lt;br /&gt;
Although you cannot export the animations to Collada, you can still do your animations in Blender and use the Blender2Lus export script linked earlier to export a starting animation script.  It has several limitations, such as only exporting the active action from each object in the scene, but running it several times and tweaking and combining the generated scripts can reduce the amount of work in generating animation scripts immensely.  Further use of this script is, for the moment, outside the scope of this tutorial (because I haven't done it myself yet - feel free to replace this with detailed explanation if you have, though!)&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
Although Spring can read .dae files and the contained UV map, it does not support any sort of material or texture import, so you have to specify these manually.  Since at this point you have already set Blender up with a reasonable approximation of the texture process it should not be especially difficult.&lt;br /&gt;
&lt;br /&gt;
You will need to provide a .dae.lua file with the same name as your model file, in the same directory, to tell Spring which texture files and associated data to use with the model.&lt;br /&gt;
&lt;br /&gt;
For example, if your model export is snazzyUnit.dae and it is present under the /objects3d folder of your testing mod, you should make a snazzyUnit.dae.lua file and place that at /objects3d/snazzyUnit.dae.lua .&lt;br /&gt;
&lt;br /&gt;
The documentation for these metadata files is [https://springrts.com/wiki/3DModels:AssimpMetadata here], but they are reasonably simple and a minimal example file is provided below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
	tex1 = &amp;quot;core_color.dds&amp;quot;,&lt;br /&gt;
	tex2 = &amp;quot;core_other.dds&amp;quot;,&lt;br /&gt;
	invertteamcolor = false&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Obviously if you are not using the atlas textures you will need to replace those names with the actual texture files you intend to use.  There are several other things that may need to be in this file, but as these differ per-unit you will need to decide what, if anything, to provide.&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
To get Zero-K to see your files and locally test your units (new or otherwise) you should use a mod.&lt;br /&gt;
&lt;br /&gt;
This is selectable in local skirmish mode (and theoretically you can distribute them to test in multiplayer) which allows you to check everything works in the engine without requiring any changes to the official repositories or even building a local development copy of the game - all you need is a working copy of Zero-K.&lt;br /&gt;
&lt;br /&gt;
=== Making the mod ===&lt;br /&gt;
Inside the Zero-K folder there is a games subfolder.  Inside that are numerous things, but if you make a new subfolder with a name ending in .sdd it will be read by the engine on startup.  A base mod is available to download [File:BaseMod.sdd.zip here] to build from if you would like an example.  More details on mod creation can be found here: [[Mod Creation]]&lt;br /&gt;
&lt;br /&gt;
Create a mod and fill out the modinfo.lua, making sure to change the name and description so you can tell it apart when you are selecting it.&lt;br /&gt;
&lt;br /&gt;
=== File locations ===&lt;br /&gt;
Like many mods, the file structure downwards from the modname.sdd folder should exactly match the Zero-K internal virtual file system, and if there are any files in your mod that match names with base files, Zero-K will use your mod's file instead of the base file.&lt;br /&gt;
&lt;br /&gt;
This allows you to selectively replace any files with whatever changed version you want, which is ideal for our purposes of testing a mod.  Any ''new'' files will also be loaded, allowing you to test entirely new units - although you may have to modify the buildoptions list of an existing factory or constructor to allow them to build your new unit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;AN IMPORTANT NOTE:&lt;br /&gt;
You should keep all of filenames and folder names lower case, as the virtual file system lowercases everything.  Double check your filenames, it needs to match exactly if you are replacing things.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing your mod ===&lt;br /&gt;
Once you have filled out your folders and files, probably (but not exclusively) using /objects3d , /units and /unittextures , you can progress to actually testing it works in-engine.&lt;br /&gt;
&lt;br /&gt;
Load up Zero-K and go to singleplayer, then Skirmish.  The map and opponents do not especially matter, though if you are testing a lot you probably want to use an inactive AI (check through main lobby options for additional AI types if it's not there by default).&lt;br /&gt;
&lt;br /&gt;
Go into Adv Options, and pick 'Select Mod'.  If the folder and modinfo are correct you should see your mod on the list.  If you do not, download the base mod, unzip it to the appropriate place and check if that shows up - if it does, the problem is with your mod.  If it does not, then something is probably in the wrong place.&lt;br /&gt;
&lt;br /&gt;
Once you've selected your mod you should start the skirmish and attempt to test whatever you've actually changed.  At one point while doing this, Zero-K would not load because the interpreter for the mod's unitdef files was more strict than the main game's, so you may wish to follow the format used in the base mod (it overwrites lotus turrets) more exactly if you have this problem.&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7024</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7024"/>
		<updated>2020-10-15T10:58:55Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* Set up texture associations and .dae.lua metadata */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  &lt;br /&gt;
&lt;br /&gt;
You can certainly import any old texture and work with it, but if you are importing textures already used by Spring you should know that they are somewhat unusual.&lt;br /&gt;
&lt;br /&gt;
Spring has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Red and Green channels and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
Nowadays Spring can read .dae (Collada) files directly via the use of Assimp (Asset Importer).  This means the export process is reasonably simple. &lt;br /&gt;
&lt;br /&gt;
Either clean your scene of everything you do not want to be exported, or select only the things you want exported.  Go to the File-&amp;amp;gt;Export menu and select Collada (.dae) format.  A file browser will open with various export settings on the right hand side.&lt;br /&gt;
&lt;br /&gt;
You should pick Selection Only from the Main tab of export options if you want to limit it to selection.&lt;br /&gt;
&lt;br /&gt;
Make sure that the orientation settings are correct.  You want to tell the exporter what axes you've been modelling with, not the axes you're looking for.  These are the default options and should usually be right, Spring/Assimp will then adjust them for use in engine, but if after checking things in Spring your object is oriented wrongly, you can try adjusting these and exporting again.  If all else fails, you can parent the root object(s) to an empty placed at the origin and rotate that. [[File:collada_default_export.png]]&lt;br /&gt;
&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
Although Collada (.dae) files do support exporting animation, you should not do this as Spring cannot read the animation data.  Instead, animations in Zero-K are handled by a lua animation script known as LUS.&lt;br /&gt;
&lt;br /&gt;
Although you cannot export the animations to Collada, you can still do your animations in Blender and use the Blender2Lus export script linked earlier to export a starting animation script.  It has several limitations, such as only exporting the active action from each object in the scene, but running it several times and tweaking and combining the generated scripts can reduce the amount of work in generating animation scripts immensely.  Further use of this script is, for the moment, outside the scope of this tutorial (because I haven't done it myself yet - feel free to replace this with detailed explanation if you have, though!)&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
Although Spring can read .dae files and the contained UV map, it does not support any sort of material or texture import, so you have to specify these manually.  Since at this point you have already set Blender up with a reasonable approximation of the texture process it should not be especially difficult.&lt;br /&gt;
&lt;br /&gt;
You will need to provide a .dae.lua file with the same name as your model file, in the same directory, to tell Spring which texture files and associated data to use with the model.&lt;br /&gt;
&lt;br /&gt;
For example, if your model export is snazzyUnit.dae and it is present under the /objects3d folder of your testing mod, you should make a snazzyUnit.dae.lua file and place that at /objects3d/snazzyUnit.dae.lua .&lt;br /&gt;
&lt;br /&gt;
The documentation for these metadata files is [https://springrts.com/wiki/3DModels:AssimpMetadata here], but they are reasonably simple and a minimal example file is provided below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
	tex1 = &amp;quot;core_color.dds&amp;quot;,&lt;br /&gt;
	tex2 = &amp;quot;core_other.dds&amp;quot;,&lt;br /&gt;
	invertteamcolor = false&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Obviously if you are not using the atlas textures you will need to replace those names with the actual texture files you intend to use.  There are several other things that may need to be in this file, but as these differ per-unit you will need to decide what, if anything, to provide.&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7023</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7023"/>
		<updated>2020-10-15T10:49:59Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* Export the model to .dae format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  &lt;br /&gt;
&lt;br /&gt;
You can certainly import any old texture and work with it, but if you are importing textures already used by Spring you should know that they are somewhat unusual.&lt;br /&gt;
&lt;br /&gt;
Spring has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Red and Green channels and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
Nowadays Spring can read .dae (Collada) files directly via the use of Assimp (Asset Importer).  This means the export process is reasonably simple. &lt;br /&gt;
&lt;br /&gt;
Either clean your scene of everything you do not want to be exported, or select only the things you want exported.  Go to the File-&amp;amp;gt;Export menu and select Collada (.dae) format.  A file browser will open with various export settings on the right hand side.&lt;br /&gt;
&lt;br /&gt;
You should pick Selection Only from the Main tab of export options if you want to limit it to selection.&lt;br /&gt;
&lt;br /&gt;
Make sure that the orientation settings are correct.  You want to tell the exporter what axes you've been modelling with, not the axes you're looking for.  These are the default options and should usually be right, Spring/Assimp will then adjust them for use in engine, but if after checking things in Spring your object is oriented wrongly, you can try adjusting these and exporting again.  If all else fails, you can parent the root object(s) to an empty placed at the origin and rotate that. [[File:collada_default_export.png]]&lt;br /&gt;
&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
Although Collada (.dae) files do support exporting animation, you should not do this as Spring cannot read the animation data.  Instead, animations in Zero-K are handled by a lua animation script known as LUS.&lt;br /&gt;
&lt;br /&gt;
Although you cannot export the animations to Collada, you can still do your animations in Blender and use the Blender2Lus export script linked earlier to export a starting animation script.  It has several limitations, such as only exporting the active action from each object in the scene, but running it several times and tweaking and combining the generated scripts can reduce the amount of work in generating animation scripts immensely.  Further use of this script is, for the moment, outside the scope of this tutorial (because I haven't done it myself yet - feel free to replace this with detailed explanation if you have, though!)&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7022</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7022"/>
		<updated>2020-10-15T10:47:54Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* Export the model to .dae format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  &lt;br /&gt;
&lt;br /&gt;
You can certainly import any old texture and work with it, but if you are importing textures already used by Spring you should know that they are somewhat unusual.&lt;br /&gt;
&lt;br /&gt;
Spring has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Red and Green channels and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
Nowadays Spring can read .dae (Collada) files directly via the use of Assimp (Asset Importer).  This means the export process is reasonably simple. &lt;br /&gt;
&lt;br /&gt;
Either clean your scene of everything you do not want to be exported, or select only the things you want exported.  Go to the File-&amp;amp;gt;Export menu and select Collada (.dae) format.  A file browser will open with various export settings on the right hand side.&lt;br /&gt;
&lt;br /&gt;
You should pick Selection Only from the Main tab of export options if you want to limit it to selection.&lt;br /&gt;
&lt;br /&gt;
Make sure that the orientation settings are correct.  These are the default options and should usually be right, but if after checking things in Spring your object is oriented wrongly, you can try adjusting these (or just rotate the model appropriately). [[File:collada_default_export.png]]&lt;br /&gt;
&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
Although Collada (.dae) files do support exporting animation, you should not do this as Spring cannot read the animation data.  Instead, animations in Zero-K are handled by a lua animation script known as LUS.&lt;br /&gt;
&lt;br /&gt;
Although you cannot export the animations to Collada, you can still do your animations in Blender and use the Blender2Lus export script linked earlier to export a starting animation script.  It has several limitations, such as only exporting the active action from each object in the scene, but running it several times and tweaking and combining the generated scripts can reduce the amount of work in generating animation scripts immensely.  Further use of this script is, for the moment, outside the scope of this tutorial (because I haven't done it myself yet - feel free to replace this with detailed explanation if you have, though!)&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=File:Collada_default_export.png&amp;diff=7021</id>
		<title>File:Collada default export.png</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=File:Collada_default_export.png&amp;diff=7021"/>
		<updated>2020-10-15T10:34:58Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Default orientation settings for Blender's collada exporter.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Default orientation settings for Blender's collada exporter.&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7020</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7020"/>
		<updated>2020-10-14T12:13:15Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* Importing textures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  &lt;br /&gt;
&lt;br /&gt;
You can certainly import any old texture and work with it, but if you are importing textures already used by Spring you should know that they are somewhat unusual.&lt;br /&gt;
&lt;br /&gt;
Spring has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Red and Green channels and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7019</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7019"/>
		<updated>2020-10-14T12:12:00Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Modelling and texturing.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  However, spring uses textures somewhat uniquely and has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
There are not many special considerations when modelling for Zero-K, and a general explanation of modelling and blender is too detailed to go here.  However, you could consult tutorials such as [https://www.youtube.com/watch?v=7MRonzqYJgw&amp;amp;list=PLn3ukorJv4vs_eSJUQPxBRaDS8PrVmIri Grant Abbitt's beginner series] or [https://www.youtube.com/watch?v=1jHUY3qoBu8 Imphenzia's introduction and low poly modelling] tutorial.&lt;br /&gt;
&lt;br /&gt;
Generally, you should attempt to keep the number of triangles used in a model as low as is reasonable.  That number varies depending on how frequent the unit is planned to be - a commander or other functionally unique unit would be fine with up to 30,000 triangles, but for a very spammable unit such as a flea this would be extremely excessive, as you can build a vast number of fleas.  Something in the region of 500-1000 would be more appropriate, with less being ideal as long as the model still looks good.&lt;br /&gt;
&lt;br /&gt;
The size of the model (or part of model) and how visible it is also has an impact on how many polygons you should be using.  A large model covering a lot of screen space should use more polygons and texels than a small one or a part of the model that people rarely or never see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
As mentioned earlier, spring uses two textures per model and cannot use multiple UV Maps, cannot use vertex colours, and cannot use additional textures other than a normal map.&lt;br /&gt;
&lt;br /&gt;
The tex1 format covers the diffuse colour and whether a pixel is teamcoloured or not, wheras tex2 covers the emissivity, roughness, and metalness of the model in its RGB channels respectively.&lt;br /&gt;
&lt;br /&gt;
Remember that most DDS normal maps are slightly different from typical OpenGL normal maps, and adjust appropriately as needed.  Typically inverting the Red and Green channels does the trick.&lt;br /&gt;
&lt;br /&gt;
If you import a texture then the importer will set up the nodes for you, however, if you are starting from scratch then you probably just want to replicate this node setup.  This mostly approximates what Spring will do in-engine, giving you a workable preview in Blender when you use a lookdev(Material Preview) view mode.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring_shader.png]]&lt;br /&gt;
&lt;br /&gt;
There are three textures referenced here, which in this case happen to be atlas textures which can be reused for multiple models. The core_color.dds is tex1 and has colours and teamcolours - the alpha channel is split off, inverted, and used to colour the alpha areas green (you can click the green colour to replace it with any other colour, if you like).&lt;br /&gt;
&lt;br /&gt;
The core_other.dds is the tex2 file, so it is split into RGB channels and each of these channels appropriately processed and connected to the relevant part of the material.&lt;br /&gt;
&lt;br /&gt;
Finally the core_normals.dds contains a direct-x formatted normal map, so it is converted to an openGL format by inverting just the Red and Green channels and is then passed through the normal calculation node to convert the image into a vector map, and then the vector map passed to the shader.&lt;br /&gt;
&lt;br /&gt;
TODO: Provide a blend file here that already has this material set up, just need to plug in textures.  Or just include atlas texture.  Airpad_packed.blend is sadly larger than 2mb so the wiki will not host it.&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=File:Spring_shader.png&amp;diff=7018</id>
		<title>File:Spring shader.png</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=File:Spring_shader.png&amp;diff=7018"/>
		<updated>2020-10-14T11:59:06Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Darloth3 uploaded a new version of File:Spring shader.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Shader replicating what the spring engine does to various texture files to produce the final result.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{PD}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=File:Spring_shader.png&amp;diff=7017</id>
		<title>File:Spring shader.png</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=File:Spring_shader.png&amp;diff=7017"/>
		<updated>2020-10-14T11:56:43Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Shader replicating what the spring engine does to various texture files to produce the final result.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Shader replicating what the spring engine does to various texture files to produce the final result.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{PD}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7016</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7016"/>
		<updated>2020-10-14T01:02:33Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Importing Textures.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.  Make sure to enable the add-on after installation.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
With the s3o importer installed and enabled, you should be able to import s3o models from spring into blender by using the File-&amp;amp;gt;Import-&amp;amp;gt;s3o option.  Then navigate to your model file and select it.&lt;br /&gt;
&lt;br /&gt;
s3o models often come in rotated to one side, as Spring uses Y-axis-up and Blender uses Z-axis-up.  You can rotate them to look right in Blender, and then when exporting them there are options to deal with this so that they export rotated correctly.&lt;br /&gt;
&lt;br /&gt;
If the importer can find them, it will also import textures and the UV map along with the model.  The texture files may need to be placed appropriately or in the same directory as the model file for this to work.&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
To open a texture you need to set a window to either the Image Editor or UV Editor mode, and then press the Open button in the top menu bar.  This will bring up a file menu where you can select a texture to bring into Blender.  Blender supports .dds textures by default, as well as most other image formats.  However, spring uses textures somewhat uniquely and has two separate texture formats.  The first of these, referred to as tex1 or colour texture, uses Red Green Blue (RGB) channels to store colour data, and Alpha (A) to store whether that part of the file is teamcolour or not.  This means that by default a tex1 texture looks mostly blank(transparent) with some odd black bits scattered around.  You can fix this in Blender by scrolling the menu bar (hold middle button with cursor on menu, drag mouse to side) all the way to the right, and clicking the little drop down which says Display Channels [[File:Blender_display_channels.png]].  By default it is set to ''Colour and Alpha'' but you should set it to ''Colour'' when working with tex1 files to ignore the alpha channel.&lt;br /&gt;
&lt;br /&gt;
Tex2 files are the ones in greenyblue with bits of red.  In those files the Red channel is how much that part of the texture emits light, the Green channel is how rough or smooth that part of the texture is (which determines how it reacts to light), and the Blue channel is how metallic and reflective that part of the texture is.  Areas which are cyan (full green and full blue) are mirror-smooth metal, so reflect the environment perfectly.  These should always have their colourspace set to non-colour data as they use each channel separately.  You can find that option in the right hand popout menu when in an image editor viewing them (shortcut key N by default) under the Image tab.&lt;br /&gt;
&lt;br /&gt;
You may also need or want to use Normal map textures, which are the ones that look mostly blue with some oddly coloured parts around the edges.  Whenever you use these normal map textures you should always change the colourspace to non-colour data as it can cause visual errors if you do not, since it will process the channels differently in the render pipeline.&lt;br /&gt;
&lt;br /&gt;
If nothing in the scene uses your texture it will be discarded from the file when you save and exit.  You may click the shield icon next to the file name to prevent this, if you want to have the textures kept around even with nothing using it.  As long as you've assigned the texture to a material, and the material to a model (see below) this will not be a problem, but it's useful to know this option exists and why a texture might be dropped.&lt;br /&gt;
&lt;br /&gt;
Blend files do not by default contain the textures referenced in them, but you 'can' optionally pack the textures into them for easy transfer between users or computers.   Explore the File-&amp;amp;gt;External Data menu for those options.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colourspace to non-colour data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=File:Blender_display_channels.png&amp;diff=7015</id>
		<title>File:Blender display channels.png</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=File:Blender_display_channels.png&amp;diff=7015"/>
		<updated>2020-10-14T00:56:39Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Blender's Display Channels dropdown icon.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Blender's Display Channels dropdown icon.&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7014</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7014"/>
		<updated>2020-10-14T00:43:46Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colorspace to non-color data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7013</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7013"/>
		<updated>2020-10-14T00:43:06Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Setting up Blender&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
If you are totally new to blender there are a few things you probably ought to do to set up blender for use with Zero-K.  Additionally, this tutorial will assume you are using left-click to select (the new default) and a fairly typical window layout similar to the default.&lt;br /&gt;
&lt;br /&gt;
Blender comes with several add-ons and scripts, not all of which are enabled by default.  While there are many additional ones you might have to pay for that could prove useful (meshmachine, decalmachine and hard ops are probably the most well known three) there are a few free add-ons you may wish to consider.  You should absolutely go to the Edit-&amp;amp;gt;Preferences-&amp;amp;gt;Add-ons submenu and enable Node Wrangler, and Looptools.&lt;br /&gt;
&lt;br /&gt;
To import s3o models from spring, you will need an addon which can be found [https://github.com/sanguinariojoe/blender_s3o_import|here].  You need to download the python (.py) file and then use the Install button inside blender's add-ons submenu, pointing it at that .py file, so that blender knows how to import .s3o models.&lt;br /&gt;
&lt;br /&gt;
If you want to export animations, you will also need [https://github.com/Anarchid/blender2lus|this] animation exporter, though the output it produces will likely still require manual adjustment and will not be covered by this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colorspace to non-color data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7012</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7012"/>
		<updated>2020-10-13T23:58:15Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* The other bits */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do before it's ready!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colorspace to non-color data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7011</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7011"/>
		<updated>2020-10-13T23:57:17Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* groundplane decal and ao bake */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do!&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
==== Create and size the virtual ground plane ====&lt;br /&gt;
&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it *again* so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-units wide, then (since you can only set the decal footprint size to an integer) you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
==== Setup for AO Baking ====&lt;br /&gt;
&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colorspace to non-color data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
==== Do the bake ====&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
==== Touchup and adjust format in external image editor ====&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7010</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7010"/>
		<updated>2020-10-13T23:53:00Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Adjusting headings.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender ==&lt;br /&gt;
=== Setting up Blender for use in Zero-K ===&lt;br /&gt;
=== Importing a model (optional) ===&lt;br /&gt;
=== Importing textures ===&lt;br /&gt;
=== Modelling for Zero-K ===&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ===&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format ==&lt;br /&gt;
=== A note on animation ===&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata ==&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files ==&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod ==&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right ==&lt;br /&gt;
&lt;br /&gt;
== The other bits ==&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do!&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it again so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-squares wide, then since you can only set the decal size to an integer you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colorspace to non-color data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7009</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7009"/>
		<updated>2020-10-13T23:52:16Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Adjusting headings.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Make or Edit the model in Blender =&lt;br /&gt;
=== Setting up Blender for use in Zero-K ==&lt;br /&gt;
=== Importing a model (optional) ==&lt;br /&gt;
=== Importing textures ==&lt;br /&gt;
=== Modelling for Zero-K ==&lt;br /&gt;
=== Texturing for Zero-K, and Spring texture oddities ==&lt;br /&gt;
&lt;br /&gt;
== Export the model to .dae format =&lt;br /&gt;
=== A note on animation ==&lt;br /&gt;
&lt;br /&gt;
== Set up texture associations and .dae.lua metadata =&lt;br /&gt;
&lt;br /&gt;
== Set up Zero-K mod that contains and uses your files =&lt;br /&gt;
&lt;br /&gt;
== Run Zero-K and point at your mod =&lt;br /&gt;
&lt;br /&gt;
== Fix whatever isn't right =&lt;br /&gt;
&lt;br /&gt;
== The other bits =&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do!&lt;br /&gt;
&lt;br /&gt;
=== groundplane decal and ao bake ===&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it again so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-squares wide, then since you can only set the decal size to an integer you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colorspace to non-color data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
==== Adjust unitdef to include groundplane ====&lt;br /&gt;
&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
=== unitpic ===&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7008</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7008"/>
		<updated>2020-10-13T23:50:52Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* groundplane decal and ao bake */ - First draft.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Make or Edit the model in Blender =&lt;br /&gt;
== Setting up Blender for use in Zero-K ==&lt;br /&gt;
== Importing a model (optional) ==&lt;br /&gt;
== Importing textures ==&lt;br /&gt;
== Modelling for Zero-K ==&lt;br /&gt;
== Texturing for Zero-K, and Spring texture oddities ==&lt;br /&gt;
&lt;br /&gt;
= Export the model to .dae format =&lt;br /&gt;
== A note on animation ==&lt;br /&gt;
&lt;br /&gt;
= Set up texture associations and .dae.lua metadata =&lt;br /&gt;
&lt;br /&gt;
= Set up Zero-K mod that contains and uses your files =&lt;br /&gt;
&lt;br /&gt;
= Run Zero-K and point at your mod =&lt;br /&gt;
&lt;br /&gt;
= Fix whatever isn't right =&lt;br /&gt;
&lt;br /&gt;
= The other bits =&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do!&lt;br /&gt;
&lt;br /&gt;
== groundplane decal and ao bake ==&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
First, create a plane and place it under your model.  It should be at zero relative to where the model is going to go, but this plane will never leave blender directly - it will be the Spring engine painting the decal onto the terrain.  Scale it until it completely covers all of your model, then apply the scale and scale it again so that it is appropriately larger than the footprint of your model.  This size may need adjusting so that it fits an integer value - for example, if the unitdef lists your unit as 5 footprint-squares wide, then since you can only set the decal size to an integer you would have to choose 6 (6/5 = 120% of the model size) or 7 (7/5 = 140% of the model size).  Somewhere between 120% and 140% is probably fine.&lt;br /&gt;
&lt;br /&gt;
Once you have the plane appropriately sized, go to the render tab [[File:Blender_render_tab.png]] and change the Render engine to Cycles.  You may wish to change the feature set and compute device appropriate to your system (especially if you have a powerful GPU) but the defaults should be fine for this.&lt;br /&gt;
&lt;br /&gt;
Make sure you set the number of samples in the Sampling section high enough.  512 is a good number to start from, though as high as 1024 is useful to reduce noise.  More samples mean more render time, even for something as simple as baking a simple ambient occlusion map.&lt;br /&gt;
&lt;br /&gt;
Next, go to the world tab [[File:Blender_world_tab.png]] and activate Ambient Occlusion.  Factor should be 1.0, and the distance parameter depends on how large your model is.  You may have to tweak this value until the resulting bake looks correct, but start with a distance parameter somewhere around 25% to 50% of the width of your model, turning it up if this is not sufficient.&lt;br /&gt;
&lt;br /&gt;
To properly bake, we need somewhere to put the texture - so open up a shader node window somewhere, select the ground plane and make sure that it is using a new material and that material is using nodes.  Connect a texture node using the Ctrl-T shortcut. Press New to make a new texture, and set it to the appropriate size - typically 512px square for something the size of a factory or 128px square for smaller buildings.  Set the image colorspace to non-color data to prevent shading artefacts later.  Make sure this texture node has been clicked on and is selected, because it's the last selected texture for each relevant object that receives the bake.&lt;br /&gt;
&lt;br /&gt;
Finally we're almost ready to do the baking!  Return to the render tab [[File:Blender_render_tab.png]] and scroll down to the Bake section.  From the Bake Type dropdown select Ambient Occlusion.  Make sure that Selected to Active is OFF, as that is intended to transfer high poly modelling data to low poly objects and we actually do want just a general scene-wide bake of ambient occlusion, it's just we only care about the result on this one ground plane object.  Margin can be adjusted but the default of 16px is probably fine.&lt;br /&gt;
&lt;br /&gt;
Press Bake!&lt;br /&gt;
&lt;br /&gt;
If blender crashed that's fine, go check in the log file to see what did it - the last time I had a crash here, I had an addon (bezier tools, totally unrelated to anything to do with baking) going wrong, and so I had to temporarily disable it.&lt;br /&gt;
&lt;br /&gt;
If all went well, you should have seen a few textures render if you were on something with a texture view, and if you go to find your new ambient occlusion texture it should be a black outline in the shape of your building with a white outside, and a blurry shadowy bit around the edge of the black outline, which is what the game will draw onto the ground.  Export this as a png.&lt;br /&gt;
&lt;br /&gt;
The next bit you will need to do in GIMP/Glimpse, or any other image processing software capable of exporting DDS textures.  Simply load your image file, turn the white colour into transparency by whatever method you prefer such that full black is opaque and full white is transparent, and then export as DDS.  Spring wants textures to be DXT5 compressed, with mipmaps generated.&lt;br /&gt;
&lt;br /&gt;
If you want some other decal underneath your unit, perhaps a metallic decal if it is a factory for example, you can add that as another layer in your image editing software here.  Ensure that the ambient occlusion layer overlays it where necessary.&lt;br /&gt;
&lt;br /&gt;
=== Adjust unitdef to include groundplane ===&lt;br /&gt;
&lt;br /&gt;
Now you've got a groundplane texture, rename it to something like unitname_aoplane.dds and put it into the /unittextures folder.  Then go to the unitdef and make sure that these tags are filled out:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence?&lt;br /&gt;
buildingGroundDecalSizeX      = 12, --Size of decal X axis in footprint units &lt;br /&gt;
buildingGroundDecalSizeY      = 12, --Size of decal Y axis in footprint units &lt;br /&gt;
buildingGroundDecalType       = [[unitname_aoplane.dds]], --filename of decal&lt;br /&gt;
&lt;br /&gt;
useBuildingGroundDecal        = true,&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After saving the updated unitdef, go and check that the ground plane exists in game.  They can be quite subtle, but by toggling on and off the &amp;quot;show ground decals&amp;quot; option, you should be able to see the difference easily.&lt;br /&gt;
&lt;br /&gt;
If needed, you can edit your original png file in the image editor again and apply gaussian blur to the image to spread the shadow out further.  Ensure that the shadow's edge doesn't touch the edge of the image, as this tends to look obvious.&lt;br /&gt;
&lt;br /&gt;
== unitpic ==&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=File:Blender_world_tab.png&amp;diff=7007</id>
		<title>File:Blender world tab.png</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=File:Blender_world_tab.png&amp;diff=7007"/>
		<updated>2020-10-13T23:21:08Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Blender world tab, for ease of learning.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
Blender world tab, for ease of learning.&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=File:Blender_render_tab.png&amp;diff=7006</id>
		<title>File:Blender render tab.png</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=File:Blender_render_tab.png&amp;diff=7006"/>
		<updated>2020-10-13T23:15:07Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* Licensing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A small screenshot of the blender render tab, to make learning easier.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
GPL from Blender&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=File:Blender_render_tab.png&amp;diff=7005</id>
		<title>File:Blender render tab.png</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=File:Blender_render_tab.png&amp;diff=7005"/>
		<updated>2020-10-13T23:13:50Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: A small screenshot of the blender render tab, to make learning easier.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A small screenshot of the blender render tab, to make learning easier.&lt;br /&gt;
== Licensing ==&lt;br /&gt;
{{cc-by-4.0}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7004</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7004"/>
		<updated>2020-10-13T23:01:52Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Initial draft of groundplane bake, WIP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Make or Edit the model in Blender =&lt;br /&gt;
== Setting up Blender for use in Zero-K ==&lt;br /&gt;
== Importing a model (optional) ==&lt;br /&gt;
== Importing textures ==&lt;br /&gt;
== Modelling for Zero-K ==&lt;br /&gt;
== Texturing for Zero-K, and Spring texture oddities ==&lt;br /&gt;
&lt;br /&gt;
= Export the model to .dae format =&lt;br /&gt;
== A note on animation ==&lt;br /&gt;
&lt;br /&gt;
= Set up texture associations and .dae.lua metadata =&lt;br /&gt;
&lt;br /&gt;
= Set up Zero-K mod that contains and uses your files =&lt;br /&gt;
&lt;br /&gt;
= Run Zero-K and point at your mod =&lt;br /&gt;
&lt;br /&gt;
= Fix whatever isn't right =&lt;br /&gt;
&lt;br /&gt;
= The other bits =&lt;br /&gt;
Ever heard about software development that first you need to complete 90% of the project, and then you need to complete the other 90% of the project?  The same sometimes applies to modding.  &lt;br /&gt;
&lt;br /&gt;
Even though by this point you should have your unit or building in game and working, there are other things to do!&lt;br /&gt;
&lt;br /&gt;
== groundplane decal and ao bake ==&lt;br /&gt;
If your unit is a building, you will need to create a ground plane to go underneath it - at the very least an ambient occlusion baked shadow, usually referred to as an aoplane.  This is simply a texture which is sized appropriately for your model and is placed underneath it by the engine.  This adds a little soft shadowing around the edge of the building which helps immensely to integrate it with the map.&lt;br /&gt;
&lt;br /&gt;
There are a few ways to make these, but the easiest if following this tutorial is probably just to bake your own in Blender.&lt;br /&gt;
&lt;br /&gt;
== unitpic ==&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7003</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7003"/>
		<updated>2020-10-12T10:57:22Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Added more headings for blender section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in [https://www.blender.org/ Blender] (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Make or Edit the model in Blender =&lt;br /&gt;
== Setting up Blender for use in Zero-K ==&lt;br /&gt;
== Importing a model (optional) ==&lt;br /&gt;
== Importing textures ==&lt;br /&gt;
== Modelling for Zero-K ==&lt;br /&gt;
== Texturing for Zero-K, and Spring texture oddities ==&lt;br /&gt;
&lt;br /&gt;
= Export the model to .dae format =&lt;br /&gt;
== A note on animation ==&lt;br /&gt;
&lt;br /&gt;
= Set up texture associations and .dae.lua metadata =&lt;br /&gt;
&lt;br /&gt;
= Set up Zero-K mod that contains and uses your files =&lt;br /&gt;
&lt;br /&gt;
= Run Zero-K and point at your mod =&lt;br /&gt;
&lt;br /&gt;
= Fix whatever isn't right =&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7002</id>
		<title>Blender To Zero-K</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Blender_To_Zero-K&amp;diff=7002"/>
		<updated>2020-10-12T10:49:09Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: ToC and outline&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is a tutorial covering all of the steps to make or edit a model in Blender (a free 3d modelling program) and transfer it to the Spring engine, then have Zero-K load it as a mutator so you can test it in-game.&lt;br /&gt;
&lt;br /&gt;
The contents page here will also act as a quick reference for all of the necessary steps, in order:&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Make or Edit the model in Blender =&lt;br /&gt;
&lt;br /&gt;
= Export the model to .dae format =&lt;br /&gt;
&lt;br /&gt;
= Set up texture associations and .dae.lua metadata =&lt;br /&gt;
&lt;br /&gt;
= Set up Zero-K mod that contains and uses your files =&lt;br /&gt;
&lt;br /&gt;
= Run Zero-K and point at your mod =&lt;br /&gt;
&lt;br /&gt;
= Fix whatever isn't right =&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Zero-K:Developing&amp;diff=7001</id>
		<title>Zero-K:Developing</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Zero-K:Developing&amp;diff=7001"/>
		<updated>2020-10-12T10:45:27Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* Artwork */ - Blender to ZK page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;New developers should read this before touching the source.&lt;br /&gt;
&lt;br /&gt;
== ZK's Devving Philosophy (social rules) ==&lt;br /&gt;
* &amp;quot;War is a product of anticommunication&amp;quot;&lt;br /&gt;
** Communicate with other devs about your changes/fixes, let them understand the issue. Do not make 'random' changes.&lt;br /&gt;
* &amp;quot;Do not create work for other people.&amp;quot;&lt;br /&gt;
** Have responsibility for your changes/commit. Do not leave bugs that require other people to fix.&lt;br /&gt;
* &amp;quot;Readability &amp;amp; performance are equally important.&amp;quot; &lt;br /&gt;
** Optimize code but not to the point of unreadability. [http://c2.com/cgi/wiki?RulesOfOptimization Remember the rules of optimization]:&lt;br /&gt;
*** Don't.&lt;br /&gt;
*** Don't (yet).&lt;br /&gt;
*** Profile before doing it.&lt;br /&gt;
* &amp;quot;If it ain't broke, don't fix it.&amp;quot;&lt;br /&gt;
** Don't code fixes that nobody wants to problems that don't exist.&lt;br /&gt;
&lt;br /&gt;
== What is in source codes ==&lt;br /&gt;
* [https://github.com/ZeroK-RTS/Zero-K Zero-K] contains the game proper&lt;br /&gt;
** units folder contains unit definition files&lt;br /&gt;
*** You can read the wiki about game development for [http://springrts.com/wiki/Main_Page Spring Engine] &lt;br /&gt;
* [https://github.com/ZeroK-RTS/Zero-K-Infrastructure Zero-K-Infrastructure]&lt;br /&gt;
** Zero-K.info: Website sources&lt;br /&gt;
** ZkLobbyServer: Lobby server (for MP)&lt;br /&gt;
** ZkData: Website/server database structure&lt;br /&gt;
* [https://github.com/ZeroK-RTS/Chobby Chobby] contains the lobby client&lt;br /&gt;
* [https://github.com/ZeroK-RTS/Zero-K-Artwork Zero-K-Artwork] contains sources for 2D art, 3D art and sounds&lt;br /&gt;
* [https://github.com/ZeroK-RTS/SpringRTS-Tools SpringRTS-tools] contains various dev tools&lt;br /&gt;
** Upspring - required to edit the .3do and .s3o model files used in the game&lt;br /&gt;
** MapIconBuilder - unit map icon sources are here&lt;br /&gt;
* [https://github.com/ZeroK-RTS/Zero-K-Missions Zero-K-Missions] contains source files for official ZK missions&lt;br /&gt;
&lt;br /&gt;
=== Style Guide===&lt;br /&gt;
The lua in the menu (chobby) and game proper should use the following whitespace:&lt;br /&gt;
* Indent with tabs.&lt;br /&gt;
* A tab may only follow a newline or another tab.&lt;br /&gt;
* If the text across two lines is being aligned (such as for a long function) then the two lines must have the same number of tabs.&lt;br /&gt;
* Don't try stack flow of control into one line. For example, put newlines after &amp;lt;code&amp;gt;then&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt;.&lt;br /&gt;
* End files with a newline.&lt;br /&gt;
* Commas should be followed by whitespace. Relations (=, &amp;lt;, &amp;lt;=, &amp;gt;=, ==, ~=) should have whitespace on each side.&lt;br /&gt;
* if a conditional is to take up multiple lines, double indent the extra lines and end the line with a conjunction (See Gallery below)&lt;br /&gt;
These guidelines are not necessarily followed in old files so updating them with a separate commit is a good idea prior to making large changes. Also, unitdefs use two-space indentation instead of tabs.          &lt;br /&gt;
&lt;br /&gt;
There are a few guildines for dealing with Spring functions.&lt;br /&gt;
* Localisation of Spring.Function should be named spFunction.&lt;br /&gt;
* Localisation of Spring.MoveCtrl.Function should be named spMoveCtrlFunction.&lt;br /&gt;
* Spring.GetCommandQueue should be used rather than Spring.GetUnitCommands (it's an alias, we just picked one).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Styleguide-if-example.JPG|Proper multiline if statement&lt;br /&gt;
Styleguide-stackflow.JPG|Example of stacked flow control&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Getting sources ==&lt;br /&gt;
This is a guide to downloading Zero-K sources from [https://github.com/ GitHub] using [https://tortoisegit.org/ TortoiseGit]. The game sources are used as an example, however this method applies to other subprojects as well.&lt;br /&gt;
* Install [https://tortoisegit.org/download/ TortoiseGit].&lt;br /&gt;
* Create a [https://github.com/ GitHub] account.&lt;br /&gt;
[[File:ForkZK.jpg]]&lt;br /&gt;
* Log in to GitHub and [https://github.com/ZeroK-RTS Locate] the repository you want to edit.&lt;br /&gt;
* Click the &amp;quot;Fork&amp;quot; button on the GitHub website to create your own copy on GitHub.&lt;br /&gt;
[[File:cloneZK.jpg]]&lt;br /&gt;
* Locate your fork on GitHub and click &amp;quot;Clone or Download&amp;quot;.&lt;br /&gt;
* Copy the web URL to your clipboard.&lt;br /&gt;
[[File:localCloneZK.jpg]]&lt;br /&gt;
* Create a folder called 'zk.sdd' in your Zero-K install under games.&lt;br /&gt;
* Right click on 'zk.sdd' and select 'Git Clone...' from the context menu.&lt;br /&gt;
[[File:cloneUIZK.jpg]]&lt;br /&gt;
* Copy the web URL into the 'URL:' field of the clone interface.&lt;br /&gt;
* Ensure that the 'Directory:' field ends in 'zk.sdd'. It is likely to automatically contain the path '...\Zero-K\games\zk.sdd\Zero-K' so be sure to delete the '\Zero-K' at the end.&lt;br /&gt;
[[File:cloneSuccess.jpg]]&lt;br /&gt;
* Wait for the sources to download.&lt;br /&gt;
* Your 'zk.sdd' folder should look something like the image above.&lt;br /&gt;
&lt;br /&gt;
== Updating sources ==&lt;br /&gt;
Keep your sources up to date by periodically syncing your fork to the original repository (using 'compare', see: https://github.com/KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser, then do &amp;quot;rebase and merge&amp;quot; instead of &amp;quot;merge&amp;quot;) and doing TortoiseGit -&amp;gt; Pull on your repository folder to take the changes from GitHub to your local files.&lt;br /&gt;
&lt;br /&gt;
== Modifying the game ==&lt;br /&gt;
:''For personal modding, see [[Mod Creation]]''&lt;br /&gt;
Follow the instructions in 'Getting sources' the download the Zero-K game sources. Feel free to inspect and edit the game files. Most developers using Windows edit lua files with [https://notepad-plus-plus.org/download/v7.6.6.html Notepad++].&lt;br /&gt;
&lt;br /&gt;
To test your changes:&lt;br /&gt;
* Create an empty file named 'devmode.txt' in the same directory as Zero-K.exe.&lt;br /&gt;
* Launch Zero-K.exe.&lt;br /&gt;
[[File:enableDevMode.jpg]]&lt;br /&gt;
* Select 'Zero-K Dev' in Settings -&amp;gt; Developer -&amp;gt; Singleplayer (you may need to scroll down).&lt;br /&gt;
[[File:startTest.jpg]]&lt;br /&gt;
* From the main menu select Singleplayer -&amp;gt; Skirmish -&amp;gt; Advanced -&amp;gt; Start to launch a test game. Note that the game type should be automatically set to 'Zero-K $VERSION'.&lt;br /&gt;
* In the game, press F8 to open debug console. It'll display errors and output to the log.&lt;br /&gt;
&lt;br /&gt;
== Modifying the lobby menu ==&lt;br /&gt;
Follow the instructions in 'Getting sources' with the following adjustments:&lt;br /&gt;
* The repository that you want to edit is https://github.com/ZeroK-RTS/Chobby.&lt;br /&gt;
* It is best to call the folder something like 'zkmenu.sdd', to avoid confusion.&lt;br /&gt;
Make sure that the 'Directory:' field ends in '.sdd'. You should end up with something like this:&lt;br /&gt;
&lt;br /&gt;
[[File:zkmenufolder.jpg]]&lt;br /&gt;
&lt;br /&gt;
To test your changes launch Zero-K.exe with the &amp;lt;tt&amp;gt;dev&amp;lt;/tt&amp;gt; arg (i.e. &amp;lt;code&amp;gt;Zero-K.exe dev&amp;lt;/code&amp;gt;). On windows this is best done by creating a shortcut and changing the target, as shown below.&lt;br /&gt;
[[File:targetZK.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Submitting changes ==&lt;br /&gt;
Git provides a systematic way to review and merge changes into the main repositories. The main game repository is used as example, but this method works for other repositories as well.&lt;br /&gt;
&lt;br /&gt;
The simple way to commit changes is as follows.&lt;br /&gt;
* Make some changes to your local files.&lt;br /&gt;
* Right click on 'zk.sdd' and select 'Git Commit'.&lt;br /&gt;
* Write a description of the changes and click 'Commit'.&lt;br /&gt;
* Right click on 'zk.sdd' and select TortiseGit -&amp;gt; Push.&lt;br /&gt;
* Enter your GitHub login and password when prompted. The changes should now appear on your fork in GitHub.&lt;br /&gt;
* Navigate to https://github.com/ZeroK-RTS/Zero-K/pulls and click &amp;quot;New Pull Request&amp;quot;.&lt;br /&gt;
* Click &amp;quot;compare across forks&amp;quot; to make your fork visible.&lt;br /&gt;
* Set your fork to be the head repository.&lt;br /&gt;
* Write a title and description of the changes, then create the pull request.&lt;br /&gt;
This creates a proposal to apply your changes to the main game. Be sure to check up on it and respond to comments.&lt;br /&gt;
&lt;br /&gt;
A more advanced method involves creating branches locally with TortiseGit -&amp;gt; Create Branch and committing blocks of related changes to a single branch. You are then able to make pull requests from branches. This allows branches to be smaller and more focused, which is desirable when merging.&lt;br /&gt;
&lt;br /&gt;
Make sure to keep your repository up to date to make merges less difficult.&lt;br /&gt;
&lt;br /&gt;
== Zero-K.exe launch flags ==&lt;br /&gt;
&amp;lt;pre&amp;gt;Zero-K.exe [rapid tag] [engine version]&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that the engine specified in arg won't automatically use the main Zero-K folder as its datadir. Add a &amp;lt;tt&amp;gt;springsettings.cfg&amp;lt;/tt&amp;gt; file to the engine version's folder with the tag &amp;lt;code&amp;gt;SpringData = path_to_Zero-K_folder&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Modifying infrastructure/tools == &lt;br /&gt;
* Install [https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx Visual Studio Community edition]&lt;br /&gt;
* Install [https://www.microsoft.com/en-us/sql-server/sql-server-downloads SQL Server express]&lt;br /&gt;
* Clone to desktop [https://github.com/ZeroK-RTS/Zero-K-Infrastructure Zero-K infrastructure]&lt;br /&gt;
* Test by opening Zero-K.sln in Visual Studio&lt;br /&gt;
&lt;br /&gt;
=== Initializing Website Database ===&lt;br /&gt;
You may need to setup the database connection for the website. In order to do that: Open Visual Studio, open the Server Explorer panel (under the View menu), right click Data Connections -&amp;gt; Add Connection -&amp;gt; Sql Server. Enter &amp;lt;code&amp;gt;(localdb)\mssqllocaldb&amp;lt;/code&amp;gt; in the Server Name field, after which zero-k_local will appear in the dropdown list of databases. &lt;br /&gt;
&lt;br /&gt;
(If zero-k_local does not appear, type it in the text box and press OK; Visual Studio will ask whether you would like to create the database. This may require you to have administrator rights on the computer.)&lt;br /&gt;
&lt;br /&gt;
[[File:zk-database-setup.png]]&lt;br /&gt;
&lt;br /&gt;
=== Debugging infrastructure ===&lt;br /&gt;
* To run a project right click it, choose &amp;quot;set as startup project&amp;quot; and hit F5 to run using debugger.&lt;br /&gt;
* You can enable multiple startup projects to test entire infrastructure locally (game servers, lobby etc). Enable asp.net, springie and ZeroKLobby projects to test it all together. [http://i.imgur.com/2mgizUJ.png Setup]&lt;br /&gt;
* To run asp.net:&lt;br /&gt;
** It's required that you install MS SQL Express on your local PC. &lt;br /&gt;
*** You can get SQL Server 2017 (for Windows 8 and later) [https://www.microsoft.com/en-us/sql-server/sql-server-editions-express here] or SQL Server 2014 (for Windows 7) [https://www.microsoft.com/en-ie/download/details.aspx?id=42299 here]. For SQL Server 2014, the file you will need is called SQLEXPR_x64_ENU or SQLEXPR_x86_ENU. Make sure you install version that matches your version of Windows (i.e. x86 vs x64). &lt;br /&gt;
*** During the installation, set collation to &amp;lt;code&amp;gt;SQL_Latin1_General_CP1_CI_AS&amp;lt;/code&amp;gt;. Leave all the parameters default except that I changed server name to SQLEXPRESS in one of the first steps of wizard.&lt;br /&gt;
[[File:SQL server collation.png|405px]]&lt;br /&gt;
** Right click asp.net -&amp;gt; properties -&amp;gt; web -&amp;gt; check &amp;quot;Specific Page&amp;quot; and leave it blank. Otherwise you get errors when trying to host locally.&lt;br /&gt;
** Make sure SQL Server is running (check the Sql Server Configuration Manager in the Start Menu). If you can't connect, edit the data source for &amp;lt;code&amp;gt;ModeType.Local&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;GlobalConst.cs&amp;lt;/code&amp;gt; (currently line 46) to say something like:&amp;lt;br/&amp;gt;&amp;lt;code&amp;gt;Data Source=&amp;lt;hostname (usually your computer name)&amp;gt;\SQLEXPRESS&amp;lt;/code&amp;gt;&lt;br /&gt;
** To make things run smoothly the following changes might also be a good idea: In &amp;lt;code&amp;gt;Shared/PlasmaShared/GlobalConst.cs&amp;lt;/code&amp;gt; (currently line 137) replace the DefaultEngineOverride with whatever engine version is current. Comment out lines 190 and 238-298 of &amp;lt;code&amp;gt;Zero-K.info/AppCode/PlasmaServer.cs&amp;lt;/code&amp;gt; unless somebody can supply instructions on how to make the torrent errors go away.&lt;br /&gt;
&lt;br /&gt;
TODO: add download links for sample database tables here. Users and clans are probably easier to make yourself for most purposes. For now, if you need this ask Licho, Histidine, DeinFreund or Anarchid. Aquanim has sample tables for maps and Planetwars structures, if that is all that you need.&lt;br /&gt;
&lt;br /&gt;
=== Modifying The Database Structure ===&lt;br /&gt;
* Modify the appropriate files in ./ZkData/Ef/...  and elsewhere ( [https://github.com/ZeroK-RTS/Zero-K-Infrastructure/commit/61addee11e74b09dd5dd73e12d31a28030d84e81 this commit] should be a reasonable guide; don't worry about the migration files, they are created later )&lt;br /&gt;
* Open Tools &amp;gt; NuGet Package Manager &amp;gt; Package Manager Console&lt;br /&gt;
* At the top of the window which appears, there is a &amp;quot;Default project&amp;quot; dropdown box. Set this to ZkData.&lt;br /&gt;
* Type the command &amp;lt;code&amp;gt;Add-Migration [description-of-change-here]&amp;lt;/code&amp;gt; into the package manager console. This should create some migration files with your description and a timestamp in the name in the Migrations folder of ZkData.&lt;br /&gt;
* In some cases you may now need to manually edit the created migration files to set defaults and the like?&lt;br /&gt;
* Type the command &amp;lt;code&amp;gt;Update-Database&amp;lt;/code&amp;gt; into the package manager console. This should update the database structure.&lt;br /&gt;
* To revert a migration that has not yet been pushed to the main repository, run &amp;lt;code&amp;gt;Update-Database –TargetMigration: TheLastGoodMigration&amp;lt;/code&amp;gt; then delete your bad migration files.&lt;br /&gt;
&lt;br /&gt;
== Artwork ==&lt;br /&gt;
See [http://zero-k.info/Wiki/Development_Artwork Development Artwork] (outdated)&lt;br /&gt;
&lt;br /&gt;
[[Blender_To_Zero-K|Blender To Zero-K]]&lt;br /&gt;
&lt;br /&gt;
== Missions ==&lt;br /&gt;
=== Campaign ===&lt;br /&gt;
Campaign planets/missions are defined in [//github.com/ZeroK-RTS/Chobby/tree/master/campaign/sample Chobby/campaign/sample]&lt;br /&gt;
&lt;br /&gt;
=== Standalone missions ===&lt;br /&gt;
See [[Mission Editor|Mission Editor start page]]&lt;br /&gt;
&lt;br /&gt;
== Updating PlanetWars for new round ==&lt;br /&gt;
:''TODO''&lt;br /&gt;
Changing faction:&lt;br /&gt;
* Faction ID, name, color in dbo.Faction&lt;br /&gt;
* Faction blurb &amp;lt;tt&amp;gt;Faction&amp;lt;Name&amp;gt;&amp;lt;/tt&amp;gt; on sitewiki&lt;br /&gt;
* Add/change icons if needed&lt;br /&gt;
** Site: img/factions/&amp;lt;name&amp;gt;.png&lt;br /&gt;
** Game: LuaUI/Configs/Factions&lt;br /&gt;
** Chobby: LuaMenu/Images/Factions&lt;br /&gt;
** Does chobby download them automatically? Presumably not&lt;br /&gt;
&lt;br /&gt;
Using [https://zero-k.info/PlanetwarsAdmin Planetwars admin interface]: Change to a different galaxy if desired, reset PW&lt;br /&gt;
&lt;br /&gt;
== Wiki ==&lt;br /&gt;
See [[Editing Help]]&lt;br /&gt;
&lt;br /&gt;
=== Unit pages ===&lt;br /&gt;
Part of each unit page is autogenerated by the [//github.com/ZeroK-RTS/SpringRTS-Tools/tree/master/unitguide Unit Guide tool], and uploaded by the [//github.com/ZeroK-RTS/Zero-K-Infrastructure/blob/master/Fixer/WikiPortingMW.cs Wiki bot].&lt;br /&gt;
&lt;br /&gt;
Run &amp;lt;code&amp;gt;export_unit_templates.sh&amp;lt;/code&amp;gt; to generate wiki templates for each unit (see &amp;lt;code&amp;gt;export_unit_templates.lua&amp;lt;/code&amp;gt; for some configuration options), then have the bot read the generated text files and edit the unit pages accordingly (requires Visual Studio setup as detailed above). The text output can also be used to manually edit pages.&lt;br /&gt;
&lt;br /&gt;
Unit buildicons and radar icons should be uploaded by FTP to manual.zero-k.info (&amp;lt;code&amp;gt;zero-k.info/zkmanual/www/unitpics&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/icons&amp;lt;/code&amp;gt; respectively). Contact Licho or Histidine for login details.&lt;br /&gt;
&lt;br /&gt;
== itch.io builds ==&lt;br /&gt;
Instructions for updating the portable build on [https://itch.io/ itch.io]:&lt;br /&gt;
&lt;br /&gt;
* Download latest Zero-K portable from https://zerok.itch.io/zero-k, extract to a folder&lt;br /&gt;
* Download butler (see guide at https://itch.io/docs/butler/)&lt;br /&gt;
* Modify extracted portable folder so that its contents are the same as what the user will download&lt;br /&gt;
* Run butler with command: &amp;lt;code&amp;gt;butler push &amp;lt;portable folder&amp;gt; zerok/zero-k:portable&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Engine ==&lt;br /&gt;
See [https://springrts.com/wiki/Development:Getting_Started Spring Engine Development]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=User:Darloth3&amp;diff=7000</id>
		<title>User:Darloth3</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=User:Darloth3&amp;diff=7000"/>
		<updated>2020-10-12T10:43:16Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Created page with &amp;quot;It'sa me! Darloth3!  There used to be a Darloth account and may at one point have even been a Darloth2, but those were for older versions of spring and their passwords were fo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;It'sa me! Darloth3!&lt;br /&gt;
&lt;br /&gt;
There used to be a Darloth account and may at one point have even been a Darloth2, but those were for older versions of spring and their passwords were forgotten, lost to time.&lt;br /&gt;
&lt;br /&gt;
So by the time I made an account for the ZK side of things I just went with Darloth3. Call me Darloth, it'll be much less confusing for everyone involved!&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=User:Anarchid/OmniCommanderDesign&amp;diff=5085</id>
		<title>User:Anarchid/OmniCommanderDesign</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=User:Anarchid/OmniCommanderDesign&amp;diff=5085"/>
		<updated>2019-03-20T14:10:09Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: animated parts should be empties&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my attempt to figure out a design for an unified commander chassis.&lt;br /&gt;
&lt;br /&gt;
= Why =&lt;br /&gt;
&lt;br /&gt;
Historically ZK has had several commander chassis to provide variety for a bunch of reasons:&lt;br /&gt;
* Initially it was the only way to provide commander variety (because procedural generation of unitdefs was not available)&lt;br /&gt;
* Later, because while &amp;lt;code&amp;gt;unitdefs_post&amp;lt;/code&amp;gt; solved the former problem, the models existed, and provided some, albeit limited, visual feedback on what the commander was &lt;br /&gt;
* Even later, as commanders became mostly &amp;quot;dynamic&amp;quot;, for the same legacy reasons&lt;br /&gt;
* No model that would display more useful information than the current system exists.&lt;br /&gt;
&lt;br /&gt;
This is bad for several reasons:&lt;br /&gt;
* Significantly initially different chassis are pregame RPS in several situations - such as Recon commander's jump available at level zero, or Support commander's build range&lt;br /&gt;
* This provides useful visual representation only for one important commander ability - jump - while all other abilities are essentially hidden. Especially guns all look exactly alike.&lt;br /&gt;
&lt;br /&gt;
= Design Design  = &lt;br /&gt;
Before approaching the design of this thing, it is useful to approach the design of designing this thing.&lt;br /&gt;
&lt;br /&gt;
# As with current commander design requirements, this design should not have degenerate, overpowered or useless paths.&lt;br /&gt;
#* Commanders should not be significantly stronger than same fair cost in units at any point, but should not be that much worse either&lt;br /&gt;
#* A single build or a series of builds should not be always better than the others&lt;br /&gt;
#* It's also a good idea to avoid as much lock-in as possible; branching systems that prohibit modules further down the line are boring (but &amp;quot;this module goes in the helmet slot, which is already occupied&amp;quot; is fine).&lt;br /&gt;
# For a transition from chassis to modules entirely, the first level-up should be important enough to encompass all of the variety in current chassis and first-morph modules&lt;br /&gt;
#* A significant part of this is chassis passive bonuses and specialization - there should be modules to imitate this&lt;br /&gt;
#* With the following criterion, this also means that the first morph should make commanders very *visibly* different as well.&lt;br /&gt;
# As much interesting information about the commander as possible should be meaningfully visible on the commander body.&lt;br /&gt;
#* This intrinsically suggests tying commander modules to their respective body parts, and maybe even have body part based equipment slots&lt;br /&gt;
#* Current stackable or weapon modules are insufficient to encompass this. A &amp;quot;subsystem module&amp;quot; approach like in Aquanim's draft may be useful.&lt;br /&gt;
#* The important qualitatively difference items should take priority. Guns and jump ability are first tier; everything else is secondary or tertiary.&lt;br /&gt;
# The technical considerations of the omni-commander model should be considered at every step &lt;br /&gt;
#* The model should be reasonably easy to modify and generally as low-maintenance as possible&lt;br /&gt;
#* Replacement or refund of current commander skins should be considered and made as easy as possible &lt;br /&gt;
#* Additional types of &amp;quot;hats&amp;quot; could be considered&lt;br /&gt;
&lt;br /&gt;
= General Stuff = &lt;br /&gt;
# The omni-commander model  is at least partially an atlas/lego system. The texture provides various materials to be splatted onto various geometry bits, with few of it strictly dedicated (except for core geometry). Weapons have their own dedicated mini-zones and can share materials.&lt;br /&gt;
## Animated parts should be empties, with the swappable visual models parented to those empties.&lt;br /&gt;
## Weapons and important abilities are emissive and color coded; some may be animated&lt;br /&gt;
# Every module is visually represented on the model.&lt;br /&gt;
## Important modules are called **subsystems** and take equipment **slots**. They completely take over a given body part, and more than one module cannot use the same body part. Advanced versions of a subsystem can replace a weaker version. The following slots are available:&lt;br /&gt;
### Head (helmet, crown, antenna, etc) - intel, aura abilities like shield, cloaker, radar&lt;br /&gt;
### Chest (torso front, breastplate, etc) - armor, regeneration&lt;br /&gt;
### Forearms (left, right) or whole arms - weapons. These should be huge and prominent as the most important things ever.&lt;br /&gt;
### Shoulders (left, right) - secondary weapons, construction abilities&lt;br /&gt;
### Back - active abilities (jump, float?)&lt;br /&gt;
### Legs - passive movement-related abilities (jump? climb? hover? goomba stomp?).&lt;br /&gt;
## Subsystem module _choices_ in the UI have to somehow show which slot they occupy &lt;br /&gt;
## Stackable modules, as much as they exist, are represented as small bits on or near the things they affect.&lt;br /&gt;
### Armor modules - rivets or small plates on chest&lt;br /&gt;
### Damage modules  - small glowy bits on upper arms&lt;br /&gt;
### Speed modules - small bits on upper/lower legs&lt;br /&gt;
### .. etc&lt;br /&gt;
## Stackable module choices need to show their stacking limits in the UI.&lt;br /&gt;
## Enhancement modules are treated as new modules. E.g. a longer-stun version of a lightning gun simply has a different lightning gun model.&lt;br /&gt;
&lt;br /&gt;
= Draft Bucket List Of Modules = &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
! Name &lt;br /&gt;
! Type&lt;br /&gt;
! Slot&lt;br /&gt;
! Level &lt;br /&gt;
! scope=&amp;quot;col&amp;quot; class=&amp;quot;unsortable&amp;quot; | Description&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; class=&amp;quot;unsortable&amp;quot; | Comments&lt;br /&gt;
|-&lt;br /&gt;
! Jetpack&lt;br /&gt;
| System&lt;br /&gt;
| Back&lt;br /&gt;
| 1&lt;br /&gt;
| Allows commander to jump&lt;br /&gt;
| Large, bulky, visible&lt;br /&gt;
|-&lt;br /&gt;
! Beam Laser&lt;br /&gt;
| Weapon&lt;br /&gt;
| Arm&lt;br /&gt;
| 1&lt;br /&gt;
| Kills things&lt;br /&gt;
| Long teal/blue emissive line along top&lt;br /&gt;
|-&lt;br /&gt;
! Combat Drone Kit&lt;br /&gt;
| System&lt;br /&gt;
| Back&lt;br /&gt;
| 2&lt;br /&gt;
| Launches Fireflies&lt;br /&gt;
| Moving mechanical stuff. Possibly can also dock drones if drone tech advances? &lt;br /&gt;
Conflicts with jump, but not with shield/cloak.&lt;br /&gt;
|-&lt;br /&gt;
! Personal Shield&lt;br /&gt;
| System&lt;br /&gt;
| Head&lt;br /&gt;
| 2&lt;br /&gt;
| Provides a small shield&lt;br /&gt;
| Crown that reminds an Aspis. Incompatible with cloak.&lt;br /&gt;
|-&lt;br /&gt;
! Personal Cloak&lt;br /&gt;
| System&lt;br /&gt;
| Head&lt;br /&gt;
| 2&lt;br /&gt;
| Cloaks commander&lt;br /&gt;
| Teal glowing halo, like Scythe/Iris backpacks. Incompatible with shield.&lt;br /&gt;
|-&lt;br /&gt;
! Advanced Nanolathe&lt;br /&gt;
| System&lt;br /&gt;
| Shoulder&lt;br /&gt;
| 1&lt;br /&gt;
| More nano range, slightly more build power&lt;br /&gt;
| Replaces default nano, bigger. &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Cheese&amp;diff=4078</id>
		<title>Cheese</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Cheese&amp;diff=4078"/>
		<updated>2018-05-29T13:15:16Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: /* Ogre rush */ Renamed banisher to ogre&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cheese strategies are strategies that can be described as high-risk and high-reward. These typically rely on winning hard and winning early. Below we will detail some of the finest cheese known to lobster-kind.&amp;lt;br&amp;gt;&lt;br /&gt;
Disclaimer: Some of these are quite bad strategies, but will probably sometimes work nonetheless.&lt;br /&gt;
==On the use of commanders==&lt;br /&gt;
A good rush will often include your commander. In the early parts of the game, this unit represents the majority of your combat strength. Most rushes just utilize the commander as a support unit that fills in a role that you need. However, some cheese strategies utilize the commander as a centerpiece of the strategy.&lt;br /&gt;
&lt;br /&gt;
==The strategies==&lt;br /&gt;
===Fencer rush===&lt;br /&gt;
Plop rover factory, and put fencers on repeat queue. Once you have made like 2 it is time to start moving towards your opponent. Once your comm builds the starting mexes/energy move it towards the opponents base as well. Once you get to your opponent's base and see what they have been up to, choose an appropriate comm morph option. Continue streaming fencers across the map. When you have a critical mass of fencers you can just move in and kill them. But don't wait too long! If they get up significant defense you could end up losing.&lt;br /&gt;
*Rocket launcher is the best morph to get if they try to counter you with skirmishers.&lt;br /&gt;
*Riot cannon if they build lots of low-hp raiders.&lt;br /&gt;
*Heat ray is good if they try to make heavies.&lt;br /&gt;
&lt;br /&gt;
===Reaver rush===&lt;br /&gt;
Much like the fencer rush.&lt;br /&gt;
#Plop cloaky and take 1 mex.&lt;br /&gt;
#Make reavers on repeat queue.&lt;br /&gt;
#Move out with your comm and have reavers rally to it.&lt;br /&gt;
This rush is more time sensitive, and requires that you hit sooner than a fencer rush. Reavers are a bit faster than your comm so they will catch up to it.&lt;br /&gt;
&lt;br /&gt;
===Ogre rush===&lt;br /&gt;
The Ogre is probably the most robust riot unit in the game, with high DPS and HP. It can be quite difficult to stop earlygame, especially if it is unscouted. The ogre is capable of killing commanders by itself and it has splash damage, making it quite effective against the raiders people typically build as well. This rush is time sensitive, as if they scout you they can throw up lots of light defense turrets and hold it off.&amp;lt;br&amp;gt;&lt;br /&gt;
#Plop the HT foundry.&lt;br /&gt;
#Queue up an ogre, set the rally point to your opponents base.&lt;br /&gt;
#Assist the factory with your commander.&lt;br /&gt;
This rush is especially effective against factories with no skirmishers, like HT or rovers. Factories with awkward skirmishers like spider may struggle to deal with it as well, but HT vs spider is a rare match-up anyways.&lt;br /&gt;
&lt;br /&gt;
====Defending against it====&lt;br /&gt;
The best defense against any cheese is scouting, and this is true here. Build your lightest raider and send it to your opponent's base. Since the banisher is an expensive unit, by the time your raider gets there it should still see the banisher in the factory being built, or just as it moves out. Since the opponent has commited quite a bit of resources to this rush you can affort to just spam lots of LLTs and the occasional Picket to hold it off. If you have a skirmisher, that would be a good choice to make as well.&lt;br /&gt;
&lt;br /&gt;
===Com-Morph Push===&lt;br /&gt;
===Com-Drop===&lt;br /&gt;
===Blastwing opening===&lt;br /&gt;
===Raider rush===&lt;br /&gt;
These types of rushes are distinct from the others in that they don't bring along the commander, and rely on overwhelming your opponent with an unexpected raider force. Below are listed some of the raiders that are most effective at rushing.&lt;br /&gt;
====Flea rush====&lt;br /&gt;
Plop spider factory and build your initial 500 metal into fleas. Send your first two out to scout. Once you get your flea swarm you can either attack the opponents base, or their commander. If their commander morphed to a splash damage weapon this will not work, but it should lead to a dead commander if the commander is alone and un-morphed. Alternatively, if they only built like 1 MT or LLT in their base and all their units are gone, you are able to quickly kill the defensive turrets and possibly win the game by killing all their eco structures and factory. You need to be careful with your fleas though, the death explosions from most buildings can instantly kill them. Obviously, this strategy fails if they are not very greedy and bother to build some raiders.&lt;br /&gt;
====Glaive/Bandit rush====&lt;br /&gt;
====Scorcher rush====&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Gunship_Plant&amp;diff=4075</id>
		<title>Gunship Plant</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Gunship_Plant&amp;diff=4075"/>
		<updated>2018-05-28T22:29:16Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Copperhead -&amp;gt; Ettin, Archangel -&amp;gt; Toad&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''{{PAGENAME}}''' is a factory that produces gunships.{{ Infobox zkunit&lt;br /&gt;
| name = Gunship Plant&lt;br /&gt;
| defname = factorygunship&lt;br /&gt;
| description = Produces Gunships, Builds at 10 m/s&lt;br /&gt;
| image = http://manual.zero-k.info/unitpics/factorygunship.png&lt;br /&gt;
| icontype = facgunship&lt;br /&gt;
| cost = 800&lt;br /&gt;
| hitpoints = 4000&lt;br /&gt;
| energy = 0.3&lt;br /&gt;
| sight = 273&lt;br /&gt;
| abilities = &lt;br /&gt;
	{{ Infobox zkability construction&lt;br /&gt;
	| buildpower = 10&lt;br /&gt;
	}}&lt;br /&gt;
}}==Description==&lt;br /&gt;
The Gunship Plant is designed for close air support. It includes a selection of transports for hauling land units around, and combat gunships which can perform a variety of offensive or defensive roles.&lt;br /&gt;
&lt;br /&gt;
The Gunship Plant builds:&lt;br /&gt;
* [[Wasp]]&lt;br /&gt;
* [[Blastwing]]&lt;br /&gt;
* [[Gnat]]&lt;br /&gt;
* [[Locust]]&lt;br /&gt;
* [[Harpy]]&lt;br /&gt;
* [[Nimbus]]&lt;br /&gt;
* [[Revenant]]&lt;br /&gt;
* [[Krow]]&lt;br /&gt;
* [[Trident]]&lt;br /&gt;
* [[Charon]]&lt;br /&gt;
* [[Hercules]]&lt;br /&gt;
&lt;br /&gt;
==Tactics and Strategy==&lt;br /&gt;
&lt;br /&gt;
The principle of Gunships is to assault the enemy from the air, at any time, and in any place. To this end, the Locust and Harpy are quick and capable of engaging enemy forces directly, while the Charon and Hercules can transport friendly land forces to the places they will be most effective. As a finishing blow, the super-heavy Krow gunship is without equal against opponents with poor anti-air coverage.&lt;br /&gt;
&lt;br /&gt;
In contrast to Airplanes, Gunships never have to rearm, so they can stick around an enemy base or army and keep dealing damage. On the other hand, they are slower and require more time to deal the same amount of damage that a bombing run would. Similarly, the Trident and Harpy are favoured in a head-on, prolonged engagement against the [[Swift]] and [[Raptor]] airplane fighters, but they are slower and less able to react to air-to-ground threats presented by the enemy.&lt;br /&gt;
&lt;br /&gt;
=== Example Unit Combinations ===&lt;br /&gt;
&lt;br /&gt;
As a raiding force, use Blastwings to set an enemy factory on fire and halt production, then use Locusts to take out enemy infrastructure.&lt;br /&gt;
&lt;br /&gt;
Tridents and Harpies together present some danger to ground units while being almost impervious to attack from enemy air forces.&lt;br /&gt;
&lt;br /&gt;
Where possible, protect your dedicated anti-ground gunships like the Nimbus, Revenant and Krow from air-to-air threats with Tridents.&lt;br /&gt;
&lt;br /&gt;
Use Charons to drop slow, high-damage riot units like the [[Reaver]] or [[Scallop]] close to enemy buildings or units which they could not otherwise reach. You can assist your dropped forces with Gnats to disable enemy threats. &lt;br /&gt;
&lt;br /&gt;
Similar drop tactics may be pursued by transporting a heavier unit like the [[Dante]] with a Hercules. If you don't want to lose the units you're dropping, retrieve them with transports or a [[Djinn]] beacon.&lt;br /&gt;
&lt;br /&gt;
More esoteric uses of transports include dropping bombs like the [[Snitch]] or [[Skuttle]] on enemy targets, or stunning a high-value target like a [[Crabe]], [[Grizzly]] or [[Commander]] with Gnats then abducting it with a Hercules.&lt;br /&gt;
&lt;br /&gt;
=== Beating Gunships ===&lt;br /&gt;
&lt;br /&gt;
Anti-air units or structures which deliver high sustained damage-per-second are generally more effective against Gunships than those with high burst damage. The [[Razor]] is pretty cheap and very tough, though you will need more than one to deal enough damage to a large Gunship fleet. The [[Cobra]] is more expensive but its flak cannon inflicts area-of-effect damage. The range of the [[Chainsaw]] and [[Artemis]] makes them effective against any air threat, though they are more expensive.&lt;br /&gt;
&lt;br /&gt;
In terms of mobile anti-air, the [[Ettin]] and [[Toad]] are most effective against Gunships. In permissive terrain, the speed of the [[Crasher]] and [[Flail]] gives them an edge despite being burst-damage based AA. The [[Gremlin]] is effective in bulk if their passive cloak is abused to set traps for enemy Gunships.&lt;br /&gt;
&lt;br /&gt;
Yout first priority against Gunships is to fend off the initial raids by Locusts and Blastwings while continuing to expand and pressure them in return. Locusts fly quite low so unlike most air units they are quite vulnerable to the [[Lotus]], and [[Picket]] are also effective in larger numbers. You might also need mobile anti-air to protect your constructors.&lt;br /&gt;
&lt;br /&gt;
If you are using Airplanes against a player with Gunships, avoid a direct fight unless you have a substantial numerical advantage - Tridents are very strong against your fighters. They can't move fast enough to deal with bombing threats on multiple fronts, so focus on supporting your ground forces with bombing runs. You should still keep some fighters to contest the skies if the gunships enter your territory.&lt;br /&gt;
&lt;br /&gt;
If you are playing the Gunship mirror matchup, try to have more Tridents than they do, while still making things happen in the ground war using Locust raids and the like.&lt;br /&gt;
&lt;br /&gt;
{{Navbox buildings}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=User_talk:Aquanim/DraftCommanders&amp;diff=4074</id>
		<title>User talk:Aquanim/DraftCommanders</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=User_talk:Aquanim/DraftCommanders&amp;diff=4074"/>
		<updated>2018-05-28T18:39:15Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Some comments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Just some ideas/suggestions, otherwise like it in general.  Would be willing to help implement it if I can get my dev copy set up again.&lt;br /&gt;
&lt;br /&gt;
Feedback Loop - how about this increasing commander autorepair when it's stationary and idle, working as if it were repairing itself without requiring the engine to actually let it nanolathe itself?&lt;br /&gt;
&lt;br /&gt;
Pocket Genie - no pun about bottles?  Bottled Djinn?&lt;br /&gt;
&lt;br /&gt;
Augmented Hydraulics seems pretty difficult to balance, range and speed on the same moderate-tough unit.&lt;br /&gt;
&lt;br /&gt;
-- [[User:Darloth3|Darloth3]] ([[User talk:Darloth3|talk]]) 20:39, 28 May 2018 (CEST)&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Commander&amp;diff=3939</id>
		<title>Commander</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Commander&amp;diff=3939"/>
		<updated>2018-05-21T12:56:30Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Huh, damage boost is still 10%.  Must have got confused with target system.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
= Warning: portions of this page are out of date =&lt;br /&gt;
&lt;br /&gt;
The commander system was substantially revamped in winter 2016. This page has only partially been updated to the new system.&lt;br /&gt;
&lt;br /&gt;
= Commander intro =&lt;br /&gt;
Your commander can be configured with a variety of modules to suit your play-style.&lt;br /&gt;
&lt;br /&gt;
After the update, modules are added only at the game and are all unlocked, and you do not need to level up to get any modules.&lt;br /&gt;
&lt;br /&gt;
To keep the game balanced commander modules cost metal ingame and are not all applied at the start of the game. Commanders start at level 1 with a free peashooter and no modules but they can morph an unlimited number of times (but you'll eventually run out of modules after which it is pointless to morph). At Morph 1 (Level 2), commanders gain a single weapon. At morph 3 commanders gain a second weapon which can either be a second regular weapon or a special weapon. If a weapon slot is left empty the commander will be given a free peashooter in its place. Some weapons will replace any other weapons (e.g I get shock rifle, it will replace the first weapon I got)&lt;br /&gt;
&lt;br /&gt;
Each morph level gives a commander more health, more modules or weapons. Morphs have a base cost and additional cost based on the value of the modules or weapons that it will gain when the morph is complete. You can pre-configure your commander buildouts only through level 6 but you can upgrade any number of times in-game.&lt;br /&gt;
&lt;br /&gt;
Unlike regular units, your commander is not disabled while morphing.&lt;br /&gt;
&lt;br /&gt;
= Modules and weapons =&lt;br /&gt;
&lt;br /&gt;
== Number of slots per level ==&lt;br /&gt;
&lt;br /&gt;
Commanders start at level 1. The number of modules and weapons increases with levels.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Commander level !! 1 !! 2 !! 3 !! 4 !! 5 !! +&lt;br /&gt;
|-&lt;br /&gt;
| Base [[File:Ibeam.png|20px]] cost || -&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; ||25 || 100 || 600 || 200 || +100&lt;br /&gt;
|-&lt;br /&gt;
| Total Weapon slots || 0 || 1 || 1 || 2 || 2 || +0&lt;br /&gt;
|-&lt;br /&gt;
| Total Module slots || 0 || 1 || 3 || 5 || 8 || +3&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Equipping weapons and modules costs additional metal.&lt;br /&gt;
&lt;br /&gt;
== Module types ==&lt;br /&gt;
Modules have &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt; names in the unlock list, although their icon color depends on their nature. They fall into four categories.&lt;br /&gt;
&lt;br /&gt;
=== Stackable ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_ablative_armor.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_autorepair.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_high_power_servos.png&lt;br /&gt;
&lt;br /&gt;
These modules are able to stacked as many times as they allow, 8x for some and 10x for drones. Stacking them repeatedly will create a powerful commander, even though their bonuses as quite minor. (10% range/damage/speed for those modules) These are &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt;.&lt;br /&gt;
This type of module is the one that should be used the most, and because of their versatility, it is useful if you intend on getting commanders which do many things, or a single buff commander that is fast, invisible and deals lots of damage. Some of these modules will subtract speed or HP, and should be used with caution as too much will leave the commander a sitting duck.&lt;br /&gt;
&lt;br /&gt;
Modules:&lt;br /&gt;
* '''Advanced targeting system:''' +7.5% range for all weapons. -2.5% speed.&lt;br /&gt;
* '''Damage booster:''' +10% damage for all weapons. -2.5% speed.&lt;br /&gt;
* '''High density plating:''' +1600 HP,-10% speed. Requires Ablative armor plates.&lt;br /&gt;
* '''Ablative armor plates:''' +600 HP&lt;br /&gt;
* '''Companion drone:''' +Weak automatically reconstructed attack drone&lt;br /&gt;
* '''Battle drone:''' +Upgraded autoconstructed drone with slowing laser, requires Companion drone first.&lt;br /&gt;
* '''Carrepairer's nanolathe:''' +4 Buildpower.&lt;br /&gt;
* '''High power servos:''' +8% speed.&lt;br /&gt;
* '''Autorepair system:''' +10HP/sec -100 HP[/list]&lt;br /&gt;
&lt;br /&gt;
=== Support===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_fieldradar.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_areashield.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_jammer.png&lt;br /&gt;
&lt;br /&gt;
Support modules are not stackable. They can provide large expensive bonuses such as a shield, cloaking, jamming or a cloaker. There are also cheap ones such as resurrect and inbuilt radar or an area shield/cloak. These are &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt; as well.&lt;br /&gt;
&lt;br /&gt;
=== Weapon Boosters ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_standoff_rocket.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_autoflechette.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_high_frequency_beam.png&lt;br /&gt;
&lt;br /&gt;
These modules are expensive but give a large bonus to a few specific weapons but can only be applied once. They are a space effective way to spend a module slot but make sure you have the weapon that they affect. They are &amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Weapon types ==&lt;br /&gt;
There are 2 types of weapon, special and normal. Both weapon types are affected by the stackable range and damage modules. Weapon names are in &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Normal ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_beamlaser.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_rocketlauncher.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_gaussrifle.png&lt;br /&gt;
&lt;br /&gt;
These are auto-targetting normal weapons that behave the same was as any other unit. They can be affected by weapon boosters and weapon converters given that it is the right weapon. They are all affected by stackable modules. They are &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Name !! Range !! Reload time !! Damage !! DPS !! Commander !! Notes &lt;br /&gt;
|-&lt;br /&gt;
|Beam Laser||330||||||150||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Flame thrower||270||0.16 ||10 || 60||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Sets units on fire for 15s(15 DPS)&amp;lt;br&amp;gt;pierces units&amp;lt;br&amp;gt;Does more damage against larger units&lt;br /&gt;
|-&lt;br /&gt;
|Heatray||300||0.1 ||45 ||450 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| Damage falls off with range&lt;br /&gt;
|-&lt;br /&gt;
|Machine Gun||285||0.16 ||30 ||180 ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon||&lt;br /&gt;
|-&lt;br /&gt;
|Light particle beam||310||0.34 ||55 || 165||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Lightning Rifle||300||1.66 ||220+&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;550&amp;lt;/font&amp;gt; || 132+&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;330&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| EMP duration: 1s&lt;br /&gt;
|-&lt;br /&gt;
|Missile launcher||415||1 ||80 || 80||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Homing&lt;br /&gt;
|-&lt;br /&gt;
|Riot cannon||275||2 ||220.2 || 110.1||&amp;amp;nbsp;&amp;amp;nbsp;Guardian||&lt;br /&gt;
|-&lt;br /&gt;
|Shotgun||290||2 ||32x12 (384) || 192||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Rocket launcher ||430||3 ||360 || 120||&amp;amp;nbsp;&amp;amp;nbsp;Guardian||Not homing&lt;br /&gt;
|-&lt;br /&gt;
|Pea Shooter ||300||.1 ||12 || 120||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||Default weapon&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Special ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_napalmgrenade.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_disruptorbomb.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_sunburst.png&lt;br /&gt;
&lt;br /&gt;
Special weapons have a long reload time and must be manually aimed with the 'D' key. They are only affected by stackable modules. They are &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;orange&amp;lt;/font&amp;gt; and can only be put on the level 4 weapon slot.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Name !! Range !! Reload time !! Damage !! DPS !! Commander !! Special Notes &lt;br /&gt;
|-&lt;br /&gt;
|Cluster bomb ||360 || 30  || 300x8 (2400)|| 80 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Bomblets spread (like a shotgun)&lt;br /&gt;
|-&lt;br /&gt;
| Concussion shell||450 || 25 ||750 || 30 ||&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Has Impulse (Tosses some units)&lt;br /&gt;
|-&lt;br /&gt;
| Disintigrator ||200 ||30  ||1400 || 46.67 ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| Damage varies on unit size&lt;br /&gt;
|-&lt;br /&gt;
|Disrupter bomb ||450 ||25 ||350+&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;2100&amp;lt;/font&amp;gt; || 14+&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;84&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Has large AOE (512)&lt;br /&gt;
|-&lt;br /&gt;
| Hellfire grenade||450 || 25||200 || 8 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Sets an area on &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;fire&amp;lt;/font&amp;gt; (45s,40dps+3s &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;burning&amp;lt;/font&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| Multistunner||360 || 25||&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;550&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;800&amp;lt;/font&amp;gt; x 16 (&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;8800&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;12800&amp;lt;/font&amp;gt;) ||&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;352&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;512&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Affected by flux amplifier. Max &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;EMP&amp;lt;/font&amp;gt; time: 8s [upgraded: 12s]&lt;br /&gt;
|-&lt;br /&gt;
| SLAM||700 ||30 || 1512|| 50.4 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| High vertical arc&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Key: &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;EMP Damage&amp;lt;/font&amp;gt;, &amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;Slow Damage&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Commander Chassis =&lt;br /&gt;
There are 4 types of commander chassis to choose for a battle.&lt;br /&gt;
&lt;br /&gt;
You can configure custom commanders based on these chassis on your user page; you must be logged in to the Zero-K website and go to: https://zero-k.info/My/Commanders.  These custom commanders may be selected at the beginning of the game in multiplayer matches.  You will still need to upgrade them as usual, but the upgrade options are filled in to your preferences.&lt;br /&gt;
&lt;br /&gt;
== Common attributes ==&lt;br /&gt;
The commander you start the game with produces 4 metal and 6 energy per second, via a unique Vanguard economy module.  Any resurrected commanders who have lost this module produce only 0.4 metal and 0.4 energy per second. They all provide a sight distance of 500 and a sonar of 500. Chassis other than the Engineer Commander have 10 build power and 120 build range and the Engineer commander has 12 build power and 250 build range.&lt;br /&gt;
&lt;br /&gt;
== Chassis list ==&lt;br /&gt;
Note that '''attributes on level 1 and level 2 are equal'''. Morphing to level 2 provides no bonus other than the weapon and module slot.&lt;br /&gt;
&lt;br /&gt;
=== Strike Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commstrike.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* All rounder&lt;br /&gt;
* Decent health and speed&lt;br /&gt;
* Can use the most weapon types&lt;br /&gt;
* Auto-regen bonus&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 2500&amp;lt;br /&amp;gt;Speed: 40.5&amp;lt;br /&amp;gt;Autoheal: 5||HP: 3000&amp;lt;br /&amp;gt;Autoheal: 12.5||HP: 4000&amp;lt;br /&amp;gt;Autoheal: 20||HP: 5000&amp;lt;br /&amp;gt;Autoheal: 27.5||HP: 6000&amp;lt;br /&amp;gt;Autoheal: 35&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Guardian Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commassault.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Best HP&lt;br /&gt;
* Medium speed&lt;br /&gt;
* Gains more HP from increased levels than other chasis do&lt;br /&gt;
* Able to use most non-exotic weapons&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 3000&amp;lt;br /&amp;gt;Speed: 40||HP: 3800&amp;lt;br /&amp;gt;||HP: 4900&amp;lt;br /&amp;gt;||HP: 6000&amp;lt;br /&amp;gt;||HP: 7200&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Recon Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commrecon.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Lowest HP&lt;br /&gt;
* Highest Speed (for a commander)&lt;br /&gt;
* Jumpjets&lt;br /&gt;
* Uses light weapons&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 1600&amp;lt;br /&amp;gt;Speed: 43.5&amp;lt;br /&amp;gt;Can Jump||HP: 2100||HP: 2600||HP: 3100||HP: 3600&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Engineer Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commsupport.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Lowest speed&lt;br /&gt;
* Low HP&lt;br /&gt;
* Gains buildpower with levels&lt;br /&gt;
* Increased build range (250 compared to 120 for others) &lt;br /&gt;
* Fewer direct damage weapons &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 2000&amp;lt;br /&amp;gt;Speed: 36&amp;lt;br /&amp;gt;Build Power: 12||HP: 2500&amp;lt;br /&amp;gt;Build Power: 14||HP: 3000&amp;lt;br /&amp;gt;Build Power: 16||HP: 3700&amp;lt;br /&amp;gt;Build Power: 18||HP: 4500&amp;lt;br /&amp;gt;Build Power: 20&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Exact effects of attribute modifiers =&lt;br /&gt;
Attribute modifiers are applied in this order:&lt;br /&gt;
* Commander Chassis absolute statistics&lt;br /&gt;
* Percentage modifiers both from modules and chassis&lt;br /&gt;
* Absolute modifiers&lt;br /&gt;
&lt;br /&gt;
Percentage modifiers from commanders and stackable modules are additive, not cumulative. Five +10% speed modules multiply a commander's speed by 1.5 instead of by 1.1^5 = 1.61.&lt;br /&gt;
&lt;br /&gt;
Percentage modifiers from weapon boosters and converters are cumulative and applied before other percentage modifiers. Think of them as changing the intrinsic stats of the weapon, rather than adding a bonus.&lt;br /&gt;
&lt;br /&gt;
{{Navbox manual}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Commander&amp;diff=3938</id>
		<title>Commander</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Commander&amp;diff=3938"/>
		<updated>2018-05-21T12:52:14Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Corrected nanolathe boost, reformat module list.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
= Warning: portions of this page are out of date =&lt;br /&gt;
&lt;br /&gt;
The commander system was substantially revamped in winter 2016. This page has only partially been updated to the new system.&lt;br /&gt;
&lt;br /&gt;
= Commander intro =&lt;br /&gt;
Your commander can be configured with a variety of modules to suit your play-style.&lt;br /&gt;
&lt;br /&gt;
After the update, modules are added only at the game and are all unlocked, and you do not need to level up to get any modules.&lt;br /&gt;
&lt;br /&gt;
To keep the game balanced commander modules cost metal ingame and are not all applied at the start of the game. Commanders start at level 1 with a free peashooter and no modules but they can morph an unlimited number of times (but you'll eventually run out of modules after which it is pointless to morph). At Morph 1 (Level 2), commanders gain a single weapon. At morph 3 commanders gain a second weapon which can either be a second regular weapon or a special weapon. If a weapon slot is left empty the commander will be given a free peashooter in its place. Some weapons will replace any other weapons (e.g I get shock rifle, it will replace the first weapon I got)&lt;br /&gt;
&lt;br /&gt;
Each morph level gives a commander more health, more modules or weapons. Morphs have a base cost and additional cost based on the value of the modules or weapons that it will gain when the morph is complete. You can pre-configure your commander buildouts only through level 6 but you can upgrade any number of times in-game.&lt;br /&gt;
&lt;br /&gt;
Unlike regular units, your commander is not disabled while morphing.&lt;br /&gt;
&lt;br /&gt;
= Modules and weapons =&lt;br /&gt;
&lt;br /&gt;
== Number of slots per level ==&lt;br /&gt;
&lt;br /&gt;
Commanders start at level 1. The number of modules and weapons increases with levels.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Commander level !! 1 !! 2 !! 3 !! 4 !! 5 !! +&lt;br /&gt;
|-&lt;br /&gt;
| Base [[File:Ibeam.png|20px]] cost || -&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; ||25 || 100 || 600 || 200 || +100&lt;br /&gt;
|-&lt;br /&gt;
| Total Weapon slots || 0 || 1 || 1 || 2 || 2 || +0&lt;br /&gt;
|-&lt;br /&gt;
| Total Module slots || 0 || 1 || 3 || 5 || 8 || +3&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Equipping weapons and modules costs additional metal.&lt;br /&gt;
&lt;br /&gt;
== Module types ==&lt;br /&gt;
Modules have &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt; names in the unlock list, although their icon color depends on their nature. They fall into four categories.&lt;br /&gt;
&lt;br /&gt;
=== Stackable ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_ablative_armor.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_autorepair.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_high_power_servos.png&lt;br /&gt;
&lt;br /&gt;
These modules are able to stacked as many times as they allow, 8x for some and 10x for drones. Stacking them repeatedly will create a powerful commander, even though their bonuses as quite minor. (10% range/damage/speed for those modules) These are &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt;.&lt;br /&gt;
This type of module is the one that should be used the most, and because of their versatility, it is useful if you intend on getting commanders which do many things, or a single buff commander that is fast, invisible and deals lots of damage. Some of these modules will subtract speed or HP, and should be used with caution as too much will leave the commander a sitting duck.&lt;br /&gt;
&lt;br /&gt;
Modules:&lt;br /&gt;
* '''Advanced targeting system:''' +10% range for all weapons. -2.5% speed.&lt;br /&gt;
* '''Damage booster:''' +7.5% damage for all weapons. -2.5% speed.&lt;br /&gt;
* '''High density plating:''' +1600 HP,-10% speed. Requires Ablative armor plates.&lt;br /&gt;
* '''Ablative armor plates:''' +600 HP&lt;br /&gt;
* '''Companion drone:''' +Weak automatically reconstructed attack drone&lt;br /&gt;
* '''Battle drone:''' +Upgraded autoconstructed drone with slowing laser, requires Companion drone first.&lt;br /&gt;
* '''Carrepairer's nanolathe:''' +4 Buildpower.&lt;br /&gt;
* '''High power servos:''' +8% speed.&lt;br /&gt;
* '''Autorepair system:''' +10HP/sec -100 HP[/list]&lt;br /&gt;
&lt;br /&gt;
=== Support===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_fieldradar.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_areashield.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_jammer.png&lt;br /&gt;
&lt;br /&gt;
Support modules are not stackable. They can provide large expensive bonuses such as a shield, cloaking, jamming or a cloaker. There are also cheap ones such as resurrect and inbuilt radar or an area shield/cloak. These are &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt; as well.&lt;br /&gt;
&lt;br /&gt;
=== Weapon Boosters ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_standoff_rocket.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_autoflechette.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_high_frequency_beam.png&lt;br /&gt;
&lt;br /&gt;
These modules are expensive but give a large bonus to a few specific weapons but can only be applied once. They are a space effective way to spend a module slot but make sure you have the weapon that they affect. They are &amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Weapon types ==&lt;br /&gt;
There are 2 types of weapon, special and normal. Both weapon types are affected by the stackable range and damage modules. Weapon names are in &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Normal ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_beamlaser.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_rocketlauncher.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_gaussrifle.png&lt;br /&gt;
&lt;br /&gt;
These are auto-targetting normal weapons that behave the same was as any other unit. They can be affected by weapon boosters and weapon converters given that it is the right weapon. They are all affected by stackable modules. They are &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Name !! Range !! Reload time !! Damage !! DPS !! Commander !! Notes &lt;br /&gt;
|-&lt;br /&gt;
|Beam Laser||330||||||150||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Flame thrower||270||0.16 ||10 || 60||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Sets units on fire for 15s(15 DPS)&amp;lt;br&amp;gt;pierces units&amp;lt;br&amp;gt;Does more damage against larger units&lt;br /&gt;
|-&lt;br /&gt;
|Heatray||300||0.1 ||45 ||450 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| Damage falls off with range&lt;br /&gt;
|-&lt;br /&gt;
|Machine Gun||285||0.16 ||30 ||180 ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon||&lt;br /&gt;
|-&lt;br /&gt;
|Light particle beam||310||0.34 ||55 || 165||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Lightning Rifle||300||1.66 ||220+&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;550&amp;lt;/font&amp;gt; || 132+&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;330&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| EMP duration: 1s&lt;br /&gt;
|-&lt;br /&gt;
|Missile launcher||415||1 ||80 || 80||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Homing&lt;br /&gt;
|-&lt;br /&gt;
|Riot cannon||275||2 ||220.2 || 110.1||&amp;amp;nbsp;&amp;amp;nbsp;Guardian||&lt;br /&gt;
|-&lt;br /&gt;
|Shotgun||290||2 ||32x12 (384) || 192||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Rocket launcher ||430||3 ||360 || 120||&amp;amp;nbsp;&amp;amp;nbsp;Guardian||Not homing&lt;br /&gt;
|-&lt;br /&gt;
|Pea Shooter ||300||.1 ||12 || 120||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||Default weapon&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Special ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_napalmgrenade.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_disruptorbomb.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_sunburst.png&lt;br /&gt;
&lt;br /&gt;
Special weapons have a long reload time and must be manually aimed with the 'D' key. They are only affected by stackable modules. They are &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;orange&amp;lt;/font&amp;gt; and can only be put on the level 4 weapon slot.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Name !! Range !! Reload time !! Damage !! DPS !! Commander !! Special Notes &lt;br /&gt;
|-&lt;br /&gt;
|Cluster bomb ||360 || 30  || 300x8 (2400)|| 80 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Bomblets spread (like a shotgun)&lt;br /&gt;
|-&lt;br /&gt;
| Concussion shell||450 || 25 ||750 || 30 ||&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Has Impulse (Tosses some units)&lt;br /&gt;
|-&lt;br /&gt;
| Disintigrator ||200 ||30  ||1400 || 46.67 ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| Damage varies on unit size&lt;br /&gt;
|-&lt;br /&gt;
|Disrupter bomb ||450 ||25 ||350+&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;2100&amp;lt;/font&amp;gt; || 14+&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;84&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Has large AOE (512)&lt;br /&gt;
|-&lt;br /&gt;
| Hellfire grenade||450 || 25||200 || 8 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Sets an area on &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;fire&amp;lt;/font&amp;gt; (45s,40dps+3s &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;burning&amp;lt;/font&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| Multistunner||360 || 25||&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;550&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;800&amp;lt;/font&amp;gt; x 16 (&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;8800&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;12800&amp;lt;/font&amp;gt;) ||&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;352&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;512&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Affected by flux amplifier. Max &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;EMP&amp;lt;/font&amp;gt; time: 8s [upgraded: 12s]&lt;br /&gt;
|-&lt;br /&gt;
| SLAM||700 ||30 || 1512|| 50.4 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| High vertical arc&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Key: &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;EMP Damage&amp;lt;/font&amp;gt;, &amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;Slow Damage&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Commander Chassis =&lt;br /&gt;
There are 4 types of commander chassis to choose for a battle.&lt;br /&gt;
&lt;br /&gt;
You can configure custom commanders based on these chassis on your user page; you must be logged in to the Zero-K website and go to: https://zero-k.info/My/Commanders.  These custom commanders may be selected at the beginning of the game in multiplayer matches.  You will still need to upgrade them as usual, but the upgrade options are filled in to your preferences.&lt;br /&gt;
&lt;br /&gt;
== Common attributes ==&lt;br /&gt;
The commander you start the game with produces 4 metal and 6 energy per second, via a unique Vanguard economy module.  Any resurrected commanders who have lost this module produce only 0.4 metal and 0.4 energy per second. They all provide a sight distance of 500 and a sonar of 500. Chassis other than the Engineer Commander have 10 build power and 120 build range and the Engineer commander has 12 build power and 250 build range.&lt;br /&gt;
&lt;br /&gt;
== Chassis list ==&lt;br /&gt;
Note that '''attributes on level 1 and level 2 are equal'''. Morphing to level 2 provides no bonus other than the weapon and module slot.&lt;br /&gt;
&lt;br /&gt;
=== Strike Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commstrike.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* All rounder&lt;br /&gt;
* Decent health and speed&lt;br /&gt;
* Can use the most weapon types&lt;br /&gt;
* Auto-regen bonus&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 2500&amp;lt;br /&amp;gt;Speed: 40.5&amp;lt;br /&amp;gt;Autoheal: 5||HP: 3000&amp;lt;br /&amp;gt;Autoheal: 12.5||HP: 4000&amp;lt;br /&amp;gt;Autoheal: 20||HP: 5000&amp;lt;br /&amp;gt;Autoheal: 27.5||HP: 6000&amp;lt;br /&amp;gt;Autoheal: 35&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Guardian Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commassault.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Best HP&lt;br /&gt;
* Medium speed&lt;br /&gt;
* Gains more HP from increased levels than other chasis do&lt;br /&gt;
* Able to use most non-exotic weapons&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 3000&amp;lt;br /&amp;gt;Speed: 40||HP: 3800&amp;lt;br /&amp;gt;||HP: 4900&amp;lt;br /&amp;gt;||HP: 6000&amp;lt;br /&amp;gt;||HP: 7200&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Recon Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commrecon.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Lowest HP&lt;br /&gt;
* Highest Speed (for a commander)&lt;br /&gt;
* Jumpjets&lt;br /&gt;
* Uses light weapons&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 1600&amp;lt;br /&amp;gt;Speed: 43.5&amp;lt;br /&amp;gt;Can Jump||HP: 2100||HP: 2600||HP: 3100||HP: 3600&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Engineer Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commsupport.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Lowest speed&lt;br /&gt;
* Low HP&lt;br /&gt;
* Gains buildpower with levels&lt;br /&gt;
* Increased build range (250 compared to 120 for others) &lt;br /&gt;
* Fewer direct damage weapons &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 2000&amp;lt;br /&amp;gt;Speed: 36&amp;lt;br /&amp;gt;Build Power: 12||HP: 2500&amp;lt;br /&amp;gt;Build Power: 14||HP: 3000&amp;lt;br /&amp;gt;Build Power: 16||HP: 3700&amp;lt;br /&amp;gt;Build Power: 18||HP: 4500&amp;lt;br /&amp;gt;Build Power: 20&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Exact effects of attribute modifiers =&lt;br /&gt;
Attribute modifiers are applied in this order:&lt;br /&gt;
* Commander Chassis absolute statistics&lt;br /&gt;
* Percentage modifiers both from modules and chassis&lt;br /&gt;
* Absolute modifiers&lt;br /&gt;
&lt;br /&gt;
Percentage modifiers from commanders and stackable modules are additive, not cumulative. Five +10% speed modules multiply a commander's speed by 1.5 instead of by 1.1^5 = 1.61.&lt;br /&gt;
&lt;br /&gt;
Percentage modifiers from weapon boosters and converters are cumulative and applied before other percentage modifiers. Think of them as changing the intrinsic stats of the weapon, rather than adding a bonus.&lt;br /&gt;
&lt;br /&gt;
{{Navbox manual}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
	<entry>
		<id>https://zero-k.info/mediawiki/index.php?title=Commander&amp;diff=3937</id>
		<title>Commander</title>
		<link rel="alternate" type="text/html" href="https://zero-k.info/mediawiki/index.php?title=Commander&amp;diff=3937"/>
		<updated>2018-05-21T12:46:11Z</updated>

		<summary type="html">&lt;p&gt;Darloth3: Commanders cannot be produced from the strider hub.  Corrected sonar range.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
= Warning: portions of this page are out of date =&lt;br /&gt;
&lt;br /&gt;
The commander system was substantially revamped in winter 2016. This page has only partially been updated to the new system.&lt;br /&gt;
&lt;br /&gt;
= Commander intro =&lt;br /&gt;
Your commander can be configured with a variety of modules to suit your play-style.&lt;br /&gt;
&lt;br /&gt;
After the update, modules are added only at the game and are all unlocked, and you do not need to level up to get any modules.&lt;br /&gt;
&lt;br /&gt;
To keep the game balanced commander modules cost metal ingame and are not all applied at the start of the game. Commanders start at level 1 with a free peashooter and no modules but they can morph an unlimited number of times (but you'll eventually run out of modules after which it is pointless to morph). At Morph 1 (Level 2), commanders gain a single weapon. At morph 3 commanders gain a second weapon which can either be a second regular weapon or a special weapon. If a weapon slot is left empty the commander will be given a free peashooter in its place. Some weapons will replace any other weapons (e.g I get shock rifle, it will replace the first weapon I got)&lt;br /&gt;
&lt;br /&gt;
Each morph level gives a commander more health, more modules or weapons. Morphs have a base cost and additional cost based on the value of the modules or weapons that it will gain when the morph is complete. You can pre-configure your commander buildouts only through level 6 but you can upgrade any number of times in-game.&lt;br /&gt;
&lt;br /&gt;
Unlike regular units, your commander is not disabled while morphing.&lt;br /&gt;
&lt;br /&gt;
= Modules and weapons =&lt;br /&gt;
&lt;br /&gt;
== Number of slots per level ==&lt;br /&gt;
&lt;br /&gt;
Commanders start at level 1. The number of modules and weapons increases with levels.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Commander level !! 1 !! 2 !! 3 !! 4 !! 5 !! +&lt;br /&gt;
|-&lt;br /&gt;
| Base [[File:Ibeam.png|20px]] cost || -&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; ||25 || 100 || 600 || 200 || +100&lt;br /&gt;
|-&lt;br /&gt;
| Total Weapon slots || 0 || 1 || 1 || 2 || 2 || +0&lt;br /&gt;
|-&lt;br /&gt;
| Total Module slots || 0 || 1 || 3 || 5 || 8 || +3&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Equipping weapons and modules costs additional metal.&lt;br /&gt;
&lt;br /&gt;
== Module types ==&lt;br /&gt;
Modules have &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt; names in the unlock list, although their icon color depends on their nature. They fall into four categories.&lt;br /&gt;
&lt;br /&gt;
=== Stackable ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_ablative_armor.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_autorepair.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_high_power_servos.png&lt;br /&gt;
&lt;br /&gt;
These modules are able to stacked as many times as they allow, 8x for some and 10x for drones. Stacking them repeatedly will create a powerful commander, even though their bonuses as quite minor. (10% range/damage/speed for those modules) These are &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt;.&lt;br /&gt;
This type of module is the one that should be used the most, and because of their versatility, it is useful if you intend on getting commanders which do many things, or a single buff commander that is fast, invisible and deals lots of damage. Some of these modules will subtract speed or HP, and should be used with caution as too much will leave the commander a sitting duck.&lt;br /&gt;
Modules:&lt;br /&gt;
Advanced targeting system +10% range for all weapons.-2.5% speed.&lt;br /&gt;
Damage booster +10% damage for all weapons.&lt;br /&gt;
High density plating +1600 HP,-10% speed. Requires Ablative armor plates.&lt;br /&gt;
Ablative armor plates +600 HP&lt;br /&gt;
Companion drone +Weak attack drone&lt;br /&gt;
Battle drone +Upgraded drone, requires Companion drone first.&lt;br /&gt;
Carrepairer's nanolathe +5 Buildpower.&lt;br /&gt;
High power servos +10% speed.&lt;br /&gt;
Autorepair system +10HP/sec -100 HP&lt;br /&gt;
&lt;br /&gt;
=== Support===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_fieldradar.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_areashield.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/module_jammer.png&lt;br /&gt;
&lt;br /&gt;
Support modules are not stackable. They can provide large expensive bonuses such as a shield, cloaking, jamming or a cloaker. There are also cheap ones such as resurrect and inbuilt radar or an area shield/cloak. These are &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;cyan&amp;lt;/font&amp;gt; as well.&lt;br /&gt;
&lt;br /&gt;
=== Weapon Boosters ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_standoff_rocket.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_autoflechette.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/weaponmod_high_frequency_beam.png&lt;br /&gt;
&lt;br /&gt;
These modules are expensive but give a large bonus to a few specific weapons but can only be applied once. They are a space effective way to spend a module slot but make sure you have the weapon that they affect. They are &amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;purple&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Weapon types ==&lt;br /&gt;
There are 2 types of weapon, special and normal. Both weapon types are affected by the stackable range and damage modules. Weapon names are in &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Normal ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_beamlaser.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_rocketlauncher.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_gaussrifle.png&lt;br /&gt;
&lt;br /&gt;
These are auto-targetting normal weapons that behave the same was as any other unit. They can be affected by weapon boosters and weapon converters given that it is the right weapon. They are all affected by stackable modules. They are &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Name !! Range !! Reload time !! Damage !! DPS !! Commander !! Notes &lt;br /&gt;
|-&lt;br /&gt;
|Beam Laser||330||||||150||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Flame thrower||270||0.16 ||10 || 60||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Sets units on fire for 15s(15 DPS)&amp;lt;br&amp;gt;pierces units&amp;lt;br&amp;gt;Does more damage against larger units&lt;br /&gt;
|-&lt;br /&gt;
|Heatray||300||0.1 ||45 ||450 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| Damage falls off with range&lt;br /&gt;
|-&lt;br /&gt;
|Machine Gun||285||0.16 ||30 ||180 ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon||&lt;br /&gt;
|-&lt;br /&gt;
|Light particle beam||310||0.34 ||55 || 165||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Lightning Rifle||300||1.66 ||220+&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;550&amp;lt;/font&amp;gt; || 132+&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;330&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| EMP duration: 1s&lt;br /&gt;
|-&lt;br /&gt;
|Missile launcher||415||1 ||80 || 80||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Homing&lt;br /&gt;
|-&lt;br /&gt;
|Riot cannon||275||2 ||220.2 || 110.1||&amp;amp;nbsp;&amp;amp;nbsp;Guardian||&lt;br /&gt;
|-&lt;br /&gt;
|Shotgun||290||2 ||32x12 (384) || 192||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||&lt;br /&gt;
|-&lt;br /&gt;
|Rocket launcher ||430||3 ||360 || 120||&amp;amp;nbsp;&amp;amp;nbsp;Guardian||Not homing&lt;br /&gt;
|-&lt;br /&gt;
|Pea Shooter ||300||.1 ||12 || 120||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer||Default weapon&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Special ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_napalmgrenade.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_disruptorbomb.png https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commweapon_sunburst.png&lt;br /&gt;
&lt;br /&gt;
Special weapons have a long reload time and must be manually aimed with the 'D' key. They are only affected by stackable modules. They are &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;orange&amp;lt;/font&amp;gt; and can only be put on the level 4 weapon slot.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Name !! Range !! Reload time !! Damage !! DPS !! Commander !! Special Notes &lt;br /&gt;
|-&lt;br /&gt;
|Cluster bomb ||360 || 30  || 300x8 (2400)|| 80 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Bomblets spread (like a shotgun)&lt;br /&gt;
|-&lt;br /&gt;
| Concussion shell||450 || 25 ||750 || 30 ||&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Has Impulse (Tosses some units)&lt;br /&gt;
|-&lt;br /&gt;
| Disintigrator ||200 ||30  ||1400 || 46.67 ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| Damage varies on unit size&lt;br /&gt;
|-&lt;br /&gt;
|Disrupter bomb ||450 ||25 ||350+&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;2100&amp;lt;/font&amp;gt; || 14+&amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;84&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Has large AOE (512)&lt;br /&gt;
|-&lt;br /&gt;
| Hellfire grenade||450 || 25||200 || 8 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon|| Sets an area on &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;fire&amp;lt;/font&amp;gt; (45s,40dps+3s &amp;lt;font color=&amp;quot;orange&amp;quot;&amp;gt;burning&amp;lt;/font&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| Multistunner||360 || 25||&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;550&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;800&amp;lt;/font&amp;gt; x 16 (&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;8800&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;12800&amp;lt;/font&amp;gt;) ||&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;352&amp;lt;/font&amp;gt;/&amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;512&amp;lt;/font&amp;gt; ||Strike&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Recon&amp;lt;br&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Engineer|| Affected by flux amplifier. Max &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;EMP&amp;lt;/font&amp;gt; time: 8s [upgraded: 12s]&lt;br /&gt;
|-&lt;br /&gt;
| SLAM||700 ||30 || 1512|| 50.4 ||&amp;amp;nbsp;&amp;amp;nbsp;Guardian|| High vertical arc&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Key: &amp;lt;font color=&amp;quot;cyan&amp;quot;&amp;gt;EMP Damage&amp;lt;/font&amp;gt;, &amp;lt;font color=&amp;quot;purple&amp;quot;&amp;gt;Slow Damage&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Commander Chassis =&lt;br /&gt;
There are 4 types of commander chassis to choose for a battle.&lt;br /&gt;
&lt;br /&gt;
You can configure custom commanders based on these chassis on your user page; you must be logged in to the Zero-K website and go to: https://zero-k.info/My/Commanders.  These custom commanders may be selected at the beginning of the game in multiplayer matches.  You will still need to upgrade them as usual, but the upgrade options are filled in to your preferences.&lt;br /&gt;
&lt;br /&gt;
== Common attributes ==&lt;br /&gt;
The commander you start the game with produces 4 metal and 6 energy per second, via a unique Vanguard economy module.  Any resurrected commanders who have lost this module produce only 0.4 metal and 0.4 energy per second. They all provide a sight distance of 500 and a sonar of 500. Chassis other than the Engineer Commander have 10 build power and 120 build range and the Engineer commander has 12 build power and 250 build range.&lt;br /&gt;
&lt;br /&gt;
== Chassis list ==&lt;br /&gt;
Note that '''attributes on level 1 and level 2 are equal'''. Morphing to level 2 provides no bonus other than the weapon and module slot.&lt;br /&gt;
&lt;br /&gt;
=== Strike Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commstrike.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* All rounder&lt;br /&gt;
* Decent health and speed&lt;br /&gt;
* Can use the most weapon types&lt;br /&gt;
* Auto-regen bonus&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 2500&amp;lt;br /&amp;gt;Speed: 40.5&amp;lt;br /&amp;gt;Autoheal: 5||HP: 3000&amp;lt;br /&amp;gt;Autoheal: 12.5||HP: 4000&amp;lt;br /&amp;gt;Autoheal: 20||HP: 5000&amp;lt;br /&amp;gt;Autoheal: 27.5||HP: 6000&amp;lt;br /&amp;gt;Autoheal: 35&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Guardian Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commassault.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Best HP&lt;br /&gt;
* Medium speed&lt;br /&gt;
* Gains more HP from increased levels than other chasis do&lt;br /&gt;
* Able to use most non-exotic weapons&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 3000&amp;lt;br /&amp;gt;Speed: 40||HP: 3800&amp;lt;br /&amp;gt;||HP: 4900&amp;lt;br /&amp;gt;||HP: 6000&amp;lt;br /&amp;gt;||HP: 7200&amp;lt;br /&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Recon Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commrecon.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Lowest HP&lt;br /&gt;
* Highest Speed (for a commander)&lt;br /&gt;
* Jumpjets&lt;br /&gt;
* Uses light weapons&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 1600&amp;lt;br /&amp;gt;Speed: 43.5&amp;lt;br /&amp;gt;Can Jump||HP: 2100||HP: 2600||HP: 3100||HP: 3600&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Engineer Commander ===&lt;br /&gt;
https://raw.githubusercontent.com/ZeroK-RTS/Zero-K/master/unitpics/commsupport.png&amp;lt;br /&amp;gt;&lt;br /&gt;
* Lowest speed&lt;br /&gt;
* Low HP&lt;br /&gt;
* Gains buildpower with levels&lt;br /&gt;
* Increased build range (250 compared to 120 for others) &lt;br /&gt;
* Fewer direct damage weapons &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
! Base Attributes !! Level 2 !! Level 3 !! Level 4 !! Level 5 &lt;br /&gt;
|-&lt;br /&gt;
|HP: 2000&amp;lt;br /&amp;gt;Speed: 36&amp;lt;br /&amp;gt;Build Power: 12||HP: 2500&amp;lt;br /&amp;gt;Build Power: 14||HP: 3000&amp;lt;br /&amp;gt;Build Power: 16||HP: 3700&amp;lt;br /&amp;gt;Build Power: 18||HP: 4500&amp;lt;br /&amp;gt;Build Power: 20&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Exact effects of attribute modifiers =&lt;br /&gt;
Attribute modifiers are applied in this order:&lt;br /&gt;
* Commander Chassis absolute statistics&lt;br /&gt;
* Percentage modifiers both from modules and chassis&lt;br /&gt;
* Absolute modifiers&lt;br /&gt;
&lt;br /&gt;
Percentage modifiers from commanders and stackable modules are additive, not cumulative. Five +10% speed modules multiply a commander's speed by 1.5 instead of by 1.1^5 = 1.61.&lt;br /&gt;
&lt;br /&gt;
Percentage modifiers from weapon boosters and converters are cumulative and applied before other percentage modifiers. Think of them as changing the intrinsic stats of the weapon, rather than adding a bonus.&lt;br /&gt;
&lt;br /&gt;
{{Navbox manual}}&lt;/div&gt;</summary>
		<author><name>Darloth3</name></author>
		
	</entry>
</feed>