Quantcast Texture size Versus Resolution size - ESOUI
Thread Tools Display Modes
05/26/19, 11:38 AM   #1
xTG
AddOn Author - Click to view addons
Join Date: Feb 2015
Posts: 14
Texture size Versus Resolution size

Hello,

I am looking to how customize the size of a texture relating of the resolution of the user.
Is it possible ?

Actually i generate a texture with a static size, but i will need to cover with multiples textures the HUD.

Code:
            <Controls>
               <Texture name="xTG_SearchIcon" textureFile="xTG_ImmersiveInterface/blood_2.dds" alpha="1">
                   <Dimensions x="600" y="600" />
                   <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="0" offsetY="3" />
                   <TextureCoords left="0" right="1" top="0" bottom="1" />
               </Texture>
            </Controls>
Here i apply a texture of 600x600 on top left, but 600x600 is not great if the user play in 1024x768.
Any ideas ?
  Reply With Quote
05/26/19, 11:59 AM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 141
A texture of size 600x600 will look roughly the same, no matter what resolution the player will play in.
If the game runs in a higher resolution, then it automatically scales-up the entire UI. If it runs in a small resolution, the UI is downscaled.
The only difference comes from different aspect ratios, in which case there is some extra space available on screen.

https://wiki.esoui.com/AddOn_Quick_Q...pact_the_UI.3F

If you have a texture control of size 1680 x 1050, then it will always cover the entire vertical space or the entire horizontal space of the game window.
  Reply With Quote
05/26/19, 01:05 PM   #3
xTG
AddOn Author - Click to view addons
Join Date: Feb 2015
Posts: 14
Very interesting !
Thanks for the great link and the explanation.
  Reply With Quote
05/27/19, 01:33 PM   #4
xTG
AddOn Author - Click to view addons
Join Date: Feb 2015
Posts: 14
Seems strange in fact...
The wiki said the unit is : 1680 x 1050

But if i place a texture at x=1680 with 600 in x dimension i can see 1/3 of the texture...
And my screen resolution is 1980 width.

I tried with a box texture to understand... And it's clear that unit is pixel.
Am i missing something ?
  Reply With Quote
05/28/19, 08:00 AM   #5
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 548
The UI size is at minimum 1920 x 1080.
  Reply With Quote
05/28/19, 10:15 AM   #6
xTG
AddOn Author - Click to view addons
Join Date: Feb 2015
Posts: 14
Thanks for the replie ChipHilseberg.

Does it mean if a player have a resolution of 2515 1886, i only need to set a texture of 1920 width and i will cover his screen ?
  Reply With Quote
05/29/19, 08:32 AM   #7
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 548
It depends on the aspect ratio.

The aspect ratio is the screen width divided by the screen height. For 1920x1080 this is 1.777. If the aspect ration of your screen is less than that, there will be extra space on the top and bottom, so to fill the screen you would need to make it as tall as GuiRoot and as wide as that height times your aspect ratio. If the aspect ratio of your screen is greater than that, there will be extra space on the left and right, so to fill the screen you would make it as wide as GuiRoot and as tall as the width time 1/aspect ratio. This assumes you want to keep the same proportion of your texture. If not, just anchor it to the TOPLEFT and BOTTOMRIGHT of GuiRoot.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Texture size Versus Resolution size

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