Animation Question

Len12

New member
I basically know how to animate in Blender. Exporting to Trainz has been my biggest issue. I ran across this instruction on the net:

"Note the animation works by making the bone b.r.rot etc a parent of object then the animation is applied to the bone."

So I make a cube. And name it cube. Then at the same point I added a lattice and named it b.r.cube2. How do I make that lattice a parent of the cube? It won't join (ctrl j for example). I added a constraint on it to make it the parent of the cube but I get nothing on export. I understand the instruction, as well, to mean you don't animate the object itself - you animate the 'child'.

Can someone provide an easy instruction to a dimwit on a simple cube animation to export and I think that would be the beginning I need?:udrool:

Thanks in advance.
 
Hmm, to make an object the parent of another object you first have to select both objects using shift rightclick. When you select two or more objects like this you will notice that the last selected is a little brighter pink then the previous selected ones. To make an object the parent of something you do a selection as described before in such a manner that the last selected, the brightest pink one, will become the parent. Now press ctrl p(keyboard) and choose normal parent ftom the popup. That's it.

As for the animation, if you made the lattice the parent of the cube, you animate the lattice and the child, the cube in this case, will move with it.

Hope this helps. Btw, questions like these are better asked in the Content Creation Support thread on this forum. Many more modellers and creators hang out there.

Greetings from rainy Amsterdam,

Jan
 
Thanks Jan I'll start there. I'm aware of the naming convention anim.kin and the export animation button as well so I"ll see if I can get it going.
 
That did it Jan. I have the correct export files (I think) cube.im, and cubeanim.kin. Added it to the config file :


mesh-table
{
default
{
mesh "cube.im"
anim "cubeanim.kin"
auto-create 1
animation-loop-speed 1
}
}


And voila works perfectly in Trainz.

Thanks!
 
Jan

I'm creating an animation for a crane. The Crane itself exports fine. I've then made an animation of the top portion rotating it as a crane would which works perfectly in blender (Lattice is called b.r.crane2 - made parent for top part of the crane). There is only one texture used by the way a tga alpha of glass for the cockpit which is part of the linked object with the lattice. Everything else is colored from Blender.

When exporting I get the message noted below 'no event text found, no events will be generated' 'Errors during data collection, export aborted'.

The bottom part of the Crane is not linked to anything.

Any solution to this?

animscreen01.jpg


animscreen02.jpg
 
Bingo. Everything except the root bone must to linked to something, in this case link the lower part of the crane to the root bone.

Paul


Is the root bone the lattice? I know that couldn't be done otherwise the bottom would also move? Do I create a root bone? Where do I put it? The problem was with the bottom as you noted as I removed it and everything else exported perfectly. Or do I make a new lattice at the origin and call it b.r.main then link it with the bottom part?
 
Last edited:
You need a lattice that doesn't move as your root bone (for example b.r.main), link b.r.crane2 to this and the bottom fixed part of the crane to b.r.main.

Paul
 
Everything's great. However, the review crane is the right colors as you can barely see in the inset but the crane in Trainz is all black! Any solution to this?

craneanim3.jpg
 
Hmm, this is something I've never seen before. Once I had a black shed like that, but the thumbnail was the same, black too. I wonder, did you maybe export the mesh and the animation seperately? That black looks a little like the m.notex option for mesh textures that are used for shadow map *.im files. I can only say, check your normals, do a ctrl-akey and select Scale and Rotation to ObjData for all meshes and export mesh and animation in one go.

As a check you could download PEV's mesh viewer to see how it does show up in there. Also download the mesh text viewer to see if somehow something else gets exported as texture then what you think it is.

Finally make sure your *.tga files are uncompressed. If you baked them in blender make sure you choose targa raw when saving them and that they are measured with factor 2. like 2 - 4 - 8 - 16 - 32 - 64 - 128 etcetera.

Greetings from sunny Amsterdam,

Jan
 
