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)
@324 I use mostly free stuff like 3D builder (windows) and autocads free program MeshMixer to triangulate and reduce the number of faces of the meshes. I also rescale to smaller sizes but the output mesh from this tool always is absurdly huge relative to the scale SimplePlanes uses. I seem to have difficulty with the scale between the original model and the one generated as the xml file so I have to use override to adjust it .
@11qazxc Great idea. Two blocks per triangle may do. Though idk how much improvement we will see.
I went for fuselages because it's what typically is used in panelling.
@TunderTunder maybe, but idk. It's a big can of worms. Triangles are straightforward, always planar. Some quads, however, can be slightly out of plane if one vertex is higher than others. And SP fuselage panels are trapezoidal, meaning not all quads can be interpreted. Two sides must be parallel. Therefore, it adds some significant hassle.
@FrozenAstro what application do you use? It may be something specific to the way it exports.
Maybe you can reduce cpu load if you'll use one-two triangle blocks instead of fuselage?
Really cool Seems to work pretty well however the obj to xml aircraft or parts are huge compared to other aircraft is there a way to scale it down in the XML file ? Scaling in the design application doesn't seems to change anything I switched to Meters in the design app and make something fairly small but the scale is way of when brought into simpleplanes. Cool app now if I can just shrink what I import Thanks!
Great..
@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