Changing texture resolution

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
Pangamini
Gremlin
Posts: 179
Joined: Fri Sep 17, 2010 2:21 pm
Location: Kosice, Slovakia
x 3
Contact:

Changing texture resolution

Post by Pangamini »

Hello there
Is there some simple way how to tell ogre to use lower quality textures (by resizing the originals to half or so) for users with less gpu memory? Setting this up before loading textures from file or just when loading textures to the GPU?
Last edited by spacegaier on Fri Oct 07, 2011 4:58 pm, edited 1 time in total.
Reason: corrected thread title spelling for better understanding
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Changing exture resolution

Post by Zonder »

assaf raman did somthing to reduce memory usage on the gpu think he deleted a mipmap level will try and find the post
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Changing exture resolution

Post by Zonder »

There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Changing exture resolution

Post by Zonder »

forgot to say you are using compressed textures already arn't you? if not you need to switch to them before doing anything else
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
Pangamini
Gremlin
Posts: 179
Joined: Fri Sep 17, 2010 2:21 pm
Location: Kosice, Slovakia
x 3
Contact:

Re: Changing exture resolution

Post by Pangamini »

I use PNGs, but i didn't know that textures can be compressed in the GPU memory...

I just want an option that will cause the game to load half-resolution textures
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Changing exture resolution

Post by Zonder »

yes they can be compressed in GPU memory PNG's are stored as a bitmap in GPU memory so you need to get them into DDS files first this should save quite a bit of RAM to start with. If you need more you can then look at the solution above maybe
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
Pangamini
Gremlin
Posts: 179
Joined: Fri Sep 17, 2010 2:21 pm
Location: Kosice, Slovakia
x 3
Contact:

Re: Changing exture resolution

Post by Pangamini »

Can DDS contain an alpha channel? IS the format free to use in commercial apps? And - are the textures compressed in GPU even if using OpenGL?
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Changing exture resolution

Post by Zonder »

DDS supports many formated look at the tool that comes with the DirectX SDK. I never though if they work in OpenGL or not but the internal formats of DDS are to do with hardware compression not the rendering API so I belive it should maybe someone else can clarify on that! :)

Using DDS in your comercial project is fine there are patents on the internal formats but you arn't effected the video hardware have to license as they do the decoding not you.
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
Pangamini
Gremlin
Posts: 179
Joined: Fri Sep 17, 2010 2:21 pm
Location: Kosice, Slovakia
x 3
Contact:

Re: Changing exture resolution

Post by Pangamini »

Ok thanks for reply - i am switching to DDS.
Just to make it clear - compressed DDS loaded with ogre material script will use less GPU memory than the same texture compressed other way (true/false)
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Changing texture resolution

Post by Kojack »

DDS works fine in opengl. Ogre has it's own dds loading code.
What you want is one of the DXT modes: DXT1, DXT3 or DXT5. (DDS is just a container format, DXT modes are some of the many formats possible in a DDS).
DXT1 take 12.5% of the memory of a raw texture, but only has 1 bit alpha or no alpha.
DXT3 and DXT5 take 25% of the memory of a raw texture. They both have more alpha bits but store them in different ways.

It is a lossy format though, so not all textures look correct. Most games these days use them though.
DXT compression works fine in opengl. The format was actually created by S3, not microsoft.
Post Reply