Some stuff i playing with

Need some nice Mods? Here, you are right!
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Some stuff i playing with

Post by papercoffee »

Do you think this skeletal stuff would be also useful for Food Fight as well? ...but on the other hand are all the weapons animated already.
Torax
Adept
Posts: 406
Joined: Fri Apr 20, 2012 6:38 pm
Personal rank: Master of Coop
Location: Odessa, Ukraine

Re: Some stuff i playing with

Post by Torax »

papercoffee wrote:Do you think this skeletal stuff would be also useful for Food Fight as well? ...but on the other hand are all the weapons animated already.
That's no matter animated it or not. If you have source models files (in ms3d format for example) it is possible to easilly convert them to psk and psa.

Blender supports importing in ms3d format as well, both exporting and importing, saving all animations (converts milkshape joints to bones, saving all relationships between bones).
And Blender gives absolute control over the animations - it uses F-Curves to control smoothness of animation, ability to easily manipulate with key frames, desirable frame rate, bone constraints to limit some specific bone movements (such as X, Y or Z axis) and much more. And the best thing related to animation it supports - Inverse Kinematics. While Milkshape for example makes possible only Forward Kinematics.

Also, Blender to ms3d exporter gives ability to automatically bake each frame of animation as key frame.
This is VERY useful if your animations have a lot of non-linear anims, and helps to save smoothness to make animation more realistic.

And with all that, of course, the best positive thing in skeletal models - no "wobbling" effect such as vertex anims gives.

So its all aat your choice. :wink:
Unreal. Alter your reality..forever...
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Some stuff i playing with

Post by papercoffee »

I get the feeling you may offer something... :mrgreen:
Torax
Adept
Posts: 406
Joined: Fri Apr 20, 2012 6:38 pm
Personal rank: Master of Coop
Location: Odessa, Ukraine

Re: Some stuff i playing with

Post by Torax »

papercoffee wrote:I get the feeling you may offer something... :mrgreen:
About to recompiling models to skeletal? :lol2:

Well..i can help with this. Depends on your current progress.

But i still experimenting with stuff. There are few things which don't work properly - i don't know why, but changing model size using such kind of code

Code: Select all

#exec MESH SCALE MESH=ExampleMesh X=1 Y=1 Z=1
doesnt affects overall model. Need more tests. I have results only by changing model size in 3D editor.
Unreal. Alter your reality..forever...
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Some stuff i playing with

Post by Feralidragon »

@Paper: Gen made the FF models in MilkShape, so it's just a matter for him to export the models to psk/psa instead of _d.3d/_a.3d, no further work needs to be done for that.

@Torax: Try this instead:

Code: Select all

#exec MESHMAP NEW MESHMAP=ExampleMesh MESH=ExampleMesh
#exec MESHMAP SCALE MESHMAP=ExampleMesh X=1.00 Y=1.00 Z=1.00
Last time I checked, the above worked fine.
Torax
Adept
Posts: 406
Joined: Fri Apr 20, 2012 6:38 pm
Personal rank: Master of Coop
Location: Odessa, Ukraine

Re: Some stuff i playing with

Post by Torax »

@Ferali
Tnx, will check this stuff :)

About recompiling FF models to psk/psa - there are no further works if only there's no need to change poly flags.
Otherwise, there will be a great work reassigning materials and UV maps.

EDIT
One question. What is the best way to add delay after firing animation is played?
For example - I dont want to change firing animation speed, but firing sound mixed from two (fire sound and charge up sound - remember the quake 3 railgun firing sound?). I want to make weapon ready to fire again when "charging" part of sound is played.
Unreal. Alter your reality..forever...
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Some stuff i playing with

Post by Feralidragon »

Torax wrote: One question. What is the best way to add delay after firing animation is played?
For example - I dont want to change firing animation speed, but firing sound mixed from two (fire sound and charge up sound - remember the quake 3 railgun firing sound?). I want to make weapon ready to fire again when "charging" part of sound is played.
Well, in theory the best way would be to override the AnimEnd event within the NormalFire state (or AltFiring) and also in the ClientFiring one (or ClientAltFiring respectively), as the latter is the client version of the same state when it comes to animation and other client-side stuff, and then setup a timer there and in the Timer itself you would finish the firing state.
However, Epic messed that one *very very* badly, and they have client code in the TournamentPlayer class that forces the weapon to return to its default state after firing if the weapon is not running an animation, which means that in online play this Timer wouldn't work at all client-side.

So, in short, the best way is to somehow add a 2-frames animation (even if from one frame to another the weapon is stopped) which lasts exactly the amount of time you want for the delay. A TweenAnim also works well, as long as the last animation sequence name is different from the current one.
You call that animation in AnimEnd as well (like you would do with the timer), except for that you have to check in the AnimEnd itself which animation sequence it played last so you know when to leave the firing state (since otherwise the weapon will get stuck, as the AnimEnd event will get triggered over and over by your last delay animation).
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Some stuff i playing with

Post by papercoffee »

Torax wrote: About recompiling FF models to psk/psa - there are no further works if only there's no need to change poly flags.
Otherwise, there will be a great work reassigning materials and UV maps.
Sorry, I don't quiet understand.
Spectra
Masterful
Posts: 542
Joined: Tue Jan 22, 2013 5:23 pm
Personal rank: Nullified!
Location: (X) Unable To Locate....

Re: Some stuff i playing with

Post by Spectra »

What is the difference between playanim and tweenanim?? What actually tweenanim Does?? I remember I made a shotgun which delays the animation while loading.
What I did to delay the fire animation is that in MS3D I 1st set the 20 frames to play fire anim and next added extra 15 frames to play like still.

With this the gun will 1st play fire anim and then wait for some seconds to finish the anim with finishanim function. With that it will look like the gun will look like it is showing some delay for anims.

1 more question: what is a Sleep() function?? I have seen those in states like Normal Fire or Altfiring....
Torax
Adept
Posts: 406
Joined: Fri Apr 20, 2012 6:38 pm
Personal rank: Master of Coop
Location: Odessa, Ukraine

Re: Some stuff i playing with

Post by Torax »

papercoffee wrote:
Torax wrote: About recompiling FF models to psk/psa - there are no further works if only there's no need to change poly flags.
Otherwise, there will be a great work reassigning materials and UV maps.
Sorry, I don't quiet understand.
I mean that there is not so much work if you dont need to add specifical rendering for the parts of models (i.e translucent, two-sided, unlit polygons or set them to render textures environment mapped).
Like Ferali's stuff - some parts of models are visible in absolute darkness (Bolt Rifle parts), and some parts of models are environment mapped (like barrel of IRPR with it's shiny metal surface)
Unreal. Alter your reality..forever...
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Some stuff i playing with

Post by Feralidragon »

Rocky wrote:What is the difference between playanim and tweenanim?? What actually tweenanim Does?? I remember I made a shotgun which delays the animation while loading.
PlayAnim plays all the animation frames completely of the passed animation sequence, and at a rate that scales against the rate defined on the animation import/definition, in other words:
PlayAnim('DoStuff', 10, 0); - Will play the animation "DoStuff" at a rate of 10 times the rate of the animation on import (defined as RATE=<some number> in the exec import parameters of the animation sequences). So if the original rate of "DoStuff" was 1 frame per second, defining a rate of 10 will make the animation play at 10 frames per second.

TweenAnim, as the name implies, tweens between animation sequences instead. It makes a direct animated transition between the frame it was rendering at the time TweenAnim was called towards the first frame of the animation sequence you passed as argument, in other words:
TweenAnim('DoStuff', 5); - Will tween from the exact animation frame you were at to the first frame of "DoStuff", and it will take 5 seconds at doing so. Unlike PlayAnim, the second argument is not rate, but is instead the time that tween takes, in seconds, and it doesn't depend on the imported animation rate at all.

Rocky wrote:1 more question: what is a Sleep() function?? I have seen those in states like Normal Fire or Altfiring....
The Sleep function pauses the state code execution for X seconds, and it only really works in state code and nowhere else, and even in state code it has a few limitations.
In other words: Sleep(2); - Will pause the execution of state code in the actor for 2 seconds.
User avatar
papercoffee
Godlike
Posts: 10447
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: Some stuff i playing with

Post by papercoffee »

Torax wrote: I mean that there is not so much work if you dont need to add specifical rendering for the parts of models (i.e translucent, two-sided, unlit polygons or set them to render textures environment mapped).
Like Ferali's stuff - some parts of models are visible in absolute darkness (Bolt Rifle parts), and some parts of models are environment mapped (like barrel of IRPR with it's shiny metal surface)
Now I understand ... no the textures are pretty much flat shaded ...I plan to add a cell-shading to weapons and player models, therefore would be any non cartoon styled weapon surface unfitting.
Torax
Adept
Posts: 406
Joined: Fri Apr 20, 2012 6:38 pm
Personal rank: Master of Coop
Location: Odessa, Ukraine

Re: Some stuff i playing with

Post by Torax »

@Ferali
I've fixed the problem with delay between fire animations.
Used part of code from flak cannon script - it have calls to reload animation from firing anims, but replaced "reload" anim with "still" anim and increased it's TweenTime value.
Unreal. Alter your reality..forever...
Torax
Adept
Posts: 406
Joined: Fri Apr 20, 2012 6:38 pm
Personal rank: Master of Coop
Location: Odessa, Ukraine

Re: Some stuff i playing with

Post by Torax »

Reached some strange errors with skeletal stuff.
First of all, when i made an arena mutator to test weapon, few bugs occurred.

When i spawned at the level, i did not get weapon as my default weapon.
Replacer worked fine - weapons and ammo were changed to things i coded, bots also get weapon as their default weapon instantly. But at my point i spawned without weapon in hands - it was spawned separately at point of my respawn as normal pickup.

And second problem is the most weird. After i picked this weapon, on 1st person view it become visible as it have no animation at all - weapon and hand on both left side and right side instead it must look like i made it (left hand holding weapon under barrel and right hand on the grip with fire trigger) :wtf:
In some reasons, animation become unlinked from weapon. I noticed that if i use summon command and spawn weapon separately or pick it up from any other weapon respawn place - everything works fine.
Attachments
Shot0002.JPG
Shot0001.JPG
Unreal. Alter your reality..forever...
Post Reply