Back to Content

Prefabs


CopperCube supports prefabs, the creation and re-using of 3d items. You can easily download and install premade 3d items and use them in your 3d scenes by simply selecting them in the prefabs window.



The prefabs window



How to add external prefabs into CopperCube


CopperCube comes with some few preinstalled prefabs. If you have downloaded and extracted an archive with additional prefabs, installing them into CopperCube so you can use them is quite easy: Right click into the prefabs window, select 'Add directory with prefabs' and select the downloaded directory. Removing and editing the prefabs directory is possible in the Options dialog (Tools -> Options).

How to create your own prefabs

Creating your own prefabs is quite simple: Simply export your CopperCube file as CopperCube prefab using the menu 'File' -> 'Export' -> 'Save current file as CopperCube Prefab'. Note that if your file includes more than one scene, only the first scene will be used as prefab. Also, be sure to clean up your scene, don't forget to erase unnesessary sky boxes and similar before exporting.

If you want to create a directory of prefabs to be used by other people, ensure that all the textures used by the prefabs are included in the directory of the prefabs so that none of your prefab is referencing a texture from your local hard drive which you are not including in the prefab archive you are sending out.
A simple way of creating your prefabs to ensure this is the following:

Assigning Icons to your prefabs

To let your prefabs appear with a nice icon in the prefabs browser in CopperCube, simply create a windows bitmap .bmp file named like your prefab in the same directory. For example if your prefab is named foobar.ccp, then you place a bitmap named foobar.bmp in the same directory. The bitmap needs to be 32x32 pixels in size. The color (255,0,255) is treated as transparent.

Assigning Copyright information to your prefabs

Similar to creating an icon, you can also add some copyright information to your prefab. Simply create a .txt text file named like your prefab in the same directory. For example if your prefab is named foobar.ccp, then you place a bitmap named foobar.txt in the same directory. The content of that file will be shown when right clicking your prefab in CopperCube.