Author Topic: HELP - Problem with Skybox  (Read 5978 times)

0 Members and 1 Guest are viewing this topic.

Offline ShadowGorrath

  • Not funny or clever
  • 211
HELP - Problem with Skybox
Hey,

I have a problem with a skybox I made. And it turned out that on it's edges, it get's some triangle-like effect. Well, just take a look at the attached screenshot.

The skybox texture is in a pretty small size, but I suspect that the problem is with it's aspect size ( 1280x1024 )

Any help would be apreciated

[attachment deleted by ninja]

 

Offline Snail

  • SC 5
  • 214
  • Posts: ☂
Re: HELP - Problem with Skybox
Uhh, is it a cube or a sphere?

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
Re: HELP - Problem with Skybox
The model is from the mediavps, so it's a sphere.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: HELP - Problem with Skybox
Looks like you need a different texture (or a modified version of that one).  To be safe, the texture applied to the skybox should have a uniform background color around all of its edges.  There has to be a seam somewhere, and if the texture doesn't match up on the two sides of the seam, you will get that effect.

 

Offline shiv

  • Don't forget Poland!
  • 211
  • FRED me!
    • http://freespace.pl
Re: HELP - Problem with Skybox
The best option will be making cube skybox with diffrent texture for each wall.
http://www.sectorgame.com/vega
The Apocalypse Vega - Join the battle! A campaign for FreeSpace 2 Open

http://www.game-warden.com/earthdefence
Earth Defense project - Coming soon...

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
Re: HELP - Problem with Skybox
Though I kinda fixed the problem by getting a new model, it's now in very low detail because of the size. The original mediavp model had the texture cut/looped/repeated, and thus in high detail. Now it doesn't have the same effect as seen in the screenshot. It now looks more like a FreeSpace1 nebula with lots of stars, or like Icey's FS2 render backgrounds.

 

Offline shiv

  • Don't forget Poland!
  • 211
  • FRED me!
    • http://freespace.pl
Re: HELP - Problem with Skybox
Shots?
http://www.sectorgame.com/vega
The Apocalypse Vega - Join the battle! A campaign for FreeSpace 2 Open

http://www.game-warden.com/earthdefence
Earth Defense project - Coming soon...

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
Re: HELP - Problem with Skybox
Here, attached.

I'm getting a higher detailed texture ( same one, but looped|copy-pasted a few times onto a larger texture ). Gonna retest it again after I get a new one.

On the other hand, it seems that mine might not work out very well. Anyone has a good looking skybox with some gently blue nebulas over random places ? And best would be that you can see the Milky Way line.

[attachment deleted by ninja]

 

Offline shiv

  • Don't forget Poland!
  • 211
  • FRED me!
    • http://freespace.pl
Re: HELP - Problem with Skybox
Wow. I really like it :yes:
When are you going to release this thingie?
It could be easy recoloured by RGB modification or Hue/Saturation/Liminance to get Yellow/Green/Red/Maroon/Purple effect as in FS1.
http://www.sectorgame.com/vega
The Apocalypse Vega - Join the battle! A campaign for FreeSpace 2 Open

http://www.game-warden.com/earthdefence
Earth Defense project - Coming soon...

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
Re: HELP - Problem with Skybox
Unfortunately, I don't think I'll release it before I finish my mod. It's meant for my 'Super Secret Mod Thing TM', which is progressing, but quite slowly ( thanks to Scoob for re-releasing the ships, I am set back a bit ). No idea when I'll finish it.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: HELP - Problem with Skybox
Can't you just place blue nebulae in Fred?  The texture on theat skybox looks a little stretched.

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: HELP - Problem with Skybox
Oh hai

I haz solvez your problem

but let me give an explanation first.


What you're basically trying to do is fit a nebula texture into a tiled skybox. Tiling suits extremely well for starfielc because stars are basically dots, so the likelyhood (and notability) of dot getting on both sides of a seam in the UV mapping is very small. That's why the tiling seams aren't notable at all on the starfield, but when you fill the texture with gradient nebulas, the likelyhood of getting completely different shades of colour on both sides of the seam is very high.

Ideally, for a nebula you would need a skybox that maps one texture spherically to the skybox. Nebulast typically stretch extremely well (well, in TGA format anyway - DXT compressed, not so much) so resolution isn't much of an issue - 2048x1024 is sufficient, but I prefer 4096x2048 since my GPU can handle it easily.

However, starfields love tiling. That's because when you stretch a dot, it becomes a blob, and stars do not like being blobs, they become stupid looking. Tiling removes the need for any significant stretching, thus tiling the starfield is a good idea.

