Quantcast Artis wanted round two - WoWInterface
Thread Tools Display Modes
05-01-16, 04:18 PM   #1
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Artis wanted round two

Since my request for recolorization of my icon was so succesful, I thought I'd try my luck with a background texture.

Attached is a .tga called white marble, which I want to use with LibSharedMedia as, you guessed it, a background!

The problem is that is shows up as entirely green. I'm guessing that means it isn't compatible, and I have no idea how to fix that. That image is also attached.

Any and all help greatly appreciated!
Attached Thumbnails
Click image for larger version

Name:	green.jpg
Views:	222
Size:	131.7 KB
ID:	8719  
Attached Files
File Type: tga white marble.tga (1.06 MB, 164 views)
  Reply With Quote
05-01-16, 04:22 PM   #2
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 425
This texture is not scaled to a power of 2. It needs to be either 1024x1024 or 2048x1024 or 2048x2048 if you really want it to be that big.
__________________
  Reply With Quote
05-01-16, 04:33 PM   #3
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Is it as simple as cropping or exporting in Gimp? Yeah, I have Gimp, but I am a near total newbie.
  Reply With Quote
05-01-16, 04:38 PM   #4
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Taking a guess, I set the canvas size to 1024x1024. The original image had an odd numbered coordinate. Trying to see if this works now.

Edit: still green

Last edited by myrroddin : 05-01-16 at 04:45 PM. Reason: still green
  Reply With Quote
05-01-16, 05:19 PM   #5
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 425
This should work.

white marble (1).tga
__________________
  Reply With Quote
05-01-16, 05:54 PM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Weird. While I'm sure there is nothing wrong with your copy, it doesn't seem to work for me. "Blizzard Marble" works fine on line 16, but "White Marble" does not.

My main chunk has the following.
Lua Code:
  1. -- register font & background with LibSharedMedia-3-0
  2. LSM:Register("font", "Roman SD", "Interface\\AddOns\\MyrroUI\\Media\\Roman SD.ttf")
  3. LSM:Register("background", "White Marble", "Interface\\AddOns\\MyrroUI\\Media\\white marble.tga")
  4.  
  5. function MyrroUI:OnInitialize()
  6.     -- called in MUI_Installer.lua
  7.     self.installer = self.installer or self:CreateInstaller()
  8. end

And MUI_Installer.lua

Lua Code:
  1. function MyrroUI:CreateInstaller()
  2.     -- create Installer window ----------------------
  3.     local width = UIParent:GetWidth() / 2
  4.     local height = UIParent:GetHeight() / 2
  5.     local f = f or CreateFrame("Frame", "MyrroUIInstallerFrame")
  6.     f:SetFrameStrata("MEDIUM")
  7.     f:SetMovable(true)
  8.     f:SetUserPlaced(false)
  9.     f:SetClampedToScreen(true)
  10.     f:SetSize(width, height)
  11.     f:ClearAllPoints()
  12.     f:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
  13.  
  14.     -- frame backdrop ---------------------------
  15.     f:SetBackdrop({
  16.         bgFile = LSM:Fetch("background", "Blizzard Marble"),
  17.         edgeFile = LSM:Fetch("border", "Blizzard Achievement Wood"),
  18.         tile = false, tileSize = 20, edgeSize = 130,
  19.         insets = {left = 0, right = 0, top = 0, bottom = 0}
  20.     })
  21.    
  22.     -- "Myrro UI" -------------------------------
  23.     local fo1 = f:CreateFontString()
  24.     fo1:SetFont(LSM:Fetch("font", "Roman SD"), 24, nil)
  25.     fo1:SetPoint("BOTTOM", f, "TOP", 0, -24)
  26.     fo1:SetText("Myrro UI")
  27.     fo1:SetTextColor(201, 137, 16, 1)
  28.    
  29.     -- version text -----------------------------
  30.     local fo2 = f:CreateFontString()
  31.     fo2:SetFont(LSM:Fetch("font", "Roman SD"), 18, nil)
  32.     fo2:SetPoint("TOP", fo1, "BOTTOM")
  33.     fo2:SetText(version)
  34.     fo2:SetTextColor(168, 168, 168, 1)
  35.    
  36.     -- "Installer" ------------------------------
  37.     local fo3 = f:CreateFontString()
  38.     fo3:SetFont(LSM:Fetch("font", "Roman SD"), 18, nil)
  39.     fo3:SetPoint("TOP", f, "BOTTOM", 0, 36)
  40.     fo3:SetText(L["Installer"])
  41.     fo3:SetTextColor(150, 90, 56, 1)
  42.    
  43.     return f
  44. end
  Reply With Quote
