Profile image

Cohort MTP

49.5k 324  10 months ago
3,200 downloads
Version 1.2 Tool

UPD1 30.06 NOW A STANDALONE EXE
UPD2 30.06 NOW DOES CONNECTIONS! TWO UPDATES IN A DAY HERE WE GO!
UPD3 26.07 NOW CAN USE ANY FILEPATH

Cohort Mesh-To-Plane (MTP) is a tool that converts OBJ meshes into SimplePlanes aircraft.

Convert your Blender-made masterpieces, or even CFD models (why not?) into the basic shape of your aircraft.

Notes:

  • MESH MUST BE TRIANGULATED
  • The parts will be automatically connected if and only if they share vertices.
  • Be mindful of the number of polygons in the model! 1 triangle = 1 fuselage piece. They have no collisions but you still have to be mindful of the complexity
  • Before using the mesh, check it for degenerate (zero area) faces. Blender "Degenerate Dissolve" command is a good way to do this. Check for duplicate verices, edges, faces. Please note that models with degenerate faces will fail to open.
  • Set showDebugPoints=True in the code to put spheres where the verticles are (and other debug points). It WILL break connections. If loading fails, remove the connections section from the aircraft file.

Known issues:

  • Z axis may be inverted if OBJ is generated via Blender. Well, just flip it around in blender or something
  • Perfectly vertical faces may be... janky. Tilt the geometry a bit. Fix in progress. For now, just rotate them around their local Z.

How to use:

  • unrar the archive and run main.exe
  • input parth to OBJ file and the path to where you want the resulting file to be saved (like C:\Users*username*\AppData\LocalLow\Jundroo\SimplePlanes\AircraftDesigns\export.xml)
  • output will be created in the specified location

Terms of use:

  • If you use Cohort you must acknowledge it in the design description.
  • You must only use OBJ files you have the appropriate license for and provide credit for the original author / source of the file (unless you made it yourself)
  • If you create a version of Cohort, you must include a link to this post with all distributions (a readme file containing a link is ok)

You may want to compile the app yourself if you want to modify it or need a version not fot Windows. You are free to modify the program to suit your needs. The app is made using PyCharm using Python 3.10 and you will find a PyCharm project in the archive. NumPy library is required. The program is split into two files because it uses a file (obj reader) from another project - asteroid light curve app.
You must include credit and link to this post if you create and/or distribute any derivative work (such as if you modify this program and upload it somewhere or use it eentirely or in portion as a part of your project)

  • Log in to leave a comment
  • Profile image
    2,110 skely

    69 upvotes 🫠

    4 months ago
  • Profile image
    49.5k 324

    @TheStupidTrabantGuy1001 if you manage to run the source code in a python ide and download the necessary dependencies... may be doable, but i never tried. You will also need to make the OBJ file.

    5 months ago
  • Profile image

    Can we use the mod to the mobile devices?

    +1 6 months ago
  • Profile image
    14.9k SiBangsatYa

    We need this as default feature

    7 months ago
  • Profile image
    70.6k Snargles

    @324 Could you possibly make it so that the converter turns the shapes and stuff into one whole part? In theory this should vastly increase the things we can create with this wonderful mod.

    +3 8 months ago
  • Profile image

    @324 Thank you

    +2 8 months ago
  • Profile image
    49.5k 324

    @JP11 This is a good example, but it still contains degen geometry. By removing the degenrate faces and wheels (they have more poly than the entire car!) i managed to convert it. The model contains small elements such as some parts on the bonnet, rear bumper, door handles, that are too small and will not reproduce okay but increase the part count. Simplify them and/or model in sp. Im afraid you will have to make the wheels in SP bc they have too many polygons. Anyway, good luck and im looking forward to this build!

    Did you make the model yourself or its from a game?

    +1 8 months ago
  • Profile image
    49.5k 324

    @JustMeAndOnly This file contains too many polygons. This will likely not run and result in about 40000 parts (if it even converts). The file contains multiple degenerate (zero-area) faces that prevent it from being converted. If you are using blender these can be removed with mesh -> clean up -> degenerate dissolve in edit mode. Remodel this in low poly and try to do small parts like windows as separate (model them with text, or a single fuselage part in sp). Same with engines, build them in SP. Use way less edges per cross section or airfoil

    8 months ago
  • Profile image

    @324 https://www.mediafire.com/file/1ukothnhvrguvem/concorde.obj/file

    8 months ago
  • Profile image
    15.0k JP11

    @324 file

    8 months ago
  • Profile image
    49.5k 324

    @JustMeAndOnly @JP11 send me your obj and export files so i could check them

    8 months ago
  • Profile image
    15.0k JP11

    @324 I keep getting an error in the designer where it couldn't load the model

    8 months ago
  • Profile image

    @324 I keep getting an error telling me to verify if my file exists, could you tell me the issue?

    9 months ago
  • Profile image
    4,708 OpenHere

    @324 thanks

    9 months ago
  • Profile image
    49.5k 324

    @ReturnOfJeffChandler I reviewed your file. It contains multiple issues:
    - The file is too big. It contains 183000 faces. That would result in 18300 parts, something SimplePlanes can't handle and my script can't too. You should use meshes below 1000-2000 faces.
    - The model contains numerous degenerate faces (faces with zero area). These will prevent the model from being converted.

    Advice: remake the model in "low poly" style with about 1000 polygons. Do not include cylindrical elemets such as wheels, rods, landing gear. Model them in SimplePlanes. You still will need to make them in SP for them to be functional. You may want to process landing gear hatches using Cohort and attach them separately. Check out my example aircraft: its' gear is built separately.

    9 months ago
  • Profile image
    49.5k 324

    @FoxtrotCharlieCharlieX yes. C/Users/your username/AppData/LocalLow/Jundroo/SimplePlanes/AircraftDesigns/filename.xml. If everything is ok you will be able to open the file as a plane in SP.
    JUst "save as" that plane after or export into another file next time so that you don't overwrite what you have. Unless that's what you want.

    9 months ago
  • Profile image

    @324 drive c? jundroo and Aircraftdesign file right?

    9 months ago
  • Profile image
    49.5k 324

    @FoxtrotCharlieCharlieX it's where you want the output file to be created.

    9 months ago
  • Profile image

    @324 what is the path to the simpleplanes xml? how i find it?

    9 months ago
  • Profile image

    @324 sure :)

    9 months ago
  • Profile image
    4,708 OpenHere

    @324 https://drive.google.com/file/d/1A3h9bODuExbd26p2c667HBBtD31MBVf0/view?usp=sharing there

    9 months ago
  • Profile image
    49.5k 324

    @ReturnOfJeffChandler Please give me access (l can't open it, set it to "anyone who has a link can view")

    9 months ago
  • Profile image
    49.5k 324

    @JustMeAndOnly @FoxtrotCharlieCharlieX @FlyingPatriot I have added writing to any filepath. Try it now!

    Sorry, it took a while. I'm kinda overwhelmed with my duties.

    9 months ago
  • Profile image
    12.0k 52

    @Maosulli I don’t know

    9 months ago
  • Profile image
    525 Maosulli

    @Skyler101 how do you make this work?

    9 months ago
  • Log in to see more comments