1. Προϊόντα
  2.   Aspose.3D
  3.   Aspose.3D FOSS for Java

Aspose.3D FOSS για Java

Φορτώστε, δημιουργήστε, μετασχηματίστε και εξάγετε 3D σκηνές από τη Java — δωρεάν και ανοιχτού κώδικα.

Βιβλιοθήκη Java Ανοιχτού Κώδικα για Επεξεργασία Αρχείων 3D

Aspose.3D FOSS για Java είναι μια βιβλιοθήκη αδειοδοτημένη με MIT, καθαρά Java, για εργασία με μορφές αρχείων 3D. Προσθέστε μια ενιαία εξάρτηση Maven και ξεκινήστε αμέσως την ανάγνωση, τη δημιουργία και τη γραφή σκηνών 3D χωρίς την εγκατάσταση οποιουδήποτε εγγενούς χρόνου εκτέλεσης, εξωτερικού SDK ή τρίτου renderer.

Η βιβλιοθήκη εκθέτει ένα καθαρό API γραφήματος σκηνής που βασίζεται στα Scene, Node, Mesh, Camera και Transform, το ίδιο εννοιολογικό μοντέλο που χρησιμοποιούν επαγγελματικά εργαλεία 3D. Η υποστήριξη μορφών περιλαμβάνει OBJ (με φόρτωση υλικού .mtl), STL (δυαδικό και ASCII, επαληθευμένο roundtrip), glTF 2.0 (υλικά PBR), GLB (δυαδικό glTF) και FBX (μόνο εισαγωγή). Οι επιλογές φόρτωσης και αποθήκευσης ανά μορφή σας επιτρέπουν να ελέγχετε την αντιστροφή συντεταγμένων, την κλίμακα, την κανονικοποίηση κανονικών και τη φόρτωση υλικών χωρίς να γράφετε κώδικα ανάλυσης ειδικής μορφής.

Aspose.3D FOSS απαιτεί Java 21 ή νεότερη και λειτουργεί ταυτόσημα σε Windows, macOS και Linux CI runners, Docker containers και περιβάλλοντα serverless. Δεν υπάρχει εγγενής επέκταση για μεταγλώττιση και δεν απαιτείται κανένα πακέτο συστήματος για εγκατάσταση.

3D Format Support and Scene-Graph API

  • OBJ / MTL: Load Wavefront OBJ files with accompanying material definitions.
  • STL: Read and write both binary and ASCII STL with full roundtrip verification.
  • glTF 2.0 / GLB: PBR material loading and export via GltfSaveOptions. Use setContentType(FileContentType.BINARY) for GLB output.
  • FBX: Import support for loading FBX files (export not available).
  • Scene-graph API: Scene, Node, Mesh, Camera, Transform.

Where Aspose.3D FOSS Can Be Used

  • Asset validation pipelines: Verify, re-orient, and re-export 3D assets in CI.
  • Game development tooling: Batch-process OBJ and STL meshes without a native engine.
  • 3D printing workflows: Read, validate, and re-export STL files.
  • Web backends: Serve 3D conversion endpoints in Docker or serverless functions.
  • Content migration: Convert between format families at scale.

Per-Format Options and Coordinate Control

  • Coordinate-system orientation: Flip axes and adjust scale per format without custom code.
  • Normal normalization: Automatically normalize vertex normals on load (ObjLoadOptions.setNormalizeNormal()).
  • Material loading control: Enable or disable MTL/texture loading for faster parsing.
  • Pretty-print output: Choose compact or human-readable glTF JSON via options.

Developer Experience

Aspose.3D FOSS for Java installs with a single Maven dependency (com.aspose:aspose-3d-foss:26.1.0). The library is pure Java, with no native extensions to compile and no system packages to install.

The scene-graph API mirrors the conceptual model of professional 3D tools, so the learning curve is short for anyone familiar with Three.js or Blender’s data model. The library is MIT-licensed, open-source, and welcomes bug reports and contributions on GitHub.

Load an OBJ Scene and Export as glTF

Add the Maven dependency, then call Scene.fromFile("model.obj") to load the OBJ file together with its MTL material definitions. A single scene.save() call with a .gltf extension writes a glTF 2.0 JSON file, with no format registry or converter object needed.

<dependency>
  <groupId>com.aspose</groupId>
  <artifactId>aspose-3d-foss</artifactId>
  <version>26.1.0</version>
</dependency>
import com.aspose.threed.*;

// Load an OBJ file (with .mtl materials)
Scene scene = Scene.fromFile("model.obj");

// Export as glTF 2.0
scene.save("model.gltf");

Convert STL to glTF with GltfSaveOptions

To produce a glTF file with coordinate-system adjustments, pass a GltfSaveOptions instance with setFlipCoordinateSystem(true). The same pattern applies to all per-format options — swap out the options class for the format you are targeting.

import com.aspose.threed.*;

Scene scene = new Scene();
scene.open("mesh.stl");

// Save as glTF with options
GltfSaveOptions opts = new GltfSaveOptions();
opts.setFlipCoordinateSystem(true);
opts.setPrettyPrint(true);
scene.save("mesh.gltf", opts);

Συχνές Ερωτήσεις

What is Aspose.3D FOSS for Java?

It is a free, MIT-licensed pure-Java library for loading, manipulating, and saving 3D scenes without installing any native runtime or external SDK.

Which 3D formats are supported?

OBJ (with .mtl), STL (binary and ASCII), glTF 2.0, GLB (binary glTF), and FBX (import only). Each format has a dedicated load/save options class.

Does it require any native dependencies?

No. Aspose.3D FOSS for Java is pure Java with zero native extensions. It runs on Windows, macOS, and Linux without any compilation step.

How do I install it?

Add the Maven dependency com.aspose:aspose-3d-foss:26.1.0 to your project. No additional system packages or native extensions are required.

Can I control coordinate-system orientation?

Yes. Per-format option classes let you flip axes, adjust scale, and normalize normals without writing any format-specific parsing code.

Which Java versions are supported?

Java 21 and later are supported. The library runs identically on all major operating systems.

Is the source code available?

Yes. The library is MIT-licensed and hosted on GitHub. Bug reports and pull requests are welcome.

  

Υποστήριξη και Πόροι Μάθησης

 Ελληνικά