Putting an animated transparent sky and a normal one in map

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom 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.
Post Reply
User avatar
crazyflyingdonut
Posts: 68
Joined: Sun Jul 15, 2018 11:48 am
Graphics Processor: nVidia (Modern GZDoom)
Location: [REDACTED]

Putting an animated transparent sky and a normal one in map

Post by crazyflyingdonut »

Okay, so I need help. I am using the PSX animated fire sky (transparent version) from Realm667, and I want it to be put over a regular sky.

Code: Select all

map (CENSORED) "(CENSORED)"
{
	levelnum = (CENSORED)
	next = "(CENSORED)"
	DoubleSky
	sky1 = "TFIRSK00"
	sky2 = "SKY3"
	music = "(CENSORED)"
}
When I run the map, the PSX animated fire sky shows up, but not the other sky.

Don't mind the censors. I edited the code after pasting it here to prevent upcoming information from being seen. The original code does not have censors all over it.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Putting an animated transparent sky and a normal one in

Post by Enjay »

Are the two skies the same size? It doesn't say that's required in the Wiki (as far as I can see) but, from memory, I *think* that might be a requirement.
User avatar
crazyflyingdonut
Posts: 68
Joined: Sun Jul 15, 2018 11:48 am
Graphics Processor: nVidia (Modern GZDoom)
Location: [REDACTED]

Re: Putting an animated transparent sky and a normal one in

Post by crazyflyingdonut »

Enjay wrote:Are the two skies the same size? It doesn't say that's required in the Wiki (as far as I can see) but, from memory, I *think* that might be a requirement.
Nope. The "SKY3" is the normal Doom 2 SKY3. I wanted to have that SKY3 texture and the PSX animated fire sky (transparent version) at the same time on the map.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Putting an animated transparent sky and a normal one in

Post by Enjay »

You could try redefining the PSX sky to be 256x128 then. From memory, it's got loads of frames so you might just want to do a cut down version of a couple of frames to test the principle before launching in to redefining all howevermany frames. Or use another texture instead of SKY3 that's the same size as the PSX sky (again, just to test the principle). However, I have a nagging feeling that the PSX sky is a weird size. 63x128 or something unusual. Maybe.
User avatar
crazyflyingdonut
Posts: 68
Joined: Sun Jul 15, 2018 11:48 am
Graphics Processor: nVidia (Modern GZDoom)
Location: [REDACTED]

Re: Putting an animated transparent sky and a normal one in

Post by crazyflyingdonut »

Enjay wrote:You could try redefining the PSX sky to be 256x128 then. From memory, it's got loads of frames so you might just want to do a cut down version of a couple of frames to test the principle before launching in to redefining all howevermany frames. Or use another texture instead of SKY3 that's the same size as the PSX sky (again, just to test the principle). However, I have a nagging feeling that the PSX sky is a weird size. 63x128 or something unusual. Maybe.
Yeah, the PSX sky is 63x224. I do not want to mess with it, I think it is perfect the way it is. So I guess I might have to find an image that is 63x224. The problem is, if I search on Google images for "sky" and set the size to 63x224, all I get is pictures of women, lamps, remotes, shower curtains, beer, products, basically everything that isn't a sky.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Putting an animated transparent sky and a normal one in

Post by Enjay »

When I was suggesting redefining the PSX sky, I meant writing a new textures lump for it so that it was the correct size by repeating its individual patches horizontally until it filled the texture. So, it wouldn't really look any different in game. However, the fact that it is 224 tall makes that a bit more awkward.

You're unlikely to get a good looking sky texture that is 63x224 BTW; even if you find a sky and resize the graphic to 63x224, that's a weird, narrow, tall size that won't suit typical sky pictures. If you found a sky and resized it to 256x224 (or even better 1024x224) then redefined the PSX one too, well, that *might* work.

Why do I say that a sky width of 1024 is even better? Because skies of that width are wrapped around perfectly and never repeat. The default 256-wide skies actually tile and appear 4 times in the sky. A 512-wide sky appears twice but a 1024-wide one wraps around perfectly just the once (so you can put obvious features - such as a moon - on them without getting multiples of that feature shown in the game). The skies in TNT Evilution do this. The Plutonia skies have a variety of approaches. One is 256 wide, one is 512 wide and one is 1024 wide.
User avatar
crazyflyingdonut
Posts: 68
Joined: Sun Jul 15, 2018 11:48 am
Graphics Processor: nVidia (Modern GZDoom)
Location: [REDACTED]

Re: Putting an animated transparent sky and a normal one in

Post by crazyflyingdonut »

Enjay wrote:When I was suggesting redefining the PSX sky, I meant writing a new textures lump for it so that it was the correct size by repeating its individual patches horizontally until it filled the texture. So, it wouldn't really look any different in game. However, the fact that it is 224 tall makes that a bit more awkward.

You're unlikely to get a good looking sky texture that is 63x224 BTW; even if you find a sky and resize the graphic to 63x224, that's a weird, narrow, tall size that won't suit typical sky pictures. If you found a sky and resized it to 256x224 (or even better 1024x224) then redefined the PSX one too, well, that *might* work.

Why do I say that a sky width of 1024 is even better? Because skies of that width are wrapped around perfectly and never repeat. The default 256-wide skies actually tile and appear 4 times in the sky. A 512-wide sky appears twice but a 1024-wide one wraps around perfectly just the once (so you can put obvious features - such as a moon - on them without getting multiples of that feature shown in the game). The skies in TNT Evilution do this. The Plutonia skies have a variety of approaches. One is 256 wide, one is 512 wide and one is 1024 wide.
So how do I fix the problem?
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Putting an animated transparent sky and a normal one in

Post by Enjay »

If I'm right, you need to make both skies the same size - either by redefining the PSX sky to be the same size as your main sky, of finding a sky the same size as the PSX sky.

Chances are you'll need to do a bit of both: find a sky that looks good when changed to 256x224 or 512x224 or 1024x224 in a graphics editor and then redefine the PSX sky in a textures lump (or a traditional TEXTURE1 lump) so that it is the same size as the other sky graphic. It'll be quite a bit of tedious work to redefine the PSX sky because, IIRC, it's got loads of frames (which is why I suggested trying a small sub-sample of it first).
User avatar
crazyflyingdonut
Posts: 68
Joined: Sun Jul 15, 2018 11:48 am
Graphics Processor: nVidia (Modern GZDoom)
Location: [REDACTED]

Re: Putting an animated transparent sky and a normal one in

Post by crazyflyingdonut »

Enjay wrote:If I'm right, you need to make both skies the same size - either by redefining the PSX sky to be the same size as your main sky, of finding a sky the same size as the PSX sky.

Chances are you'll need to do a bit of both: find a sky that looks good when changed to 256x224 or 512x224 or 1024x224 in a graphics editor and then redefine the PSX sky in a textures lump (or a traditional TEXTURE1 lump) so that it is the same size as the other sky graphic. It'll be quite a bit of tedious work to redefine the PSX sky because, IIRC, it's got loads of frames (which is why I suggested trying a small sub-sample of it first).
Well, I just decided to make my own sky in a 63x224 size, and it worked. Now I can see both the PSX sky and my own sky at the same time on the map. Thank you for the help once again.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Putting an animated transparent sky and a normal one in

Post by Enjay »

No worries. Glad you found something that works well in that size.
Post Reply

Return to “Mapping”