Cohort MTP
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)
@SamTheUncle Thanks :)
@windshifter1
Oh, thanks! Thats very cool! You always know about that type of stuff.
@SamTheUncle I know your question was quite a while ago, but it seems it was never answered.
This isn't actually a mod as you think it is. Its not a simpleplanes mod file, its a compter program .exe . You run the program, input the filepath for the model, and it processes to output a simpleplanes file (it saves in the correct location, no need to move it). Then you just open SP and open the aircraft named "export". There it is. Make sure to not have too many polygons, (low poly files recommended) because each polygon becomes one fuselage panel. 1000 polygons, 1000 parts.
The resulting file is a normal simpleplanes file, no mod required to open.
An example of this is my Horse, a simpleplanes creation made entirely using this tool. Its funny though, my least effort creation (almost no effort) has my most upvotes ever. Only on simpleplanes.
Simple square polygon pls
@324
Quick question. If I were to download this, use it to create a plane, and then upload the plane, would you be required to have this mod to download the plane I post? Or could everyone download it?
@skely
72.
69 upvotes 🫠
@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.
Can we use the mod to the mobile devices?
We need this as default feature
@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.
@324 Thank you
@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. I
m afraid you will have to make the wheels in SP bc they have too many polygons. Anyway, good luck and i
m looking forward to this build!Did you make the model yourself or its from a game?
@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
@324 https://www.mediafire.com/file/1ukothnhvrguvem/concorde.obj/file
@324 file
@JustMeAndOnly @JP11 send me your obj and export files so i could check them
@324 I keep getting an error in the designer where it couldn't load the model
@324 I keep getting an error telling me to verify if my file exists, could you tell me the issue?
@324 thanks
@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.
@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.
@324 drive c? jundroo and Aircraftdesign file right?
@FoxtrotCharlieCharlieX it's where you want the output file to be created.
@324 what is the path to the simpleplanes xml? how i find it?