RFC: Fancy classics

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Re: Shader help wanted:

Post by Simon B »

Screet wrote:
Simon B wrote:
... what causes this?
ATI has some magic that can cause a Hydra to be drawn normally and it's pods entirely black. Same applies for winged spacecraft....and sometimes it's just the other way around.
Not my issue - but may be worth testing in another videocard ...

I'm running on nvidia 6800 with the proprietary drivers. Not sure I want to pull the card just to test this.

Also - the subentity is always opposite lighting ... when the top surface is dark, the skiff is light.

Checked the FDL and it's engines don't share this effect - they behave.
Screet who just got "red" markings at a german tech magazine board for commenting that ATI does neither have OpenGL 3 support ready nor working drivers at all.
- the crysalis drivers test out ok over here... few have opengl3 "ready". It will be slow.

never had trouble with ati cards on proprietary or free drivers - and their free software support is pretty good.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

Simon B's replacement ships 8) for FighterHUD can be downloaded here

Image
Download Fighter HUD, Stingray and System Redux from the EliteWiki
User avatar
ZygoUgo
---- E L I T E ----
---- E L I T E ----
Posts: 406
Joined: Mon Nov 17, 2008 4:15 pm
Location: Blighty

Post by ZygoUgo »

Finally came up with something for the front of the Viper that didn't look like a beak or a nose :?
I'm going to hopefully rearrange the flashers and their colours, so I would like to ask Simon for the glow map too if there is one for her yet.
I may use my original checked design for the Interceptor, or more rather combine the two so they suit each other.

Image

