WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Graphics Help (https://www.wowinterface.com/forums/forumdisplay.php?f=14)
-   -   I need a cooldown texture (https://www.wowinterface.com/forums/showthread.php?t=48854)

Duugu 01-23-14 06:12 AM

I need a cooldown texture
 
I'm looking for a cooldown texture that is 'comprised' of single images to manually animate a cooldown via SetTexCoodinates.

What I'm looking for is like this:

What I need is a square/cooldown style version.

I could build one by myself. But I don't know how, exept building it manually image for image. Which would be a lot of work. :/

Has someone a texture like this available and would provide me with it, or does someone know how to build these textures without doing every Frame by hand?

Thank you.

Phanx 01-23-14 07:09 AM

OPie does a "fake" cooldown like that (eg. using textures, not an actual cooldown object). You could take a look to see how that works, though I should warn you the code is rather... let's just go with "interesting". :p

Dridzt 01-23-14 07:59 AM

I think rather than creating a bunch of different graphics cropping will serve you better.

Zork has posted rather extensively on how to achieve ring effects here.
http://www.wowinterface.com/forums/s...highlight=ring

Duugu 01-23-14 09:02 AM

Thank you both of you.

Having a quick peek into the OPie code I would say it's basically the same way as with Zork's implementation (cooldown is build out of 9 triangular textures).
I know this way, but I would like to realize it with pre-build textures.

I'm rotating the cooldowns parent object via animation groups, which is working fine with a single texture object that is anchored to the center of it's parent.
Building a cooldown out of several anchored/rotated/croped textures would most likely not work with this, or would at least raise new problems. :) Supposably it would cost me more time to fix them, than to completely create the needed texture by hand. :D

Example:
This is what happens with the flyout background texture (which is not anchored to the center) if the button is rotated. So I would like to do it as simple as possible. :)

Dridzt 01-23-14 09:31 AM

I have a feeling it might be better if you just hide select textures.
The flyout background seems like a prime candidate for that.

elcius 01-26-14 03:02 AM

1 Attachment(s)
I made one of these ages go to use on nameplates, It's made of 345 64x64 frames.
Lua Code:
  1. local n = floor(345*p);
  2. Texture:SetTexCoord(
  3.     0.001953125*n,0,
  4.     0.001953125*n,1,
  5.     0.001953125*(n+1),0,
  6.     0.001953125*(n+1),1
  7. )

Resike 01-26-14 05:27 AM

Quote:

Originally Posted by elcius (Post 290209)
I made one of these ages go to use on nameplates, It's made of 345 64x64 frames.
Lua Code:
  1. local n = floor(345*p);
  2. Texture:SetTexCoord(
  3.     0.001953125*n,0,
  4.     0.001953125*n,1,
  5.     0.001953125*(n+1),0,
  6.     0.001953125*(n+1),1
  7. )

What kinda virus is that, it can't even run properly. But seriously something is wrong with the files.

Duugu 01-26-14 07:56 AM

Thank you so much Elcius. This saves me so much time.

Interesting side note: I was sure wow expects textures to be in a square format. oO
Learned something. :)

Thanks again.

Choonstertwo 01-26-14 09:21 AM

Quote:

Originally Posted by Duugu (Post 290226)
Thank you so much Elcius. This saves me so much time.

Interesting side note: I was sure wow expects textures to be in a square format. oO
Learned something. :)

Thanks again.

The only limitations on the dimensions of textures is that they have to be powers of 2 and can't be larger than 1024.

There's a lot more information about WoW-compatible textures in this guide.

Duugu 01-26-14 10:37 AM

Quote:

Originally Posted by Choonstertwo (Post 290228)
The only limitations on the dimensions of textures is that they have to be powers of 2 and can't be larger than 1024.

Well, even if this sounds familar it can't be true. Elcius' texture file has a size of 32,768 x 64 pixels and does work. Strange but true. :)

[e] I can remember that I used a texture like ... 2048 x 2048 or something years ago with CursorCastBar which reproduceable crashed the Mac client. Don't know if or when this was fixed. Would be nice to know what happens with Elcius' texture file when used on a Mac. Anyone with a Mac client here who could try it?

Choonstertwo 01-26-14 10:40 AM

Quote:

Originally Posted by Duugu (Post 290229)
Well, even if this sounds familar it can't be true. Elcius' texture file has a size of 32,768 x 64 pixels and does work. Strange but true. :)

That's odd. I've never tested the limits myself, I just assumed the guide was accurate.

Duugu 01-26-14 10:44 AM

Quote:

Originally Posted by Choonstertwo (Post 290230)
That's odd. I've never tested the limits myself, I just assumed the guide was accurate.

Me too. Guess my expression when it does load was somewhat priceless. :)

Resike 01-26-14 12:50 PM

Quote:

Originally Posted by Duugu (Post 290229)
Well, even if this sounds familar it can't be true. Elcius' texture file has a size of 32,768 x 64 pixels and does work. Strange but true. :)

[e] I can remember that I used a texture like ... 2048 x 2048 or something years ago with CursorCastBar which reproduceable crashed the Mac client. Don't know if or when this was fixed. Would be nice to know what happens with Elcius' texture file when used on a Mac. Anyone with a Mac client here who could try it?

I can't even open the textures, drops some unknow size issue.

Duugu 01-26-14 01:26 PM

Quote:

Originally Posted by Resike (Post 290234)
I can't even open the textures, drops some unknow size issue.

http://www.getpaint.net/ will open it.

Nimhfree 01-26-14 02:17 PM

Quote:

Originally Posted by Duugu (Post 290229)
Well, even if this sounds familar it can't be true. Elcius' texture file has a size of 32,768 x 64 pixels and does work. Strange but true. :)

[e] I can remember that I used a texture like ... 2048 x 2048 or something years ago with CursorCastBar which reproduceable crashed the Mac client. Don't know if or when this was fixed. Would be nice to know what happens with Elcius' texture file when used on a Mac. Anyone with a Mac client here who could try it?

If you have an addon to run I will test it out for you. Just let me know where to get the addon.

Duugu 01-27-14 08:46 AM

1 Attachment(s)
Quote:

Originally Posted by Nimhfree (Post 290237)
If you have an addon to run I will test it out for you. Just let me know where to get the addon.

Here we go. It just creates two frames anchored to UIParent center. Tank you.

The left one has a size of 4096 x 4096 and the right one is 32,768 x 64.
The first one crashed the Mac client (or some client setups at least ... not sure about that :/) back in 2010. I removed it from my addon and replaced it with a 1024x1024 version which seemed to solve the problem.

zork 01-28-14 02:37 AM

What you are trying to do is sth I did in this mod ages ago:
http://www.wowinterface.com/download...07-Disco2.html

Basically a huge sprite frame that changes the SetTexCoord based on a value. But for me it did not work that well (not smooth enough and problems with smooth animation on bad FPS). Imo WoW can handle 1024x1024 just fine. >= 2048x2048 depends on your PC I guess.

But why would you create 300+ images nowadays and manipulate them manually in first place?

To create a full ring you need two 180° rings and 2 scrollframes. The only thing that is left is an Update function that changes the texture rotation. Plus if you are using animationgroups on your texture you do not have to do that either. You can just run a linear animation loop with an OnFinished function to fix your textures.

Lightspark and I have discussed that here: http://www.wowinterface.com/download...age=2#comments

I can set up an example for you if you like. Should be that hard to get a cooldown ring running.

p.s. I'm talking about animating a simple ring texture...if you are talking about rotating a full set of actionbuttons I'm out. :)

Duugu 01-28-14 06:00 AM

Quote:

Originally Posted by zork (Post 290266)
What you are trying to do is sth I did in this mod ages ago:
http://www.wowinterface.com/download...07-Disco2.html

Basically a huge sprite frame that changes the SetTexCoord based on a value. But for me it did not work that well (not smooth enough and problems with smooth animation on bad FPS). Imo WoW can handle 1024x1024 just fine. >= 2048x2048 depends on your PC I guess.

But why would you create 300+ images nowadays and manipulate them manually in first place?

To create a full ring you need two 180° rings and 2 scrollframes. The only thing that is left is an Update function that changes the texture rotation. Plus if you are using animationgroups on your texture you do not have to do that either. You can just run a linear animation loop with an OnFinished function to fix your textures.

Lightspark and I have discussed that here: http://www.wowinterface.com/download...age=2#comments

I can set up an example for you if you like. Should be that hard to get a cooldown ring running.

p.s. I'm talking about animating a simple ring texture...if you are talking about rotating a full set of actionbuttons I'm out. :)

Thanks for replying. Actually I do rotate all Blizzard action buttons and all their contents to create a kind of 'bezier style action bar'.

Actually I didn't was aware of your scrollframe approach. Thanks for pointing this out. I'm not sure if this will work. I'll have to rotate the two scrollframes via an animation. Semlar stated here http://www.wowinterface.com/forums/s...ad.php?t=48798 that rotating a scrollframe would not work as expected. Didn't tried it though.

At the Moment I'm fine with the 'sprite' approach. It's working. And there are several other Problems to solve with my action bar approach. I'll get in touch with the cooldown problem to optimize it if everything else is working too. :)

zork 01-28-14 06:33 AM

Yeah...rotating a ScrollFrame itself is a really bad idea. You can do that if you are into arts and stuff ... because art is what you get. :p

Currently I use animationgroups on textures that are anchored to the scrollchild of a scrollframe. That works pretty well.

Duugu 03-15-14 12:27 PM

I ended up with building the cooldown image set myself. (I need single files, transparent border, etc.)

It took me a while to search for a usefull approach to build the files. So I just thought I should add a few lines over here showing my solution for everyone else who needs to do this in the future. :)

An easy way to build image files is a very simple and small vb.net app. Like this one:

Code:

Dim blackPen As New Pen(Color.Black, 1)
Dim filePath As String = "E:\CD\"
Dim count As Integer = 0
Dim bmp As Bitmap = New Bitmap(64, 64)
Dim g As Graphics = Graphics.FromImage(bmp)

g.Clear(Color.Transparent)
bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
count = count + 1

For x = 32 To 62
  g.DrawLine(blackPen, 32, 32, x, 1)
  bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
  count = count + 1
Next
For x = 1 To 62
  g.DrawLine(blackPen, 32, 32, 62, x)
  bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
  count = count + 1
Next
For x = 62 To 1 Step -1
  g.DrawLine(blackPen, 32, 32, x, 62)
  bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
  count = count + 1
Next
For x = 62 To 1 Step -1
  g.DrawLine(blackPen, 32, 32, 1, x)
  bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
  count = count + 1
Next
For x = 1 To 32
  g.DrawLine(blackPen, 32, 32, x, 1)
  bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
  count = count + 1
Next

It builds image files for a 64x64 cooldown fake-animation.

The Graphics class provides a lot of drawing functions. You can use them to build fake-animations for lot of different custom shapes.


All times are GMT -6. The time now is 03:05 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI