About Store Forum Documentation Contact



Post Reply 
Texture Quality.
Author Message
Xhizors Offline
Member

Post: #1
Texture Quality.
Hello, I have tested to load 2D Images into the engine with same size and diffrent formats but I can't get the image to look perfect like using this tool:

http://developer.nvidia.com/object/windo...iewer.html

The image always looks blured and not sharp.

Image in the attachment.


Attached File(s)
.rar  image.rar (Size: 31.23 KB / Downloads: 3)
(This post was last modified: 04-28-2010 09:44 AM by Xhizors.)
04-28-2010 09:44 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Texture Quality.
if you use A8R8G8B8 then the image will be exactly the same as original
04-28-2010 09:58 AM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #3
RE: Texture Quality.
(04-28-2010 09:58 AM)Esenthel Wrote:  if you use A8R8G8B8 then the image will be exactly the same as original

Yes, but when I load it into the engine the image quality is not as sharp. Try to drop the image into the converter and check the quality, Its not the same.

Gui += window.create(Rect( D.pixelToScreen( RectI( 0, 0, 404, 202 ) ) ));

// Style
window.style->image_back = Images("../inventory.gfx");

// Window Settings
window.style->border_color = 0;
window.style->shadow = 0;
window.barVisible( false );
04-28-2010 10:50 AM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #4
RE: Texture Quality.
Did you see the diffrence?

Also check the thread: http://www.esenthel.com/community/showth...p?tid=2078

Thank you
04-28-2010 01:45 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
RE: Texture Quality.
I'll take a look at it when I'll find some time.
Please note that not only size is here important, but also position.
If your window position is located at +0.5 pixel then it will get blurred.
04-28-2010 08:05 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #6
RE: Texture Quality.
(04-28-2010 08:05 PM)Esenthel Wrote:  I'll take a look at it when I'll find some time.
Please note that not only size is here important, but also position.
If your window position is located at +0.5 pixel then it will get blurred.

I know this, But try view the image in your Converter program, It will be blured in that to.
04-29-2010 07:07 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Texture Quality.
Converter rescales the image to be drawn to match the size of the window
04-29-2010 08:28 AM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #8
RE: Texture Quality.
(04-29-2010 08:28 AM)Esenthel Wrote:  Converter rescales the image to be drawn to match the size of the window

I see, But still same problem ingame.

Gui += window.create(Rect( D.pixelToScreen( RectI( 0, 0, 404, 202 ) ) ));

// Style
window.style->image_back = Images("../inventory.gfx");
window.style->border_color = 0;
window.style->shadow = 0;
window.barVisible( false );

Correct size 404*202 pixels.

And its still blured.

Here is an image preview, To the left = Engine to the Right = DDS Viewer.
Vec2 pSize = D.pixelToScreenSize( VecI2( 404, 202 ) );

// window
Gui += window.create(Rect_R(D.w(),0,pSize.x, pSize.y)).level(0);

I did this, Then the window is clear, BUT when I move the window a bit then the window gets blured.

Any reason?


Attached File(s) Image(s)
   
(This post was last modified: 04-29-2010 01:19 PM by Xhizors.)
04-29-2010 12:51 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Texture Quality.
Quote:I did this, Then the window is clear, BUT when I move the window a bit then the window gets blured.
if its that important to you then you can in the Window::update method
adjust the window position in each frame to be perfectly per-pixel aligned.
04-29-2010 01:22 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #10
RE: Texture Quality.
(04-29-2010 01:22 PM)Esenthel Wrote:  
Quote:I did this, Then the window is clear, BUT when I move the window a bit then the window gets blured.
if its that important to you then you can in the Window::update method
adjust the window position in each frame to be perfectly per-pixel aligned.

Yes its very important to move the window and have the same sharpness. I think everyone likes that.

Ok I will try it.
04-29-2010 03:58 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: Texture Quality.
yes, but that approach forces visually smaller gui size on bigger resolutions
04-29-2010 04:36 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #12
RE: Texture Quality.
So you mean, everyone who wants to have sharp GUI Images must always adjust the window position in Window::update method to get the images sharp?, Can't this be done itself in the Engine's GUI Move handler?

Just sounds wierd to not always have the images perfectly per-pixel aligned.

Best regards

-XHizors
(This post was last modified: 04-30-2010 07:10 AM by Xhizors.)
04-30-2010 07:09 AM
Find all posts by this user Quote this message in a reply
Post Reply