Newer skies

Remember it never hurts to ask, but you might not get it.
User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Newer skies

Postby Marscaleb » Mon Aug 14, 2017 12:00 am

I was experimenting with skyboxes today. I noticed a few things. Most notably, the skies in this engine are always smoothed, even if smoothing is disabled. But as I thought about it, I began to realize that you wouldn't want them to. If you are using a skybox, the illusion is broken if you can see the corners, which would stick out horribly if they used nearest neighbor filtering. If you were using the default sky sphere, and carefully crafted the sky image to look proper when distorted by the spherical mapping, the pixelated look would again be destroyed by the way the image gets distorted.

So if you want to use a low-resolution aesthetic, there are only two ways this could be achieved.

One, use portal skies.

This would be pretty neat, and would also be very useful for high-res aesthetics.
Portal skies work by crafting a special room (or a special 3D object) and then placing a camera inside this room. The image from this camera is rendered in place of the sky.
This gives a lot more control for creating skies the way you want them, plus it makes it easier to add special effects. You can have clouds slowly scroll by, have objects moving in the sky such as ships/planes, have a space-sky tumble so it looks like the ship you are on is spinning out of control, or even flash lightning in the sky timed with dynamic lights in your level.
Or if you wanted a low-res pixelated aesthetic you could build a simple backdrop of mountains and clouds where the textures face the camera in a logical manner.

In most games, the "sky box" room has just been tucked away somewhere inaccessible on the map. We could do that here, but it might also work logically to have an external object that each level accesses, either a special level or perhaps even an individual 3D object. I suggest this just because the normal skies in Doom just grab one of 3 or 4 premade skies for several levels, so if we were to emulate that functionality it would require accessing a sky object outside the normal map.

The second idea I have about skies is to improve the way the engine renders flat sky images.

I know this has been really tricky to do in 3D engines, since the same drawing technique doesn't quite pass over into 3D space. The modern ports of Build games billboard the sky, but if you look up you can . GZDoom and Risen3D do an interesting thing where they draw the sky onto a cylinder but have the top/bottom fade out into a fog effect.
But it seems to me that it should be possible to render a flat sky in a 3D world that better matches how they looked in these old engines.
I noticed something interesting about how Mario 64 rendered their skies. I was watching a of the game, and I noticed some odd polygons in the background. After a while I realized they were the sky, and they showed an interesting method of rendering some flat sky into the world, despite the fully 3D environment and extended camera movement.
Looking at the poly lay out in that video, you can see that it is a flat sky, rendered as polygons that always exactly face the camera. When the camera pitches up or down, the relative position of the plane shifts up/down, and likewise shifts over to the side when the camera rotates its yaw.
I would love to see this method duplicated in 3DGE. Granted, the existing Doom skies aren't built for viewing quite that high (although Heretic's skies are taller) but the sky plane could also be locked to the top of the camera so that at a certain point it never pans any further up. To make it easier to rotate the plane a full 360 degrees, instead of moving the plane we could just pan the texture.
For the back-end, I would suggest some extra sky pieces could be added like SKY1_U and SKY1_L that would pin themselves to the existing sky, so mods that want to add more sky certainly can, without disrupting the existing images within the original games.

So anyway, those are my suggestions.
Not exactly an important matter, but I thought I would post it while its on my mind.

User avatar
Coraline
Site Admin
Posts: 747
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: Newer skies

Postby Coraline » Tue Aug 15, 2017 2:49 pm

That skybox idea, for camera portal rendering, is on my todo list :-) I feel that is the next logical step for sky rendering upgrades ^^

Rendering DOOM-style flat skies has always been tricky but EDGE takes the cake IMO. If you notice EDGE blurs the top of the sky flat (and bottom) to create a psuedo-3D skybox. Literally, the engine creates a fake 256x256 sided skybox, projects the image all around in a cubic way (infinite vertical heights, so only N, S, E, W), and blurs the top/bottom to make it appear seamless, and I feel it does a good job at doing it.

There is no SkyDome projection, but it would be redundant seeing as this does nearly the same thing anyway.

But, I will look into the sky portal stuff as soon as I get home :D
\(סּںסּَ` )/ۜ

User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: Newer skies

Postby Marscaleb » Sun Aug 27, 2017 7:28 pm

Are we talking about the same engine? Because the skies in 3DGE are projected onto a sphere. Although this blurring-the-top business sounds like what I see done in a couple Doom ports. (Huh, I thought I had written out a description of these in my original post. I guess I didn't.)

User avatar
Coraline
Site Admin
Posts: 747
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: Newer skies

Postby Coraline » Mon Feb 19, 2018 8:03 pm

They are not sphere-ified. Believe it or not, EDGE will still create a skybox to project the normal skies onto (a full one at that). Sounds kinda odd, but that's how it was programmed originally...lol
\(סּںסּَ` )/ۜ


Return to “Feature Suggestions”

Who is online

Users browsing this forum: No registered users and 1 guest