Git Product home page Git Product logo

colladaviewer2's Introduction

The MIT License (MIT)

Copyright (c) 2012 Erik M. Buck

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

COLLADAViewer2
An instructional OS X application to load/display COLLADA Models and export to compact binary representations.

COLLADA is a royalty-free XML schema that enables digital asset exchange within the interactive 3D industry. COLLADA is the best way to import complex 3D models into your own applications. Almost every popular 3D modeling tool these days supports export to COLLADA format. As you may suspect, the COLLADA format specification is huge and complex to support just about every kind of information 3D modeling tools might generate.

Apple introduced the new Scene Kit framework in OS X 10.8, "Mountain Lion." Scene Kit is an Objective-C framework for building 3D scenes composed of imported COLLADA 3D models, cameras, lights, and meshes. I highly recommend playing with the new framework including its integration with Xcode 4.2+.

Scene Kit doesn't exist for iOS as of version 6.0, and the framework is probably too "heavyweight" for mobile devices at this time. Apple recommends using off-line tools to convert "heavyweight" data types such as COLLADA models into compact binary representations for use with iOS. Unfortunately, Scene Kit neither provides a conversion capability nor supplies source code you could use as the basis of your own conversion tool.

The "Learning OpenGL ES for iOS" sample code at cosmicthump.com/learning-opengl-es-sample-code/ includes a rudimentary Mac OS X COLLADAViewer.app application with source code in the Chapter 7 examples. COLLADAViewer.app reads and displays a subset of COLLADA models and saves them in a compact binary representation suited for the book's examples. COLLADAViewer.app implements a small portion of the overall COLLADA Specification (pdf), but even with COLLADAViewer.app 's numerous constraints, it still operates as a handy conversion tool to achieve the desirable "compact binary representation" for use in iOS applications.

After the publication of "Learning OpenGL ES for iOS", the limits of COLLADAViewer.app started to become a bit too constraining for my own projects. I started work on a COLLADAViewer2.app application that I'm excited to provide as a new "alpha" version sample with source code.

This repository contians an Xcode project with source code to parse COLLADA XML files and supports a much greater subset of the COLLADA Specification than COLLADAViewer.app. The sample is useful as a demonstration of Apple's Objective-C XML parsing classes in general as well as the specific challenges of COLLADA. The alpha version of COLLADAViewer2 should correctly display almost any COLLADA model that Apple's Preview application can display. Exporting compact binary "modelplist" files from COLLADAViewer2 produces the same result as COLLADAViewer and suffers the same limitations. The next planned improvement to COLLADAViewer2 introduces a new more flexible "compact binary representation" for use in iOS applications.

Everything here is licensed under the permissive MIT License: http://opensource.org/licenses/mit-license.php

colladaviewer2's People

Contributors

erikbuck avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.