Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Crispy

Skyboxes in Unreal

This topic is 5592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I''m implementing a skybox feature that is fairly similar to the one used in Unreal and its descendants - something that allows severals layers of "walls", "ceiling" and "floor" to exist. This is fine - everything''s nice. However I can''t really figure out how they solved the question of "infinity" - you can see the sky stretch as far as possibly possible. Implementing this, however, is tricky as drawing a humongous quad to really stretch so far that you can''t tell a difference will have a considerable performance hit. Does anyone here have a clue how they did it? Is it (the ceiling and the floor) sneakily "bent" to converge at the horizontal center point just some distance off (which should be visible, but it isn''t) or are there some other dark forces behind this? Crispy

Share this post


Link to post
Share on other sites
Advertisement
None of the sky-boxes in Unreal stretch to inifinity. Most of them are simply very large. A few use illusions. Most of the time the solve it by masking the horizon with a mountain range or something similar.

----
AIDS

Share this post


Link to post
Share on other sites
Most skyboxes are smaller than you would think. They just draw the sky box before everything else with the depth writes off, and then you rotate it according to how the player is orientated, but you don''t translate it anywhere. Then draw the rest of the scene.

Share this post


Link to post
Share on other sites
Unreal''s skyboxes are simply an area in the level (normally not connected to the main playable area) with a camera location inside.

From my experience, a pre-rendered skybox would be either 128^3 or 256^3; most skyboxes were less than 1024*1024*256 in Unreal units.

The view from the camera point, with the player''s current orientation, is drawn. The scene from the player''s actual location is then drawn on top. That way you don''t have to fake a sky with distant quads or other geometric effects.

This method is particularly flexible because you can make a ''standard'' skybox (i.e. cube with pre-rendered textures), or an actual scene (make polygonal mountains, or whatever), or have a combination.
You can also have movement, lighting, transparency, effects etc. to add whatever realism or eye candy you like.

Essentially, though, you''re just building an area of level as normal then rendering it before the scene. Just bear in mind that there is a fixed viewing point.

Share this post


Link to post
Share on other sites
Start Unreal, enable cheats, activate god and ghost mode, and fly high above the level. Look around, somewhere in the distance (generally not too far away from the level itself) you'll see the skybox(es). You can fly into them and inspect from every direction. At least, that used to work in Unreal I. Don't know about UT + U2, but I guess it's similar.


[edited by - Yann L on February 1, 2003 8:30:50 PM]

Share this post


Link to post
Share on other sites
A thing in Unreal (the first Unreal) that I like to know is how those guys make the game lightmaps. I think that isn''t multitexturing bacause when someone flash something on dark faces, the dark faces be visible. And don''t seems vertex lighting... it seems like multitextures... but don''t seems like multitexturing... well... as you can see, i''m confused

Share this post


Link to post
Share on other sites
Disabling depth testing - should''ve thought of this myself . Anyway - this brings along a couple of problems, be it as sneaky as it is - one of these is distortion between the skybox and the level itself. I''m personally implementing the skybox for an open level (a heightmap engine with no visible walls) and drawing the level and the skybox in different scales (a 512x512x128 skybox around a 1024x1024x256 level) greatly amplified the effect where the skybox seems physically nearer (yet appears behind everything else) than the level, thus moving considerably faster when you look at it on the background of the level itself and pan. Maybe indoor scenes can absorb this distortion...

As for lightmapping in Unreal - afaik lightmaps are used everywhere where dynamic lights need to be applied and speed is really an issue - they''re fast, versatile and don''t necessarily have to eat up a texture unit. Besides, Unreal is too old to use PPL (by default at least).

Crispy

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!