Anyone work with Skyboxes yet?
Posted: Sun Apr 03, 2005 5:45 pm
I have not ventured into this area and I was looking for any input? I read some posts by Danmar at his Lands of Kray and wrote in inquire more into his Sky Box ventures. Let me share his reply.
Any thoughts on this? Or it might help someone else. I have not gotten a change to play with his idea's yet.Heh, I'm still not sure how to do it 'right'.
The main problem is the skyboxes aren't 'true' skyboxes. They're just texture mapped objects with inward facing polygons that surround a level. There's none of the typical camera tricks. But it stands to reason since they were never written into the engine in the first place
To see some of the limitations in them, create a typical sized area, say 8x8 or 16x16. Stand in the middle of it and with your view aimed at about 45 degrees up take a screen shot. Now compare that screenshot with the texture for the skybox. Typically you'll see roughly 1/3 or less of the texture is viewable.
Now go to any far corner. More of the texture is visible but still you can't see much of it.
The problem is increase in zones that have unfettered edges, i.e. not surrounded by tree tiles or cliff tiles. This allows you to see that the 'virtual' tiles extend about 4 tiles outwards. Under the original camera lock this wasn't an issue because you couldn't see it. Now you can and it looks kinda like poop
The original camera lock wasn't in place for any reason but to hide the missing bits and pieces of the game IMO.
Other issues that I know of:
Every CC skybox set that I downloaded and tested has one or two thin lines of artifacting that go up and down. I can't say I fault the builder because I couldn't get rid of it myself. A skybox that renders perfectly fine in studio max, built by someone who kinda knows what he's doing in regards to setting mapping and gizmo size, has this problem in NWN.
One key point here is all the CC skyboxes and my own attempts were involved with a tubulal skybox. There could very easily be a engine limitation in NWN in dealing with objects this large that causes this to occur. In fact I can't think of any other cause. For me the flaw always occured in the center of the east side which I think is direction 0 in game(for whatever reason that might be). In several of the CC skyboxes this flaw was in both east (0) and west (180). Depending on the texture's overall 'business' and brightness/contrast this can be more or less visible.
The skyboxes I looked at in particular were one each of Nano's and Stilgar's sky sets.
At this point I broke down and looked at one of BW's skyboxes. They're actually literally using a box, not a tube or hemisphere. This does NOT display the thin vertical artifact and in addition their skybox is smaller than both of the other sets by a considerable degree. At this point I was bored to tears trying to figure out what the actual cause
was so I didn't do any further testing to see if it was the squareness or the size that fixed the vertical flaw.
The problem with square box though is that when you pan and lookat the sky you can see where the corners are.
Another oddity, the BW skyboxes include a top cover to their box that's mapped with a completely different texture. It seems to be impossible to get to a point to see these although I would guess that if you built a 32x32 area and layered cliffs along the entire way you might even get to the point where you're above the sky box. In addition even when I moved this horizontal cap down to well inside camera view, it never
rendered.
That's another limitation in this particular method of skyboxing. Raising the height of the camera yields very bad things happening.
This is quite possibly, even probably the reason the skyboxes are so large which results in such a large waste of texture space and loss of detail. To deal with the maximum possible height change of the camera.
So to sum up:
To have the (IMO) best looking skybox at this time knowing what I know and realizing what I didn't bother to check, you need to do the following:
Create the skybox for a reasonable maximum sized area. I chose 20x20. Size and adjust the position of the skybox so that it works for at most 3 or 4 cliff heights. Make sure you test by going to one corner of the area and looking at the opposite corner.
I would also recommend you built your skybox out of 4 planes of about 5x5 or 6x6 sections. Make very sure you're texture mapping will fall dead even on the right points. Then join them together, put them all in one smoothing group and then test looking for artifacting.
If no artifacting is seen and the general size and placement works for you, then go back and began rounding the skybox out a bit, bulge the middle sections of the planes and bring the corners in a bit.
Test for artifacting at each major step.
-Danmar







