Skip to content
This repository was archived by the owner on Oct 23, 2025. It is now read-only.

Netherlands3D/ColladaExport

Repository files navigation

Archived – Now maintained in the Netherlands3D Main Repository; OpenUPM updates suspended.

Collada Mesh Export

This package provides scripts that allow you to export triangle lists or Unity GameObjects containing a mesh to a Collada file using streamwriting. This can be useful for creating 3D models that can be used in other applications or for sharing with others. With the ColladaFile class, you can easily create, fill, and export a Collada file from triangles. Additionally, the GameObjectToColladaFile script can retrieve the triangles from a GameObject Mesh (or nested meshes) and export them to a Collada file.

Installing

This package is provided through OpenUPM, to install it using the CLI you can perform the following:

$ openupm add eu.netherlands3d.collada

or, you have to add https://package.openupm.com as a scoped registry with, at least, the following scopes:

  • eu.netherlands3d

Usage

The following example shows how to export a custom triangle (made from 3 verts)

The GameObjectToColladaFile is a script that does this by retrieving the triangles from a GameObject Mesh ( or nested meshes )

Please note that currently the exported Collada is exported as triangles without 'sharing' any vertices, causing the exported mesh to have seperated triangles.

// Create a new collada file in memory that we will construct
 var collada = new ColladaFile();

// Add a mesh to the collada file by adding a list of vertices that make up the triangles
// A single vertex is defined as a double[] array
var vertexList = new List<double[]>();
vertexList.Add(new double[] { 0, 0, 0 });
vertexList.Add(new double[] { 1, 0, 0 });
vertexList.Add(new double[] { 1, 1, 0 });

collada.AddObjectTriangles(vertexList, "MyTriangle", material);

// Finish the document
collada.Finish();

// Save the collada document as a local file
collada.Save(filePath);

Repository Archived

This repository has been archived and is no longer maintained independently.

The contents of this package have been merged into the
Netherlands3D Main Repository
into the Packages folder.

Current Location

The latest version and future updates of this package will be maintained inside the Netherlands3D main repository as part of an effort to simplify and unify our development workflow.

Why was this repository archived?

To streamline development and reduce overhead, the Netherlands3D packages are being integrated into the main repository.
This approach allows for better coordination between packages and features, while we continue to evaluate whether a full monorepo setup (including versioning) is desirable in the future.

Where to contribute

Please open issues and pull requests in the Netherlands3D Main Repository.

Publication status

Updates to this package on OpenUPM are suspended until further notice.
Future releases will be managed from the main repository once the new development flow has been finalized.

Historical reference

This repository remains available in read-only mode as a historical record of its standalone development.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages