Creating a part icon: Difference between revisions

From KSP 2 Modding Wiki
No edit summary
No edit summary
 
Line 3: Line 3:
# Download the <code>KSP2_IconGenerator.blend</code> file from this location: https://github.com/KSP2Community/CommunityPartsPack/tree/main/Parts.
# Download the <code>KSP2_IconGenerator.blend</code> file from this location: https://github.com/KSP2Community/CommunityPartsPack/tree/main/Parts.
# Copy then open the <code>KSP2_IconGenerator.blend</code> file.
# Copy then open the <code>KSP2_IconGenerator.blend</code> file.
# Click File > Import > FBX and import the part.
# Click '''File > Import > FBX''' and import the part.
# In “Scene Collection” on the right, drag and drop the “KSP2 Paintable material” (present in “ADD YOUR MODEL HERE!) onto the model.
# In '''Scene Collection''' on the right, drag and drop the <code>KSP2 Paintable material</code> (present in <code>ADD YOUR MODEL HERE!</code>) onto the model.
# In the shader editor, import the part textures.
# In the '''Shader editor''', import the part textures:
## Diffuse = Albedo
## '''Diffuse''' = '''Albedo'''
## Set the “Color Space” field to “Non-Color” for Metallic, Normal, and Ambient Occlusion
## Set the '''Color Space''' field to '''Non-Color''' for '''Metallic''', '''Normal''', and '''Ambient Occlusion'''
## If no occlusion, set the “Occlusion Strength” value to 0.
## If no occlusion, set the '''Occlusion Strength''' value to 0.
# Select the camera (press 0 to preview the rendering)
# Select the camera (press 0 to preview the rendering)
# Resize and move the model if necessary.
# Resize and move the model if necessary.
# Remove the “ADD MODEL HERE!item.
# Remove the <code>ADD MODEL HERE!</code> item.
# Press F12.
# Press '''F12'''.
# Save the image (Alt + S) as <part name>_icon.png.
# Save the image ('''Alt + S''') as <code><part name>_icon.png</code>.
  '''How to assign materials to multiple objects in Blender?'''
  '''How to assign materials to multiple objects in Blender?'''
  1. Go to object mode.
  1. Go to '''object mode'''.
  2. Prepare one object with the materials you want assigned to multiple objects.
  2. Prepare one object with the materials you want assigned to multiple objects.
  3. Select all objects you want to copy the materials to.
  3. Select all objects you want to copy the materials to.
  4. Hold shift and click the object you prepared last to make it the active object.
  4. Hold '''shift''' and '''click''' the object you prepared last to make it the active object.
  5. Press Ctrl+L.
  5. Press '''Ctrl+L'''.
  6. Choose link materials.
  6. Choose '''link materials'''.


== In Unity ==
== In Unity ==
Line 26: Line 26:
# Open the mod's Unity project.
# Open the mod's Unity project.
# Move the file to the Asset folder in Unity.
# Move the file to the Asset folder in Unity.
# Make the file addressable. The name of the addressable must be <part name>_icon.png.
# Make the file addressable. The name of the addressable must be <code><part name>_icon.png</code>.
# Select the picture in Unity. In the Inspector window, set the value “Sprite” to the “Texture Type” field. Click on “Apply”.
# Select the picture in Unity. In the Inspector window, set the value '''Sprite''' to the '''Texture Type''' field. Click on '''Apply'''.
[[Category:Parts and modules]]
[[Category:Parts and modules]]

Latest revision as of 11:23, 24 February 2024

In Blender

  1. Download the KSP2_IconGenerator.blend file from this location: https://github.com/KSP2Community/CommunityPartsPack/tree/main/Parts.
  2. Copy then open the KSP2_IconGenerator.blend file.
  3. Click File > Import > FBX and import the part.
  4. In Scene Collection on the right, drag and drop the KSP2 Paintable material (present in ADD YOUR MODEL HERE!) onto the model.
  5. In the Shader editor, import the part textures:
    1. Diffuse = Albedo
    2. Set the Color Space field to Non-Color for Metallic, Normal, and Ambient Occlusion
    3. If no occlusion, set the Occlusion Strength value to 0.
  6. Select the camera (press 0 to preview the rendering)
  7. Resize and move the model if necessary.
  8. Remove the ADD MODEL HERE! item.
  9. Press F12.
  10. Save the image (Alt + S) as <part name>_icon.png.
How to assign materials to multiple objects in Blender?
1. Go to object mode.
2. Prepare one object with the materials you want assigned to multiple objects.
3. Select all objects you want to copy the materials to.
4. Hold shift and click the object you prepared last to make it the active object.
5. Press Ctrl+L.
6. Choose link materials.

In Unity

  1. Open the mod's Unity project.
  2. Move the file to the Asset folder in Unity.
  3. Make the file addressable. The name of the addressable must be <part name>_icon.png.
  4. Select the picture in Unity. In the Inspector window, set the value Sprite to the Texture Type field. Click on Apply.