Hmm, this is something I've never seen before. Once I had a black shed like that, but the thumbnail was the same, black too. I wonder, did you maybe export the mesh and the animation seperately? That black looks a little like the m.notex option for mesh textures that are used for shadow map *.im files. I can only say, check your normals, do a ctrl-akey and select Scale and Rotation to ObjData for all meshes and export mesh and animation in one go.

As a check you could download PEV's mesh viewer to see how it does show up in there. Also download the mesh text viewer to see if somehow something else gets exported as texture then what you think it is.

Finally make sure your *.tga files are uncompressed. If you baked them in blender make sure you choose targa raw when saving them and that they are measured with factor 2. like 2 - 4 - 8 - 16 - 32 - 64 - 128 etcetera.

Greetings from sunny Amsterdam,

Jan

Thanks Jan

With the exception of the window in the crane everything else is colored with Blender. I'm exporting both at the same time.

I just did a cargo ship with animated props and exported both the animation and mesh - again black. I textured the stack with a bmp 1024x1024 texture - preview window shows up fine but again all black in Trainz. In the preview window I can tell you all shows up fine just when I place the object in use does it show up black. I haven't done anything different with my texturing as well either TGA or bmp. Again it shows up perfectly in the preview window. Something to do with the animation process.
 
With the exception of the window in the crane everything else is colored with Blender.
Allthough I'm at a loss why the mesh shows up black while the thumbail shows correctly, I wonder, you do create uv-maps for your meshes do you? Using the buildin material and textures from blender directly doesn't work.
I presume you've checked the *.bmp and *.tga files you use in an image viewer to make sure they contain what you expect. Something easily forgotten after baking blender materials to an uv-mapped image is to save it, otherwise the baked result is only visible in blender itself, while the image you've created with Image New... in the UV-texturing window stays black.

Greetings from overcast Amsterdam,

Jan
 
Try selecting the crane and then clicking the ? mark button for the property's window and then give it a name. The textures should then show. I've seen this happen in 09 with objects that have attachment points.
 
Try selecting the crane and then clicking the ? mark button for the property's window and then give it a name. The textures should then show. I've seen this happen in 09 with objects that have attachment points.

I'll give that a try.
 
Allthough I'm at a loss why the mesh shows up black while the thumbail shows correctly, I wonder, you do create uv-maps for your meshes do you? Using the buildin material and textures from blender directly doesn't work.
I presume you've checked the *.bmp and *.tga files you use in an image viewer to make sure they contain what you expect. Something easily forgotten after baking blender materials to an uv-mapped image is to save it, otherwise the baked result is only visible in blender itself, while the image you've created with Image New... in the UV-texturing window stays black.

Greetings from overcast Amsterdam,

Jan

I create UV maps. All the objects you see in that image (well almost all) are original objects done in the same way as I've done all my assets. It is clear that the issue is related to the animation issue. I'm using 2.49b. This only occurs when I do an animation.
 
Try selecting the crane and then clicking the ? mark button for the property's window and then give it a name. The textures should then show. I've seen this happen in 09 with objects that have attachment points.

Didn't work.
 
I did a ordinary cube, made it white (no textures), and animated it. Again it shows up ok in the preview window but in Trainz black. I printed out the mesh. Can anyone recognize any error:

