Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: ShadowGorrath on April 05, 2008, 11:31:00 am
-
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]
-
Uhh, is it a cube or a sphere?
-
The model is from the mediavps, so it's a sphere.
-
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.
-
The best option will be making cube skybox with diffrent texture for each wall.
-
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.
-
Shots?
-
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]
-
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.
-
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.
-
Can't you just place blue nebulae in Fred? The texture on theat skybox looks a little stretched.
-
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.
(http://i32.tinypic.com/2a5xeds.png)
...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 (http://www.freespacemods.net/download.php?view.189).
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.
-
Hey, thanks a lot. :)
-
Are there specific dimensions for the starfield POF, and texture requirements are standard DDS right?
I only ask because there's no WIKI page.......
-
I think that they depend on the skybox model.
-
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.
-
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?
-
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.
-
Skybox pof from anywhere??
Nukes one will do i assume?