Editing Blender To Zero-K
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 25: | Line 25: | ||
=== Importing textures === | === Importing textures === | ||
− | 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. | + | 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. |
− | |||
− | |||
− | |||
− | |||
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. | 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. | ||
Line 38: | Line 34: | ||
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->External Data menu for those options. | 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->External Data menu for those options. | ||
+ | |||
=== Modelling for Zero-K === | === Modelling for Zero-K === | ||
Line 62: | Line 59: | ||
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. | 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. | ||
− | 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 | + | 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. |
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. | 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. | ||
== Export the model to .dae format == | == Export the model to .dae format == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== A note on animation === | === A note on animation === | ||
− | |||
− | |||
== Set up texture associations and .dae.lua metadata == | == Set up texture associations and .dae.lua metadata == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Set up Zero-K mod that contains and uses your files == | == Set up Zero-K mod that contains and uses your files == | ||
− | |||
− | |||
− | == | + | == Run Zero-K and point at your mod == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | == Fix whatever isn't right == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== The other bits == | == The other bits == | ||
Line 178: | Line 125: | ||
<pre> | <pre> | ||
− | buildingGroundDecalDecaySpeed = 30, --Seconds decal | + | buildingGroundDecalDecaySpeed = 30, --Seconds decal fades in or out of existence? |
− | buildingGroundDecalSizeX = 12, --Size of | + | buildingGroundDecalSizeX = 12, --Size of decal X axis in footprint units |
− | buildingGroundDecalSizeY = 12, --Size of | + | buildingGroundDecalSizeY = 12, --Size of decal Y axis in footprint units |
buildingGroundDecalType = [[unitname_aoplane.dds]], --filename of decal | buildingGroundDecalType = [[unitname_aoplane.dds]], --filename of decal | ||
Line 192: | Line 139: | ||
=== unitpic === | === unitpic === | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |