Quantcast Any way to know a game texture's dimension? - ESOUI
Thread Tools Display Modes
05/06/14, 10:52 AM   #1
ZunaSW
Join Date: Mar 2014
Posts: 37
Any way to know a game texture's dimension?

Hi! Sorry my english.
I wanted to know if there is a way to know the dimensions of one of the textures in the game, especially the ones of the UI. I know there is a list of the textures in the game and I thank it, it helped me a lot, but it doesn't say the dimensions of them.
Can I get the dimensions with the Zgoo addon? Or is there another way to get them?
Thank you!
  Reply With Quote
05/06/14, 04:22 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 853
Originally Posted by ZunaSW View Post
Hi! Sorry my english.
I wanted to know if there is a way to know the dimensions of one of the textures in the game, especially the ones of the UI. I know there is a list of the textures in the game and I thank it, it helped me a lot, but it doesn't say the dimensions of them.
Can I get the dimensions with the Zgoo addon? Or is there another way to get them?
Thank you!
Usually it is just textureControl:GetDimensions(), but if you do not know exact name, its better to use Zgoo.
Move mouse cursor over the object you want to inspect and type /zgoo mouse. It will show you all available methods for that object. Find GetDimensions() and click on ":" next to it. It will show you width and height of that object.
__________________
@Garkin (retired from ESO)
My addons: SkyShards, LoreBooks, Dustman, Map Coordinates, No, thank you!, ... (full list)

Last edited by Garkin : 05/06/14 at 04:25 PM.
  Reply With Quote
05/06/14, 06:31 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 651
That would give you the dimensions of the control, not the actual texture file that the control is displaying. afaik, there is no such way.
  Reply With Quote
05/06/14, 06:43 PM   #4
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
Which textures specifically do you want to know? I have converted a bunch of them to PNG files so I know these ones.
__________________
Author: AI Research Grid | Awesome Info
  Reply With Quote
05/07/14, 06:23 AM   #5
ZunaSW
Join Date: Mar 2014
Posts: 37
Oh, Zgoo helped me, but it says 1985 (a lot of numbers here), 1488 (a lot of numbers here), I think that is not the dimension of the texture, because I think it is not a valid dimension for a dds file, or I am wrong?

I wanted to know the dimensions of the health, stamina and magicka frames (I know there are three frames, center, left and right) textures. Also the compass three frames too (center, left and right). If I'm not wrong, each frame has a different texture.

Thank you!

EDIT: I'm watching the icons in the Image Viewer of Wykkyd Framework, I give you the .dds path of those I think the texture I'm looking for, but maybe they are not all of them, I can't find the diferent frames.

- /esoui/art/unitattributevisualizer/attributebar_small_frame.dds
- /esoui/art/unitframes/target_health_frame.dds

Last edited by ZunaSW : 05/07/14 at 08:01 AM.
  Reply With Quote
05/07/14, 08:56 AM   #6
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 185
It should be kinda easy to solve this.

Make a Control with a Texture Control within.
Set the Dimensions to 1x1.
Set SetResizeToFitFile and SetResizeToFitDescendents to true, load the texture and get the new dimensions.
  Reply With Quote
05/07/14, 09:43 AM   #7
ZunaSW
Join Date: Mar 2014
Posts: 37
Originally Posted by Iyanga View Post
It should be kinda easy to solve this.

Make a Control with a Texture Control within.
Set the Dimensions to 1x1.
Set SetResizeToFitFile and SetResizeToFitDescendents to true, load the texture and get the new dimensions.
Hmm... Its a good idea, but, how can I set the file which will be the texture resized? What I want to say is: we say to the texture to be resized to fit a file, but, what file? I have this in my lua:

Code:
Tex01 = wm:CreateControl(nil, Tex01, CT_TEXTURE)
Tex01:SetTexture("TestAddon/tex/Tex01.dds")
Tex01:SetDimensions(1,1)
Tex01:SetResizeToFitFile(true)
Tex01:SetResizeToFitDescendents(true)
Is it ok?
I created the control, and say what texture will have Tex01. I set the dimensions as you said, and then set resize to fit file and set resize to fit descendents. But Tex01 will have to know what file is that one so Tex01 can be resized at the size of that file, right? (wow.. I don't know if you understand what I want to say xD)

Thanks!
  Reply With Quote
05/07/14, 10:22 AM   #8
Iyanga
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 185
Originally Posted by ZunaSW View Post
Hmm... Its a good idea, but, how can I set the file which will be the texture resized? What I want to say is: we say to the texture to be resized to fit a file, but, what file? I have this in my lua:

Code:
Tex01 = wm:CreateControl(nil, Tex01, CT_TEXTURE)
Tex01:SetTexture("TestAddon/tex/Tex01.dds")
Tex01:SetDimensions(1,1)
Tex01:SetResizeToFitFile(true)
Tex01:SetResizeToFitDescendents(true)
Is it ok?
I created the control, and say what texture will have Tex01. I set the dimensions as you said, and then set resize to fit file and set resize to fit descendents. But Tex01 will have to know what file is that one so Tex01 can be resized at the size of that file, right? (wow.. I don't know if you understand what I want to say xD)

Thanks!
The file is the texture file and the order is probably wrong. First you set the dimensions to 1,1. Then you enable the resizing and finally you set the texture.
  Reply With Quote
05/07/14, 10:59 AM   #9
ZunaSW
Join Date: Mar 2014
Posts: 37
Hmm... I'm getting this error:

Code:
user:/AddOns/TestAddon/TestAddon.lua:32: attempt to index a nil value
stack traceback:
	user:/AddOns/TestAddon/TestAddon.lua:32: in function '(main chunk)'
Here is the part of the lua where you can find the line 32:

Code:
Tex01 = wm:CreateControl(TOP, Tex01, CT_TEXTURE)
Tex01:SetDimensions(1,1)
Tex01:SetResizeToFitFile(true)
Tex01:SetResizeToFitDescendents(true)
Tex01:SetTexture("TestAddon/tex/Tex01.dds")
I changed the "nil" of the other code to "TOP".

Any ideas? Thank you, you all are helping me a lot.

Last edited by ZunaSW : 05/07/14 at 11:05 AM.
  Reply With Quote
05/07/14, 12:49 PM   #10
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 651
Change it back to nil. That's supposed to be the global name/reference you give to the frame you are creating. If you give it no name, you use nil. TOP is already a constant in ESO - it's a number that is used for anchoring and placement.
  Reply With Quote
05/07/14, 12:51 PM   #11
ZunaSW
Join Date: Mar 2014
Posts: 37
It's still giving me the error :/
  Reply With Quote
05/07/14, 12:54 PM   #12
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
- /esoui/art/unitattributevisualizer/attributebar_small_frame.dds
256x64


- /esoui/art/unitframes/target_health_frame.dds
256x16
__________________
Author: AI Research Grid | Awesome Info
  Reply With Quote
05/07/14, 01:00 PM   #13
ZunaSW
Join Date: Mar 2014
Posts: 37
Originally Posted by Stormknight View Post
- /esoui/art/unitattributevisualizer/attributebar_small_frame.dds
256x64


- /esoui/art/unitframes/target_health_frame.dds
256x16
OMG! Thank you! What about the compass one? "/esoui/art/compass/compass.dds". It's awesome, I don't know how did you extracted the files to get the dimensions o_O /applaud
  Reply With Quote
05/07/14, 01:26 PM   #14
Stormknight
 
Stormknight's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 128
/esoui/art/compass/compass.dds
64x64


Here's galleries for the folders containing those images (has the other associated images):
/compass
/unitframes
/unitattributevisualizer

As far as how I got them, I used google to find an old (from beta) dump of the DDS files and then batch converted them to PNG files using GIMP.

There's also a list of textures on the Wiki that is similarly from the beta (that list is actually taken from Wykyyd's framework).

I'm hoping it's not too long before ZO officially release things and we can get an up-to-date version of this, as there are many textures that aren't on that list.
__________________
Author: AI Research Grid | Awesome Info
  Reply With Quote
05/07/14, 01:32 PM   #15
ZunaSW
Join Date: Mar 2014
Posts: 37
Wow... This is so awesome. Thank you Stormknight! And thank you all those who helped me I learned a lot!
  Reply With Quote
05/11/14, 09:04 AM   #16
Roupine
Join Date: May 2014
Posts: 18
If you create a CT_TEXTURE control using the file you're curious about, couldn't you then just use GetTextureFileDimensions() or GetTextureInfo()?
  Reply With Quote

ESOUI » Developer Discussions » Graphics Help » Any way to know a game texture's dimension?

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