Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 08:52:01 pm
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Blender / Cal3D / COLLADA / Xith3D
Pages: [1] 2 3 4
Print
Author Topic: Blender / Cal3D / COLLADA / Xith3D  (Read 13356 times)
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« on: 23. March 2007, 02:01:51 pm »

Hi,

Just a bunch of related (pseudo-)news :

- It's really hard to find a working Blender->Cal3D export script
- We *need* some models. The minimum is skeletal animation.
- Shaders are good. Cal3D doesn't support shaders.
- Xith3D has a COLLADA support.
- COLLADA supports shaders.
- We haven't had news from Croft (who has implemented COLLADA support) since several months now
- There is an existing Blender->Collada export script, which code seems easy to understand, doesn't support skeletal animation yet, yet Python seems easy.
- I (and I hope there are others) am/are willing to have working COLLADA skeleton-animated models from Blender working in Xith3D
- I have tons of other things to do
- This may be once more vaporware
- Though if you ever want to have cool models in your game, I accept contributions
- Where to start ? Grab the source of this : http://sourceforge.net/projects/colladablender
- Make several models, try to export, see what the COLLADA format is looking like, and the limitations of the current exporters.
- Try to find some examples of COLLADA files with skeletons and animations in them, read them and get familiar to it. Then, for seriousness you need the specs. Here they are : http://www.khronos.org/collada/ (we're 1.4.1)
- Browse the Xith3D codebase for the collada code, and try to understand how it's working.
- Find out if there is skeletal animation support (I guess there isn't).
- Study Blender's Python API, especially concerning Scenes, Objects, Meshes, Armatures, Bones, Actions, and Vertex Groups.
- Make some tests with basic blender models : e.g. do your own script which just print out what you have in the Blender data-structure.
- Try to have an file containing a block of XML corresponding to the armature/animation block of the COLLADA
- Integrate it into the script
- Implement loading of skeleton/animations from COLLADA files in Xith3D
- Use the Cal3D lib port which is in Xith3D to compute the skeletal animations
- Commit !
- Enjoy Smiley

If nobody answers, that's what I'll try to do, if I find enough time and motivation (and not too much irritating bugs).

I'm counting on you, this ain't gonna be an easy task.

Amos
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #1 on: 23. March 2007, 02:39:24 pm »

Wohoho men, great news.

The Collada Blender export script already supports Skeletal Animation.

Well, half the work is done.

On the other hand, I have import problems with Xith3D. But that's something I'm waay more familiar with. So I'll get my hands dirty.
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #2 on: 28. March 2007, 04:41:36 pm »

More news.

I got a basic loader running.

The only unsolvable (as I see it) drawback for now is the JAXB context which is really long to be created (4.88 seconds on my system). But I think it's something we can live with, since it has to be done only once at the beginning of the program. After that, model loading is really fast, e.g. 203 milliseconds for the model shown.

So what's supported so far ? Not very much, I'm afraid but I was having some issues which I had to solve one by one and the COLLADA file format is pretty complex (because powerful).

So you can load models with Polygons/Triangles. Polygons are loaded correctly if they are Triangles or Quads and the number of vertices per polygon never change (those who know the COLLADA format know what I mean). If you're not familiar with COLLADA, keep in mind you can import anything which is exported from Blender with the "Triangles" option checked. Which is great.

Normals are loaded, but no UV coordinates or Colors yet. No material either. It's for very soon.

Nothing's yet on SVN as I think it contains not enough features to be public yet but it's coming. By the way, is anyone interested at all in this work ?
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #3 on: 28. March 2007, 05:17:35 pm »

Great !

Here is a little screenie to *prove* you that UV loading is successful.

Note that the COLLADA file format is really more complex that it seems especially about, for examples, materials/effects/shaders/textuers/meshes which are (unsurprisingly) closely related but there are links from every object to every other in the whole XML file.. something like a nightmare.. But yet I find it cool and I'll refactor my loading to take that into account.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #4 on: 28. March 2007, 08:53:38 pm »

I watch this work with high interest. I consider the collada format as the upcoming standrad for all engines. So it's very cool, that you're taking this format into account.

Marvin
Logged
cottonbelly
Just dropped in

Offline Offline

Posts: 3


View Profile Email
« Reply #5 on: 03. April 2007, 08:29:05 am »

Hi!

I am considering Xith3D to display Collada content, and I just wanted to know how this format has been implemented yet in Xith3D.
Is it possible to import full scenes with cameras, lights and animations?
If not, when do you think it will?

Thanks in advance,

François
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #6 on: 03. April 2007, 09:25:33 am »

Hi!

I am considering Xith3D to display Collada content, and I just wanted to know how this format has been implemented yet in Xith3D.
Is it possible to import full scenes with cameras, lights and animations?
If not, when do you think it will?

Thanks in advance,
I think Croft's implementation (the one currently in Xith-tk) supports the scenes/cameras/lights concepts.

For my part, I'm doing a COLLADA loader model-oriented : so we don't mind about cameras, nor lights but yes we want animations ! Though support for all that would be probably easier than what I?m doing now...
Logged
cottonbelly
Just dropped in

Offline Offline

Posts: 3


View Profile Email
« Reply #7 on: 03. April 2007, 10:22:47 am »

Ok. Thanks for your quick reply.
In your message you say : "we want animations". Does that mean that you are implementing animations at the moment? When do you think it will be ready?

François.
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #8 on: 03. April 2007, 12:20:01 pm »

Ok. Thanks for your quick reply.
In your message you say : "we want animations". Does that mean that you are implementing animations at the moment? When do you think it will be ready?
I'm sorry I can't say a precise date. You can track progress here : but I think within a month it should be relatively stable.
Logged
cottonbelly
Just dropped in

Offline Offline

Posts: 3


View Profile Email
« Reply #9 on: 03. April 2007, 03:14:32 pm »

Okay that's great! I'll be checking this thread regularly. Hope skeletons will be supported...

François.
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #10 on: 03. April 2007, 04:36:52 pm »

Okay that's great! I'll be checking this thread regularly. Hope skeletons will be supported...
Actually it's a requirement for my game Smiley So yes you'll anyway have a way to have working skeletal anims from Blender into Xith3D Smiley And I hope, from COLLADA format.
Logged
kukanani
Fierce Warrior
****
Offline Offline

Posts: 504


My game is coming along fairly smoothly...


View Profile WWW
« Reply #11 on: 08. April 2007, 02:06:35 pm »

I am extremely interested in your work, Amos (I would have posted sooner, but I was on vacation and didn't have access to a computer).
Logged

xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #12 on: 09. April 2007, 12:42:39 pm »

OK, thank you all for support, unfortunately I'll be a week off but on Saturday I'll be back on work.

By the way, now I know pretty much about how COLLADA works in general and specifically about mesh definitions and materials. The tricky part is now left : skeletal animation (also called skinning in the COLLADA doc). If anyone is willing to help me with this part, he/she is very welcomed. I thought I'd use Cal3D to do the skeletal computations. What do you think about that ? I must admit that I haven't investigated skeletal animation that much and the Cal3D thing was more of a port than a re-implementation. So either you can share your knowledge or code something (which I'll pay much attention to) or.. wait I find the appropriate materials so that I can understand all that properly and implement it.

About code availability (since that's what you're mostly waiting on), Marvin and me discussed some days ago about a universal project (hey.. one more ? yeah !) which would consist of 3D format loaders. In the end I think it could also contain better image loaders, sound (ogg/wav/mp3) and music (midi, various mod/s3m/it/xm(s)) loaders, and that in generic structures. Then every engine willing to have these features could just implement their specific part and that's it. Of course, we're not gonna reinvent the wheel when the wheel is fine : loaders which are already very good should only be wrapped (e.g. for mp3). So a new SourceForge.net will be created for all these loaders : I'm still wondering about the right name (JUL ? (Java Universal Loaders) BJL ? (Better Java Loaders) ALJ ? (Abstract Loaders for Java)). Of course, this image/sound thing is for the far future : the present is about COLLADA Loading. About integrating other formats (Cal3D/MD2/MD5/OBJ/ASE/3DS/DXF/AC/LWO/MAX) it's not excluded, and it should use the same data structures that are used currently to load COLLADA ("currently" = in the implementation I'm working on) since COLLADA is (IMHO) the most organized format of all (especially about shared copies / instance and scenes/libraries management).

About scene-oriented COLLADA files, as I said I don't see as a priority to support things like lights/cameras. I'd rather concentrate on meshes/complex materials(including shaders)/animations. Though the data structures have been designed such as you can have a "library file", eg. a file with all your game models in it and you can retrieve the ones you want (e.g colladaFile.getModel("fuzzyDonkey") ) : information about the position and orientation of these models in the original scene will also be available.

About shaders, and as I'm looking for an all-opensource solution (and as Blender doesn't support GLSL shaders directly and thus cannot export GLSL shaders to COLLADA files), maybe a COLLADA-Shaders editor (Xith3D-powered) is something to think about (Ex. questions : should the GUI be Eclipse, Netbeans, or Xith3D-based ?).

About stability, I'm almost sorry to say that I want the tools I work with to be very well designed : now it happens that I contribute to more and more of these tools (no, no, I'm not yet an Eclipse developer.. could come one day Smiley who knows...), and that means........ that the COLLADA file loader (and the other if they're ever made) will be pretty unstable at first : and I don't exclude major changes even after it hasn't been changed for weeks. The biggest change I can foresee for now is the generalization of the COLLADA data structures used currently : they will be used for every other loaders so package and interface changes are to expect : but I prefer to having something working first.

About file sizes : in the COLLADA docs they says (ah the rats..  Grin ) that COLLADA shouldn't be used as an engine format, but just as an asset-exchange format. I don't really agree : if the scene-oriented things are left for DCC tools, COLLADA can do very well for an engine file format : and I think having the possibility to load COLLADA files from jar solves a bit of the problem.. Also maybe there are XML libs out there which are able to convert an XML to a binary one.. and still load the binary file with the same schema. All these things are to explore.

About going generic : why that ? Xith3D is great, that's a fact (and I wouldn't be contributing to it otherwise), but now itself isn't the end of the world : Marvin and I have already discussed about another engine from "almost scratch" (of course we will kindly borrow the good parts from Xith3D). So having tools independant from Xith3D is a great thing IMHO. Also, I really don't like the "scenegraph-centric" vision of some people which is really too much. A game development isn't "scenegraph-centric" it is "yourgame-centric" : which is why I want these loaders to be generic/universal/abstract/call it what you want, which is why I want XPAL to be both physic-lib-independant and scenegraph-independant, which is why OpenMali (I know, I say this word one more time and I get hanged  Grin ) is not tied to any graphic lib, which is why OneClick isn't bound to any specific library (I mean, apart from the standard Java API).

About my production rate : I've been busy in a field which isn't related to computers Smiley So I haven't had much time but it should be back to normal in a week (see the beginning of this thread).

I think the future's bright and we have many great things to do, especially as an open-source community. I hope I have answered most of your questions, please ask if you have any left (what ? ah yeah, her name begins with a "Y" but how is that related to.. ?  Grin ).

Until the JUL/BJL/ALJ projects gets approved by SF guys the code will be available on Xith3D SVN (this is opposed to the views I expose above but hey you have to have the code somewhere, right ? It'll be soon on its own project).

So, all, see you soon on this board ! And good work while I'm off Smiley The sun... no stress... ok I shut up  Wink
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #13 on: 09. April 2007, 01:22:30 pm »

OK guys, finally I don't even have the time to put it on SVN : here is a dirty build, so that you can see what it looks like. I also attached the example model and a small java test (you have to change the path, yes it's not clean I know).

There are many unfinished parts in the code, some are not used at all (e.g. the whole controller and material thingies are loaded but not used when converting to Xith3D).

At least you can have a preview of this work.

Enjoy !

Amos
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #14 on: 09. April 2007, 01:41:32 pm »

About code availability (since that's what you're mostly waiting on), Marvin and me discussed some days ago about a universal project (hey.. one more ? yeah !) which would consist of 3D format loaders. In the end I think it could also contain better image loaders, sound (ogg/wav/mp3) and music (midi, various mod/s3m/it/xm(s)) loaders, and that in generic structures. Then every engine willing to have these features could just implement their specific part and that's it. Of course, we're not gonna reinvent the wheel when the wheel is fine : loaders which are already very good should only be wrapped (e.g. for mp3). So a new SourceForge.net will be created for all these loaders : I'm still wondering about the right name (JUL ? (Java Universal Loaders) BJL ? (Better Java Loaders) ALJ ? (Abstract Loaders for Java)). Of course, this image/sound thing is for the far future : the present is about COLLADA Loading. About integrating other formats (Cal3D/MD2/MD5/OBJ/ASE/3DS/DXF/AC/LWO/MAX) it's not excluded, and it should use the same data structures that are used currently to load COLLADA ("currently" = in the implementation I'm working on) since COLLADA is (IMHO) the most organized format of all (especially about shared copies / instance and scenes/libraries management).

I thought about this thing during the last days.

About shaders, and as I'm looking for an all-opensource solution (and as Blender doesn't support GLSL shaders directly and thus cannot export GLSL shaders to COLLADA files), maybe a COLLADA-Shaders editor (Xith3D-powered) is something to think about (Ex. questions : should the GUI be Eclipse, Netbeans, or Xith3D-based ?).

If it is possible in any way, this should be mostly independent. In a way, that allows to easily create a build to integrate it into Eclipse, NetBeans, any-other or to have ot as a standalone app.

Marvin
Logged
Pages: [1] 2 3 4
Print
Jump to:  

Theme orange-lt created by panic