Jump to content

Recommended Posts

ACF Mesh tools

View File

ACF Mesh Tools
for Linux, Windows and MacOsX


ACF Mesh Tools allows you to edit and modify the plane's meshes from the ACF file.
Be aware: those tools are not made to edit the OBJ8 files as they work only with the ACF file format.


HOW ACF MESH TOOLS WORKS

Let's take as example the default Laminar's Cessna 172, a great model very well done (aestetically and internally).
We know that in Plane Maker the fuselage is made out of cross-sections:
301333669_Screenshot2020-10-25at02_00.233838x2075.jpg.ee692c6727eb7b2f90aef3d26233692f.jpg

...and those cross-sections creates a mesh:
1709679979_Screenshot2020-10-25at02_26.593839x2076.jpg.215d6723d416fa0f9062d7ac562541f9.jpg

Those meshes, made out of cross-sections, are the ones that PlaneMaker uses as model for the plane and X-Plane uses for its physics calculations.
Before v.8 that meshes were used as visual and physics model. Now, in most cases, this meshes are hidded from view and X-Planes uses a dedicated file, in OBJ8 proprietary format, for the visual rendering.

Using the tool 'acf_mesh_extract', the meshes inside the ACF are saved in a standard Wavefront OBJ file, that can be edited with Blender or with any other software that supports the format.

Once converted, the mesh can be modified:
1108407866_Screenshot2020-10-25at03_45.463236x2042.jpg.67c1c4932e2eccbe31dc309ba4cc2eec.jpg


Then the edited mesh is converted back in ACF format, using 'acf_mesh_insert', and the resulting ACF file can be loaded in Plane Maker:1801930091_Screenshot2020-10-25at03_45.312549x1569.jpg.f1a6f8078ef46e11e969b258492782c8.jpg

630876394_Screenshot2020-10-25at11_49.371416x427.jpg.8134a4409d0dd8e60f0af8fc53448265.jpg

 

Everything shown here was entirely done automatically with a conversion script. Except moving the points to alter the shape, no additional task has been done in Blender.
I'm using Blender, but this method can be used with any 3D software.


A PRACTICAL EXAMPLE

This is a quick reshaping that I've done on the fuselage of B-377 Stratoscruser made by Kauffmann.

I've found that the hidden fuselage doesn't match the shape of the plane model, the visual one, as we can see in Plane Maker and in the version imported in Blender:
7887307_Screenshot2020-10-25at17_52.472517x1526.jpg.0b0785bab5d4423396db75192ef19ca4.jpg1878854424_Screenshot2020-10-25at13_37.133178x1999.jpg.aa50a50af46096b6a5cd7477e49d334c.jpg

(the wireframe in black, the unselected one, is the OBJ8 mesh for this plane; the selected object is the fuselage mesh from the ACF file)

After a quick reshaping, I've managed to make che ACF mesh match the shape of the OBJ8; then and I've reimported it back in the ACF file:
1929727750_Screenshot2020-10-25at15_46.313182x2032.jpg.c0b44cdfd6be2d76debc0200c43f84b7.jpg1875046868_Screenshot2020-10-25at17_53.452507x1560.jpg.7941d0d69e6ea58619903aa11a5cb1f5.jpg

Loading the resulting ACF file in PlaneMaker we see that the cross-sections have changed from this:
1000880580_Screenshot2020-10-25at17_52.591318x403.jpg.cbf3e2788ae7def7f54f226acf49e03d.jpg1503917441_Screenshot2020-10-25at19_45.132509x1544.jpg.bf115d13a02fa3768632ee780721ac31.jpg

to this:
850159042_Screenshot2020-10-25at17_50.141336x406.jpg.01e1aad0bc673fa990dd9cb6db57ec31.jpg170663143_Screenshot2020-10-25at17_50.402501x1547.jpg.1b225ab31e7dd01bd3d34d7bb449f377.jpg

 

THE TOOLS

In the zip file you'll get:

