Skysphere

Started by
8 comments, last by Knytestorme 21 years, 7 months ago
Been playing some Star Trek: Bridge Commander lately and looking at how they do the background. I initially wondered if they might just be one large quad with tiled textures on the back (like doing maps for a sidescroller but with larger textures) and then overlaying an old star scroller effect but then I looked more closely and it appears they are using a skybox method for them. My question is, they could also be using a skybox actually made up of a shpere not a cube (which would actually seem more appropriate for a 360 degreee space combat game) and so if they are, how would you generate the skysphere for it to work in a similar fashion to a skybox. would it be easiest to work out the max co-ords of your playing area and then just generate a sphere of a size that encircles the playarea and texture the interior of the sphere, or is there another way. The issue I have with my initial implementation idea is that it leads to the same sort of thing as the sidescoller background idea as the texture size would have to be huge for a reasonable sized play area (eg greater than 1k x 1k, and no cards handle textures of that size afaik), textures get scaled up from say 512x512 to fit to a sphere that might be 4k radius, or use texture tiling which leads to very simialr backgrounds (eg you may see the same galaxy image through the left and right windows while moving straight). At this stage I''m not sure which way to go so thought I''d ask here since I don''t currently have time to do up some tech tests but wanted to get a head start on planning an idea I have. Thanks in advance.
Advertisement
quote:Original post by Knytestorme
My question is, they could also be using a skybox actually made up of a shpere not a cube (which would actually seem more appropriate for a 360 degreee space combat game) and so if they are, how would you generate the skysphere for it to work in a similar fashion to a skybox.


That is not true. A skybox textured properly is more than sufficient. The biggest obstacle is making those textures. When you view the texture on a flat surface (like in a paint program), they should appear warped or bent. When those warped textures are applied to the skybox, they will create the proper perspective.

Have a look at some of those Quicktime VR images. When you''re looking through Quicktime, they look normal. When you look at the entire image at once, it looks very odd and warped.
SpiffGQ
quote:
would it be easiest to work out the max co-ords of your playing area and then just generate a sphere of a size that encircles the playarea and texture the interior of the sphere, or is there another way.

Actually, mapping a skytexture to a skydome is a lot harder than a sky box. Skyboxes are simple: just take 6 textures with a FOV of 90° each. Mapping a sphere without distortions at decent resolutions in almost impossible.

quote:
The issue I have with my initial implementation idea is that it leads to the same sort of thing as the sidescoller background idea as the texture size would have to be huge for a reasonable sized play area (eg greater than 1k x 1k, and no cards handle textures of that size afaik),

Most modern cards can handle textures up to 4k x 4k. But that would be a bit overkill for a sky box

quote:
textures get scaled up from say 512x512 to fit to a sphere that might be 4k radius, or use texture tiling which leads to very simialr backgrounds (eg you may see the same galaxy image through the left and right windows while moving straight).

Don''t know if I got you right here, but it sounds, as you if you are scaling the skybox/sphere with your scene. Don''t do that. In fact, the sky scale should be totally indpendent of your 3D scene scale. Even if your scene has a scale of 10 miles, you can still have a skybox with a scale of a few inches. And it will look good. Just be sure to disable the depth buffer, when rendering the sky.

/ Yann
quote:Original post by Yann L
Most modern cards can handle textures up to 4k x 4k. But that would be a bit overkill for a sky box

Are you sure? I''m pretty sure most of them "only" support 2k x 2k. My GeForce4 440 Go does, my Voodoo5 does, and I think even my Radeon 8500 doesn''t do 4k textures, but I, as ever, don''t have access to it right now so I can''t check.

OKOK I''ll shut up now, I''m nitpicking again >_<

- JQ
Full Speed Games. Coming soon.
~phil
My GF4 Ti supports 4k x 4k textures...

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
OK, but that''s still not "most modern cards"
In any case, 4kx4k is pretty huge. Even in DXT1, that''s, uh, 8MB for just one texture, without a mip map. (more than 10MB for a full chain) Sure, it can be done on those fancy 128MB cards...

- JQ
Full Speed Games. Coming soon.
~phil
I define a ''modern card'' as GF3+

But it is total overkill to use that as a skybox texture. Not only will it take tons of memory, it will also be pretty slow. But those huge texture can actually be useful for eg. shadowmapping etc.
Question, Yann:
Sorry for going off-topic, but since you mentioned shadowmapping, how do you put multiple shadow maps onto one texture? Seperate them by an empirically determined empty border and then just clamp the projected texture coordinates to never go outside that border? (and into the neighbouring shadow map) Is this really better than putting the shadow maps into seperate textures?
Or did you mean something different?

Thanks

EDIT:
Oh and I consider a Radeon 8500 a GF3+ card. (well, it is in fact better than a GeForce3)

- JQ
Full Speed Games. Coming soon.

[edited by - JonnyQuest on September 9, 2002 12:58:39 PM]
~phil
quote:
Sorry for going off-topic, but since you mentioned shadowmapping, how do you put multiple shadow maps onto one texture? Seperate them by an empirically determined empty border and then just clamp the projected texture coordinates to never go outside that border? (and into the neighbouring shadow map) Is this really better than putting the shadow maps into seperate textures?
Or did you mean something different?

Nah, I just meant using a 4k x 4k texture as a single shadowmap. That can be useful, if you need extremely high precision shadows on very fine geometry (on a well projected 4k depthmap, shadows look almost as if they were raytraced).

quote:
Oh and I consider a Radeon 8500 a GF3+ card. (well, it is in fact better than a GeForce3)

I'm an nVidia follower But I admit, the 9700 kicks serious ass.

/ Yann

[edited by - Yann L on September 9, 2002 2:09:09 PM]
quote:Original post by Yann L
Nah, I just meant using a 4k x 4k texture as a single shadowmap. That can be useful, if you need extremely high precision shadows on very fine geometry (on a well projected 4k depthmap, shadows look almost as if they were raytraced).

Oh, right. That must look pretty damn cool. At least you can use an alpha-only texture or so for shadow maps...

quote:
I'm an nVidia follower

Damn you!

Edit: "quote", not "quite", ack!

- JQ
Full Speed Games. Coming soon.

[edited by - JonnyQuest on September 10, 2002 5:04:20 AM]
~phil

This topic is closed to new replies.

Advertisement