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?
Changing texture resolution
- Pangamini
- Gremlin
- Posts: 179
- Joined: Fri Sep 17, 2010 2:21 pm
- Location: Kosice, Slovakia
- x 3
- Contact:
Changing texture resolution
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
Reason: corrected thread title spelling for better understanding
Ancient Greeks did have a culture, but they didn't have gasoline.
...and we have gasoline.
...and we have gasoline.
- Zonder
- Ogre Magi
- Posts: 1168
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 73
Re: Changing exture resolution
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...
- Zonder
- Ogre Magi
- Posts: 1168
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 73
Re: Changing exture resolution
There are 10 types of people in the world: Those who understand binary, and those who don't...
- Zonder
- Ogre Magi
- Posts: 1168
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 73
Re: Changing exture resolution
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...
- Pangamini
- Gremlin
- Posts: 179
- Joined: Fri Sep 17, 2010 2:21 pm
- Location: Kosice, Slovakia
- x 3
- Contact:
Re: Changing exture resolution
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
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.
...and we have gasoline.
- Zonder
- Ogre Magi
- Posts: 1168
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 73
Re: Changing exture resolution
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...
- Pangamini
- Gremlin
- Posts: 179
- Joined: Fri Sep 17, 2010 2:21 pm
- Location: Kosice, Slovakia
- x 3
- Contact:
Re: Changing exture resolution
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.
...and we have gasoline.
- Zonder
- Ogre Magi
- Posts: 1168
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 73
Re: Changing exture resolution
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.
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...
- Pangamini
- Gremlin
- Posts: 179
- Joined: Fri Sep 17, 2010 2:21 pm
- Location: Kosice, Slovakia
- x 3
- Contact:
Re: Changing exture resolution
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)
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.
...and we have gasoline.
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
Re: Changing texture resolution
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.
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.