acf_mesh_extract
acf_mesh_insert

Launch those commands without options to get an help page.

acf_mesh_extract extracts all the meshes from the ACF file and converts them in a single (wavefront) OBJ file with multiple objects. You can import this file in any 3D software that supports the format, and alter the meshes as you wish.

  • You can not delete or add points nor change in any way the topology; you are just limited to move points.
  • You'll find that some objects, like the engine's nacelles,  are not in their final position; that is because PM positions them with a translation value. You can not move those objects to their final positions, otherwise when you'll reimport them back in the ACF file, it won't work;
  • You are allowed to delete objects that you don't need.
  • Some objects, although they can be modified and reimported in the ACF file, once this one is opened in Plane Maker are reset to their original shape; this applies to those parts, such the wings, that are made out of airfoils.
  • You can not alter the UV informations of the vertices, as they are used to store the ACF's topology informations and they are needed later to reinsert the meshes back in the original file.
  • Make sure that your 3D sofware exports the UV informations, without altering them.

acf_mesh_insert allows to reinsert the modified meshes back in the original ACF file. It can be used only with meshes converted with 'acf_mesh_extract'.

  • You can not overwrite the original ACF file; this command will save the output in a different file. Your original ACF file is always preserved.
  • Inserting the meshes does not alter in any way the informations of other parts present in the file.
  • You don't need to reinsert all the meshes; you can insert only the ones you have modified.

 

DEVELOPMENT

This tools are under active development and their functionalities may change in the future.
The primary development platform is Linux.

Special thanks to @xraydelta1 for compiling the Mac version.

Feedbacks, reports, suggestions or ideas are strongly welcomed: feel free to send me a message with your thoughts.

X-Pilot's forum is the primary and sole forum for support, announcements and new releases.

PLEASE DO NOT REDISTRIBUTE THIS TOOLS THROUGH OTHERS FORUMS OR PLATFORMS


 

Link to comment
Share on other sites

  • 2 weeks later...

OK. So I modified the mesh as specified, and attempted my first insert.  The insert utility ran with no error messages but a modified ACF file was not generated.

Update:

If I only extract the mesh, import the obj, modify, export and insert the utility worked well.

I had originally imported the wavefront.obj into a blender file with a full aircraft model to use to move the vertices, even after deleting the original aircraft, the resulting wavefront.obj export file caused failures with the insert executable. 

I'm now trying to figure out the work flow that allows me to trace a blender model and still get a good export.

Edited by Jeffory
Link to comment
Share on other sites

33 minutes ago, Jeffory said:

I had originally imported the wavefront.obj into a blender file with a full aircraft model to use to move the vertices, even after deleting the original aircraft, the resulting wavefront.obj export file caused failures with the insert executable. 

Can you send those files to me, so I can check and see where the problem is?

Edited by CaptainSpaulding
Link to comment
Share on other sites

  • 1 month later...
  • 10 months later...
  • 3 months later...

This is totally awesome and I'm very glad to discover this tool.

I have been working on a few python scripts that I use for help in modifying .acf files, as I often want to tweak problems and annoying graphical glitches on freeware aircraft.

To answer KenS's question I do not believe you should put these tools in the main XPlane folder or the plane maker folder, but rather put them in their own folder.  Add the tool folder to the PATH to be able to run the tools from the command line.

Edited by InitiatedAunt74
Link to comment
Share on other sites

  • 1 year later...

Hi CaptainSpaulding,

I'm really interested in using this took for aircraft development, but I'm struggling with getting an account sorted (there's an error with the challenge question and the mods haven't gotten back to me). Do you have an alternative download link for this script?

Thanks

Link to comment
Share on other sites

4 hours ago, jagforce1 said:

I'm really interested in using this took for aircraft development, but I'm struggling with getting an account sorted (there's an error with the challenge question and the mods haven't gotten back to me). Do you have an alternative download link for this script?

If you can make a post in this forum, you can download the file.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...