The solution was to use two different spheres with different texture mapping. Outer shell with tiled starfield (got that from MediaVP's) and inner shell for spherically mapped nebula texture (spherical UV mapping was no problem at all after planets...); the minor difficulty I had was in TS3.2 to get the models' centers aligned and both spheres textured with appropriate mapping and texture. Well, it worked all right. Here be results.



...yes, the effect you were trying to accomplish looked familiar so I thought I'd give you a hand. ;) The skybox itself can be used for various types of nebulas and starfields of course, just by copying the model and renaming the textures in PCS or PCS2 (or heck, even Notepad++ has worked for me on some occasions...).

The trick is to make black transparent on the nebula texture, so the starfield gets through it. Making the nebula texture so it appears seamless is bloody difficult, though. Polar distortions arent' really a problem, it's the horizontal seam between two halves that is really hard to blend into each other seamlessly... :shaking:


As for the difference in using the background nebula system and a global nebula texture - the main advantage of nebulas is ease of use, the main advantage of global nebula texture is you get a seamless huge global nebula. Trying the same with the nebula system would get arduous and getting the different nebulas to match each others' edges seamlessly would be even harder than making this kind of nebula texture.

So, this kind of nebula is possibly better solution when you want a big, global, structurally relatively uniform nebula/dust texture - if you have someone who's able to make a distortio-less spherically mappable nebula texture, that is.

Nebula skybox is downloadable here.

If you want a different nebula, copy the model file, open it in PCS and edit the nebula texture to read something else (your specified nebula texture)... or just replace the skybox_nebula.tga with your own texture.

The model works well with either the provided, high-res 4096^2 starfield (my preference because I often use narrow fields of view) or the mediaVP starfield0001.dds, whichever you want to use. If you want to disable the provided, huge starfield0001.dds, just rename it to starfield0001_disabled.dds, and the model will then use the starfield0001.dds in the mediaVP's.

If your video card doesn't support 4096^2 texture size, resize the nebula texture to 2048*1048 and save as TGA.


...why TGA instead of DDS? Because DDS* dislikes gradients with passion, and stretching a DDS compressed gradient-rich texture will unavoidable result in ugly pixelation which I for one don't want to see. :p I rather sacrifice a tiny bit of performance to the god of quality.


*Actually, it's badly done DXT* compression that hates gradients (and I don't know how to make it work properly), but I'm unsure if uncompressed u8888 DDS files have any memory efficiency advantage over uncompressed TGA's. I would think not, and RLE-compressed TGA saves at least tiny bit in filesize if not in memory consumption.


EDIT: This particular nebula pattern might not be what you're looking for - it certainly doesn't form the line of Milky Way - but with the technique I used it's pretty hard to have significant amount of control over the locations of the nebula concentrations. But as far as getting things to work, this kind of skybox model would most likely be what you're looking for. I'll leave you to either make your own nebula texture for the model, or use the one I provided. :)

EDIT2: MediaFire link changed to FreeSpaceMods link.
« Last Edit: April 17, 2008, 05:41:44 pm by Herra Tohtori »
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
Re: HELP - Problem with Skybox
Hey, thanks a lot.  :)

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: HELP - Problem with Skybox
Are there specific dimensions for the starfield POF, and texture requirements are standard DDS right?


I only ask because there's no WIKI page.......
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline ShadowGorrath

  • Not funny or clever
  • 211
Re: HELP - Problem with Skybox
I think that they depend on the skybox model.

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: HELP - Problem with Skybox
It seems to me that the engine simply uses the skybox as "background", as in, renders it behind everything else and always keeps the player in center, because the POF I used in this one is 4 units in diameter when I open it up in ModelView.

As for textures, basically same rules as with all other textures. Conceptually it's closer to effect (kinda like the 3D shockwaves or subspace vortices) than a model, but it will use anything the game can eat - preferable DDS due to memory footprint reduction, but gradient nebulas require more effort to make a good DXT compressed DDS file than normal textures. With TGA you lose a bit of performance (or actually you hog a lot more memory, which is not a problem if you have plenty of system RAM and VRAM), but retaining the quality is not an issue.

Zacam knows more about converting gradient-rich textures into DXT compressed DDS files... I'll probably have to learn about it.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: HELP - Problem with Skybox
As a wildcat guess, I'm gonna saythe best way for ME to start is to export the starfield.pof and de-grade it to a cob and retexture it?  Is that right?
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Re: HELP - Problem with Skybox
As a wildcat guess, I'm gonna saythe best way for ME to start is to export the starfield.pof and de-grade it to a cob and retexture it?  Is that right?


Eh, not by a long shot. Since you can avoid trueSpace with this kind of task, I recommend doing so.

Sphere is a sphere is a sphere. If you make a spherical UV-mapped skybox model, just grab one, open it in PCS 2, change the texture name, and make a new texture. The UV-mapping is already there, the only difference would be the texture name it uses.

Which is AFAIK the only thing you would want to change anyway. Heck, remember the Cardinal Spear planets? I made basically one sphere that converted to POF properly. Then I copied that POF multiple times and changed the texture names to use appropriate planet texture... with Notepad++, if I recall correctly. :D The ringed planet was a special case, that I needed to make a new model for.
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

  

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: HELP - Problem with Skybox
Skybox pof from anywhere?? 

Nukes one will do i assume?
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png