Cal3d Progress

Finally a work in progress Blender script that I have gotten Blender 2.41 to export. However, the pipe is far from complete. A few issues need to be resolved.First one is the UV comes out wrong, it appears to be rotated 90 degrees counter clockwise. See Figure
Second problem is I am unable to export multiple materials. When ever I have more than one material assigned to the mesh the first material seems to get exported and the exporter ignores the rest.
Third issues is related to the second one. The exporter reads the name of the texture file when it creates the xrf files not the materials.
Fourth issue is the relatives paths do not seem to be working properly. I only tested this by creating a textures directory in the root directory. When I exported the files the script exported \\textures/male.png in the xrf file.
Fifth issue is cleaning up. Every time I change anything. Name of a datablock, import a new mesh, bake an animation, anything I have to save and reload the blender scene.
Sixth issues is the cal3d miniviewer is really crude. The viewer is very limiting. I haven’t found a way to tweak the lights or play all the animations. So in order for an artist to play a specific animation they must put it on the top of the list in that animations section of the cfg file and preview in the miniviewer. There needs to be a better miniviewer.
Files that were used can be found here.
February 15th, 2006 at 5:32 pm
One funky discrepancy I found when using the Cal3D script and applying the spring effects to planar mesh types. In the script it says that objects/bones/actions that begins with “_” will not be exported. Then in the second paragraph it says meshes that begin with _Cloth will be exported with springs, coupled with an application of _cloth_wieghts. I can’t really follow the logic, but then again I am only an artist.
I tried exporting the the skirt named _ClothSkirt with some weights applied to it, nothing got exported the first time around. So I renamed it to ClothSkirt and no spring effects were applied.
I tried using the a simple scene with a bone and a planar mesh. I applied the weights to deform the mesh, then I applilied a 0 variable _cloth_weight to the verts that I needed to be static and a + variable for spring effects. The exporter export the mesh fine however in the miniviewer I couldn’t see the spring effects for the planar mesh.
February 17th, 2006 at 2:04 am
Did you try out the script and read the testing on it done here?
http://www.blender3d.org/forum/viewtopic.php?t=7884&sid=1744431f166beae9abb6d0d975946792
http://www.blender3d.org/forum/viewtopic.php?t=7960&sid=1744431f166beae9abb6d0d975946792
This script had no probs with UVs or relative paths, I dont know about the materials as i never used them.
Of course, there were some other problems with the bones rotating, messing things up that seem to be coming from Blender itself..which the programmers there are looking into.
February 21st, 2006 at 2:46 am
Hi, I got your cal3d script to work for me(with the animatiosn and skeleton and mesh all working), except the UV’s are flipped on the mesh. You said you corrected the uvs, and they work for you..i’m thinking that they needed to be how they were in order to work for me.
So…I changed this line in your script to the old line, adding the #:
uv = [face.uv[i][0], face.uv[i][1]] #1.0 - face.uv[i][1]]
And it worked! The UV’s work fine for me now. I was told that this may be becuase we are using .bmp files for the textures in our game.
February 21st, 2006 at 4:54 am
Currently the UV got fixed.. There are a few issues that the programmers is trying to resolve.
1. Export option for materials versus uv image names.
2. Reseting the rig after each action, baking the first frame and the capture the rest of the poses
3. Trying to see if the we can condense the size of the rig by exporting only needed bones not the ik… Don’t know if this is doable.
4. Minor clean up like removing “//” from the exporter
the work in progress can be found here http://www.elefth.org/
February 21st, 2006 at 1:42 pm
I believe you can eliminate the IK bones by simply putting a _ at the beginning of their name. I did this when I used IK (it was blender 2.37), and it worked. Did you try that?
February 21st, 2006 at 1:50 pm
your are correct when adding a “_” to eliminate un neccessary bones. However the way the script works I need all the bones to be present when the poses are beign captured. We may not get rid of them all together. We may find this useful for dynamic IK.
February 21st, 2006 at 9:20 pm
Do you have to bake all your animations when using IK? And then rename the IPO names? I found that to be a real pain, thus why i stopped using IK. not that I really needed it in the first place though.
February 22nd, 2006 at 1:36 am
Since the great blender hacks really messed it up in the last version you can’t bake IK. I asked the coders and they said that you need a frying pan and some peanut oil to bake the IPO’s. Needless to say I was not amused.
Never-the-less with the current script that I am using that the wf programmers are developing, you don’t have to bake anything. Just animate with IK/FK and export. No need to rename anything. The skeleton is a bit bigger but your keframes are reduced significantly. This also reduces the files sizes by around 200% in some cases. The outcome of some of my tests resulted in what used to be a 350K file have become 120-130K files.
I agree with you though some things in Blender are a big pain in the…
April 14th, 2006 at 2:39 pm
Hi
Where does this script lives officially? I’m tryng to figure out the latest version of the script which would work as correct as possible with blender 2.41 and cla3d 0.10.0 and I’m puzzled. The version that I’ve got (from http://www.blender3d.org/forum/viewtopic.php?t=7884&sid=1744431f166beae9abb6d0d975946792) doesn’t export the IK based animations. Is there CVS or something?
April 15th, 2006 at 3:19 pm
yeah all those blow. go get this one thanks to elefth on coders channel at worldforge.org http://www.elefth.org/
April 18th, 2006 at 1:02 pm
I’m trying to use it but can’t get exporting animation to work.
i have 5 bones in an IK chain and one bone - IK target. i have two key frames in an action I want to export with different positions of the IK bone. when i export i just don’t get no movement. it also leaves temporary action, I guess it’s supposed to have the IK solutions calculated into the bone channels? and this animation does nothing (i guess that’s what is exported).
how could i get in touch with the developers?
April 18th, 2006 at 1:35 pm
Im not sure what you are trying to do but the script works either in FK or IK. I have created animations both ways. Also how are you previewing your animations?
The way the script works is it resets all the bones then reads the animations of the first frame. Then it captures a pose on the first frame for all the bones then proceeds to capturing poses only for the frames that have data in them.
The developer can be found at irc.worldforge.org in the coders channel. alias name elefth. If you want to know when he was last seen type in /msg brenda seen elefth
April 18th, 2006 at 1:42 pm
before export i preview my animations in blender
after export i use miniviewer
thanks for the info!
April 18th, 2006 at 1:57 pm
[...] still can’t save animation although they say it works… [...]
April 19th, 2006 at 1:01 am
you have to be using Blender 2.41, python 2.4. Make sure that the PYPATH is set correctly in your enviroment variable. Remember the whole Blender CCS is really finikey and flakey
April 19th, 2006 at 10:13 am
I finally managed to get it working but i have to keep several previous copies of the blend file to be able to revert when for some unclear reson the animation stops being exported. and i have problems with making cal3d find the textures, but solving that i postpone for later…
April 19th, 2006 at 4:29 pm
realistically you only need two blender files, one work in progress and one for exporting. When exporting just append actions to your working armature.
Texture format has to be supported by the miniviewer. I think it supports pngs and jpgs. Also you have to tweak the cfg file if the script doesn’t put the paths in to the materials section. The directory structure works either relative on absolute paths.
April 20th, 2006 at 8:01 am
the miniviewer i use (_gl) seems to only support .tga textures.
i keep more then two version bacause some times i end up with animation that don’t get exported and I have no idea why, the only way to handle that with two files would be to export after each change and see if I broke the animation yet. But I’m just too lazy.
April 22nd, 2006 at 7:27 pm
Btw, I don’t know if you’ve seen this, but I thought it could be useful http://www.blendernation.com/2006/04/10/free-rigged-model-ludwig/