Page 11 of 15

Posted: Thu Aug 02, 2007 3:33 pm
by Dorth
Well, the thing is you don't always want to complete an animation. Depending how far it is, to gracefully fall back, it might be easier to read backwards the frame from a point (middle for example) but pass that point to end the animation ^^

+ that way you can jump to a mid-animation and things like that, useful for cinematics and the like ^^

Posted: Fri Aug 03, 2007 5:08 am
by jordan
[quote="Luke"]jordan,

yeah, simply add the new files to the project (as some of the project files are out of date, as I don't use them)

I'll fix that wrong case in, #include "irrCompileConfig.h"[/quote]

Thanks! It worked after adding the missing files to the Makefile. Here's the updated line from the Makefile in case you want it:

IRROBJ = C3DSMeshFileLoader.o COgreMeshFileLoader.o COBJMeshFileLoader.o CAnimatedMeshMD2.o CAnimatedMeshMD3.o CB3DMeshFileLoader.o CBoneSceneNode.o CBSPMeshFileLoader.o CAnimatedMeshSceneNode.o CBillboardSceneNode.o CBSPMeshFileLoader.o CCameraFPSSceneNode.o CCameraMayaSceneNode.o CCameraSceneNode.o CColladaFileLoader.o CCSMLoader.o CDMFLoader.o CDummyTransformationSceneNode.o CEmptySceneNode.o CGeometryCreator.o CLightSceneNode.o CLMTSMeshFileLoader.o CMD2MeshFileLoader.o CMD3MeshFileLoader.o CMS3DMeshFileLoader.o CMeshManipulator.o CMeshSceneNode.o CMetaTriangleSelector.o CMY3DMeshFileLoader.o COCTLoader.o COctTreeSceneNode.o COctTreeTriangleSelector.o CParticleBoxEmitter.o CParticleFadeOutAffector.o CParticleGravityAffector.o CParticlePointEmitter.o CParticleSystemSceneNode.o CQ3LevelMesh.o CSceneCollisionManager.o CSceneManager.o CSceneNodeAnimatorCollisionResponse.o CSceneNodeAnimatorDelete.o CSceneNodeAnimatorFlyCircle.o CSceneNodeAnimatorFlyStraight.o CSceneNodeAnimatorFollowSpline.o CSceneNodeAnimatorRotation.o CSceneNodeAnimatorTexture.o CShadowVolumeSceneNode.o CSkinnedMesh.o CSkyBoxSceneNode.o CSkyDomeSceneNode.o CTerrainSceneNode.o CTerrainTriangleSelector.o CCubeSceneNode.o CSphereSceneNode.o CTextSceneNode.o CTriangleBBSelector.o CTriangleSelector.o CWaterSurfaceSceneNode.o CXAnimationPlayer.o CXFileReader.o CXMeshFileLoader.o CMeshCache.o CDefaultSceneNodeAnimatorFactory.o CDefaultSceneNodeFactory.o CQuake3ShaderSceneNode.o

Posted: Sat Aug 04, 2007 12:40 am
by gheft
I just tried out the latest revision and my x file is looking pretty bad. the skeleton appears as a single vertical line, most of the joints are at the origin. the mesh is rotated and shrunk and the joints that move are stretched all over the place. I also noticed that it isn't loading materials for x files anymore.

btw, I've tried all different settings with the panda exporter and resaved it with mview and loaded it successfully with irrlicht meshviewer, so I know the model is good

I can send it to you if you need more test models

Posted: Sat Aug 04, 2007 1:28 pm
by Luke
well, the thing is you don't always want to complete an animation. Depending how far it is, to gracefully fall back, it might be easier to read backwards the frame from a point (middle for example) but pass that point to end the animation ^^

+ that way you can jump to a mid-animation and things like that, useful for cinematics and the like ^^
I'm not sure what you mean, it's all frame based, you can do that easy, if there is animation by name, it will still be using frames internally.
I just tried out the latest revision and my x file is looking pretty bad. the skeleton appears as a single vertical line, most of the joints are at the origin. the mesh is rotated and shrunk and the joints that move are stretched all over the place. I also noticed that it isn't loading materials for x files anymore.
yeah, the animations weren't complete, I didn't have enough time.

have a try with the latest update, let me now if there are still bugs.
I also noticed that it isn't loading materials for x files anymore.
in what way? the meshbuffer is not split, so multi textures don't work yet.

are the textures loading/trying to load? by the way, the x loader will now load textures from the same folder as the mesh now

Posted: Sat Aug 04, 2007 9:58 pm
by gheft
With the new update the skeleton is still broken and yet somehow the animation works perfectly!
The skeleton still appears as one line so when I use getJointNode("joint")->getAbsolutePosition()
it returns the same for all joints because they all seem to be stuck at the origin. I want to get the positions of all joints so I can set up a ragdoll.

The materials for my models are now working(single meshbuffer) but I noticed when I compiled the irrlicht meshviewer with the new system the dwarf model appears as solid black, but I think its because it has multiple mesh buffers. I don't know if it should be using one texture for the whole model, but it isn't using any.

Posted: Sun Aug 05, 2007 3:50 am
by Luke
With the new update the skeleton is still broken and yet somehow the animation works perfectly!
The skeleton still appears as one line so when I use getJointNode("joint")->getAbsolutePosition()
it returns the same for all joints because they all seem to be stuck at the origin. I want to get the positions of all joints so I can set up a ragdoll.
lol, sorry, try it now.

I don't know if it should be using one texture for the whole model, but it isn't using any.
I don't know, maybe the material it's using happens to have no texture. it will be fixed anyway so don't worry.

Posted: Sun Aug 05, 2007 9:44 am
by gheft
well, it changed one thing, the point where all the joints are now appears to have moved from my characters pelvis bone, to under his feet... :o

Posted: Sun Aug 05, 2007 10:31 am
by Luke
yet it animates fine? that's weird, could you post the code, and can I have a look at the mesh?

Posted: Sun Aug 05, 2007 11:13 am
by gheft
really the only code I'm using is addAnimationSceneNode and setting the debug flag for the skeleton so I can't see how there could be a problem there.
anyway heres a link to the mesh
http://www.sendspace.com/file/8gx2dz

Posted: Sun Aug 05, 2007 11:28 am
by Luke
well there seems to be problems hierarchy of the mesh

Image

Posted: Sun Aug 05, 2007 6:57 pm
by Dorth
I know it's all in frames still ^^
But the thing is imagine 2 different models using 2 diff. skeletons but those have the same animation names. Now I want to check if half the animation is passed or not (or something the like). Well, if each animation carry it's length, I can now that + I can know how long it'll take it to do the whole animation ^^

Posted: Sun Aug 05, 2007 9:50 pm
by vermeer
beware sometimes unwrap3d displays bones somwhate weird still it's correct, dunno if is the case

Posted: Mon Aug 06, 2007 2:04 am
by Luke
I know it's all in frames still ^^
But the thing is imagine 2 different models using 2 diff. skeletons but those have the same animation names. Now I want to check if half the animation is passed or not (or something the like). Well, if each animation carry it's length, I can now that + I can know how long it'll take it to do the whole animation ^^
I'm still not sure that you mean, it sounds like you want to go:

if ( Node->getFrameNr() > (Node->getEndFrame()/2) ) DoStuff();

beware sometimes unwrap3d displays bones somwhate weird still it's correct, dunno if is the case

Well checking it by hand, it does appear to be wrong

Code: Select all

Frame Bip01_Head {
  

  FrameTransformMatrix {
   0.836979,6.725142,0.039813,0.000000,6.700855,-0.837342,0.571879,0.000000,0.572410,-0.031262,-6.752853,0.000000,1.945152,24.512890,-1.095727,1.000000;;
  }
 }

 Frame Bip01_L_Finger01 {
  

  FrameTransformMatrix {
   6.081264,-0.767891,-2.891051,0.000000,2.427052,5.095330,3.751884,0.000000,1.748499,-4.401995,4.847143,0.000000,33.099327,15.460739,0.383812,1.000000;;
  }
 }

 Frame Bip01_L_Finger0 {
  

  FrameTransformMatrix {
   5.816360,-0.214046,-3.471851,0.000000,2.427054,5.095329,3.751883,0.000000,2.491781,-4.463340,4.449631,0.000000,31.810133,15.508191,1.153360,1.000000;;
  }
 }
as you can see, no nesting = no hierarchy

Posted: Mon Aug 06, 2007 5:36 am
by alexionne
Hi!

My experience is that Max + X-format is one of the worst conbinations to work with. In the team I'm working for, artists are using Max, and we used to use .x files for our objects. But when it came to animations, I found that exported objects (using Panda) have really strange things, like this one, or sometimes we also got dummy frames in hierarchy - meaning you have a frame with no geometry, which only links its parent and child frames. The strange thing is that this frame does not exist in Max! Even worse, it had identity transofrmation matrix!? These kind of stuff made us switch to .ase format.

Oh, yeah, and official DirectX function to load animated .x files can sometimes crash - try to make an object with two root frames, export hierarchy but don't export animations and see what happens when you try to load it using D3DXLoadMeshHierarchyFromX :-)

Best,
Aleksa

Posted: Mon Aug 06, 2007 6:54 am
by Luke
yeah the x format is terrible, I really don't recommend using it, but it's still good to give people a choice, hopefully we will have a lot more choices soon too.