Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Texture quality

Author
Message
jlahtinen
14
Years of Service
User Offline
Joined: 26th Oct 2009
Location: Finland
Posted: 23rd Feb 2016 10:02
Soo, diving to the 3D side of AGK2...


When making a skybox or skysphere in this case, the texture quality is an issue. Is there somekind of limit how big the texture can be? I'm using 4096x2048 texture meant for skysphere. And no matter how I try to set SetImageMagFilter or SetImageMinFilter the texture is either complete blurr with jaggies or pixelated mess.

Is it possible to load the full "raw" texture in AppGameKit like in DBP or is this a somekind of limit on mobile devices?
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 23rd Feb 2016 17:08 Edited at: 23rd Feb 2016 18:08
Hey jlahtinen! Can you post some code and maybe a screenshot of your problem? Could help determine what is going on. Also what image format are you using and if there's compression involved, what kind are you using and at what percentage?

Try the uploaded project file out, see if you see any difference between your test and the screenshot.

Attachments

Login to view attachments
jlahtinen
14
Years of Service
User Offline
Joined: 26th Oct 2009
Location: Finland
Posted: 26th Feb 2016 09:26 Edited at: 26th Feb 2016 09:26
Thank you. That looks great.

With sky the texture size is ok, but with stars (space) you'll need huge image (8192x4096) so it wont look horrible.
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 27th Feb 2016 12:02
Hello jlahtinen,

be careful by using giant textures, there are limitations on each device. AGK2 does load an image with the size of: "8192x4096" as a 8192x8192 image.

"Most mobile platforms only support images that are a power of 2 in width and height (8,16,32,64,128 pixels, etc). If you load an image that is not a power of 2 size on a platform that does not support it your image will be increased in size until it matches the next power of 2 size. This does not affect the quality of the image as the extra pixels will be blank and used as padding only, but will increase the amount of memory used to store the image.
If you have lots of non-power of 2 images you could combine them into an atlas texture that is a power of 2 to make best use of memory."


If you use the SetGenerateMipmaps() command, you can disable it before loading the sky image, so the result is getting sharper.

I would recommend you to use muliple alpha layers with smaller textures maybe on a single skydome object. I would even say, that you could calculate dynamic wind noise on a fractal cloud or star movements in memblocks and it would have still a better performance than a single 8192x4096 skydome image loaded into VRAM.

[/url]
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 8th Mar 2016 18:50
Quote: "With sky the texture size is ok, but with stars (space) you'll need huge image (8192x4096) so it wont look horrible.
"


This is wrong. There is no reason or any situation where you will need a skysphere texture at that size..no situation.

I can easily make an amazing looking night sky with stars with a texture only 1024x1024 in size.

Login to post a reply

Server time is: 2024-03-29 13:36:15
Your offset time is: 2024-03-29 13:36:15