How to make skybox from sky texture?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

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.

How to make skybox from sky texture?

Postby 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).
User avatar
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom

Re: How to make skybox from sky texture?

Postby 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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: How to make skybox from sky texture?

Postby 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.
User avatar
MartinHowe
In space, no-one can hear you KILL an ALIEN
 
Joined: 11 Aug 2003
Location: Waveney, United Kingdom

Re: How to make skybox from sky texture?

Postby 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.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: How to make skybox from sky texture?

Postby 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.
PoptartNoahh
 
Joined: 11 Dec 2017
Discord: PoptartNoahh#2982


Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 1 guest