Skip to content
RHY3756547 edited this page Sep 9, 2017 · 4 revisions

While the game automatically generates meshes for objects in the game from the sprites, some can be completely incorrect. In these cases, it is useful to export the object mesh and fix it yourself in an external program.

By booting the game in Volcanic (Volcanic.exe) and entering a lot (ideally in Sandbox Mode), you can browse through the objects in the game to find objects you wish to fix, and export the generated 3D meshes from them using the 3D Debug tab.

All OBJ exports contain this comment, which explains how the naming convention works.

# Generated by the FreeSO FSOm Exporter tool.
# Meshes can be cleaned up then re-imported via Volcanic.
# One material per object... Note that material names must follow this format:
# - '$_SPR_rot#_#': uses the texture from the SPR this DGRP would normally use, 
#                 at the given rotation and index.
# - '$_TEX_#': import a custom PNG texture at the given chunk ID. Textures can be 
#            shared across multiple DGRPs by using the same ID.
# Replace $ with the dynamic sprite index. 0 means base. (untoggleable)
# Textures are assumed to have a filename equivalent to their material name, plus png.

Dynamic sprites can be tied to the dynamic sprites present in the DGRP you have exported. Most object DGRPs do not have any, though you can find more information on each dynamic sprite of a DGRP in the Appearance tab.

Importing the obj into an 3D mesh editor such as Blender will immediately allow you to edit the object's geometry and UV map. To see the texture in the editor, switch to Material view, then change the world to have Environment lighting with energy 1.

You can then export any changes from blender back into the .OBJ format. These .OBJs can be imported into volcanic to replace generated meshes.

Object name conventions must be followed when editing objects for them to successfully re-import into the game. It is allowed to have text after the end of an object name if it is prefaced by an underscore... eg. 0_TEX_1_customname. This is ignored by the importer.

Blender .OBJ Export Settings

Faces must be triangulated, and edges should not be allowed. You should also disable "write normals", and it is not necessary to write materials. (textures are inferred from the object name)

Custom Texture import

Meshes with custom textures should have objects named as follows.

The corresponding textures for each object should be found in the same folder as your exported .OBJ. They don't need the dynamic sprite index (eg. 0_) prepended, since texture resources are shared between all sprites in an iff file.

IFF Save mode

By default, replacement meshes and textures are saved in the Content/MeshReplace folder. If you are making custom content, you can save your replacement meshes and textures directly into the object file using the checkbox at the top of the 3D Debug window.

This also allows you to save reconstruction settings for your object (these changes are temporary if iff mode is not enabled), which is useful if you are using the FreeSO official blender object exporter. Changes can be saved on the main volcanic window, as usual.

Multitile Objects

In The Sims, multitile objects are made out of separate single tile parts. In volcanic, you can choose which single tile part you are modifying from the combo box on the top right. In 3D Debug, all tiles except from the target part will disappear when you have selected a single tile.

There are two approaches to making multitile objects. Making replacement meshes for each single tile, or making a large mesh which covers the whole thing on a single tile, and blanking out the other tiles with empty OBJ files. It is up to the modeller to decide which is appropriate, though you will likely have to make your own texture to perform the full object replacement on one tile.

Notes

Volcanic is unstable in DirectX mode, due to the way the GUI embedded game displays work. It is likely that volcanic will quickly crash when looking at the Debug 3D tab for an extended period of time. While it is recommended to run 3D mode in DirectX, you should run Volcanic in OpenGL anyways.

FreeSO does not currently support texture wrapping or mipmapping (for custom textures), due to concerns with hardware support for NPOT textures. Assume that the texture mode will be clamped when importing into FreeSO. There is currently also no default diffuse shading or other lighting model in FreeSO, so it is expected that lighting has been baked into the textures for imported meshes.