SkyBox

Advanced game related topics
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mindplay.

Inspired by the wonderful depth of the skyboxes in Freelancer, I spent a lot of time making my own skybox, figured out how to render it etc. - it works fine, but ... the SkyBox function seems to be restricted to JPGs? It won't load BMPs, apparently ... and JPGs with lots of little stars in them, little white dots, come out really ****ty, with lots of "grease" in an 8x8 area around every little star :( ... any solution for that??

I also have problems with resolution - I tried with 512x512 box maps first, but that looked completely wack ... I'm now up to 1024x1024, which means it's taking up a LOT of RAM, and it still looks pretty crappy - I'm not sure if it's because of the ugly JPG compression, but I suspect there's some sort of color reduction too when loading? ... do the textures get converted to 16-bit color or something??

My skybox textures look just fine in photoshop, even under a microscope - but as soon as they're running in a skybox in PB, they look totally trashed :/

Source files and graphics, if you want to take a look:

http://www.mindplay.dk/temp/skybox.zip

Also, I wonder, why is there no perspective amount setting for a SkyBox, like there is for a SkyDome??
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

I think than PNG should be supported for the skybox.. I will check.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by xMystik.

Most software that allows you to save jpg will also allow you to specify how much compression is used. Just turn the compression down a bit until you get a satisfactory result.

Steve.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mindplay.

well, obviously, but I've already tried both 8 (very high) and 10 (maximum) quality when saving from photoshop, and I get visual artifacts no matter what :(
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

i have checked your skybox out and i think the textures displayed are correct and the same as you original ones but i think that somewhere along the line (maybe during rendering) the image gamma has been turned up revealing that ugly '.jpeg'ness'.

--Kale

In love with PureBasic! :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mindplay.

I switched to PNG, that works better, thanks fred :)

It still looks trashy though, when you compare the original bitmaps ... I think I know why the graphics look so terrible though - I'm using the standard "Screen3DRequester.pb" from the PB examples, and apparently, this totally ignores the depth and refresh rate properties of the video card and monitor, and just forces 16-bit depth! Probably all the 3D demos that come with PB look considerably worse because of this, and for all I know, perform considerably worse as well - most modern graphics card perform better in 32 bit color than they do in 16 bit, because that's what they're optimized for ... I'm reworking the Screen3DRequester.pb now, to support depth and refresh rate settings - I'll post the fixed version here when I'm done.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Kale.

>>just forces 16-bit depth

wow didn't notice that.

>>I'm reworking the Screen3DRequester.pb now, to support depth and refresh rate settings - I'll post the fixed version here when I'm done.

cool :)

--Kale

In love with PureBasic! :)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mindplay.

hmm, I have to do some duplicate checking while adding stuff to comboboxes (depths, refresh rates etc.), but GetGadgetItemText() doesn't seem to work for combo-boxes ... it just returns an empty string no matter what ... and it wants a column number, which combo-boxes don't have - I've tried both 0, 1 and -1, but it just returns empty string, so now I'm stuck :(

... fred?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mindplay.

... so I gave up using the Screen3DRequester for now, and settled for a simple, temporary solution:

OpenScreen(800,600,32,"myscreen")

From populating the combobox with depths, resolutions and refresh rates, I already know that my card (GeForce3 w/64 MB) supports 800x600 in 32-bit - unfortunately my skybox textures STILL look trashy :(

So it must be the underlying loader that converts the textures into 16bit format? And then of course it won't make any difference what screenmode I use ... and there doesn't seem to be any way to adjust the texture format for the 3D engine?

I'm sure that Ogre supports better than 16-bit texture formats? So maybe this is an area that needs more working on for the PB interface??

for now I'm stuck, having wasted half a day trying to do something that's impossible :(
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

AFAIF, textures should be in 32 bit if the screen depth is 32 bit.. Could you make a screenshot to show me exactly how it looks ?

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mindplay.

There is no quality difference between 16 bit and 32 bit screen mode, which tells me that the textures themselves must be 16 bit only - otherwise they'd look even worse in 16 bit mode ... there are very clearly "levels" in the gradients, as opposed to when I view the graphics in photoshop...

How do you make a screenshot while it's in full screen mode?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

GrabSprite() - SaveSprite()

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mindplay.

got it :)

http://www.mindplay.dk/temp/test.png

Includes both the rendered and original texture, for comparison - as you can clearly see, the levels in the rendered texture has very edgy levels in it, it's almost like there's a layer of circles imposed over it ... those aren't present on the original.

I checked the format of the output screenshot, by the way - it's 24 bit, so the screen is running the proper depth, so I'm pretty sure that the texture is converted to 16 bit when loaded.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mindplay.

... has anyone looked into this yet?
Post Reply