Skip to content

How to: Generate perfect part thumbnails

Eric Mor edited this page Dec 15, 2022 · 2 revisions

This mod will show you how to easily generate thumbnail icons for your custom parts, so that they match perfectly the part preview in the palette. An example of how it looks:

For this tutorial, you will need to download and install the latest version of the ModCreatorKit (and you also need the Spore Launcher Kit)

Fixing the part preview

In the Spore editor, when you hover the mouse over a part in the palette, it will show a 3d preview of it. If you have ever developed a custom part you might have noticed, however, that for custom parts usually this preview is not centered, and sometimes the part is not even fully visible. This has a pretty easy solution, actually:

  1. Open the .prop.prop_t of your custom part.
  2. Find the modelDefaultChannelsBBox property.
  3. If you find it, remove it.

Done! If you are wondering why this happened, that property defines the boundaries of your part, which are used to center it in the part preview. Often part mods just copy this property from somewhere else, but it’s actually not necessary: when the property is not present, the boundaries will be calculated from the model itself.

Generating a part thumbnail

For the thumbnail, you are going to need the latest version of the ModCreatorKit mod. This will generate a thumbnail that corresponds to the exact first frame of the part preview. It will also use the same beige color used in Spore part icons, but you can change that if you want.

Making a preview page

Since the icon is generated from the part preview, it will probably generate in a resolution that is too low. To fix that, you might want to create a new parts page with bigger items. These properties will make a page with a single 128×128 item, which will generate icons with enough quality (this assumes you know how palette pages work):

bool palettePageUseAbsoluteItemSize true
float paletteItemWidth 128
float paletteItemHeight 128
int32 palettePageNumRows 1
int32 palettePageNumColumns 1
bool palettePageUseRelativeLayout false
float palettePageHorizontalOffset 40

Now add whatever part you want to generate a thumbnail for into this palette page.

Using the ModCreatorKit

  1. Open the game and go to the editor that has your part.
  2. Open the cheat console with Ctrl+C, and type the cheat: captureIcon "destinationPath" Instead of destinationPath, type the actual path to the folder where the images will be saved. For example:
  3. Hover the mouse over the part of which you want to generate the thumbnail. You have to wait until the part zooms and starts rotating; a message in the console will appear when the image was saved.

Done! The image will be saved with the hash name of your part. You can rename it if you want to have the same filename as the original part, but they should work without renaming them as well. Now just copy the images into the CreaturePartIcons~ folder (or a different folder if you are working on a different editor). If you really want to be the thumbnail to be perfect, you should consider adding some shadow around it like Spore parts do.

Also, the thumbnail generator uses a light beige color (#CED4AF) as the base color for the part, as that is the one used in vanilla Spore parts. If you want another color, you can specifiy it with the -color argument (but it uses numbers from 0.0 to 1.0!). For example, to generate with a red base color: captureIcon "C:\Users\Eric\Desktop\" -color (1.0, 0.0, 0.0)

Clone this wiki locally