#Crop texture
78 messages Β· Page 1 of 1 (latest)
There is no way to do this directly in wa?
That's a atlas and if you wait for the next release it has atlas support
Texture WA already support using atlases. The only thing that's coming (if I understand correctly) is the ability to select atlases from a picker.
The trouble here may be that the regions of the image may not actually be existing atlases. Certainly back in Wrath Blizz used to just use TexCoords more often. I'm not sure when atlases were introduced.
AHH wotlk
If @nova scroll has atlas names then they should use them directly instead of a path/fileID for the whole image
I'm not sure I'm familiar with the atlas π is this something new?
A "texture atlas" is a term for what you're describing. A region within a larger image.
In the game's API this is also a system where texture regions are predefined with names that can be used in texture:SetAtlas(atlasName).
Unfortunately users can't add atlases so this can only be done for stuff that Blizz set up.
For anything of your own, or without a Blizz atlas, you'll need TexCoord
oh ok, but that should actually be fine in my case. Cause what I'm trying to do is build a custom UI but heavily inspired from the default one, just customised in different places
thanks a lot π
I'm going to try to see if the textures I need were exposed as atlases in wotlk
If TextureAtlasViewer (addon) works on Classic then that'll be a help.
Someone mentioned in another channel that apperantly the legion and earlier files and atlases being there, can you check that?
but I think you were right, the atlases in there were "bigger" images, e.g. I created a texture WA using the following Atlas:
and on the right you can see how it shows
there are quite a few atlases, Legion as well
ok, but I'm not sure I know now how I could crop a part of such an atlas (if that's possible). E.g. from the first picture, how could I crop to eventually end up just with the gryphon?
I understand I have to use some Lua, not sure on where to put it (custom init event maybe?)
It shows Zou a name, just using that name in a texture aura with maybe some checkbox, not sure right now, should give you that image.
But asakawa knows more there
AFAIK everywhere in WA that takes a path or fileID will accept an atlas name
if you use alpha version of weakauras you can just do this
Looks squished.
Nah, the interface is stretching it to square
Well, I can adjust it, beeing a bit squish is not a problem
preview is but region adapt size automatically
like
Just now you can also just use the name the add-on shows you
The alpha adds basically what the add-on does
try type hud-MainMenuBar-gryphon
but if i remember there are dirty offsets, which is fixed in alpha
This just looks like you aren't using the correct "clamp" setting
Or, not switching off Full Rotation
ok, I've exported the one I created so it may be easier to understand what I did
Sadly the clamp settings can't help with an atlas like this so you simply can't use full rotation
!WA:2!Dj1pVnnqu8u1HImsiAekirxqmWwk0k1o36uhcOK2OZUf2c357z7tC(oZ7oN2WyhqmNpczMP8jaXgBwrSYcIpb9taNDkDGB5EV397D)(9(Zg9BN3M3M)LNUWQJNcOrOv3B63UXcxzlr4TiTyKMdKEdpE0ysSwQX3SP7uSnxyIrWctqTLADPTbE1zjjgWo4iB1FA5oROL2mnEwr9ZgpwUarnMHZ(hUzhC(rTATXsQk2HBSwOSSEbNgfqwWbd1PaQfYMZKGI3id)HbNEYcesDFy0ScaVvNlfQenM3OdpwJIG3J04gIpKySu065lucRhlXDzY8U2II0uxf)GNJ3A(zhRSYKKMFEqWWX9pFOV15qOoLS)1McqkFn349BtjdMckBOdT4QLt6DCy0KWOJjr(Losyfs6maVd2yeCWiHJdgoK0eHnaOsBgrrZbJ38s1TsWRy7AvpfIw7xx1FTv1dlECwjV7iQqncuL(uSBkoRitRUX1ZaurLxSE4Dj5sb3M9R5uLyD)4WQh1VAhFLwbFhOgi0IGk1MT1kED)1HysDnIgiwR4MRRXu3bQ66N74ZLBv3QD3Q6fvVSApNzN)pYZe8vHI8cj8Q1AAUbKjntZQ7VmbDLOJtQLU5nRh09RdvtblShji40RVBfA)sbFz0hViwB9hCI8ccvwKr3CHRrsAg6MN0PANvoxgn(dPOUuXzzGinZ(Jf1YxSEvZxQP8((gXNGoK8sPv457MEXDQ89iXsQXuBXSu3MLTX0LCIi1RTHCWU7T7ETN(Z393
oh right right
You already have the atlas you want and can browse for more with TAV
thanks, it works with that π
if you need size without distortion
Aha, I was just typing up something regarding that
If you're putting in a browser then the atlas dimensions really do matter
yep, I noticed the width and height is in TAV, I'm going to rely on that π
@weak umbra Personally I'd want to see the images in the browser as the true atlas size, or at least the correct atlas dimensions, scaled up to fit. But also once selected the user needs to know the dimensions really.
it edit size of aura when you select (then you do whatever you want)
Oh it does? That's great
That's nice. Like WA can't easily compete with TAV's visual way of browsing for items but things like that definitely offer a reason to use it.
i love playing with this π
I did a quick thing in rehack for atlas scaling up, without warping. Just a proof of concept so can probably be cleaned up a bit
if not f then
f = CreateFrame("FRAME")
f.t = f:CreateTexture()
end
f:SetAllPoints("UIParent")
f:Show()
f.t:SetPoint("CENTER")
f.t:SetAtlas("_128-GoldRedButton-Center", true)
local w,h = f.t:GetSize()
if w > h then
local prop = 100/w
f.t:SetWidth(100)
f.t:SetHeight(h*prop)
elseif h > w then
local prop = 100/h
f.t:SetWidth(w*prop)
f.t:SetHeight(100)
else
f.t:SetSize(100, 100)
end
f.t:Show()
I take it Ace fights you on this stuff though?
im looking into it
I was scaling to 100x100 specifically
But yeah, I guess just finding the proportion of the 2 is simpler π
got it working with this
local atlasInfo = GetAtlasInfo(texturePath)
self.texture:SetAtlas(texturePath, false);
self.texture.IsAtlas = true
if atlasInfo.width > atlasInfo.height then
self.texture:SetSize(120, 120 * (atlasInfo.height / atlasInfo.width))
elseif atlasInfo.height > atlasInfo.width then
self.texture:SetSize(120 * (atlasInfo.width / atlasInfo.height), 120)
else
self.texture:SetSize(120, 120)
end
Very neat π
Yeah, right now, I'd use WA over TAV probably. Even for other projects.
where could I download the latest alpha version of WA? π
If you use Curse (or similar) then you can probably set your preferred version to Alpha. Just remember to set it back again later if you don't want to actually be alpha testing potentially broken stuff