HomePortalFAQSearchMemberlistUsergroupsRegisterLog in
Making threads to link to banned members content grants an automatic ban
Meet the new KITO admins & hear their plans here.
You can use google search to find threads and posts here now. Example

Share | 
 

 Animated GUI textures

View previous topic View next topic Go down 
AuthorMessage
venw0lf

avatar

Game username : Venwolf
Server : Last Moon (Global Mod)
Female Posts : 107
Join date : 2015-05-14
Age : 15
Location : off the grid

PostSubject: Animated GUI textures   Sun May 07, 2017 3:19 am

So after a bit of thinking I decided I wanted to make an animated HP bar, just cause.
Just a simple shiny effect, nothing too crazy. I also wanted to see if it would be laggy ingame.

I used this to give me an idea of what I should do.

So I plopped it into my GUI material file with the necessary code
GUI code:
 

Each image file is named hpbar_1.jpg, hpbar_2.jpg, and so on.
However when I open it ingame... It's not the best.

It's laggy and messed up. I'm 10000% sure the images are in the correct order, everything is fine with the actual image sequence it's just. Not good.

I tried both rendering systems and it's still messed up.
I suppose I can just make a new layer in the material code and have the shine scroll, but I really wanted it to work this way. Sigh.

Anyone know what I'm doing wrong?
Back to top Go down
ObeyTheFist

™
avatar

Game username : ObeyTheFist
Server : Dragon's Den
Female Posts : 514
Join date : 2012-09-07
Location : Australia

PostSubject: Re: Animated GUI textures   Sun May 07, 2017 12:18 pm

Hello!

Okay, first off... I can see a problem here...

anim_texture hpbar.jpg 79 0.05
tex_address_mode clamp

You don't need to clamp that texture so you can remove that line.

But why do you have 2 numbers after the one texture name? If you have a sequence of animation textures so the shine goes smoothly across then you need to have:

anim_texture hpbar_1.jpg hpbar_2.jpg hpbar_3.jpg 0.05

Plus whatever other numbers you have, then the one number at the end that controls the speed at which the textures switch from one to the next.

I hope that helps!

~Obey~
Back to top Go down
http://dragonsden.freeforums.net
venw0lf

avatar

Game username : Venwolf
Server : Last Moon (Global Mod)
Female Posts : 107
Join date : 2015-05-14
Age : 15
Location : off the grid

PostSubject: Re: Animated GUI textures   Sun May 07, 2017 1:34 pm

That does help, thanks!
I read in the Ogre Manual that you could name your files
hpbar_1 hpbar_2 and so on
and then put how many of those images, in my case 79 frames so I put a 79 after it, like demonstrated in the manual, and then 0.05 for the length of time I want the frame to be playing.
It turns out that the amount of time the frames were playing was the issue, and I did remove the clamp thing. The time part worked a little differently than I thought. I still need to work on getting to know materials a little better, heh.

Thank you so much for helping me though~
Back to top Go down
ObeyTheFist

™
avatar

Game username : ObeyTheFist
Server : Dragon's Den
Female Posts : 514
Join date : 2012-09-07
Location : Australia

PostSubject: Re: Animated GUI textures   Mon May 08, 2017 12:22 am

No worries, glad to help!

There are some things in the Ogre manuals that just...don't quite work right with IT servers. ^^;

For instance the Ogre manual mentions directional lighting. Impressive Title never actually had that function at all. :/

You have over 70 frames for that HP bar? O_o That is...excessive. Should get together a few people with computers of differing strength to see how it handles that because for the average player's computer usually anything over 10 frames is laggy. It might not be so bad since the HP bar textures are only small, but...ouch. XD
Back to top Go down
http://dragonsden.freeforums.net
 
Animated GUI textures
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Keeping I.T. Open :: SUPPORT :: Support-
Jump to: