Giter VIP home page Giter VIP logo

colladaxna's People

Contributors

bunkerbewohner avatar gwenael-hagenmuller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

colladaxna's Issues

Convert Extra Texture Maps to XNA Content Model

Even though the underlying ColladaModel class imports not only diffuse texture maps, but also specular maps, environment maps, normal maps and opacity maps, only simple diffuse texture maps are converted to the XNA content model within the pipeline extension right now.

Therefore conversion of these texture maps to the XNA content model has to be implemented (I personally don't know how to do that right now).

Importing entire scene rather than Model only

This library was created to import single animated 3D models from COLLADA files. However, the COLLADA file format is much more powerful than that. You can actually store multiple complete 3D scenes with lights, cameras and abitrary entities.

Maybe in future a seperate library could be created that allows importing entire scenes from COLLADA to XNA. The advantage of this would be that you wouldn't necessarily have to create a Level Editor. You could simply use your favourite 3D Content Creation Tool, such as 3ds Max or Blender, to design your 3D scenes and levels.

Create Documentation

Even though using the Importer is as simple as selecting it from a ComboBox in Visual Studio, some documentation is still needed for developers who might want to improve or extend the library, or simply want to understand how it works.

Also I should probably add more comments to the code.

Import Animation Clips

Animations are already correctly imported. However, right now animation clips are not. Animation clips are simply tuples of name, start- and end-time of logically separate animations. I.e. while most of the time there will be one long animation in the COLLADA document, it will consist of different parts. For example the first 30 frames could be a walking animation, the next 30 a jump, and so on.

Animation clips allow accessing these parts by their names rather than by frame numbers. Therefore it would be nice to import these clips. Unfortunately I haven't seen an exporter that actually exports animation clips yet. But I can just refer to the COLLADA specification to implement it anyway. In the worst case you can add animation clips via notepad very easily.

License

I think you forgot to state what license the code is under.

As it stands, it is unlicensed, which means that it can not be technically used, redistributed, or modified.

If you have not chosen a license, may I suggest Apache 2, or MIT X11?

A few files have a "Copyright MIcrosoft, all rights reserved" which looks like they came from some sort of sample or template. It might be worth replacing those with code that is licensed appropriately, or finding if Microsoft released updated versions with a new license.

Provide Additional Scene Information?

The XNA content model and Model class do not cover the whole COLLADA specification. For example COLLADA files also can define lights and cameras, which are obviously not part of a Model but of a complete scene.

Maybe a Scene content class could be created which contains these information and also references Models as its elements. So when you load the Scene object via the ContentManager you get use the information to render the whole scene with an existing engine (such as SunBurn).

But maybe this is simply not needed and it is enough to just import single Model entities.

Integrate Mesh Triangulation

Currently only triangulated meshes are supported, since XNA only supports triangles natively. Content creation tools often use more complex polygons, though. Even though many programs support triangulation for COLLADA export, it would be desirable not having to rely on this.

For this reason an integrated triangulation algorithm could be implemented to handle more complex polygons in COLLADA documents for import into XNA.

COLLADA also supports other geometry representations such as NURBs, which could be triangulated automatically.

Find skeleton exported by 3ds Max 2012

The default Autodesk COLLADA exporter used in 3ds Max 2012 does not export skeletons as expected. Unlike OpenCOLLADA no tag is created to reference the root joint. My current implementation relies on this reference though.

Therefore animated models exported 3ds Max 2012 (for which OpenCOLLADA is not yet available) are not loaded properly. To fix this, a function can be created that simply searches for the first occuring scene graph node of type "JOINT".

Correctly convert custom effects

COLLADA supports custom effects (e.g. HLSL shaders) with arbitrary parameter bindings. These are already loaded, but not yet converted to the XNA ContentModel. For this there might be a content processor needed which creates the corresponding Effect instances.

Support Arbitrary Number of Joints

Right now only up to four joints influencing a single vertex are imported. This was done because this way the index and weight channels could be imported as Vector4 elements. However, this restriction is not necessary.

Support for an arbitrary number of joints must be implemented (which is easily done).

Import Physics Information

COLLADA allows defining physical properties of scenes. These could be imported and attached to the XNA model to make it easy using models loaded from COLLADA files with physics engines.

AnimationImporter.cs

Hi

In the Titles file function:
static bool DoesAnimationAffectJoints(Dictionary<string, Joint> joints, XmlNode xmlAnimation)

Lines:
XmlNode xmlChannel = xmlAnimation.SelectSingleNode("//channel");
----- 8<----------------
string target = xmlChannel.Attributes["target"].Value;

Seems always to ALWAYS inspect the first animations channels target, instead of the parameters one..

It started to work more nicely with following line:
XmlNode xmlChannel = xmlAnimation.SelectSingleNode("animation/channel");

Does this make any sense... ?

I found this when Animators Max spitted out some animated joints without any frames.

Best,
Niittis

ps. Thanks for nice piece of Code.

Testing

The implementation has to be tested thoroughly. Easiest way: Simply trying to load and display many different COLLADA models and see if any bugs pop up.

Bad import of dae file.

Hi,

Im looking for an importer tool like ColladaXna, but when import the dae file, the model look wrong.

orig

Any ideas?

WP7 version of collada importer

Hello Mathias,

I'd like to appreciate your outstanding work on XNA collada importer project in the first place.

But in the second place I'd like to ask if there is an WP7 version of this project.
I would suppose because it's an Importer (not even processor) it should work with any type of XNA project, but I'm getting this error after trying to import dae file (following your guide posted here: https://github.com/Bunkerbewohner/ColladaXna/wiki/Quickstart):

"Building content threw NullReferenceException: Object reference not set to an instance of an object.
at ColladaXna.Base.Import.SkeletonImporter.GetNodeName(XmlNode xmlNode)
at ColladaXna.Base.Import.SkeletonImporter.ReadJoints(Joint parent, IEnumerable`1 xmlNodes, ColladaModel model)
at ColladaXna.Base.Import.SkeletonImporter.Import(XmlNode xmlRoot, ColladaModel model)
at ColladaXna.Base.ColladaModel.Load(String filename)
at ColladaXna.Base.ColladaModel..ctor(String filename) ..."

So i tried to build WP7 version of this library, but also with no success - some parts of code is not supported on WP7 platform (eg. XmlNode type and so on).

So is there any way to use your awesome library on WP7 platform?

Thank you very much

Best Regards

Jakob

Support multiple texture coordinate channels

Right now only one texture coordinate channel is imported. Multiple texture coordinate vertex channels are not handled correctly. This is not a bug, it just wasn't implemented yet.

Use SAX instead of DOM for Parsing

Currently the library uses the DOM based XmlDocument class for parsing COLLADA documents which offers easy access to the XML data. However, since COLLADA models can be several MB large this method can be very memory consuming. An alternative SAX implementation would probably not only save memory, but also would be faster.

Convert COLLADA scene to XNA NodeContent

Even though the ColladaModel class loads Collada scene graphs correctly (to a reasonable extent), the Content Importer pipeline extension still needs to convert this information to the XNA content model (NodeContent class).

Right now Meshes are just added flat to the root NodeContent not properly representing the scene node structure and, more importantly, their transformations.

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.