<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FModeling%2FImporting_Models</id>
	<title>HPL3/SOMA/Modeling/Importing Models - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frictionalgames.com/page?action=history&amp;feed=atom&amp;title=HPL3%2FSOMA%2FModeling%2FImporting_Models"/>
	<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Modeling/Importing_Models&amp;action=history"/>
	<updated>2026-10-04T08:27:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Modeling/Importing_Models&amp;diff=7320&amp;oldid=prev</id>
		<title>TiMan: Add a practical, source-verified SOMA model-import workflow covering resources, mesh caches, Model Editor import, submesh reassignment, entity setup, testing, and troubleshooting.</title>
		<link rel="alternate" type="text/html" href="https://wiki.frictionalgames.com/page?title=HPL3/SOMA/Modeling/Importing_Models&amp;diff=7320&amp;oldid=prev"/>
		<updated>2026-10-02T15:28:59Z</updated>

		<summary type="html">&lt;p&gt;Add a practical, source-verified SOMA model-import workflow covering resources, mesh caches, Model Editor import, submesh reassignment, entity setup, testing, and troubleshooting.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Importing a model''' brings exported mesh data into SOMA's resource pipeline. The route depends on the intended result:&lt;br /&gt;
&lt;br /&gt;
* A fixed scene piece can be loaded as a '''static object''' from its model file.&lt;br /&gt;
* An interactive, animated, or physically configured object should be imported into &amp;lt;code&amp;gt;ModelEditor.exe&amp;lt;/code&amp;gt; and saved as an '''entity''' (&amp;lt;code&amp;gt;.ent&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
SOMA ships primarily with Collada &amp;lt;code&amp;gt;.dae&amp;lt;/code&amp;gt; source models and generated &amp;lt;code&amp;gt;.msh&amp;lt;/code&amp;gt; mesh caches. The installed game also contains some &amp;lt;code&amp;gt;.fbx&amp;lt;/code&amp;gt; files, especially under &amp;lt;code&amp;gt;entities&amp;lt;/code&amp;gt;, but exporter-specific compatibility varies. Use the format supported by the documented exporter and verify the result in SOMA's tools.&lt;br /&gt;
&lt;br /&gt;
== Prepare the files ==&lt;br /&gt;
&lt;br /&gt;
# Export the model according to [[HPL3/SOMA/Modeling/Modeling Guidelines|Modeling Principles]] and the instructions for the chosen exporter.&lt;br /&gt;
# Put the model in its final mod resource directory, normally under &amp;lt;code&amp;gt;static_objects/&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;entities/&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Put its textures and &amp;lt;code&amp;gt;.mat&amp;lt;/code&amp;gt; files in resource paths available to the mod.&lt;br /&gt;
# Confirm the directory is included by &amp;lt;code&amp;gt;resources.cfg&amp;lt;/code&amp;gt; before opening the asset in an editor.&lt;br /&gt;
&lt;br /&gt;
For automatic material resolution, assign the diffuse texture in the source model and provide an HPL3 material with the same base name. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
panel.dae&lt;br /&gt;
panel.dds&lt;br /&gt;
panel.mat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the model references &amp;lt;code&amp;gt;panel.dds&amp;lt;/code&amp;gt;, HPL3 looks for &amp;lt;code&amp;gt;panel.mat&amp;lt;/code&amp;gt;. A model with multiple materials must use separate submeshes, each with its own texture/material reference.&lt;br /&gt;
&lt;br /&gt;
== Validate the exported mesh ==&lt;br /&gt;
&lt;br /&gt;
# Start &amp;lt;code&amp;gt;ModelViewer.exe&amp;lt;/code&amp;gt; and load the exported model from its final resource location.&lt;br /&gt;
# Check that the object has the expected orientation, scale, pivot, submeshes, and materials.&lt;br /&gt;
# Inspect the tool output or HPL log for missing mesh, texture, or material messages.&lt;br /&gt;
# Close and reopen the asset after correcting the source export so stale state is not mistaken for a successful fix.&lt;br /&gt;
&lt;br /&gt;
Loading a source mesh generates or refreshes its &amp;lt;code&amp;gt;.msh&amp;lt;/code&amp;gt; cache. The executable contains an explicit “cache out of date” path that reloads the Collada source. Keep the source model in the mod; do not treat the generated cache as the editable master.&lt;br /&gt;
&lt;br /&gt;
SOMA's shipped files demonstrate this pairing extensively: 5,444 inspected &amp;lt;code&amp;gt;.dae&amp;lt;/code&amp;gt; files under &amp;lt;code&amp;gt;static_objects&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;entities&amp;lt;/code&amp;gt; have a same-path &amp;lt;code&amp;gt;.msh&amp;lt;/code&amp;gt; cache.&lt;br /&gt;
&lt;br /&gt;
== Import the mesh into an entity ==&lt;br /&gt;
&lt;br /&gt;
# Open &amp;lt;code&amp;gt;ModelEditor.exe&amp;lt;/code&amp;gt; and choose '''File → New''' for a new entity.&lt;br /&gt;
# Choose '''File → Import Mesh''' and select the exported model.&lt;br /&gt;
# Confirm that the expected submeshes appear. Each imported mesh produces one or more submesh objects in the editor.&lt;br /&gt;
# Configure materials if a submesh did not resolve the intended &amp;lt;code&amp;gt;.mat&amp;lt;/code&amp;gt; automatically.&lt;br /&gt;
# Add physics shapes and create bodies where the entity requires collision. Add joints, sub-entities, effects, or animations only as needed.&lt;br /&gt;
# Open '''Entity Settings''', choose the appropriate entity type, and configure its type variables.&lt;br /&gt;
# Save the entity as an &amp;lt;code&amp;gt;.ent&amp;lt;/code&amp;gt; file in the same asset directory.&lt;br /&gt;
# Enable '''Entity Preview''' to inspect physics and animations before placing the entity in a map.&lt;br /&gt;
&lt;br /&gt;
A representative shipped entity, &amp;lt;code&amp;gt;entities/urban/utility/air_vent/air_vent.ent&amp;lt;/code&amp;gt;, stores this separation directly:&lt;br /&gt;
&lt;br /&gt;
* its &amp;lt;code&amp;gt;Mesh&amp;lt;/code&amp;gt; element references &amp;lt;code&amp;gt;air_vent.dae&amp;lt;/code&amp;gt;;&lt;br /&gt;
* its imported &amp;lt;code&amp;gt;SubMesh&amp;lt;/code&amp;gt; is stored under that mesh;&lt;br /&gt;
* its collision shape and body are separate sections; and&lt;br /&gt;
* its &amp;lt;code&amp;gt;UserDefinedVariables&amp;lt;/code&amp;gt; select the &amp;lt;code&amp;gt;StaticProp&amp;lt;/code&amp;gt; entity type.&lt;br /&gt;
&lt;br /&gt;
The same directory also contains &amp;lt;code&amp;gt;air_vent.msh&amp;lt;/code&amp;gt;. This illustrates the roles of the three files: &amp;lt;code&amp;gt;.dae&amp;lt;/code&amp;gt; is the source mesh, &amp;lt;code&amp;gt;.msh&amp;lt;/code&amp;gt; is the generated cache, and &amp;lt;code&amp;gt;.ent&amp;lt;/code&amp;gt; is the entity setup.&lt;br /&gt;
&lt;br /&gt;
== Reimport an updated mesh ==&lt;br /&gt;
&lt;br /&gt;
When '''Import Mesh''' is used in an entity that already has a mesh, the Model Editor opens the '''SubMesh Reassign''' dialog. This allows saved submesh data to be associated with the new export.&lt;br /&gt;
&lt;br /&gt;
* The left side lists new submeshes and lets each one be paired with an old submesh.&lt;br /&gt;
* '''Use new data''' discards the previous submesh parameters for that new submesh.&lt;br /&gt;
* The right side lists old submeshes that remain unassigned.&lt;br /&gt;
* '''Best Match''' attempts pairing based on triangle count according to the existing editor documentation.&lt;br /&gt;
&lt;br /&gt;
Review every proposed match before accepting it. Stable submesh names and a stable object split make reimport safer; renamed, merged, or divided submeshes require deliberate reassignment. Save the &amp;lt;code&amp;gt;.ent&amp;lt;/code&amp;gt; after accepting the mappings and test its bodies, attachments, and animations again.&lt;br /&gt;
&lt;br /&gt;
== Use the result in a map ==&lt;br /&gt;
&lt;br /&gt;
For a static object, select it through the Level Editor's '''Static Object''' mode. For an entity, select the saved &amp;lt;code&amp;gt;.ent&amp;lt;/code&amp;gt; through '''Entity EditMode'''. Place one test instance, save and reopen the map, then launch the mod and verify:&lt;br /&gt;
&lt;br /&gt;
* scale and orientation;&lt;br /&gt;
* material and texture loading;&lt;br /&gt;
* collision and player movement around the object;&lt;br /&gt;
* shadows and lighting;&lt;br /&gt;
* entity interaction or animation, where applicable.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
* '''The model cannot be found:''' confirm its folder is included by &amp;lt;code&amp;gt;resources.cfg&amp;lt;/code&amp;gt; and that the editor is working on the intended mod.&lt;br /&gt;
* '''The model is invisible or malformed:''' verify export scale, up axis, transforms, normals, and triangulation in the source application, then regenerate the cache.&lt;br /&gt;
* '''The material is missing:''' confirm that each submesh has a diffuse texture reference and that the corresponding same-base-name &amp;lt;code&amp;gt;.mat&amp;lt;/code&amp;gt; can be resolved.&lt;br /&gt;
* '''The wrong material appears:''' check for duplicate asset names elsewhere in the resource paths and inspect the submesh's assigned material in Model Editor.&lt;br /&gt;
* '''An entity breaks after reimport:''' revisit SubMesh Reassign. A changed skeleton can also make the saved &amp;lt;code&amp;gt;.ent&amp;lt;/code&amp;gt; incompatible with the new mesh; SOMA reports this condition as an out-of-date entity/mesh skeleton.&lt;br /&gt;
* '''The editor still shows the old model:''' close and reopen the entity or editor after replacing the source and cache; do not assume an in-place resource refresh succeeded.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[HPL3/SOMA/Modeling/Modeling Guidelines|Modeling Principles]]&lt;br /&gt;
* [[HPL3/SOMA/Modeling/Exporting Models|Exporting Models]]&lt;br /&gt;
* [[HPL3/Entities/Model Editor View|Model Editor reference]]&lt;br /&gt;
* [[HPL3/Entities/Entity Mesh|Submeshes and reassignment]]&lt;br /&gt;
* [[HPL3/Entities/Entities Overview|Entity workflow]]&lt;br /&gt;
&lt;br /&gt;
[[Category:English]]&lt;/div&gt;</summary>
		<author><name>TiMan</name></author>
		
	</entry>
</feed>