Aging 3D models
Project description
age3d
A Python Library to age 3d models by simulating the effects of weather
Overview
Age3D is a Python Library that allows for eroding of 3d models. It uses the .stl
file format and incorporates Open3D functionality, allowing users to simulate material removal.
Features:
- Simplified Workflow for
.stl
$\rightarrow$TriangleMesh
$\rightarrow$PointCloud
&BitMask
- Visualization of
TriangleMesh
&PointCloud
- Calculate Metric of
TriangleMesh
- Erosion Method for Aging
- Customizable Number of Passes of Simulated Erosion Particles
- Customizable lifetime of Simulated Erosion Particles
Dependencies
age3d requires the open3d Python Library which is installed during libray installation.
Installation
The recommended way to install age3d is through pip.
pip install age3d
Usage
Import the library:
import age3d
Import a .stl
model where file_path
points to the location:
mesh = age3d.import_mesh(file_path)
Erosion
If the mesh
is low-poly, run with number_of_subdivisions > 0
:
mesh = age3d.mesh_subdivision(mesh, iterations = number_of_subdivisions)
Erode the mesh
:
eroded_mesh = age3d.erode(mesh)
If Erosion with customized Passes and Max Particle Lifetime:
updated_vertices, eroded_mesh = age3d.erode(mesh, iterations = 2, erosion_lifetime = 10)
Point Cloud Creation
Make a PointCloud
with Red Color Points:
point_cloud = age3d.make_point_cloud(mesh, color = [255, 0, 0])
Visualization
Visualize Eroded Mesh:
eroded_mesh.compute_vertex_normals()
age3d.visualize(mesh)
or
eroded_mesh.compute_vertex_normals()
age3d.visualize([mesh])
Visualize Mesh & Point Cloud:
eroded_mesh.compute_vertex_normals()
age3d.visualize([mesh, point_cloud])
Visualize Mesh & Point Cloud with Wireframe:
eroded_mesh.compute_vertex_normals()
age3d.visualize([mesh, point_cloud], show_wireframe = True)
Contributing
If you encounter an issue, please feel free to raise it by opening an issue. Likewise, if you have resolved an issue, you are welcome to open a pull request.
See more at CONTRIBUTING.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file age3d-0.4.0.tar.gz
.
File metadata
- Download URL: age3d-0.4.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9cdc068902f631b5f684db419c3565ae7fe9191fb279b12b84e5e2492c62469 |
|
MD5 | 44e010faf76f9b1442c2655b00ab46b1 |
|
BLAKE2b-256 | b5cac998f8e8b5ce73f3f6b1ea455b2590f9053aff7e169bfb3736c5f2418f4c |