Space Engineers 2

Space Engineers 2

Not enough ratings
Space Engineers 2 | Guide: Create New Voxel Material
By KeenSWH and 2 collaborators
This tutorial provides a guide to creating a new voxel material in the VRAGE3 Editor.
   
Award
Favorite
Favorited
Unfavorite
Prerequisites

⏱️ Time to complete: ~8 mins

Please ensure you have followed the section on “Tool Setup and Mod Creation” in the VRAGE3 Modding Overview guide prior to starting this guide.

If you are not interested in the creation process of your own material please skip to the VRAGE3 Editor section and use the example materials provided which can be found here: Steam\steamapps\common\Space Engineers 2 - Mod SDK\ExampleMod1\Ice Voxel
Art Process
Triplanar materials: Voxels are made of triplanar material projections. This means that we can map a texture three times with planar maps along the X, Y, and Z axes, and then blend between these three samples based on the angle of the face, using the one that fits best with the least stretching.




Distance Based Textures: Voxel Materials have another 3 types of textures, based on the distance that is going to be seen by the player: Near, Far1 and Far2



Depending on the distance of the character to this voxel, it will transition from one texture set to another.
Art Process - Example
For this example a single texture is uniformly applied across all axes, with distance being the only source of variation for simplicity and consistency. Although implementing separate textures for the top, front, and sides is possible, it is not included here.

  1. Source Textures: To create variations of a voxel material based on distance (Near, Far1, and Far2), locate or create three distinct materials. For example, the Ice Asteroid was created using three different materials sourced from “megascans”.

    Near

    Far1

    Far2

  2. Polish: After downloading the texture sets, the albedo files of each were modified to more resemble ice using an image editing program.

  3. Export: Export the files as .png and make sure that the remaining files have the same file format (Editor will not allow material creation with different formats mixed)

  4. Naming: Give the name <Name_<Axis>_<Distance>_<Type> e.g IceAsteroid_Y_Near_Albedo Do this for all the files (respecting the distance purpose):



Quick notes:
  • Our textures a driven by Height map range from -20cm (black values) to +20cm (white values)
  • Normal maps are OpenGL
VRAGE3 Mod Editor: Adding Source Files & Making Material Assets
  1. Drag Folder: Drag the Ice Voxel folder from ExampleMod1 in your operating system’s file explorer to the Editor
    Note: The editor will take the source files and generate the texture and material files automatically. This may take some due to the amount of files that are generated.

  2. Select Material File: When the editor has finished processing all the files select “IceMaterial.def”

  3. Base Texture Scale: Adjust the slider for Base Texture Scale in the Texture LOD Settings section to 9
Creating the Voxel Material Definitions
Voxel Material Definition

  1. Create Voxel Material: In the project explorer Right Click on empty space, Create Definition → search for, and select VoxelMaterialDefinition


  2. Name Definition: Name your definition “IceModVoxelMaterialDefinition”

  3. Name the Material: The newly created definition should be automatically selected and in focus of the “Property Inspector”, in the name field give the material a name like IceMod

  4. Physical Material: Left-click the Asset Finder Button (...) in the physics Material field where it says “None (VoxelPhysicsMaterialDefinition)” and search for and select “IceLikeMaterial.def”
Voxel Render Material Definition
  1. Create Voxel Render Material: In the Project Explorer Right click on empty space, Create Definition → search for, and select VoxelRenderMaterialDefinition

  2. Name Definition: Name your definition “IceModVoxelRenderMaterialDefinition”

  3. Add Voxel Material: The newly created definition should be automatically selected and in focus of the “Property Inspector” Drag the IceModVoxelMaterial.def to the Voxel Material field where it says None (Voxel Material Definition)

  4. Add Render Material: Drag “IceAsteroid.def” to where it says None (TriPlanarSingleMaterialDefinition)


  5. Preview: Double click on the IceAsteriod.def material file, this will bring up a preview of the material in the Render View window
Asteroid Generator Setup
  1. Search: Press the magnifying glass and in the search bar search for CombinedGenerator2.def

  2. Override Definition: Right click the “CombinedGenerator2.def”, Create Partial Definition (Override)

  3. Select Mod Folder: An operating system window will appear, press “Select Folder”

  4. Select Generator: In the project explorer select the newly created override of CombinedGenerator2.def

  5. Update Surface Materials: Scroll down to the Surface Materials Section, drag the Voxel Material Definition you created onto the first voxel materials present and remove the rest by pressing the X


You should now be able to start your game by going to the menu bar → Project → Start Game and on starting a new game have all the procedurally generated asteroids be that of your newly created material.
Video Guide
Support & Links
In case you need more help, check out the Modding section of our Discord[discord.gg] – our team and community are there to support you!



🛠️ Feedback & Support - https://support.keenswh.com/
🗺️ Roadmap: https://2.spaceengineersgame.com/roadmap-2/#current
🛰️ Discord: https://discord.gg/keenswh
📫 Newsletter: https://www.keenswh.com/newsletter
➡️ Connect and find us on your platform of choice: https://www.keenswh.com/connect/