Convex Collision Meshes In Blender

    Logging in with you Steam ID has now been restored ♥

    • Convex Collision Meshes In Blender

      So I'm making a modified version of a prop (a mirrored "table_l" desk) in Blender using Crowbar decompilations, and am having some problems with the collision model. I am for whatever reason not able to split it into convex parts properly, and the recompilation just produces a "shrink-wrap" collision which needless to say is effectively unusable for this highly concave prop. The ancient SDW tutorial describes a way to export multiple groups in one model file using a 'set smooth' tool, but this seems to have been removed from the new versions of Blender and all I can seem to do is export the collision mesh as multiple files which the compiler will not accept.

      How to proceed?
      Pre-Disaster Planning Thread: Thinking of Restoring a Part of Black Mesa? Come Here First!

      Office Complex PD: I'm the Slowest Pre-Disaster Mapper!

      Pre-Disaster Questionable Ethics: It's here!
    • If you have split the collision mesh into separate objects (and applied smooth shading to each of the objects individually), you must group them together before exporting. Simply select all the mesh objects (in Object Mode) and press Ctrl+G to group them together and name the group something like "table_r_static_phys". You should now be able to export the group as "table_r_static_phys.smd".
    • The Smooth tool is under the Edit heading in the Tools tab:



      I'd also recommend making a copy of your collision mesh pieces and putting them in a separate layer before merging them, just in case something goes wrong or you need to adjust it later, which happens often, especially if you have a particularly complex (or small) model - and make sure that any given part of the collision pieces isn't .5 units thick or less, because otherwise the compile tools will just ignore the $concave command and shrinkwrap it anyway.

      The Javid wrote:

      I can't wait til we ditch that pattern too. It only blends in with gravel and shitty couches.
    • Went through both of the above and got the same result as before. Notably, despite having scaled the model upward by a factor of 5 I am still getting "WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!" errors, which makes me suspect that something else is going on with the model itself. Not sure what that would be, but I'll keep looking.

      EDIT: Recompiled with just the two largest mesh elements and it went fine, so I'm gonna add in convex sections one at a time and see which ones are causing the problem.
      Pre-Disaster Planning Thread: Thinking of Restoring a Part of Black Mesa? Come Here First!

      Office Complex PD: I'm the Slowest Pre-Disaster Mapper!

      Pre-Disaster Questionable Ethics: It's here!

      The post was edited 1 time, last by Admiral Sakai ().

    • Got it to work by scaling the entire model up by a factor of ten instead of five and also changing the units in the export settings from feet to inches. I could probably do more tests to see which issue was actually responsible for the problem, but I'm just happy to see the back of this thing.
      Pre-Disaster Planning Thread: Thinking of Restoring a Part of Black Mesa? Come Here First!

      Office Complex PD: I'm the Slowest Pre-Disaster Mapper!

      Pre-Disaster Questionable Ethics: It's here!
    • One possible source of error could be that you selected the wrong faces in the seam between adjoining pieces when separating the collision mesh pieces, causing the face normals in that part of the mesh to point inwards instead of outwards, with respect to the selected piece of the collision mesh. If you enable display of face normals you can check each piece of the collision mesh and verify that all the normals are pointing outwards. If any of the normals are pointing inwards, you can flip them using the Shading->Normals -> Flip Direction button in the Tool Shelf (after selecting the affected faces.)