DonCrudelis
|
 |
«
Posted
2004-06-07 12:12:35 » |
|
Hi everybody!
Is there any 3D Studio loader, which supports animations (not just one animation)? If so, please reply my where i can get it.
Thanks in advance!
Emil Alonzo
|
|
|
|
aNt
|
 |
«
Reply #1 - Posted
2004-06-07 13:18:30 » |
|
http://www.newdawnsoftware.com/resources/xith3danimation seems abit slow and gets worse the more frames it plays in an animation. lags out abit.. then when it gets back to frame 1 it speeds up again  but the src is there 
|
|
|
|
DonCrudelis
|
 |
«
Reply #2 - Posted
2004-06-07 15:25:40 » |
|
Thanks, it did work!  I will try and look at the code to see if I could improve somrthing 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
aNt
|
 |
«
Reply #3 - Posted
2004-06-10 06:46:36 » |
|
well i think the problem is in the for loop under: packages: org.newdawn.xith3d.threeds.model.PosTransform org.newdawn.xith3d.threeds.model.RotTransform org.newdawn.xith3d.threeds.model.ScaleTransform in the call 'setTime'. 1 2 3 4 5 6 7 8 9 10 11 12 13
| for (int i=0;i<frames.size();i++) { firstFrame = (PosFrame) frames.get(i); if (i != frames.size()-1) { nextFrame = (PosFrame) frames.get(i+1); if ((time >= firstFrame.time) && (time < nextFrame.time)) { break; } } else { nextFrame = (PosFrame) frames.get(0); } } |
it seems to scan all the frames in the files animation. so it gets incromently slower the more frames you have.  not sure of a work around mind.
|
|
|
|
kevglass
|
 |
«
Reply #4 - Posted
2004-06-10 06:57:48 » |
|
How many frames are we talking about here? I'd be surprised if that was the bottleneck unless we're talking about 1000s of frames. Have you tried profiling?  (yes, yes, I know, its my code I should sort it out but I have a slight RSI problem right now) Kev
|
|
|
|
aNt
|
 |
«
Reply #5 - Posted
2004-06-10 07:57:39 » |
|
yep thousands + frames. not so many keyframes mind prob around 100 at most ever...
im just downloading OptimizeIt so i can make build a profile...
|
|
|
|
aNt
|
 |
«
Reply #6 - Posted
2004-06-10 08:56:43 » |
|
heres the profiler output:  Seems to hang out in RotTransform. With an animation of around 8 keyframes
|
|
|
|
kevglass
|
 |
«
Reply #7 - Posted
2004-06-10 09:01:50 » |
|
Certainly looks that way, what hideous code did I leave in there.
Kev
|
|
|
|
aNt
|
 |
«
Reply #8 - Posted
2004-06-10 10:02:48 » |
|
|
|
|
|
kevglass
|
 |
«
Reply #9 - Posted
2004-06-10 11:15:43 » |
|
Alright, assuming my hand is in any workable state tonight I'll take a look tonight. But only because of all the smileys  Kev PS. Does anyone else have a list of things they need to see sorted out (I'm not adding new features, just fixes)
|
|
|
|
Games published by our own members! Check 'em out!
|
|
aNt
|
 |
«
Reply #10 - Posted
2004-06-10 13:13:39 » |
|
only things i have found over the months using the loader is getName(); returns nothing for me, thought it should return the name of the shape matching the name i gave it in the modeler. and the animation thing- ditching the loop would be cool. i would like to have alot of objects animating at the same time  also texture loading- if i load a lot of shapes with textures the way textures are loaded in the loader- it tends to run out of memory. i changed it to use getMipMap() (think its using disk caching) but then transparent textures (png) didnt work  strange thing is a changed it back and it started working ok.. so not sure if this was a xith3d bug that was fixed. but animations being nicer would make my day 
|
|
|
|
kevglass
|
 |
«
Reply #11 - Posted
2004-06-10 18:05:03 » |
|
It seems I can't even get a model on the screen anymore  Going to be hard to fix anything.. Kev
|
|
|
|
aNt
|
 |
«
Reply #12 - Posted
2004-06-10 18:09:24 » |
|
do u want one of my 3ds files?
|
|
|
|
kevglass
|
 |
«
Reply #13 - Posted
2004-06-10 18:12:24 » |
|
Na, I've got piles of 3DS models now, just nothing showing up from the test app. I guess Xith must have changed significantly since I last tried it.
Kev
|
|
|
|
aNt
|
 |
«
Reply #14 - Posted
2004-06-10 18:19:27 » |
|
im using a build from the 29th of April. All works here still.
i could upload the xith3d.jar for u?
|
|
|
|
kevglass
|
 |
«
Reply #15 - Posted
2004-06-10 18:36:29 » |
|
Nope, back on track now!  Kev
|
|
|
|
aNt
|
 |
«
Reply #16 - Posted
2004-06-10 18:37:56 » |
|
sweet 
|
|
|
|
kevglass
|
 |
«
Reply #17 - Posted
2004-06-11 13:11:44 » |
|
New version uplaoded. It might be better, it might break a bit. PLEASE backup an old version before downloading this one...
Kev
|
|
|
|
DonCrudelis
|
 |
«
Reply #18 - Posted
2004-06-11 17:29:12 » |
|
In 3D Studio, is it possible to have e.g two animations in the same file? Or do you need to have e.g Character Studio?
Thanks, Emil Alonzo
|
|
|
|
aNt
|
 |