05-01-16, 07:51 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,655
Are you closing the game and restarting? Images are only loaded into memory once.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-01-16, 08:01 PM   #8
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Originally Posted by Seerah View Post
Are you closing the game and restarting? Images are only loaded into memory once.
I did not know that, but coincidentally, yes I am.

Attached is my latest version of the file. Based on Google, I have resized to a maximum of 512x512 and made sure to add an Alpha layer.

Then I found an old thread, and checked file paths. I have tried a few variants of the following, again with no success.

For example, with "" instead of [[]] or one \ or \\ and with and without the extension.
Code:
LSM:Register("background", "White Marble", [[Interface\AddOns\MyrroUI\Media\white marble]])
Attached Files
File Type: tga white marble .tga (205.8 KB, 111 views)
  Reply With Quote
05-01-16, 08:05 PM   #9
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
I don't know if this is related, by as soon as I replaced the background from LibSharedMedia's built in "Blizzard Marble", the font colour stopped working, and has never recovered. You can see the assigned colour in the CreateInstaller() function linked above. The colour for all three text lines display as white.

They are supposed to be gold, silver, and bronze, in order.

I am going to try forcing those as in-line hex colourization.
  Reply With Quote
05-01-16, 08:05 PM   #10
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,655
Rename to white_marble (just to take care of any chance that it doesn't like the space) and put .tga at the end of the file path.

(edit: the space shouldn't matter, though)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-01-16, 08:15 PM   #11
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
For sheer redundancy, I renamed both the font and the image to remove spaces. RomanSD.ttf and WhiteMarble.tga are the actual file names.
Code:
LSM:Register("font", "Roman SD", "Interface\\AddOns\\MyrroUI\\Media\\RomanSD.ttf")
LSM:Register("background", "White Marble", "Interface\\AddOns\\MyrroUI\\Media\\WhiteMarble.tga")
The font is correct, if bleached of all colour. Still the green image instead of a background.
  Reply With Quote
05-01-16, 08:22 PM   #12
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Oh yes, here the new in game image for reference. If you look at the first post, the text "MyrroUI Developer" was on one line, and gold. I created some additional text.

Here is what it looks like now. Green background and bleached text colour. And I'm stumped on both.
Attached Thumbnails
Click image for larger version

Name:	still green.jpg
Views:	177
Size:	131.7 KB
ID:	8722  
  Reply With Quote
05-01-16, 08:32 PM   #13
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,133
You did completely exit the game before adding/changing the file name?

That and incompatible format are the two main reasons people get green textures.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
05-01-16, 08:47 PM   #14
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Originally Posted by Fizzlemizz View Post
You did completely exit the game before adding/changing the file name?

That and incompatible format are the two main reasons people get green textures.
I went as far as the Launcher, although now not even that is running, so I can try again. Took a break for a few minutes before I did the /headdesk manoever.

Yeah, I've heard incorrect naming, bad file paths (still confused which is correct -- maybe that's it?) in the Lua code, and incompatible file formats (which is why I attached my image file).

Knowing Murphy and his law, it will end up being something stupidly simple to fix, and I'm just not spotting it right now.

Last edited by myrroddin : 05-01-16 at 08:48 PM. Reason: grammar!
  Reply With Quote
05-01-16, 09:07 PM   #15
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
I'm beginning to wonder if the image has too many colours, or something like that. Colour depth of 256, according to the Wowace thread.

Edit: Nope. Turns out the original was greyscale, and I changed the mode to RGB. Phooey!

Last edited by myrroddin : 05-01-16 at 09:15 PM.
  Reply With Quote
05-01-16, 09:28 PM   #16
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,655
Is it RGB with an alpha layer? A 32-bit .tga, not a 24-bit one?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-01-16, 10:01 PM   #17
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,133
Marble.tga

try this one.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
05-01-16, 10:47 PM   #18
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Originally Posted by Fizzlemizz View Post
Attachment 8723

try this one.
SUCCESS!! What did you do? Now I have to fix the font colours, and I'm set.

TY TY TY TY TY
Attached Thumbnails
Click image for larger version

Name:	success.jpg
Views:	171
Size:	176.8 KB
ID:	8724  
  Reply With Quote
05-01-16, 10:50 PM   #19
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,133
Changed it to RGB, resized to 512x512 and added an alpha chanel.

I'm glad you're up-and-running

Edit: for future. With Gimp I resized the image Munk uploaded to 512x512* then created a new image set to 512x512, and in the advanced setting of creating a new image set "color space" to RGB and set the "fill with" to transparency. Copied, pasted and exported to .tga using the default settings.

* (I have a memory of reading somewhere that 512 was the laregest wow would except but that may have changed)
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 05-01-16 at 11:38 PM.
  Reply With Quote
05-01-16, 11:26 PM   #20
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,037
Damn, I thought I had done all that, but I guess it didn't save in the export process.

Once again, thank you EVERYBODY for helping fix this. It was driving me bonkers!!

Here is the finished, but unpopulated with options, product. I fixed the text colours with hex codes.

Colour codes link, because it is awesome: http://www.colourlovers.com/palette/..._silver_bronze

And my code, in case someone wants to do this again, and needs help.
Lua Code:
  1. function MyrroUI:CreateInstaller()
  2.     -- create Installer window ----------------------
  3.     local width = UIParent:GetWidth() / 2
  4.     local height = UIParent:GetHeight() / 2
  5.     local f = f or CreateFrame("Frame", "MyrroUIInstallerFrame")
  6.     f:SetFrameStrata("MEDIUM")
  7.     f:SetMovable(true)
  8.     f:SetUserPlaced(false)
  9.     f:SetClampedToScreen(true)
  10.     f:SetSize(width, height)
  11.     f:ClearAllPoints()
  12.     f:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
  13.  
  14.     -- frame backdrop ---------------------------
  15.     f:SetBackdrop({
  16.         bgFile = LSM:Fetch("background", "White Marble"),
  17.         edgeFile = LSM:Fetch("border", "Blizzard Achievement Wood"),
  18.         tile = false, tileSize = 20, edgeSize = 130,
  19.         insets = {left = 8, right = 8, top = 8, bottom = 8}
  20.     })
  21.    
  22.     -- "Myrro UI" -------------------------------
  23.     local fo1 = f:CreateFontString()
  24.     fo1:SetFont(LSM:Fetch("font", "Roman SD"), 24, nil)
  25.     fo1:SetPoint("BOTTOM", f, "TOP", 0, -24)
  26.     fo1:SetText("|cFFC98910Myrro UI|r") -- gold
  27.    
  28.     -- version text -----------------------------
  29.     local fo2 = f:CreateFontString()
  30.     fo2:SetFont(LSM:Fetch("font", "Roman SD"), 18, nil)
  31.     fo2:SetPoint("TOP", fo1, "BOTTOM")
  32.     fo2:SetText("|cFFA8A8A8" .. version .. "|r") -- silver
  33.    
  34.     -- "Installer" ------------------------------
  35.     local fo3 = f:CreateFontString()
  36.     fo3:SetFont(LSM:Fetch("font", "Roman SD"), 18, nil)
  37.     fo3:SetPoint("TOP", f, "BOTTOM", 0, 36)
  38.     fo3:SetText("|cFF965A38" .. L["Installer"] .. "|r") -- bronze
  39.    
  40.     return f
  41. end
Attached Thumbnails
Click image for larger version

Name:	done.jpg
Views:	398
Size:	169.1 KB
ID:	8725  
  Reply With Quote

WoWInterface » Developer Discussions » Graphics Help » Artis wanted round two

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off