A library that can be used to easily convert a collada file (.dae) to a wavefront file (.obj).
Project description
collada2obj
This Python library can be used to easily convert collada (i.e., .dae
) files
to wavefront (i.e., .obj
) files. This transformation between file formats for 3d
models is useful for a variety of applications, though this library was motivated
by the need for this transformation in some robotics applications.
At the moment, this library is a work in progress and is not yet fully functional. However, the basic functionality is there and the library can be used to convert simple collada files to obj files.
See the examples
directory for example usages of the library.
Installation
To install this library, you can use pip
:
pip install collada2obj
Local Installation
If you want to install this library locally (recommended only if you want to tweak/play around with collada2obj
itself), then you can clone this repository and
install it using pip
in the following way:
Change to the root directory of this repo and then run the following command:
pip install -e .
Usage
from collada2obj import ColladaFileConverter
def main(input_filename: str = "../convert_base_mesh/base.dae", output_filename: str = "./out.obj"):
# Setup
print(
"Create a converter for the Collada file \"{}\" and export to OBJ file \"{}\"."
.format(input_filename, output_filename)
)
converter = ColladaFileConverter(dae_filename=input_filename, obj_filename=output_filename)
converter.export_obj()
if __name__ == '__main__':
main()
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
Built Distribution
File details
Details for the file collada2obj-0.0.3.tar.gz
.
File metadata
- Download URL: collada2obj-0.0.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d771e886d22f0ec06b18c156bc6db5ffc15015c6ad107759cf52fdf79db579ca |
|
MD5 | 871d5218b003fb41e75a613b6fa7c880 |
|
BLAKE2b-256 | 3d324c080475472fde19d931720cd7426a72c1cb83f9c4b7f72226f304191b96 |
File details
Details for the file collada2obj-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: collada2obj-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a86a8eb0ec3297db19bb899b67ff568db6a76f36a6dcc509d6a1129a0b2426b |
|
MD5 | 9decc4baad829381a84434194a6fc1fb |
|
BLAKE2b-256 | 8b9de6a880940e65b9901f74c66f6aad6447f53a3c5405ea114ef2db3c3603b6 |