|
lonesomeStranger
|
 |
« on: 28. May 2010, 04:50:20 pm » |
|
Hi Marvin,
I'm watching Collada code for a while and the following thing is obscure for me:
Why jagatoo-side geometry is updated (and then converted to xith geometry at every frame)? I think the target (xith) geometry should be updated after initial conversion.
Could you say something about this?
|
|
|
|
|
Logged
|
Anton
|
|
|
|
horati
|
 |
« Reply #1 on: 28. May 2010, 05:48:29 pm » |
|
Marvin has been pretty busy lately. Is this causing an urgent problem for you?
|
|
|
|
|
Logged
|
|
|
|
|
lonesomeStranger
|
 |
« Reply #2 on: 29. May 2010, 10:44:03 am » |
|
Marvin has been pretty busy lately. Is this causing an urgent problem for you?
No urgent problems. I'd like to try to make Collada animation working but I need to clarify the things ... Regards
|
|
|
|
|
Logged
|
Anton
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #3 on: 30. May 2010, 04:34:18 pm » |
|
The collada loader is a little bit strange anyway. It seems way too complex for what it does. I would love to see the JAGaToo part exchanged anyway. You're free to fix the code if you want. Of course geometry shouldn't be updated every frame. In theory it should be created through the GeometryFactory interface directly as xith geometry. Updating should be done on the xith geometry then.
Marvin
|
|
|
|
|
Logged
|
|
|
|
|
lonesomeStranger
|
 |
« Reply #4 on: 30. May 2010, 06:36:48 pm » |
|
The collada loader is a little bit strange anyway. It seems way too complex for what it does.
Initially, I want to do minimal changes just to make collada code working efficiently enough. I think to apply openmali's WriteableTriangleContainer for updating xith geometry in SkeletalController. What do you think? Btw, I've noticed mispelling in org.xith3d.scenegraph.Geometry, line 1563: public final boolean setTriangle( int i0, int i1, int i2, Triangle triangle ) { return ( setTriangle( i0, i1, i2, triangle ) ); }
I guess it should be: public final boolean setTriangle( int i0, int i1, int i2, Triangle triangle ) { return ( dataContainer.setTriangle( i0, i1, i2, triangle ) ); }
Regards
|
|
|
|
|
Logged
|
Anton
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #5 on: 30. May 2010, 08:51:08 pm » |
|
Initially, I want to do minimal changes just to make collada code working efficiently enough.
I think to apply openmali's WriteableTriangleContainer for updating xith geometry in SkeletalController. What do you think? I wouldn't necessarily go for triangles here, if I could avoid it. Some get/setTriangle implementations cannot be most efficient. Most of them are efficient though. The concept was to do everything geometry related through an implementation of org.jagatoo.loaders.models._util.GeometryFactory Btw, I've noticed mispelling in org.xith3d.scenegraph.Geometry, line 1563:
Looks like a bug. You have dev access, don't you. Just go ahead to fix it. Marvin
|
|
|
|
|
Logged
|
|
|
|
|
lonesomeStranger
|
 |
« Reply #6 on: 02. June 2010, 12:08:17 pm » |
|
Hi Marvin, Did you receive my PM about dev access? I'm just afraid it remains unnoticed or is lost somehow.  Regards
|
|
|
|
|
Logged
|
Anton
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #7 on: 02. June 2010, 03:41:45 pm » |
|
Did you receive my PM about dev access? I'm just afraid it remains unnoticed or is lost somehow.  Oh, yes. Sorry. I forgot it. Thanks for reminding me. I have granted you dev access to the requested projects. Please tell me, if I can do something else. Marvin
|
|
|
|
|
Logged
|
|
|
|
|
lonesomeStranger
|
 |
« Reply #8 on: 02. June 2010, 04:10:19 pm » |
|
Thanks a lot! The current question: @Deprecated public ModelAnimation( String name, int numFrames, float fps, KeyFrameController[] controllers, Object animPrototype )
What do you see as a way to implant dae animation in ModelAnimation ? (btw, cal3d uses above constructor ...)
|
|
|
|
« Last Edit: 02. June 2010, 04:26:20 pm by lonesomeStranger »
|
Logged
|
Anton
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #9 on: 02. June 2010, 04:28:17 pm » |
|
Pass it as the animPrototype. The idea was to completely do the animation inside of one of the KeyFrameController implementations. Theoretically one of the implementation should match every kind of animation. But if this doesn't work in theory, we might rethink the deprecation of the above quoted constructor.
I don't know, how much effort you want to put into the collada loader. Do you want to make it really clean and match the concept, that all the other loaders (except for collada and cal3d currently) use? Or do you just want to get it running and "somehow" get attached to the actualy system?
Marvin
|
|
|
|
|
Logged
|
|
|
|
|
lonesomeStranger
|
 |
« Reply #10 on: 02. June 2010, 05:25:28 pm » |
|
I don't know, how much effort you want to put into the collada loader. Do you want to make it really clean and match the concept, that all the other loaders (except for collada and cal3d currently) use? Or do you just want to get it running and "somehow" get attached to the actualy system?
At first I want to get it at least working+better structured. However I'd like to make it clean as you said. I don't know sincerely if I can cope with it ( Collada is a good mess  ) but I'll try. Btw, some time ago I tried to convert dae data to xith animation system but failed - they are too different ...
|
|
|
|
|
Logged
|
Anton
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #11 on: 02. June 2010, 06:44:25 pm » |
|
Btw, some time ago I tried to convert dae data to xith animation system but failed - they are too different ...
Feel free to suggest changes to make the xith animation system more general  . Marvin
|
|
|
|
|
Logged
|
|
|
|
|
lonesomeStranger
|
 |
« Reply #12 on: 19. July 2010, 03:54:18 pm » |
|
Hi Marvin,
I'm currently working on collada animation conversion to xith and got a problem:
Different bones of a skeleton may have a different number of keyframes with different time values, different start/end time. Even for one bone transl/rot/scale keyframes may be different as above.
One straightforward solution that comes in mind is to make general keyframe set (with additional empty or interpolated keyframes) which will suit all bones. But I'm afraid it could be wasteful.
What do you think about this all?
|
|
|
|
|
Logged
|
Anton
|
|
|
|
lonesomeStranger
|
 |
« Reply #13 on: 20. July 2010, 04:51:43 pm » |
|
Different bones of a skeleton may have a different number of keyframes with different time values, different start/end time. Even for one bone transl/rot/scale keyframes may be different as above.
I must admit my flaw in knowledge of animation ... All mentioned above can be called bone-based keyframe model that's widely used now unlike skeleton-based one. One straightforward solution that comes in mind is to make general keyframe set (with additional empty or interpolated keyframes) which will suit all bones. But I'm afraid it could be wasteful.
I think I found a better solution: In ModelAnimation are passed two dummy keyframes just to allow core animation system work. A new Skeletal controller (that I want to suggest) will be free to do all what's needed for animating bones. Hope I'm right ...
|
|
|
|
|
Logged
|
Anton
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #14 on: 21. July 2010, 06:21:21 pm » |
|
Wouldn't it work to store a duration for each key frame and use this time instead of the same time for all key frames, if given?
Marvin
|
|
|
|
|
Logged
|
|
|
|
|