For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
skeletal animation usage
- [§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
Re: skeletal animation usage
I was thinking about that a long ago... I wanted to make a mod where you can rotate only head* but not body, but it'd be a f[ch367]ckload of work and wouldn't replicate (properly) if done without skeletal meshes.
* - no homo
* - no homo
☆
- Turboman.
- OldUnreal Member
- Posts: 897
- Joined: Tue Feb 04, 2003 6:40 pm
Re:
I was thinking about that a long ago... I wanted to make a mod where you can rotate only head* but not body, but it'd be a f[ch367]ckload of work and wouldn't replicate (properly) if done without skeletal meshes.
* - no homo
sorry i was still editing my messy post when you posted this
but i should note i'm doing this with skeletal animation only, i'm really willing to explore the possibilities and limitations of this new format.
as for "tracking" individual body parts, with skeletal animation how hard would this be to do? ut2004 had this, as do many unreal engine games (rune, undying, deep space 9, deus ex ps2). I really think this would be the biggest feature of animation combining if possible
Last edited by Turboman. on Tue Nov 10, 2009 2:55 pm, edited 1 time in total.
- []KAOS[]Casey
- OldUnreal Member
- Posts: 4497
- Joined: Sun Aug 07, 2011 4:22 am
- Location: over there
Re: skeletal animation usage
if that skeletal skaarj of yours is set up right, yep :p
you should be able to set bonerotation of the head and body relative to it's enemy
and for blinking yeah, should be possible but a waste of bandwidth imo unless it's simulated
you should be able to set bonerotation of the head and body relative to it's enemy
and for blinking yeah, should be possible but a waste of bandwidth imo unless it's simulated
- Turboman.
- OldUnreal Member
- Posts: 897
- Joined: Tue Feb 04, 2003 6:40 pm
Re: skeletal animation usage
but..... any example code of animation combining or tracking? i haven't been able to find any example code on UDN or stuff.
- []KAOS[]Casey
- OldUnreal Member
- Posts: 4497
- Joined: Sun Aug 07, 2011 4:22 am
- Location: over there
Re: skeletal animation usage
SkelPlayAnim(0,"Running",1, 0.1,0); //set all bones to run animation
SkelPlayAnim(1,"Firing",1,0.1,0); //set shoulder root bone and child bones to firing animation
Assuming 0 is the root bone for ALL bones, and 1 is the shoulder/arms/head bone.
on event AnimEndOnBone( int BoneIndex );
you can re play those animations to effectively loop
SetBoneRotation(5, Rotator(Location-Enemy.Location);
assuming bone 5 is head bone
HAven't actually tested it myself but thats my understanding of how it works
SkelPlayAnim(1,"Firing",1,0.1,0); //set shoulder root bone and child bones to firing animation
Assuming 0 is the root bone for ALL bones, and 1 is the shoulder/arms/head bone.
on event AnimEndOnBone( int BoneIndex );
you can re play those animations to effectively loop
SetBoneRotation(5, Rotator(Location-Enemy.Location);
assuming bone 5 is head bone
HAven't actually tested it myself but thats my understanding of how it works
- Turboman.
- OldUnreal Member
- Posts: 897
- Joined: Tue Feb 04, 2003 6:40 pm
Re: skeletal animation usage
setbonerotation seems to work as ucc didnt throw any error at me, but skelplayanim seems to be an unrecognized variable here, iscript simply give me a BAD OR MISSING PARAMETER 1 error.SkelPlayAnim(0,"Running",1, 0.1,0); //set all bones to run animation
SkelPlayAnim(1,"Firing",1,0.1,0); //set shoulder root bone and child bones to firing animation
Assuming 0 is the root bone for ALL bones, and 1 is the shoulder/arms/head bone.
on event AnimEndOnBone( int BoneIndex );
you can re play those animations to effectively loop
SetBoneRotation(5, Rotator(Location-Enemy.Location);
assuming bone 5 is head bone
HAven't actually tested it myself but thats my understanding of how it works
here's the example code:
function PlayTurning()
{
BaseEyeHeight = Default.BaseEyeHeight;
SkelPlayAnim(BIP 01 R THIGH,"turn",1,0.1,0);
SkelPlayAnim(BIP 01 L THIGH,"turn",1,0.1,0);
}
here i'm trying to make the legs perform a subtle animation while turning (to simulate the effect of "anchored" feet, what newer games have).
also can i determine the speed (or the actual animation played) by turning speed and direction? for example if mr skaarjwarrior turns around 120 degrees to the left it plays a wild turn to left animation, then if he turns around 45 degrees to the right it plays a subtle move to the right animation?
another thing, you mentioned "numbering" your bones, but hows that? my bones are simply named BIP 01 THIGH, BIP 01 HEAD and such rather then having numbers, or am i supposed to count them from the root bone?
Last edited by Turboman. on Mon Nov 23, 2009 5:07 pm, edited 1 time in total.
- Smirftsch
- Administrator
- Posts: 9001
- Joined: Wed Apr 29, 1998 10:00 pm
- Location: NaPali
- Contact:
Re: skeletal animation usage
// Unreal Skeletal mesh implemention.
native(1726) final function int GetBoneIndex( string BoneName ); // Get bone index of a name (-1 if not found, "Weapon Bone" for weapon bone index).
native(1727) final function name GetBoneName( int Index ); // Get name of a bone index
native(1728) final function Coords GetBoneCoords( int Index ); // Get world coords of a bone.
native(1729) final function bool SetBoneRotation( int Index, rotator RotModifier ); // Set bone rotation.
native(1730) final function bool SetBoneScale( int Index, vector New3DScale ); // Set bone size 3D.
native(1731) final function bool SetBoneRoot( int Index, optional int RootIndex ); // Change bone's root bone (attach bone to bone, 0 root = orginal bone).
native(1732) final function bool SetBonePosition( int Index, vector Offset ); // Change bone location offset (offset is in mesh coords, not world coords).
// Play an animation with bone index as root.
// @ Index - The root bone index for the animation.
// @ Rate (1.0) - The animation rate.
// @ TweenTime (0.0) - The "blend-in" time for the animation.
// @ bLoop (false) - Animation will loop forever.
// @ TweenOut (0.0) - When not looping, the "blend-out" time for the animation (-1 and it will freeze frame once animation completed).
native(1733) final function bool SkelPlayAnim( int Index, name AnimName, optional float Rate, optional float TweenTime, optional bool bLoop, optional float TweenOut );
// Stop an animation in this bone index.
// @ bCheckFromRoot (false) - If true, check if this bone is affected by any channel towards the root.
native(1734) final function bool StopSkelAnim( int Index, optional bool bCheckFromRoot );
// Remove all active animation channels and reset back all bone sizes and rotations (this is automatically done when mesh is switched to another skeletal mesh).
native(1735) final function ResetSkeletalMesh();
So it should work...
native(1726) final function int GetBoneIndex( string BoneName ); // Get bone index of a name (-1 if not found, "Weapon Bone" for weapon bone index).
native(1727) final function name GetBoneName( int Index ); // Get name of a bone index
native(1728) final function Coords GetBoneCoords( int Index ); // Get world coords of a bone.
native(1729) final function bool SetBoneRotation( int Index, rotator RotModifier ); // Set bone rotation.
native(1730) final function bool SetBoneScale( int Index, vector New3DScale ); // Set bone size 3D.
native(1731) final function bool SetBoneRoot( int Index, optional int RootIndex ); // Change bone's root bone (attach bone to bone, 0 root = orginal bone).
native(1732) final function bool SetBonePosition( int Index, vector Offset ); // Change bone location offset (offset is in mesh coords, not world coords).
// Play an animation with bone index as root.
// @ Index - The root bone index for the animation.
// @ Rate (1.0) - The animation rate.
// @ TweenTime (0.0) - The "blend-in" time for the animation.
// @ bLoop (false) - Animation will loop forever.
// @ TweenOut (0.0) - When not looping, the "blend-out" time for the animation (-1 and it will freeze frame once animation completed).
native(1733) final function bool SkelPlayAnim( int Index, name AnimName, optional float Rate, optional float TweenTime, optional bool bLoop, optional float TweenOut );
// Stop an animation in this bone index.
// @ bCheckFromRoot (false) - If true, check if this bone is affected by any channel towards the root.
native(1734) final function bool StopSkelAnim( int Index, optional bool bCheckFromRoot );
// Remove all active animation channels and reset back all bone sizes and rotations (this is automatically done when mesh is switched to another skeletal mesh).
native(1735) final function ResetSkeletalMesh();
So it should work...
Last edited by Smirftsch on Mon Nov 23, 2009 5:16 pm, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
- .:..:
- OldUnreal Member
- Posts: 1637
- Joined: Tue Aug 16, 2005 4:35 am
Re: skeletal animation usage
What you need to do is:
Code: Select all
function PlayTurning()
{
BaseEyeHeight = Default.BaseEyeHeight;
SkelPlayAnim(GetBoneIndex("BIP 01 R THIGH"),'turn',1,0.1,,0.1);
SkelPlayAnim(GetBoneIndex("BIP 01 L THIGH"),'turn',1,0.1,,0.1);
}(ಠ_ಠ)1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD
- Turboman.
- OldUnreal Member
- Posts: 897
- Joined: Tue Feb 04, 2003 6:40 pm
Re: skeletal animation usage
thanks for that list, must have missed something in the faq.
native(1733) final function bool SkelPlayAnim( int Index, name AnimName, optional float Rate, optional float TweenTime, optional bool bLoop, optional float TweenOut );
okay apparantly the first step works when i insert a number instead of a name in int INDEX.
SkelPlayAnim(1,"walk",1,0.1,0);
then it gave me a type mismatch in parameter 2: and failed to compile, parameter 2 is walk, the animation called "walk" is present in the model, any suggestions?
And how exactly do i use int index? like i said my bones are named pelvis, arm, head etc rather then having a number, am i supposed to be able to look up that number somewhere?
wait dots posted a second before me... lemme read
okay that solved it!
but now, it seems to play the animation after actually turning, oh well thats probably related to the original turn script
native(1733) final function bool SkelPlayAnim( int Index, name AnimName, optional float Rate, optional float TweenTime, optional bool bLoop, optional float TweenOut );
okay apparantly the first step works when i insert a number instead of a name in int INDEX.
SkelPlayAnim(1,"walk",1,0.1,0);
then it gave me a type mismatch in parameter 2: and failed to compile, parameter 2 is walk, the animation called "walk" is present in the model, any suggestions?
And how exactly do i use int index? like i said my bones are named pelvis, arm, head etc rather then having a number, am i supposed to be able to look up that number somewhere?
wait dots posted a second before me... lemme read
okay that solved it!
but now, it seems to play the animation after actually turning, oh well thats probably related to the original turn script
Last edited by Turboman. on Mon Nov 23, 2009 5:33 pm, edited 1 time in total.
- Turboman.
- OldUnreal Member
- Posts: 897
- Joined: Tue Feb 04, 2003 6:40 pm
Re: skeletal animation usage
Ah i've discovered a bug regarding skeletalmodels!
Its the way d3d/opengl draws translucent textures on skeletalmeshes, it strangely seems to draw them behind normal solid textures, software rendering doesn't produce this bug though, neither does it occur on vertex meshes.
Example is a weapon with a scope i'm working on, the glass of the scope is partly obstructed by the solid tube around it, that renders over it instead of behind.
Also too bad unmirror=1 doesn't work on skeletalmeshes, with vertexmeshes it saved me alot of time by just letting unreal mirror left handed/right handed variants of weapons
Its the way d3d/opengl draws translucent textures on skeletalmeshes, it strangely seems to draw them behind normal solid textures, software rendering doesn't produce this bug though, neither does it occur on vertex meshes.
Example is a weapon with a scope i'm working on, the glass of the scope is partly obstructed by the solid tube around it, that renders over it instead of behind.
Also too bad unmirror=1 doesn't work on skeletalmeshes, with vertexmeshes it saved me alot of time by just letting unreal mirror left handed/right handed variants of weapons
Last edited by Turboman. on Tue Dec 15, 2009 6:03 pm, edited 1 time in total.
- .:..:
- OldUnreal Member
- Posts: 1637
- Joined: Tue Aug 16, 2005 4:35 am
Re: skeletal animation usage
Hmm... I don't think that depends on skeletal meshes, perhaps just the order of the actors it renders?Ah i've discovered a bug regarding skeletalmodels!
Its the way d3d/opengl draws translucent textures on skeletalmeshes, it strangely seems to draw them behind normal solid textures, software rendering doesn't produce this bug though, neither does it occur on vertex meshes.
Example is a weapon with a scope i'm working on, the glass of the scope is partly obstructed by the solid tube around it, that renders over it instead of behind.
Guess we'd need to add a "DrawScale3D" option for actors for this and use Y scale -1 to mirror the model for best results.Also too bad unmirror=1 doesn't work on skeletalmeshes, with vertexmeshes it saved me alot of time by just letting unreal mirror left handed/right handed variants of weapons
As normal "unmirror" does only mirror the verts and the anim, but does not effect the skeletal animation or bones.
(ಠ_ಠ)1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD
- Turboman.
- OldUnreal Member
- Posts: 897
- Joined: Tue Feb 04, 2003 6:40 pm
Re: skeletal animation usage
well i'm speaking of a single skeletalmesh with solid and translucent textures, but actually i discovered it only occurs between twosided and translucent textures.Hmm... I don't think that depends on skeletal meshes, perhaps just the order of the actors it renders?
here's an example pic of what problem i'm having, opengl/d3d draw the texture order wrong (the translucent texture is drawn behind the twosided one), software rendering does it fine.

will that work? casey already suggested using the normal scaling with a negative value, it works perfectly with the animation and such, but the model is drawn inside out.Guess we'd need to add a "DrawScale3D" option for actors for this and use Y scale -1 to mirror the model for best results.
As normal "unmirror" does only mirror the verts and the anim, but does not effect the skeletal animation or bones.
Last edited by Turboman. on Wed Dec 16, 2009 4:38 pm, edited 1 time in total.
- [§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
Re: skeletal animation usage
He's talking about the Y scale only, not X or Z, and yeah that will work for what I know. 
☆
- Kajgue
- Global Moderator
- Posts: 755
- Joined: Mon Oct 17, 2005 2:36 pm
Re: skeletal animation usage
Hello Turboman,
Is this mesh importable for Blender? I don't have the privilege of using Max :/
Is this mesh importable for Blender? I don't have the privilege of using Max :/
Last edited by Kajgue on Sun Dec 26, 2010 2:24 pm, edited 1 time in total.
AKA - ( T : S : B ) Ice-Lizard


- Turboman.
- OldUnreal Member
- Posts: 897
- Joined: Tue Feb 04, 2003 6:40 pm
Re: skeletal animation usage
Hello Turboman,
Is this mesh importable for Blender? I don't have the privilege of using Max :/
i assume you're talking about the skaarjwarrior? i don't know, you might want to check if blender can open .max files.
i should update the file i posted tho, it has some bugs that i fixed later, i didn't bother as i didn't think anyone would have checked it

