MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

Featured upload! Blender 2.8 GEOM Tools [Updated 14/12/2019]

by SmugTomato Posted 27th May 2019 at 9:09 PM - Updated 21st May 2020 at 2:31 PM by SmugTomato : Fixed some typos
10 Comments / replies (Who?) - 5 Feedback Posts, 5 Thanks Posts
This is a featured upload! It showcases the best talent and creativity available on MTS and in the community.
Blender 2.8 GEOM Tools
Tested with Blender 2.8 (sub 72) Beta, any version released after may 30 2019 should work.
It appears to be working fine with Blender 2.81

Quote:
Update 14/12/2019 - Version 1.02
  • Fixed a division-by-zero error when UVs overlap in a single triangle
Quote:
Update 30/5/2019 - Version 1.01
  • Modified code to work with the final API changes, export works again


This tool aims to be a fully functional GEOM Import and export for Blender 2.8.
You should be able to work with any Sim/Pet mesh, for example; clothes, hair, accessories.

If something doesn't work please let me know and send me a private message with your blend file and traceback, without those I can't fix anything

This is an add-on for Blender 2.8 and will not work on older versions.
Blender 2.8 now has a stable release, get it at https://www.blender.org/

Add-on Installation
This add-on is installed like any other Blender add-on, to install it follow the menus as shown below.
Edit > Preferences > Add-ons > Install

Tools

Tool Panel


Morphs
Morphs can be imported from GEOM morph meshes, these can be extracted from BGEO files and the base GEOM file with Cmar's tool
Make sure you have your base mesh selected and import the morphs, you can select all morphs and import them all in one go, the morphs are imported as shape keys

Splitting UV seams
While Blender assigns UVs per polygon, GEOM files store them per vertex to save on performance. This means that every vertex can only have 1 UV coordinate. If the UV seams are not split you will probably find your exported UV maps all messed up.
Doing this changes the vertex order, make sure to renumber the vertices after this as described below.

Renumbering vertices
start_id tells the add-on the vertex ID to start renumbering at.
Displayed to the right of it is the highest vertex ID and the amount of unique vertex IDs, these are updated after the 'Recalculate IDs' button is pressed.
Don't touch these if you don't plan on adding/removing vertices, this way the original vertex IDs are preserved.

Cleaning empty groups
TS3 does not seem to like GEOM files having bones that have no vertices assigned to them, pressing this button will remove these pesky empty bones from your mesh.

Rebuilding the FNV map
If you ever import something and vertex groups have names like 0xef89a3e3, you'll probably want to change those to their proper names.
To do this, you'll have to import the rig for the mesh in question, make sure the rig is selected and press the 'Rebuild Bonehash Database' button on the panel. After doing that select the mesh and press the 'Rename Vertex Groups' button on the same panel.
You will only have to do this once, as the bone names are added to a json file mapping the fnv32 hashes to names.


Export
To export a mesh along with all it's morphs simply press the export button, on the export panel you will be able to choose your seam fix type.
Pick your age/gender group and LOD group and your seams will be fixed.


Credits
cmomoney for the original rig importer that I adapted into this one, can be found here
Operating System: Windows Linux Mac OS X
Utility Type: Meshing Tools
Plugin Type: Blender

You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Sims 3
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
BlenderGeom_1.02.zip | Description: Fixed division-by-zero error 242.5 KB 928 14th Dec 2019
Don't forget to Thank the creator after downloading! Use the Thanks button located above the screenshots above.
Basic Download and Install Instructions:

1. Download: Click the download link to save the .rar or .zip file(s) to your computer.

2. Extract the zip, rar, or 7z file.

3. Add-on Installation
This add-on is installed like any other Blender add-on, to install it follow the menus as shown below.

In the menubar follow the following sequence:
Edit > Preferences > Add-ons > Install > Select the zip file

Need more information?
 
10 Comments / Replies (Who?) - 4 Feedback Posts, 5 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Field Researcher
THANKS POST
#2 Old 28th May 2019 at 1:10 AM
thank you
Forum Resident
THANKS POST
#3 Old 28th May 2019 at 7:29 AM
Ugh. Can't say it's by time. I was searched for this many many years ago when TS3 beginned. Adele was searched it too. Later better then never they say.
Test Subject
#4 Old 29th May 2019 at 12:22 PM
Thanks! Finally something that works, at least for importing and editing, I have an error when exporting (body mesh) though.
Traceback (most recent call last):
File "*\addons\io_simgeom\io\geom_export.py", line 81, in execute
depsgraph = context.depsgraph
AttributeError: 'Context' object has no attribute 'depsgraph'
Lab Assistant
Original Poster
#5 Old 29th May 2019 at 2:56 PM Last edited by SmugTomato : 30th May 2019 at 4:47 PM.
Quote:
Originally Posted by Prominet
Thanks! Finally something that works, at least for importing and editing, I have an error when exporting (body mesh) though.
Traceback (most recent call last):
File "*\addons\io_simgeom\io\geom_export.py", line 81, in execute
depsgraph = context.depsgraph
AttributeError: 'Context' object has no attribute 'depsgraph'


Hey, thanks for letting me know. Could you please send me a PM with the blend file and any further info so I can investigate the issue?

Edit
The issue has been resolved in version 1.01
Test Subject
THANKS POST
#6 Old 28th Jun 2019 at 1:30 AM Last edited by persongirl : 22nd Jul 2019 at 6:38 AM.
Thank you so much SmugTomato!! I just started sims modding to try to do personal conversion projects and I had plugins spread across a billion blender versions! This at least helps me cut back on blender versions I have installed. I'll let you know how it works! Now if only I knew python and could update other plug-ins.....
EDIT: Imported a ts3 GEOM to help me align a conversion and it looks like the mesh is appearing as it should and the bones are showing up as vertex groups! thank you so much again SmugTomato!
Inventor
THANKS POST
#7 Old 2nd Aug 2019 at 9:34 AM
Oh this would be so helpful. You've done amazing work.
Virtual gardener
staff: administrator
#8 Old 7th Dec 2019 at 9:15 PM Last edited by Lyralei : 7th Dec 2019 at 11:30 PM.
Hi @SmugTomato !

I was actually wondering if you'd checked this out with pets meshes . Personally I'm working on a cat head replacement mod and I noticed that Blender doesn't like pet bones. Or well, the script rather. I know that the script wasn't made with pets in mind, but I figured I'd report it anyway

So, what happens, is that it either says that the weight's array is "out of index", or it says "context doesn't have attribute". I tested this on both my mesh and exporting it and even just importing EA's cat head mesh and exporting that without modifications and both give similar bone errors.

If you like, I could make a thread in the forum or PM you, that might make things easier

EDIT: From some debugging, it seems that the array is not liking the fact that there are 4 elements rather than 3 being exported into the weights[j] array. Not sure if it's a pet thing, but that's where it goes wrong.
Test Subject
THANKS POST
#9 Old 12th Mar 2020 at 9:40 PM
This one really works! Thank you so much!
Test Subject
#10 Old 24th Mar 2020 at 9:55 AM
I am new to this, do I need the Rig Importer, too? And if, which of the both zip files? Even I didn´t try it out, thank you very much for your hard work. People like you needs TS3.
Lab Assistant
Original Poster
#11 Old 24th Mar 2020 at 6:10 PM
Quote:
Originally Posted by Snowcat
I am new to this, do I need the Rig Importer, too? And if, which of the both zip files? Even I didn´t try it out, thank you very much for your hard work. People like you needs TS3.

There's a rig importer included in the add-on, no need for any separate downloads.