Home » Community » Forums » DirectX and XNA » COLLADA & DirectX (C++)
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 COLLADA & DirectX (C++)
Post New Topic  Post Reply 
I've heard about the great features of COLLADA, however, I read that it not easy to work with COLLADA in DirectX.

Is there some (free) API to load and use COLLADA files with DirectX (not Managed o XNA) in VS 2005?

 User Rating: 1009   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I think it is as hard to use in DirectX as in any other. :)

Here is a link to WIKI-COLLADA : WIKI - Collada

Sincerely,
Arto Ruotsalainen
Dawn Bringer 3D - Tips & Tricks


 User Rating: 1069   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

collada is just an xml, so it's difficult as read an xml.
I'm using collada in my framework (DirectX10 for .Net), and I've spend a pair of day to load data from it (using C++.Net is more easy, I understand).
Anyway, the logic behind the Collada file is quite easy, I didn't had any problem to load static mesh with generics semantic (the good thing of collada is that is extremely flexible and the free exporter for max permit to create all the information that I need like multiple texture format, tangent and binormal).

I've seen also animation (but I'll implement it in future) and it seems easy.

You just need an xml parser for C++ and see a couple of file (also the documentation is very good), then create empty mesh and load all data in it.




http://www.notjustcode.it
DirectX10 tutorial and more

 User Rating: 1070   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by robydx
collada is just an xml, so it's difficult as read an xml.
I'm using collada in my framework (DirectX10 for .Net), and I've spend a pair of day to load data from it (using C++.Net is more easy, I understand).
Anyway, the logic behind the Collada file is quite easy, I didn't had any problem to load static mesh with generics semantic (the good thing of collada is that is extremely flexible and the free exporter for max permit to create all the information that I need like multiple texture format, tangent and binormal).

I've seen also animation (but I'll implement it in future) and it seems easy.

You just need an xml parser for C++ and see a couple of file (also the documentation is very good), then create empty mesh and load all data in it.


Well, you don't have to write the parser on your own, there already is an implementation for that for download. Gooogle more, or see the wiki. :)

Sincerely,
Arto Ruotsalainen
Dawn Bringer 3D - Tips & Tricks


 User Rating: 1069   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:
Original post by papitorico
Is there some (free) API to load and use COLLADA files with DirectX (not Managed o XNA) in VS 2005?


A quick search will give you a lot of answer for that question and most will be pointing to two libraries :

-COLLADA DOM: a library made at first by SONY (the collada.org website is still hosted by them) and now it seems to have been moved into Khronos hands

-FCollada: a library made by a company called Feeling Software.

After some hours trying to understand the COLLADA DOM. I've started working with my own implementation for COLLADA. I quickly dropped that project when I came across FCollada and started implementing my importer with that one. After about 8-12 hours of work I had time to study/learn the library and make a simple geometry importer for my engine and I took my time to make sure I was doing the right thing.

With the FCollada library I only had to load the polygons and get the vertices associated with it (along with other properties)... you also get access to the COLLADA's scene graph (for reading and writing).

I'm sure though that the COLLADA DOM is not that bad... probably my understanding of COLLADA is better and I'd be able to use it almost right away. In fact I think that their mostly equal except that FCollada seems to support multiple versions of the format which the DOM library doesn't seem to support.

My suggestion would be to look at both those libraries and also the forums on the COLLADA or Feeling Software website. There are also some projects like Benjamin, Nitschke's website. There are some XNA and DirectX projects with source in COLLADA.org forums... and it is basically the same thing except you'll probably need to rewrite it in C++ (since you asked for non-managed/XNA API).

I'd like to add one thing though... a mistake that a lot of people does is to use the format directly in the engine... COLLADA is made as an exchange format between applications and is not meant for real time applications.

JFF

 User Rating: 1098   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

How about shaders, any diffference usins HLSL shader with COLADA?

One more thing, if COLLADA is an exchange format, that means, for example, that I can load an .X model and then import all animations and assets separately, and then use them having no problems. Am I right?

Thnx a lot for your answers!!

 User Rating: 1009   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Collada is just an exchange format, you can use for a software rendering engine, for directX7,8,9,10 with and without shader, fx, hlsl.
The best thing of collada is that it has a flexible format so I can create every type of data that I need.
I think that is not difficult to work with collada, I didn't had any diffucult in loading it.
I write my parser from the ground.
Just load the semantics to create vertex structure, load the series of float array (it separates data for each component) and pass them to the mesh locking it.




http://www.notjustcode.it
DirectX10 tutorial and more

 User Rating: 1070   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: