WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Graphics Help (https://www.wowinterface.com/forums/forumdisplay.php?f=14)
-   -   Cutting up an frames image components (https://www.wowinterface.com/forums/showthread.php?t=34635)

v6o 08-26-10 07:00 AM

Cutting up an frames image components
 
2 Attachment(s)
So I'm trying to create a frame out of this image and I was thinking of cutting the image like this. Are there any other suggestions or recommendations, or would you do it differently? Would it be better to make it less parts and less scalable?

Image #2 shows the different image cuts which will then be saved as separate files.

xConStruct 08-26-10 08:57 AM

It won't make a difference, apart from file size (which should be neglectable).

I would make the stretched/tiled ones smaller, because they are repeated anyways.

You could also remove two of the corner pictures (leaving only topleft and bottomleft) and then mirror the textures in WoW:
texture:SetTexCoord(1, 0, 0, 1) would mirror it horizontally. I often use that because I'm too lazy to mirror and save them in my image application.

But that's just the web designer speaking in me - where file size matters :)

sacrife 08-26-10 09:05 AM

Yeah as a webdesigner, the top and left ones only need to be 1 pixel height/width as they can be replicated/stretched as you see fit.

Also the corners can be mirrored and the center color can just be produced manually with WHITE8x8 and a color for it.

Fodaro 08-26-10 09:30 AM

1 Attachment(s)
The way I would approach this is to try and turn it into a backdrop border. The attached image is the border for a chat bubble. In this case, the edgeSize property of the backdrop would be set to 32, so the image is divided up into 8 32x32 pixel squares (as marked). You will need bigger squares, looking at the sizes involved. From left to right the squares are for: left border, right border, top border, bottom border (these two appear to be rotated), top left corner, top right corner, bottom left corner, and bottom right corner.

What I would do, (although I've never done this before), is turn your image into a border like this one. You'd probably want 128x128 pixel squares, and you might have to tweak some distances slightly, but then you could make your frame any size you like, and have the border still work fine. It looks like your background is solid color, so you might not even need an image for that.

Finally, you could use it like any other backdrop, for example:
lua Code:
  1. frame:SetBackdrop({
  2.     bgFile   = [[Interface\AddOns\MyStarTrekAddOn\frameBg]],
  3.     edgeFile = [[Interface\AddOns\MyStarTrekAddOn\frameBorder]],
  4.     edgeSize = 128,
  5.     insets   = { left = 128, right = 128, top = 128, bottom = 128 }
  6. }
  7. frame:SetBackdropColor(1, 1, 1, 1)
  8. frame:SetBackdropBorderColor(1, 1, 1, 1) -- if you like, you could even make the image monochrome, then tint it how you like.

As I say, never done this before, so might need a bit of tweaking. If you get it working, please post to say how you did it :).

Hope this helps,

v6o 08-26-10 07:42 PM

2 Attachment(s)
I actually ran into trouble years back where tiling a smaller image was more demanding on the computer than tiling an slightly larger one. That's why still do it like that. Probably rarest you've ever heard but it happened to me, don't remember more details than that.

This interface does not have all detail into it yet and some parts will change depending on which window/frame that is open. I'm not sure when I'll put in all the details but I don't want to restrict myself early on and having to redo it later.

Fodaro, if WoW accept images larger than 512px then I could do like that but otherwise it's gonna be hard fitting some parts into the backdrop.

Here's an example of the ingame map in Borderlands. I know it's slimmer and has more details and that's what I'm aiming towards but I copied the main game menu which was bigger in size and was good enough just to test it ingame.

Fodaro 08-27-10 03:27 AM

1 Attachment(s)
Quote:

Originally Posted by v6o (Post 203972)
Fodaro, if WoW accept images larger than 512px then I could do like that but otherwise it's gonna be hard fitting some parts into the backdrop.

Ah, good point, but is it that WoW won't accept image files bigger than 512x512, or textures bigger than 512x512?

I'm not sure which, but if it is the files after all, then everything will fit into 64x64 squares apart from the bottom corners. So, you can either change the size of the corners, or, since you don't appear to be using transparency, manually position two textures in the right place (shown by the red squares on the attachment) and use a border for the rest (shown by white squares).

ravagernl 08-27-10 06:19 AM

Quote:

Originally Posted by v6o (Post 203972)
I actually ran into trouble years back where tiling a smaller image was more demanding on the computer than tiling an slightly larger one. That's why still do it like that. Probably rarest you've ever heard but it happened to me, don't remember more details than that.

Iirc that happened with IE5 and 5.5, right?

You could also use Phanx's way of doing this (She creates 8 textures and anchors/colors them with functions, see oUF_Phanx).

zork 09-03-10 06:09 AM

Minimum size of texture is 8 !!! A width/height of 1 will not show you anything.
The texture when done must be a multiplier of 8. So 8/16/32/64/128/256/512/1024/2048

2048x2048 is max in WotLK and 8x8 is min.


All times are GMT -6. The time now is 08:31 PM.

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