Tower Unite

Tower Unite

评价数不足
Workshop Tips and Tricks: Rigging Workarounds, Material Tips, and Troubleshooting
由 CarbonCopyCat 制作
A repository of miscellaneous tips and tricks to help with creating workshop models.
   
奖励
收藏
已收藏
取消收藏
Intro/Table of Contents
This guide is a collection of various tips, tricks, etc. that may help in creating workshop content. The content in this guide is aimed toward Blender users (and some of it is Blender-specific), but you should be able to apply most of this to other 3d software packages as well.

Edit 9/19/24: A new version of the armature has been released, making some portions of this guide potentially outdated. I'm no longer interested in this game, so I won't be testing the changes for myself, but the following parts are most likely outdated and no longer applicable:
  • Fixing leg splay (useful for skirts) + considerations for wide-stanced models
  • Extremely stretched model on import, or model turns into spikes; looks fine in Blender

Table of Contents:

About the Tower Unite Blender Tools addon

Playermodel Rigging
  • Fixing leg splay (useful for skirts) + considerations for wide-stanced models

Material Setup
  • Making emissive maps usable in Tower
  • Fixing normal map orientation / previewing normal maps properly in Blender

Troubleshooting
  • Finding unweighted vertices (parts stretching to between a model's feet)
  • Holes in model, parts only visible from one side/missing parts
  • Failed playermodel import, vague error (e.g. Invalid Elements in "n")
  • Extremely stretched model on import, or model turns into spikes; looks fine in Blender
  • Textures export properly but are missing in-game (common with MMD models)
  • Blender Addon - Normal maps not exporting

Troubleshooting - not addressed in this guide
See "Making Workshop Models - The Ultimate Guide" under "Other Recommended Resources"
  • Too many vertices
  • Missing texture on import
  • Steam related upload issues (0 byte upload, upload failed, etc.)

Other Recommended Resources

Changelog
07/11/23 - Added the "Troubleshooting: Failed playermodel import, vague error" and the "Troubleshooting: Extremely stretched model" portions of the guide. Also added the changelog :>
10/26/23 - Added issues relating to exporting models using the Tower Unite Blender Tools addon on unsupported Blender versions. These have been added to the "Extremely stretched model" (now "Extremely stretched model / Model turns into spikes") and "Troubleshooting: Failed playermodel import, vague error" portions of the guide.
11/08/23 - Added the "Troubleshooting: Blender Addon - Normal maps not exporting" and "About the Tower Unite Blender Tools addon" sections to the guide.
11/15/23 - Updated mentions of the Tower Unite Blender Tools addon as the fixed version is compatible with newer versions of Blender. Also added issues relating to the armature's pose before export to the "Extremely stretched model / Model turns into spikes" portion of the guide.
04/23/24 - Added the "Troubleshooting: Textures export properly but are missing in-game (common with MMD models)" portion to the guide, and updated the "Troubleshooting: Extremely stretched model / Model turns into spikes" with information regarding newer Blender versions.
About the Tower Unite Blender Tools addon
Tower Unite Blender Tools was an addon created by Spoom to help with exporting models from Blender to Tower Unite, but is now obsolete due to the release of the new armature.
However, it also includes a .dae export function that allows for proper normal map export when using Blender, so unless the texture import process for the game has changed, it may still be required in some cases.

The download link for the addon is available here:
https://towerunite.com/sdk/resources/workshop/Tower_Unite_Suite_BetaBlender4.0.zip
Rigging: Fixing Leg Splay (likely outdated)
In some playermodels, particularly those with longer shirts or skirts, the in-game idle/walking animation may result in stretching near the front of the model's crotch area and concavity of the area near its backside.

For models with standard leg width:
  1. Select the Tower Unite armature and enter Pose Mode. Select one of the thigh bones and rotate it 35 degrees laterally on the Z axis so the foot bone points outwards. Then, select the same leg's calf bone and rotate it 35 degrees medially on the Z axis so the foot bone returns to its original orientation. Repeat for the opposite leg.
    Exact rotation values can be inputted in Blender by entering the desired rotation value after pressing R to rotate the selection. In this case, the appropriate keypresses would be as follows: R (enter rotate mode) → Z (lock to z axis) → (-)35 (rotate selection (negative) 35 degrees) → Enter (end rotation)
  2. After rotating both thighs and calves, press Ctrl+A and select "Apply Pose as Rest Pose".
For a video showcasing these steps, see the following:

Although this fix does alleviate most of the distortion caused by leg splay, it will cause some minor distortions near the knee area, which may be more problematic than the original splay if it wasn't severe.
Additionally, if you are using the armature generated with the Tower Unite Blender Tools addon, do note that this fix will break the pose previews provided by that addon.

For models with leg width wider than normal:
Follow the previous steps, but only rotate the thigh bone laterally; do not rotate the calf bone medially. Depending on how your model appears in-game after applying the fix, you may also need to edit parts of your mesh, rotating portions of the the calf and foot laterally in Edit Mode.

To see how a very wide-stanced model might fare with these fixes, see the following:
https://docs.google.com/document/d/1SGFrGcXUNB47ChCkhOwg59tryOa-ZkcRoN16SNdd6Og/edit?usp=sharing
Materials: Making Emissive Maps Usable in Tower
Although Tower Unite does not have native support for emissive maps, emissive effects can be done by taking advantage of the "emission" slider in the workshop editor. This is done by converting the emissive map into a transparent diffuse map, applying that map to a new material, and duplicating areas of the mesh that require that effect.
As the process involves duplicating existing faces, to prevent extra work, this should be done after the model is properly weighted for Tower.

Step 1: Making emissive maps transparent
Requirements: GIMP (free image editor)[www.gimp.org]
Open your emissive map in GIMP, then select Colors → Color to Alpha. Set the color to the background black of your emissive map and hit OK. Export your image as PNG via File → Export As...

Step 2: Applying the emissive map to the model
  1. In Blender, select the object with the emissive map, navigate to the Material Properties tab (checkered sphere), and click the + button to add a new material slot to the object. Set the material's Surface property to Principled BDSF and set the Base Color as an Image Texture set to the transparent emissive map.
  2. In Edit Mode, select all the faces that contain the emissive effect in the original emissive material. It may be helpful to temporarily switch the original emissive material's material slot to the transparent emissive map's to see what parts are emissive. Additionally, if the emissive effect takes up a large part of the material, it may be helpful to select the original emissive material's material slot and click Select under the Material Properties tab to select all faces with that material.
  3. With the emissive faces selected, press Shift + D and then right click to duplicate those faces in place. While still having those faces selected, select the transparent emissive material's material slot under the Material Properties Tab, and hit Assign. Then press Alt + S to fatten the duplicated faces, raising them slightly above the original faces.
Repeat the process for each emissive map you have in your model.
As this process adds an extra material for each emissive material present in your model, you may need to use the Material Combiner Addon[github.com] to merge multiple materials together.
Materials: Fixing Normal Map Orientation / Previewing Normal Maps Properly in Blender
Before we begin, do note that normal map export with .dae files is currently not possible in Blender without the Tower Unite Blender Tools addon[towerunite.com]. The linked version is the updated version hosted on the official Tower website rather than the outdated version originally posted on the forums; ensure you're using the properly updated version.

Blender and Tower Unite differ in how they handle normal maps; as Blender uses OpenGL while Tower uses DirectX, normal maps that appear fine in Blender will have their depth flipped in Tower, and vice versa. This is because the orientation of the green channel differs between DirectX and OpenGL normals: OpenGL normals will need to have their green channels inverted to be DirectX-compatible.

Fixing normal map orientation
This should be fairly easy to do with any decent image editor, but if you don't have one, you can use the following free options:

GIMP:[www.gimp.org]
  1. Open your image, then navigate to Colors → Components → Decompose. In the Extract Channels Window, ensure the Color model is RGB and Decompose to layers is enabled, then hit OK.
  2. In the new document that opens, in the Layers menu on the side, select the green layer and select Colors → Invert. Note that you won't see any changes unless you hide the red layer.
  3. Navigate to Colors → Components → Compose. In the Compose Window, ensure the Color model is RGB, and that the appropriate channels are set under Channel Representations (something like Red = red-# / red-#, Green = red-# / green-#, Blue = red-# / blue-#)
  4. In the new document that opens, select File → Export to export the image.

ImageMagick:[imagemagick.org]
convert input.png -channel G -negate output.png

Previewing normal maps properly in Blender
You can invert a normal map's green channel in Blender for preview purposes using a Separate RGB, Invert, and Combine RGB node in the Shader Editor.
Do note that keeping your normals set up like this on export will make it not export properly, so ensure it's set back to normal before exporting.
Troubleshooting: Unweighted Vertices, and How to Find Them
Every vertex in a model should be weighted to at least one bone, as unweighted vertices are placed between the model's feet, causing major stretching:

If an entire part of the model is unweighted, this may even result in it disappearing entirely.

However, some triangulation-related issues may appear to look like unweighted vertices; in that case, please refer to the Troubleshooting: Holes in Model / Parts Only Visible From One Side + Missing Parts section located elsewhere in this guide to fix this issue.
Finding unweighted vertices
Although unweighted vertices create noticeable deformations in-game, pinning them down in Blender may be difficult. If you have trouble finding unweighted vertices, perform the following:
  1. In Pose Mode, move the entire armature a significant distance away from the mesh, preferably along the Y-axis. Any unweighted vertices will remain in place while the remainder of the mesh moves along with the armature. Singular unweighted vertices will create noticeable spikes, like so:


  2. In the Modifier Properties menu, enable On Cage (upside-down triangle icon) and Edit Mode (square icon) on the Armature modifier, and then enter Edit Mode. Enabling these options will allow deformations caused by the armature to be visible in Edit Mode.


  3. Weight the unweighted vertices. If you're dealing with small amounts of stray vertices (rather than a large unweighted portion of the model), the easiest way may be to Copy over the weights from another vertex using the Vertex Weights panel in the N-menu (opened by pressing N).
    To use it, first select the vertices you want to copy weights to, then Shift-Click the vertex you want to copy weights from. The vertices you will be copying weights to will be highlighted in orange, while the vertex you will copy weights from will be highlighted in white. Then click Copy under the Vertex Weights panel.


  4. Restore the armature to its original position by entering Pose Mode, selecting all bones, and clicking Pose -> Clear Transform -> All.
Troubleshooting: Holes in Model / Parts Only Visible From One Side + Missing Parts
When exporting your model, you may run into an issue where your model appears fine in Blender, but appears to have holes inside of Tower, like so:
Images are borrowed from the Tower Unite Discord's workshop channel. This issue was caused by not having triangulation applied on export.

This issue has three main causes:
Inverted normals
Each face in your model's mesh has an attribute called the surface normal, the direction of which indicates the "front" and "back" of a face. Blender shows the back of faces by default, but Tower does not, so faces with flipped normals appear as holes when exported.
To check the direction a face is pointing, navigate to Viewport Overlays located on the top right and enable Face Orientation. Properly-oriented faces will appear in blue, while flipped faces will appear in red.

To fix any flipped faces, select them in Edit Mode, then press Alt+N → Flip.
Not enabling triangulation on export
When importing a model into Tower, the game will attempt to automatically triangulate any models containing quads or n-gons; however, it's not very good at it, sometimes causing issues like holes or subtle distortions.
To get around this, you can simply triangulate the model during export via the .dae export menu.
In the Tower Unite addon's .dae exporter, this is done by ticking the Triangulate option.
In the default Blender .dae exporter, the option is located under Geom → Triangulate, but should be enabled by default.
If you want better control over the model's triangulation, you can triangulate the mesh itself by pressing Ctrl+F → Triangulate in edit mode with the desired faces selected.
Model seams
It's also possible that your model may have some separate overlapping vertices with differing weights, causing an actual gap in the model, like so:

This image is also borrowed from the workshop channel.

This can be fixed by selecting the vertices at the seam and hitting M → By Distance to Merge By Distance, merging the two overlapping vertices into one vertex. You can select all vertices by pressing A, but be careful, as recklessly merging all vertices by distance can cause unwanted results. If you want to select vertices manually, you may want to enable X-ray to select through objects via Alt+Z.

Parts only visible from one side / Missing parts
As described earlier in this section, Tower doesn't display the back side of faces, only the front, which can cause issues with parts of clothing like dresses, skirts, or capes. To make a part of the model visible from both sides, select the faces of the part, press Shift+D to duplicate it, and then right click to cancel the movement. Then, while still having the newly duplicated part selected, flip its normals. It's recommended to only do this after fully rigging and testing the model, as the duplicated parts must have the exact same weight, making adjusting the weights afterwards very troublesome. If you need to adjust the model's weights afterwards, I recommend deleting the duplicated portions (L to select all faces linked to the one under your cursor at once; make sure nothing's selected first) and re-duplicating them after making any adjustments.

If a part of your model is missing in the editor entirely, it's possible that its faces are flipped and that you just can't see the other side (as it's blocked by something else), but it may also be that the entire part is unweighted (see the section above).
Troubleshooting: Failed playermodel import, vague error
Sometimes, the workshop editor may show a compilation error, but won't be very descriptive as to what's causing it (such as Invalid Elements in "n"). Here are some potential things to check to troubleshoot such errors:
  • Ensure that the model file only contains the Tower Unite armature and that the bones are properly named. This usually happens if the model being rigged was previously weighted to a different armature which still remains in the scene on export. The bone naming of the TU armature shouldn't be an issue unless the naming scheme has been unnecessarily tampered with.
  • Make sure the model is weighted to at least three vertex groups/bones. This usually happens when exporting a model that's still in the process of being rigged to see how it appears in-game. It's also possible to run into this issue when rigging a static playermodel: for proper instructions on static playermodel rigging, see the guide under "Other Recommended Resources".
  • Remove any shape keys from the model. In Blender, this can be found in the Shape Keys menu in the Object Data Properties tab: select each shape key and press the - button on the side to delete it, deleting Basis last. Repeat the process for any other mesh objects in the scene.
Troubleshooting: Extremely stretched model / Model turns into spikes (likely outdated)
A model may look fine in Blender, but on import, may end up looking extremely stretched, like so:



This is due to four major causes:
  1. The model has some sort of object-level transformation set (Location/Transformation is not 0,0,0; Rotation is not 0,0,0; Scale is not 1,1,1).
  2. The armature has been posed in Pose Mode (only if using the Tower Unite Blender Tools addon?)
  3. The armature has some sort of object-level transformation set.
  4. The unit scale of the scene is incorrect.
It's also possible that the issue is caused by a combination of these causes.
Model-level issues
This is usually the case if you have moved/rotated/scaled the model to position it without touching the Tower Unite armature.
To fix this, select your model (mesh object) in Object Mode and press Ctrl + A → All Transforms. If your model consists of multiple mesh objects, make sure to apply transforms to all the objects.
Posed armature issues
This usually happens if you have posed the armature (including the pose previews in the Tower Unite Blender Tools addon) and haven't cleared the pose before exporting. AFAIK, this really only happens when using the addon due to how it handles things during export.
To fix this, select all the bones in pose mode and Pose -> Clear Transform -> All. If you've cleared the bone transforms but the exported model hasn't changed, you may need to save the file before exporting or disable Magic Export in the Blender addon's Tower Unite .dae exporter.
Armature-level issues
This is usually the case if, rather than scaling the model to match the size of the TU armature, you scaled the armature to match the model.

To fix this:
  1. Delete the existing armature from the scene.
  2. If you're using the Tower Unite Blender Tools addon, add a new armature via Add → Armature → Tower Unite Armature. The armature should be set to the proper size automatically.
    If you aren't using the addon, open a fresh copy of the Tower Unite rig .blend file located on the sdk page (save your current .blend file first). Then, navigate to File → Append..., select the .blend file you were previously working on, open the Object folder, and select your model (or the parts of your model) from the list.
  3. Scale the model to match the armature; do not scale the armature.
  4. Select your model in Object Mode and press Ctrl + A → All Transforms. Do this for all the mesh objects that make up your model.
  5. Set the model's Armature modifier's Object to the new armature.
Unit scale issues
This should only be an issue if you aren't using the Tower Unite Blender Tools addon, and the fix is near-identical to fixing armature scale issues.
  1. Open a fresh copy of the Tower Unite rig .blend file located on the sdk page (save your current .blend file first). Then, navigate to File → Append..., select the .blend file you were previously working on, open the Object folder, and select your model (or the parts of your model) from the list.
  2. Scale the model to match the armature; do not scale the armature.
  3. Select your model in Object Mode and press Ctrl + A → All Transforms. Do this for all the mesh objects that make up your model.
  4. Set the model's Armature modifier's Object to the new armature.

Addon-related issues
Additionally, if you're using an outdated version of the Tower Unite Blender Tools addon on a Blender version later than 3.2 - 3.4 or the newer fixed version on versions 4.1 or greater (possibly, though this hasn't been replicated), you may run into an issue where your model turns into several small spikes, like so:


Image borrowed from the Tower Unite Discord's workshop channel.

If you're using the outdated version of the addon, first install the updated version of the addon from this post in the thread (not the post at the top of the thread):
https://towerunite.com/sdk/resources/workshop/Tower_Unite_Suite_BetaBlender4.0.zip

The updated version fixes some bugs, so updating is recommended over simply downgrading your Blender version.

Next, ensure you're using a supported version of Blender (should work with versions 3.2 - 4.0) and open the .blend file in that version of Blender.

Then delete your model's existing armature, generate a new armature via the Add menu, and assign the new armature as the object of your model's existing armature modifier.
Troubleshooting: Textures export properly but are missing in-game (common with MMD models)
If you're trying to import a model from a non-English source (i.e. an MMD model), you may run into an issue where your textures won't import properly even when the model's materials are set up properly (Principled BSDF with Image Texture, no errors during export).

This may be happening because your image files have non-English filenames, which the workshop importer can't properly handle. This can be solved by simply renaming your image files to only contain alphanumeric characters (a-z, 0-9, some special characters allowed) and re-assigning the image texture to the material (to update it with the new filename).
Troubleshooting: Blender Addon - Normal maps not exporting
Due to the way Blender handles .dae export, embedding normal map data into an exported .dae file (in versions 2.8 and above) requires use of the Tower Unite Blender Tools addon.

A proper setup that uses normal maps should consist of an Image Texture as the Base Color and a Normal Map node hooked up to an Image Texture as the Normal, like so:


Unfortunately, it's possible that normal map export will not work properly even when using the addon. This is because the addon only receives information regarding a material's normal map during the current Blender session; closing and reopening the scene will make it so the addon will not be able to recognize the normal maps.

This can be fixed by performing the following:
  1. Open the Shader Editor for any materials with normal maps.
  2. For each material, disconnect the Normal Map node from the Normal slot of the Principled BDSF material. Make sure to completely disconnect the two nodes by letting go of left click (instead of just holding the node connection with the cursor).
  3. Reconnect the Normal Map to the Normal slot of the material.
  4. Double-check that the normal map exported properly. Importing the .dae into Tower usually isn't necessary; you can just check if the normal maps have been properly copied to the export folder (provided it's been cleaned out before export). If a material didn't export properly, repeat the previous step (may take multiple disconnects/reconnects for the normal map to register).
Do note that this fix only applies to the current Blender session; you'll have to repeat this process each time you re-open Blender.
Other Recommended Resources
(Partially outdated, but with applicable sections) Comprehensive resource on setting a model up for export and importing it into Tower Unite. Has troubleshooting tips on some vertex count-related issues, as well as issues related to the workshop editor itself. Also has a basic video tutorial about the export/import process.
https://steamcommunity.com/sharedfiles/filedetails/?id=2845340732

An explanation of the in-game metallic, specular, and roughness material settings, as well as some recommended values.
https://steamcommunity.com/sharedfiles/filedetails/?id=2362156981

A tutorial that walks through improving the faces of anime-type models.
https://steamcommunity.com/sharedfiles/filedetails/?id=2784757676

(Possibly outdated) A basic tutorial for static playermodels.
https://steamcommunity.com/sharedfiles/filedetails/?id=1966755294

The Tower Unite Discord's #workshop channel: there if you need help with your own model. Read the pins!
https://discord.gg/pixeltail
1 条留言
Octo 2023 年 10 月 2 日 下午 1:40 
heh thanks for using my triangulate images :slimetabby: