Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/23/26 19:08
WFO Training with parallel cores Zorro64
by Martin_HH. 02/23/26 15:29
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (TipmyPip, tomaslolo, AndrewAMD, Martin_HH), 5,190 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 6 1 2 3 4 5 6
Easy animations #326551
06/01/10 16:18
06/01/10 16:18
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
jcl please can you make the way we make smooth blending between scenes easier? Most of people need smooth changing between animations, not terrible like ent_animate works frown please can you make ent_blend(or ent_blendframe for bones) work like ent_animate? I mean, we just call it, and it will work smoother? Not for blending animations, but for smoother changing between them. I'm just asking for some thing like vec_set and vec_lerp. For me they work same, but in vec_lerp you can set the speed and force of the setting vector. So I'm asking for staff like that. So it can work just like this:
Code:
ent_animate(my,"walk",walk_,ANM_CYCLE,0.5);
// so 0.5 is a smooth changing between animations
// but if you do not want smooth you can play with 0.5


And I already asked to help me with working with ent_blendframe, but no one carries... So what I suppose to do then? I can make simple smooth animations between walk,run and stand with ent_blend (for vertex and bone animations), but it is really hard for me to add more animations to it(and not only for me, but for all beginners I guess), it needs state machine, that tells ent_blend (or ent_blendframe for bones) when to start and when to stop each animations.... but if I have 100 animations?? I'll need to tell ent_blend when to start and stop for each animations?! I think better just to make it easier for every one. Thank you and sorry for bad English. With hope greetings TRACER.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Easy animations [Re: 3run] #326553
06/01/10 16:24
06/01/10 16:24
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
sooo... what is the diffrence between this and ent_blendframe?


3333333333
Re: Easy animations [Re: Quad] #326555
06/01/10 16:31
06/01/10 16:31
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
You mean between ent_blend and ent_blendframe? Or between ent_blendframe and the thing I'm asking for? laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Easy animations [Re: 3run] #326557
06/01/10 16:37
06/01/10 16:37
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
between ent_blendframe and what you are asking for.


3333333333
Re: Easy animations [Re: Quad] #326560
06/01/10 16:50
06/01/10 16:50
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I do not know how to work with ent_blendframe dude. But I heard that is just the same as ent_blend, but only for bone animations. That means that it will need state machine too... the thing that I'm asking for, will work just simple like this:
Code:
///////////////////////
if(key_w)
{
  ent_animate(my,"walk",walk_,ANM_CYCLE,0.5);
  walk_ += 5 * time_step;
}
else
{
  ent_animate(my,"stand",stand_,ANM_CYCLE,0.5);
  stand_ += 2 * time_step;
}
///////////////////////


As you see, it is just simple as usual ent_animate, but there will be smooth blending between scenes. And it is really easy to use it this way. If you do not need smooth blending between scenes, but need ugly changing between them, then just play with "0.5". No need to make state macine for it, no need to tell ent_blend (or ent_blendframe for bone animatios) exactly when to start and when to stop animations. Very easy and fast.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Easy animations [Re: 3run] #326564
06/01/10 16:59
06/01/10 16:59
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
hmm i understand your consideration about state machines but you can overcome this easily

define all your scene names as STRING* and then use ie.

STRING* anim_frame;
STRING* anim_frame_old;
STRING* anim_walk = "walk";
STRING* anim_stand = "stand";
... and so on
then:

if(key_w){
if(anim_frame!=anim_frame_old)anim_frame_old = anim_frame;
anim_frame = walk;
}
else{
if(anim_frame!=anim_frame_old)anim_frame_old = anim_frame;
anim_frame = stand;
}

and at the end of your action

if(anim_frame_old!=NULL){
start blending here
if( blending finishes) anim_frame_old = NULL;
}

ent_animate(..,anim_frame,..,..);

etc.

you can create a system of yourself for easy blending....

and if you do not want to repeat same lines either write a macro or a function like

void set_anim(STRING* animpointer){
if(anim_frame!=anim_frame_old)anim_frame_old = anim_frame;
anim_frame = animpointer;
}

and use set_anim(walk); etc...


3333333333
Re: Easy animations [Re: Quad] #326565
06/01/10 17:02
06/01/10 17:02
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Can you explain it more? laugh And in an other may be an easier way, my English is just sucks) But even so, don't you think that making ent_animate, as I sad will be mush easier for every one?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Easy animations [Re: 3run] #326568
06/01/10 17:14
06/01/10 17:14
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
As far as I understand, what you want is ent_blendpose?


Re: Easy animations [Re: jcl] #326573
06/01/10 17:40
06/01/10 17:40
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I do not need blend bones or to have two different animation at the same time. I just need smooth changing between animations. Same to use as ent_animate, but with smooth blending between animations and to be able to toggle smooth changing. Like as I sad: ent_animate(my,"walk",walk_,ANM_CYCLE,0.5);


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Easy animations [Re: 3run] #326587
06/01/10 19:00
06/01/10 19:00
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Please ignore this meaningless ramble.....
Have you tried smaller steps than 0.5? Like 0.1 or even lower?
Or am I completely off the track here?

[EDIT] And as a point of interest, in your example you have PERCENT and MODE backwards.
Mode is last, Percent second last. ie "ent_animate(my,"walk",walk_,0.5,ANM_CYCLE);"

If this is just a posting typo, just ignore me.
But IF this sort of typo is in your code, the compiler may not notice, but it certainly wont work correctly...


[EDIT-2] I was wrong, the parameters arent in the wrong order, there is just too many!
I would expect that to fail to compile, but it is in the thread too many times to
be a mere typo I think...



Last edited by EvilSOB; 06/01/10 19:53.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 1 of 6 1 2 3 4 5 6

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1