neurolabusc / Fast-Quadric-Mesh-Simplification-Pascal-

Mesh triangle reduction using quadrics (for Delphi, Lazarus and Pascal)
62 stars 13 forks source link

Trying to use Other file formats #3

Open KurushDesai opened 1 year ago

KurushDesai commented 1 year ago

I tried using a file with .stl extension which a pretty common file type in terms of 3d objects, and the result was stuck on :- image

neurolabusc commented 1 year ago

The C code only reads OBJ format meshes. You can either compile the Pascal code or convert your STL mesh to OBJ format. Supporting the STL format is complicated, because this format does not re-use vertices. This inherent weakness of the STL format leads to large file sizes, and the resulting meshes either appear faceted or one must weld vertices to allow proper per-fragment shading. Likewise, any mesh simplification routine must weld vertices of STL files before processing them.

The Pascal code includes the function UnifyVertices that allows it to read STL format files.