I would like to point out that I optimised this PNG in photoshop to 256 colours without any noticeable visual difference, she dropped from just over 320k to a nip over 100k. If we did this for every skin (that would remain unaffected) we could reduce the RAM they use by two thirds.
EDIT (Assuming there isn't some element to memory usage that alters this?)
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Post by Simon B »

The GIMPs posterize tool lets me dynamically set the number of colors per channel - if I do 8 bits per channel, thats 512 colors, I get a more degraded image than that. 128 bits per channel gives similar grain and halves the filesize.

It's a good observation though, and may help people experiencing slowdowns without reducing the actual dimentions of the texture.

Hmmm... the stripe is not supposed to go behind the grill ... I see I have that on mine too. Dunno how I missed that. Have to fix.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
_ds_
Deadly
Deadly
Posts: 180
Joined: Thu Jan 22, 2009 5:34 pm
Location: In a cloaked ship behind you

Texture compression

Post by _ds_ »

ZygoUgo wrote:
I would like to point out that I optimised this PNG in photoshop to 256 colours without any noticeable visual difference, she dropped from just over 320k to a nip over 100k. If we did this for every skin (that would remain unaffected) we could reduce the RAM they use by two thirds.
Won't work. The image still has to be decompressed to be used; all that you're doing is to reduce the disk space used. (Though that's worthwhile in itself, in that it also means less to be downloaded.)

You want S3TC (and the requisite OpenGL support for it, which – on Linux, at least – requires libtxc-dxtn0).
http://tartarus.org/~ds/oolite/patches, Buzzer OXP etc.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Texture compression

Post by Screet »

_ds_ wrote:
Won't work. The image still has to be decompressed to be used; all that you're doing is to reduce the disk space used.
Are you sure? It did read to me that the space saved was not the result of compression, but of reducing from 3/4 byte/pixel to 1 byte per pixel, thus reducing the color depth of the image. If oolite can handle textures with a color depth of 1 byte, it can save a lot of space. However, it might require to have color index information...

Screet
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Post by Simon B »

The decompressed image will still be smaller - though the decompression itself will still cost.

Remember - we were expecting smaller pngs to result in smaller overhead.

aside: I've been tied up with helping get a local law repealed. Should be able to focus back on oolite soon.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Simon B wrote:
The decompressed image will still be smaller - though the decompression itself will still cost.

Remember - we were expecting smaller pngs to result in smaller overhead.

aside: I've been tied up with helping get a local law repealed. Should be able to focus back on oolite soon.
Been watching this story - Stephen Fry - our most famous twitterer has blacked out his avatar for this very reason...
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Texture compression

Post by Commander McLane »

Screet wrote:
_ds_ wrote:
It did read to me that the space saved was not the result of compression, but of reducing from 3/4 byte/pixel to 1 byte per pixel, thus reducing the color depth of the image. If oolite can handle textures with a color depth of 1 byte
As Ahruman has informed us a couple of times (probably even in this thread) Oolite uses 24-bit colour, period. So whatever you convert into 1 byte per pixel will be re-converted to 3 bytes per pixel by the engine.
User avatar
ZygoUgo
---- E L I T E ----
---- E L I T E ----
Posts: 406
Joined: Mon Nov 17, 2008 4:15 pm
Location: Blighty

Post by ZygoUgo »

That's my fault for bringing it up, I don't know how these wizardy shenanegans work so I'm easily confused.
I mis-interpreted it as the textures were read at 3 bytes (by the engine placing the texture on its object, so no improvement there), but could be stored at 1 byte to save RAM on low end machines.
Thanks for the answer.

EDIT I forgot to say what I originally came in for!
I thought it would give the game a better sense of travelling if there were different liveries for each of the galaxies, much as we can see the variations between different countries.
Seeing as you can have which (part of the) galaxy you are in effect which missions you receive I'm presuming this is possible.
I think my current livery looks pretty American, I don't see why we should give them the entire place to themselves :D
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Shader help wanted:

Post by JensAyton »

Simon B wrote:
I have a problem with the lighting - look:
Image
... what causes this?
A possible reason is that one mesh is using shaders and the other isn’t, and there’s something interesting about the lighting situation – most likely, the ship’s in shadow, which currently isn’t reflected by shaders. I know of two cases where this can happen:
  • When using “simple” shader mode, non-smooth meshes/materials with no custom material effects don’t use shaders. This can easily be seen in the standard Coriolis on the Demo2 screen.
  • If a shader fails to compile, it’ll fall back to non-shader rendering for that material.
This problem should go away when I get around to fixing the lighting system.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Texture compression

Post by JensAyton »

Commander McLane wrote:
Screet wrote:
_ds_ wrote:
It did read to me that the space saved was not the result of compression, but of reducing from 3/4 byte/pixel to 1 byte per pixel, thus reducing the color depth of the image. If oolite can handle textures with a color depth of 1 byte
As Ahruman has informed us a couple of times (probably even in this thread) Oolite uses 24-bit colour, period. So whatever you convert into 1 byte per pixel will be re-converted to 3 bytes per pixel by the engine.
Wrong! I haven’t informed you of anything of the sort.

Most graphics hardware – effectively all graphics hardware – supports a limited set of colour formats. The ones used by Oolite are eight-bit greyscale (“luminance”) and 32-bit RGBA. Paletted colour textures are not supported (they’d require twice as many memory hits per pixel). 24-bit RGB textures aren’t either; I’m not sure why, since the overhead of multiplying by three instead of four is quite small compared to a 1/4 memory saving, but that’s the way it is.

There are 4:1 and 8:1 lossy compression schemes supported in most hardware from the last several years. These are currently not supported by Oolite.
User avatar
ZygoUgo
---- E L I T E ----
---- E L I T E ----
Posts: 406
Joined: Mon Nov 17, 2008 4:15 pm
Location: Blighty

Post by ZygoUgo »

:lol: Alas I fear I will never understand the realm of magic!
User avatar
Simon B
---- E L I T E ----
---- E L I T E ----
Posts: 836
Joined: Thu Oct 23, 2008 5:54 am
Location: Red Beach NZ
Contact:

Re: Shader help wanted:

Post by Simon B »

Ahruman wrote:
Simon B wrote:
I have a problem with the lighting - look:
Image
... what causes this?
A possible reason is that one mesh is using shaders and the other isn’t, and there’s something interesting about the lighting situation – most likely, the ship’s in shadow, which currently isn’t reflected by shaders.
The ship is not in shadow - so I looked closely at the shaders, and discovered that there is a slight (spelling) mistake in the textures, preventing the normal map for the boa2 body being loaded ... I cannot see it for the life of me, but I see an error about a texture not found in the logs. When I copy it's filename to the shader, the funny problem goes away.

(appears - the shaders for the skiff are quite different from that for the body - so I have to bring the maps into agreement to be sure).

The boa (std) body is still unshaded.

I'll be going through all these to get some sort of consistency in the next week or so.
Simon Bridge
[re2dux] [neolite]
"Everything is perfect down to every last flaw..."
HBT: The Book of Verse - Principia Discordia
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Shader help wanted:

Post by Screet »

Simon B wrote:
The ship is not in shadow - so I looked closely at the shaders, and discovered that there is a slight (spelling) mistake in the textures, preventing the normal map for the boa2 body being loaded ... I cannot see it for the life of me, but I see an error about a texture not found in the logs. When I copy it's filename to the shader, the funny problem goes away.
Could it be that you accidentally used a shift-space in the filename?

Back in the old university days (early 90's) that was the way we used to create directories for exchanging files we didn't want the universities tech staff to find. It worked for years until most of the people went working for the university themselves ;)

Screet
Post Reply