SOMA
Community created content for SOMA
Get community created content for SOMA. Even better, learn how to create your own content and to share it.
Learn More
Does anybody know how to replace a model using Blender and the HPL3 exporter?
Hey folks!

I'm coming here from the official Frictional Games DISCORD, as I can't find a solution there.

I'm trying to replace a single model in SOMA, using Blender. I've installed the HPL3 exporter[github.com], but I have trouble importing and CANNOT export the model.

The model is cave_spider_anim.dae . At the moment my goal is to simply replace the spider model with the same model, after which I'll test with a box and then I'll change the spider model entirely.

Blender won't import the file directly as a .dae, so I've converted it to an .obj using this facility[products.aspose.app].EDIT: Sorry, I forgot that I'd actually gone with removing the library_effects content from the .dae, as seen on this page.[wiki.frictionalgames.com]

I can setup most of the texture maps into Blender's Principled BSDF node using 'non-color data' when appropriate.

However, when attempting to export using HPL3 Exporter, I get the following error log:
"
No asset use list found. Creating new
File read success
ROUGHNESS map pre-bake
setting up bake
Info: Baking map saved to internal image, save it externally or pack it
Info: Baking map saved to internal image, save it externally or pack it
ROUGHNESS map post-bake
PRESPEC map pre-bake
setting up bake
Info: Baking map saved to internal image, save it externally or pack it
Info: Baking map saved to internal image, save it externally or pack it
PRESPEC map post-bake
SPECULAR map pre-bake
SPECULAR map pre-bake
SPECULAR map post-bake
NORMAL map pre-bake
setting up bake
Info: Baking map saved to internal image, save it externally or pack it
Info: Baking map saved to internal image, save it externally or pack it
NORMAL map post-bake
DIFFUSE map pre-bake
setting up bake
Info: Baking map saved to internal image, save it externally or pack it
Info: Baking map saved to internal image, save it externally or pack it
DIFFUSE map post-bake
NVIDIA Texture Tools 2.0 - Copyright NVIDIA Corporation 2007

CUDA acceleration ENABLED

time taken: 0.014 seconds
REMOVING H:/Program Files (x86)/Steam/steamapps/common/SOMA/mods/NoSpidersMod/entities/creatures/crust/test/cave_spiderMesh/cave_spider_ncl1_2_spec.tga
REMOVING H:/Program Files (x86)/Steam/steamapps/common/SOMA/mods/NoSpidersMod/entities/creatures/crust/test/cave_spiderMesh/hpl3export_cave_spider_ncl1_2_spec.tga
NVIDIA Texture Tools 2.0 - Copyright NVIDIA Corporation 2007

CUDA acceleration ENABLED

time taken: 0.028 seconds
REMOVING H:/Program Files (x86)/Steam/steamapps/common/SOMA/mods/NoSpidersMod/entities/creatures/crust/test/cave_spiderMesh/cave_spider_ncl1_2_nrm.tga
NVIDIA Texture Tools 2.0 - Copyright NVIDIA Corporation 2007

CUDA acceleration ENABLED

time taken: 0.013 seconds
REMOVING H:/Program Files (x86)/Steam/steamapps/common/SOMA/mods/NoSpidersMod/entities/creatures/crust/test/cave_spiderMesh/cave_spider_ncl1_2.tga
Exporting .mat
export here
Collada export: Added image:
Collada export to: H:\Program Files (x86)\Steam\steamapps\common\SOMA\mods\NoSpidersMod\entities\creatures\crust\test/cave_spiderMesh/cave_spiderMesh.dae
Info: Exported 2 Objects
.ent exists, updating
removing cave_spiderMesh.001
Could not delete all keys for ' Armature '
Could not delete all keys for ' main_space '
Could not delete all keys for ' main '
Could not delete all keys for ' j_root_ctrl_space '
Could not delete all keys for ' j_root_ctrl '
Could not delete all keys for ' Armature.001 '
Could not delete all keys for ' cave_spider '
Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.2\scripts\addons\io_export_hpl3.py", line 2241, in execute
self.export_objects(hpl3export)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.2\scripts\addons\io_export_hpl3.py", line 352, in export_objects
obj_sel.hide_render = obj_sel["hpl3export_hide_render"] == "True"
KeyError: 'bpy_struct[key]: key "hpl3export_hide_render" not found'
Error: Python: Traceback (most recent call last):
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.2\scripts\addons\io_export_hpl3.py", line 2241, in execute
self.export_objects(hpl3export)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.2\scripts\addons\io_export_hpl3.py", line 352, in export_objects
obj_sel.hide_render = obj_sel["hpl3export_hide_render"] == "True"
KeyError: 'bpy_struct[key]: key "hpl3export_hide_render" not found'

Unable to find a suitable DXT compression, falling back to uncompressed.
"

My resources.cfg is as follows:
<Resources>
<Directory Path="/graphics" AddSubDirs="true"/>
<Directory Path="/lang" AddSubDirs="true"/>
<Directory Path="/entities/" AddSubDirs="true"/>
</Resources>

Any ideas, folks? People have been very helpful on the official Discord, but I'm not able to make forward progress.

I'm about ready to call it quits on modding SOMA, so this is my last hope - any suggestions?
Last edited by Reverend Speed; 30 Aug, 2022 @ 8:10am