How to make skybox from sky texture?

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: How to make skybox from sky texture?

Re: How to make skybox from sky texture?

by PoptartNoahh » Sun Jun 10, 2018 7:01 pm

What type of projection are you trying to make, and from what source? the doom skies are rectangular equidistant and this is enough to make a cube/gnomonic map.

Re: How to make skybox from sky texture?

by JPL » Mon May 21, 2018 9:03 pm

MartinHowe wrote:Does anyone know if there is a way to make a skybox from a sky texture? Is there some algorithmic way to do it? If I understand how skboxes work, I would have thought not as it would involve finding textures for the walls and floor that (at least roughly) match the original sky texture; however I thought I'd ask.

(If somebody already knows of a skybox based on (or closely resembling) the E4 sky, that would be helpful too as that's what I'm aiming at).
Something I did a long time ago, unfortunately with no source file or repeatable steps to pass on, was take a static bitmap image and map it to a sphere in a 3D program, tiled it across the sphere as many times as looked good, then placed 6 square aspect cameras at the center of the (normals flipped) sphere and rendered out the usually top/bottom/front/back/left/right images. I iterated on it by editing the original image and managing the distortion across the sphere until it looked good enough.
This works a lot better with natural features like clouds and mountains, if you want rectilinear things like buildings and stuff to look good that will take more work.

There's probably a program that automates this kind of work to some extent, though the camera rig I made wasn't too tough. Getting the cameras' views' edges to line up with one another took the most fiddling but once it was done, I didn't need to touch it again.

Re: How to make skybox from sky texture?

by MartinHowe » Mon May 21, 2018 1:38 pm

Thanks - I thought probably not :(
I'll have a look at various skyboxes people have pointed me to in the other thread and see what I can find.

Re: How to make skybox from sky texture?

by Graf Zahl » Mon May 21, 2018 12:25 pm

Since a sky texture misses most of what makes up a skybox you won't be able to produce good results. That problem aside, it requires a complete recalculation because a skybox is a projection of a 360° view onto a cube surface. I don't know if any tool exists that could do it, but I don't think so.

How to make skybox from sky texture?

by MartinHowe » Mon May 21, 2018 12:57 am

Does anyone know if there is a way to make a skybox from a sky texture? Is there some algorithmic way to do it? If I understand how skboxes work, I would have thought not as it would involve finding textures for the walls and floor that (at least roughly) match the original sky texture; however I thought I'd ask.

(If somebody already knows of a skybox based on (or closely resembling) the E4 sky, that would be helpful too as that's what I'm aiming at).

Top