«
Reply #19 - Posted
2004-06-12 08:27:04 » |
|
2 animations? sorry i dont understand. do u mean u want to shapes to animate? one doing one thing the other doing somthing else. if so then yes would be pointless if u couldnt do this. but i would think about how u want to make objects for a game world. i make component parts of a model then animate them parts. after that i bring them into Xith3D and connect them up separate files (IO is fast if u ask me- for somthing like loading). if u make say 10 shockwave explosion effects then 10 explosion centers along with 10 models of stuff that looks like smashed up parts animating. Next you bring them parts into Xith and mix them together (maybe even changing he colors in Xith3d to add more complexerty. u end up with alot of combinations. if u make them as final done deals u end up with only 10 this is also cool with making characters. make them separate parts if u can. history: Quake did this along time back 
|
|
|
|
DonCrudelis
|
 |
«
Reply #20 - Posted
2004-06-12 12:45:41 » |
|
Ok Thanks for the help!  Emil Alonzo
|
|
|
|
aNt
|
 |
«
Reply #21 - Posted
2004-06-18 11:00:11 » |
|
1 2 3
| for(int i = 0; i < model.numChildren(); i++) { System.out.println("name of child: " + model.getChild(i).getName()); } |
returns nothing  . is there away of getting the names of the models i have set in my modeler? so i can add tages in my models?
|
|
|
|
kevglass
|
 |
«
Reply #22 - Posted
2004-06-18 11:56:54 » |
|
You know, I had a look at this, and the code is in there to support NamedObjects. I couldn't be sure anything had actually been named in my test models.
Could you possibly shoot me over a 3DS model with something telling me what names should be turning up so that I can run some tests and hopefully give you a fixed version?
Cheers,
Kev
|
|
|
|
aNt
|
 |
«
Reply #23 - Posted
2004-06-18 12:40:39 » |
|
here u go: http://www.topresultmate.com/xith3d/v1.3dsshould be 5 shapes nice and simple: name: leftwing name: vapor_1 name: vapor_0 name: front1 name: body so rock and roll. i sort of got it to work changing your TSDModel class adding this: 1 2 3
| public Iterator getObjectNames() { return(objects.keySet().iterator()); } |
its just i pulling the keys- all i need. but getting the name from a Group would be more rock and roll  - hows the hand?
|
|
|
|
aNt
|
 |
«
Reply #24 - Posted
2004-06-18 14:23:04 » |
|
if i want to get the location of a shape group in the world i would guess i would need to do this: 1
| System.out.println("c: " + model.getNamedObject("vapor_0").getVworldBounds().getCenter().toString()); |
but i get 0f, 0f, 0f. but the object is moving
|
|
|
|
kevglass
|
 |
«
Reply #25 - Posted
2004-06-18 16:45:59 » |
|
Might be worth printing the complete bounds out, it might be that the bounds arn't updating as the object moves. However, if thats the case, and the original bounds are right (which I wouldn't be sure of) then there may be a problem in the scenegraph, in that bounds wouldn't be updating with transform group changes..
Kev
|
|
|
|
aNt
|
 |
«
Reply #26 - Posted
2004-06-19 09:15:47 » |
|
well looked into it and the: 1
| model.getBounds.toString() |
we get the bounds and location of the model OK. also the: 1
| model.getVworldBounds().toString() |
changes as exspected. it seem the children of the model are not getting updated. they are moving along in the scene ok. just there getBounds are al 0f, 0f, 0f 0f and there getVworldBounds() dont change from 0f, 0f, 0f 0f 1
| model.getNamedObject("vapor_0").getVworldBounds().toString() |
isnt working. maybe i should update my Xith3D to a newer version and try that......
|
|
|
|
aNt
|
 |
«
Reply #27 - Posted
2004-06-24 11:29:42 » |
|
ok at last i get my computer working again. sodding thing and have the new CVS of Xith3d and JOGL and all that other jazz. and bosh still get 0f,0f,0f, r0f from a nested object bounds... gurrr-  *stomp stomp*
|
|
|
|
Yuri Vl. Gushchin
Senior Devvie   
Speak Java!
|
 |
«
Reply #28 - Posted
2004-06-25 06:04:14 » |
|
Test case? [want to take a look, because of bounds work fine for me]
Yuri
|
Yuri Vl. Gushchin JProof Group
|
|
|
aNt
|
 |
«
Reply #29 - Posted
2004-06-25 13:30:41 » |
|
Here is a test case as requested: http://www.topresultmate.com/xith3d/3ds-bounds-test.zip i have added kevs 3ds src also because i changed his TDSModel.java- just added a little bit of code that returns the model names- makes life simpler... im thinking of added a Texture Manager so models can share the same textures. will do that and upload it to so kev can pass his expert eye over it. But theres nothing to amazing going on- i have build it around kevs code to make it simpler to see whats happening... The main model.getVworldBounds is ok. but the children just return 0s i get this: The main Model.getVworldVounds: BoundingSphere [-0.42404148,-0.18567085,-0.09359161 radius 12.151663] Model: redBox getVworldBounds: BoundingSphere [0.0,0.0,0.0 radius 0.0] Model: redBox2 getVworldBounds: BoundingSphere [0.0,0.0,0.0 radius 0.0] Model: redBox1 getVworldBounds: BoundingSphere [0.0,0.0,0.0 radius 0.0] The main Model is cool the kids are not so funky.
|
|
|
|
|