READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

AMR - Mesh Format Research Helper

General game file tools that are useful for more than one game
Post Reply
User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 524
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 443 times

AMR - Mesh Format Research Helper

Post by Bigchillghost » Mon Aug 19, 2019 7:27 am

1) Introduction

Advanced Mesh Reaper, or AMR for short, is a tool I created when playing around with MFC.

It's aimed to be a quick approach to obtain a couple of meshes with all basic attributes including positions, normal vectors, texture coordinates, and if necessary, to transform them to the target coordinate system without the assistance of extra programing or other 3D applications.

Though it can be used for format researching purpose, it's not served to be a beginner tool. So there're not any step-by-step tutorials on specific formats.

2) Change Log

Code: Select all

2019.11.07 - v1.3.2		Added a new data type Int10 for normal encoding;
				Fixed preview status not flushed under certain circumstances;
				Fixed open file failed when a param file has been created/opened.
2019.10.30 - v1.3.1		Fixed a parameter validation issue;
				Fixed a display issue of negative relative offsets.
2019.10.27 - v1.3.0		Added UINT8 datatype support for face indices;
				Distance control applied also to tristrips;
				Fixed naming issue during export;
				Minor bug fixes.
2019.09.12 - v1.2.0		A few small modifications;
				Fixed some UI issues.
2019.08.24 - v1.1.0		Added option for previewing all meshes in param list;
				Added support for relative source path when saving param list file;
				Fixed a couple of issues.
2019.08.19 - v1.0.1		Initial release.
3) User Interface

Image

See below for a detailed explanation.

4) Main Features
  • The Multi Sources mode allows you to specify individual data files as inputs. This can be very convenient when you have raw data dumped from discrete compressed blocks.
  • Independent routines of handling different mesh elements, which ensures a simple, clean and user friendly interface.
  • Complete modules for managing the parameter list to make your work easier and faster.
  • Ability to handle cases where extra data is inserted in polygon indices. This is useful for files containing combined UV or normal indices.
  • Support of parsing position bounding box to restore the mesh to its in-game scaling.
  • Multiple UV channels support. By exporting to FBX format, the tool allows to export each mesh with up to 4 individual UV channels.
  • Flip UV option. It allows to vertically flip the UV so as to map with the textures.
  • Supports for normal vectors without any cost.
  • Transformation options of the model including axis inversion and mesh rotations.
  • Visulizes meshes, UVs and vertex normals vectors.
5) Examples Using the Tool

Image

Image Image

Image Image

6) Notes

AMR is using an external mesh viewer called ViewScene to preview the model with different attributes.
It's based on the ViewScene sample program of Autodesk FBX SDK, version 2019.2. I made some modifications myself to meet with different demands of this project. The main modifications include:
- Added codes for displaying vertex normal vectors;
- Added codes for displaying as point cloud;
- Added codes for displaying shaded wireframe;
- Changed some of the keyboard accelerators, and added a few more to interact with the scene more easily;

Still, the modified ViewScene executable along with its required libaries technically are not a part of AMR. So they do not come with this release. You should obtain these components from the link provided below and place them into the location of the AMR executable.

ViewScene Executable

7) Download
You do not have the required permissions to view the files attached to this post.
Last edited by Bigchillghost on Thu Nov 07, 2019 4:09 pm, edited 5 times in total.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 524
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 443 times

Re: AMR - Mesh Format Research Helper

Post by Bigchillghost » Fri Aug 23, 2019 5:55 pm