0 File ID: JIRF, Chunk Size: 1808, (file size: 1816) File Type: IDXM
12 Chunk ID: INFO Size: 68 (next chunk: 88) Version: 104
24 Position: 0.000, 0.000, 0.000
36 Rotation: 1.000, 0.000, 0.000, 0.000
52 Number of CHNK type Chunks: 1
56 Influence per Vertex: 1, Influence per Chunk: 1
64 Mesh bounding box minimum X, Y, Z: -1.000, -1.000, -1.000
76 Mesh bounding box maximum X, Y, Z: 1.000, 1.000, 1.000
88 Chunk ID: CHNK Size: 1144 (next chunk: 1240) Version: 100
100 Chunk Index: 0
104 Chunk ID: MATL Size: 96 (next chunk: 208) Version: 103
116 Material Name Size: 20
120 Material Name: material.001m.notex
140 Property Count: 0
144 Two Sided: 1
148 Opacity : 1.000
152 Ambient 1.000, 1.000, 1.000
164 Diffuse 1.000, 1.000, 1.000
176 Specular 0.250, 0.250, 0.250
188 Emissive 0.000, 0.000, 0.000
200 Shininess : 9.608
204 Number of textures: 0
208 Chunk ID: GEOM Size: 1024 (next chunk: 1240) Version: 201
220 Primitive flags: 4 = GC_TRIANGLES
224 Number of primitive options: 0
228 Area: 24.000 Vertex Count: 24 Triangle Count: 12
240 Index Count: 36 Face Normal Count: 12 Max Influences: 1
252 Bone Name Size (V200): 0
---- VERTEX POSITIONS ---- SUPPRESSED
---- TRIANGLE INDICES ---- SUPPRESSED
---- VERTEX NORMALS ---- SUPPRESSED
---- TRIANGLE NORMALS ---- SUPPRESSED
1240 Chunk ID: INFL Size: 568 (next chunk: 1816) Version: 100
1252 Bone Count: 1
1256 Bone Name size: 12, Name: b.r.cube2
1272 Parent Name size: 0, Name:
1276 Local Position: [0.000, 0.000, 0.000]
1288 Local Orientation: [1.000, 0.000, 0.000]
1300 [0.000, 1.000, 0.000]
1312 [0.000, 0.000, 1.000]
1324 Influence Chunk Count: 1
1328 Influence index: 0
1332 Vertex Count: 24
---- Vertex Influence Data ---- SUPPRESSED
1816 Eof
 
Well, I can only see three things that could hamper the display of the crane, but if those are the reason for the problem I don't know.

The first is: 120 Material Name: material.001m.notex
The m.notex addition tells trainz that the mesh has no texture attached. This will be the culprit it seems. In fact the default addition the expoter creates should be m.onetex.
Don't know if this helps, but make sure that not only the assigned material has the uv-map as image texture, but also that the uv-texturing window in blender has the same image selected for the mesh. This only works in edit mode(tab key). So with the mesh in edit mode and all selected make sure the correct image is selected there.

The second is: 144 Two Sided 1(boolean). Exported meshes from blender should have this option in the mesh tab set to off.

The third is in line 1272.
Bone Count 1 means there should be a fixed b.r.main one and an animated child one b.r.cube2
In line 1272 there's no b.r.main for the Name of the parent. Note that the "b.r." prefix is mandatory, everything after that is your own choice.

Hope you can do something with this.

Greetings from sunny Amsterdam,

Jan
 
Well, I can only see three things that could hamper the display of the crane, but if those are the reason for the problem I don't know.

The first is: 120 Material Name: material.001m.notex
The m.notex addition tells trainz that the mesh has no texture attached. This will be the culprit it seems. In fact the default addition the expoter creates should be m.onetex.
Don't know if this helps, but make sure that not only the assigned material has the uv-map as image texture, but also that the uv-texturing window in blender has the same image selected for the mesh. This only works in edit mode(tab key). So with the mesh in edit mode and all selected make sure the correct image is selected there.

The second is: 144 Two Sided 1(boolean). Exported meshes from blender should have this option in the mesh tab set to off.

The third is in line 1272.
Bone Count 1 means there should be a fixed b.r.main one and an animated child one b.r.cube2
In line 1272 there's no b.r.main for the Name of the parent. Note that the "b.r." prefix is mandatory, everything after that is your own choice.

Hope you can do something with this.

Greetings from sunny Amsterdam,

Jan

I'll try the suggestions and get back. I know the notex thing - as noted I didn't texture the object just wanted a quick test object. That shouldn't effect it though as the only requirement in Trainz (exporter) is a material applied to the object which I did. I didn't do a b.r.main because I wanted a quick test. As noted above it is part of the crane animation and it's still black but I'll get in the habit of making it.
 
Last edited:
Back
Top