Help with animation and rotation..

Ask questions, discuss ideas, get answers
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Help with animation and rotation..

Post by fo0k »

so, I am getting a little closer but currently have the following error (this happened with my own light object and then I also tried the process using your animated flags)

*could you perhaps post your con files for the standalone flags as shown in the first vid above? would be useful as reference

first up.. the error - I guess it's fairly clear whats wrong.. but I kinda thought I had 'skinned the verts'. Can you suggest which step I have missed/failed?
error.png
error.png (8.08 KiB) Viewed 4691 times
and ingame I get this masterpiece (your flags.. but same issue with my light..)
screen.png
screen.png (847.54 KiB) Viewed 4691 times
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Help with animation and rotation..

Post by Apache Thunder »

Do you have any bones with the same name in the scene or any objects in your max scene that share the same name? I had this problem the first time I was making tank tracks. I had both sets of tracks in the scene at once and they used similar bones and stuff and it confused the scripts.

Here's how my flags are coded. Note that the command used to load the SKN file and SKE files require the extension at the end of the file name. Check for that as well since unlike textures, the game does not default to SKN/SKE/SM files. You have to specify it in the path for it to work.

Geometry Template:

Code: Select all

GeometryTemplate.create AnimatedMesh fishingboat_e_01_flags_m1
GeometryTemplate.setSkin Animations/fishingboat_e_01_flags_m1.skn
GeometryTemplate.file Vehicles/fishingboat_e_01_flags_m1
GeometryTemplate.hasDynamicShadow 1
Object Template:

Code: Select all

ObjectTemplate.create AnimatedBundle fishingboat_e_01_flags
ObjectTemplate.geometry fishingboat_e_01_flags_m1
ObjectTemplate.createSkeleton Animations/fishingboat_e_01_flags_m1.ske
ObjectTemplate.setAnimationState fishingboatflags_idle1
ObjectTemplate.cullRadiusScale 5
ObjectTemplate.hasDynamicShadow 1
Also, never attempt rig a mesh with more then 23 bones. It was the reason I was unable to make working soldier meshes early on as I was not aware of this limitation. (the error message during the CTD was very cryptic and didn't not say anything useful as to the cause of the problem at the time) I did not find out untill I was attempting to export something for BF2 and their scripts told me I had too many bones and the max was 23. I assumed this to be the same for BF1942 and I was later proven correct. This is the reason why soldier meshes have the hands and head made as seperate objects. Trying to rig the entire soldier mesh as one object goes over the 23 bone limit and the game will CTD. Another curious Dice coding practice explained. :P

Hope this info helps. :D

EDIT:

The flag animation really goes well with the added smoke effects, water explosian and boat sinking (now that I got my boats to sink properly. Seems floaters won't sink unless the boat has a chance to be in the critical. If a projectile does enough damage to the boat to where it goes from good health streight to zero, then it won't sink. :( I fixed this by using a larger HP number for the critical damage and increased the hp lost while critical property to make up for this. :D

In this video you can see how the flag animation goes when the boat is seen from a distance sinking. Oh and I got cannons on the boats now. :D


Combined with the final effects it makes it 200% more awesome. :D
ImageImageImage
I have cameras in your head!
Post Reply