Detailed Explanation on the AMR User Interface
  • Menu
    • File
      Image

      Code: Select all

      Open			Entry to open the source data file of the model.
      Multi Sources		Entry to open individual source files for different attributes.
      Export			Exports mesh to FBX format with the given parameters.
      Export from List	Exports meshes recorded in the opened param list.
      
      - Multi Sources
      Image

      Code: Select all

      Clear			Clear the filename in the edit box, which has the effect of closing the previous source.
      
    • Options
      Image

      Code: Select all

      Preview All in List	Preview all meshes recorded in the opened param list.
      
  • Panel
    • File Access
      Image

      By default the data is read as little-endian. Check Big-endian to change the byte order.
    • Parameters
      Image

      Code: Select all

      Open			Opens a parameter list file.
      Save			Saves current parameter list into a file.
      Add			Adds current parameters to the list.
      Del			Deletes parameters of the selected entry.
      Load			Loads parameters of selected entry to the panel.
      Ren			Renames the selected entry.	
      Reset			Resets panel parameters to default state.
      
    • Preview
      Image

      Visulizes vertex positions, normals and texcoords as point cloud or mesh.
      Press Proceed to preview the result.
    • Polygon Indices
      Image

      Parameters that affect how face indices are read.

      Code: Select all

      Count				Number of face indices in decimal.
      Address				Offset where face indices data start. Must be an hexadecimal integer.
      Distance to Next Index		Number of bytes distant to next index in the first polygon relative 
      				to Address.
      Distance to Next Polygon	Number of bytes distant to the first index in the next polygon 
      				relative to Address.
      				Both fields above are in decimal.
      Default				Disables/enables distance mode.
      Data Type			Data types of index elements.
      Encoding			Encoding of polygon indices. 
      				Availabe options include FBX N-gon, triangle list and triangle strip 
      				with/without restart flag (-1).
      
    • Vertex Attributes
      Image

      Parameters that affect how vertex attributes are read.

      - Count
      Number of vertices in decimal.

      Code: Select all

      Calculated			Obtains Count from the digest of indices interpretation.
      - Normals
      Enables/disables Normal attribute.

      - Texcoords
      Enables/disables texture coordinate attribute.

      - Address
      Offset where corresponding vertex attribute data start. Must be an hexadecimal integer.
      It can be an absolute address or one relative to the specified address.

      - Stride
      Size of the structure containing the corresponding vertex attribute.

      Code: Select all

      All Same			For cases where all attributes are packed in the same structure, 
      				or if they have the same stride.
      - Data Type
      Data types of vertex attribute elements.

      Code: Select all

      All Same			For cases where all attributes are using the same data type.
      - UV Settings
      Options to manage UV properties.

      Code: Select all

      Channal ID			ID of selected UV channel. Supports up to 4 channels.
      Push				Stores parameters from the panel into selected UV channel.
      Pop				Loads parameters from selected UV channel to the panel.
      Del				Deletes parameters from selected UV channel.
      Unit Factor			Factor to be divided by the UV values when which are encoded as 
      				16 bit integers. 
      				By default this value is automatically adjusted to restrict 
      				the coordinates within the bound of 0 to 1.
      Flip				Flips UV vertically. Affects all UV channels.
      - Invert Axis
      Inverts the position coordinates along a certain axis. Useful for converting the mesh from
      left-handed system to right-handed one, or vise versa.

      - Rotations
      Rotates the mesh with the given Euler angles during preview or export procedure.

      - Bounding Box
      Used to restore the mesh to proper scale when the values are encoded as 16 bit integers.

      Code: Select all

      Disabled			Disables/enables bounding box.
      - Normal Storage
      Storage order of normals encoded as 3-byte vectors, where padding byte is not considered as part
      of the vector, if there's any. By default it's read as X, Y then Z.

      Code: Select all

      Inverse				Inverts reading order to Z, Y then X. This is useful when the normals are 
      				packed as 32-bit integers.
    • Data Interpretation
      Image

      Here's the window where you can interpret the data with the given parameters. Only the first and the last 500 lines will be shown if the buffer contains more than 1000 elements. For FBX N-gon, only the first 500 polygons will be displayed.

      The Digest window shows the digest message of the results of the interpretation, or notifications from other operations.

      Code: Select all

      Positions			Interprets position data.
      Normals				Interprets normal data.
      UVs				Interprets UV data.
      Indices				Interprets polygon index data.
      
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 524
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 443 times

Re: AMR - Mesh Format Research Helper

Post by Bigchillghost » Thu Nov 07, 2019 4:10 pm

Version 1.3.2 released.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

Post Reply