Problem with tall sky rendering

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread 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: Problem with tall sky rendering

Re: Problem with tall sky rendering

by Graf Zahl » Sun Nov 15, 2009 1:05 am

I really think it's better this way. If someone wants square pixels it's easy enough to do by y-scaling the sky texture with 1.2.

I did some more checks and it mostly works now. There was a minor problem with skytexturemid which has to be multiplied with the texture scale. I fixed that.

The offset is still not 100% correct for scaled textures. I checked a 256x240 pixel tall sky with scaling factors 1.2 and 0.83333 and in both cases the sky is placed a few pixels too high. It's minor and I don't think it needs to be addressed. I can't say if it's just precision errors or an indicator of something more serious.

Re: Problem with tall sky rendering

by randi » Sat Nov 14, 2009 7:06 pm

Fine, whatever. I grow weary of fiddling with the sky.

Re: Problem with tall sky rendering

by Graf Zahl » Sat Nov 14, 2009 6:06 am

The skies in Zendyn fare even worse than all the others. They are caught somewhere in the middle with the base line at around 216 in a 256 pixel tall texture so they don't look right with either method without some fudging (like the skyoffset I implemented yesterday in GZDoom.)

But if I had to make a choice, Randy's squishing again loses clearly because the base line and the filler part below it becomes visible too obviously.

Here's 2 screenshots of Zendyn MAP07:

Squished: (see the darker part in the sky? That's where the base line is supposed to be. The lower part is just a darkened reflection of the upper part)

Image


Shifted down: (it shows less of the mountains, of course but it also hides the parts that are supposed to stay hidden)

Image

Re: Problem with tall sky rendering

by Graf Zahl » Sat Nov 14, 2009 4:16 am

I'll check them immediately.

Re: Problem with tall sky rendering

by edward850 » Sat Nov 14, 2009 3:44 am

Graf Zahl wrote:I'll try to find more skies but so far I haven't found any aside from my own that aren't just space clouds etc which aren't affected by positioning either way.
Zen Dynamics has tall skys, most notably map07. Not sure how tall they are though.

Re: Problem with tall sky rendering

by Graf Zahl » Sat Nov 14, 2009 1:59 am

Hm. This doesn't work well for any of the skies I checked. I added a CVAR to toggle between the current behavior and how I think it should be and compared all the skies I found yesterday.

These are the WADs I checked:

The Darkest Hour (the moon and mountain skies)
Temple of the Ancients
Phoenix Rising
Paranoia
A Hex on You
The Chosen
Super Sonic Doom MAP10

In all of these cases it was beyond obvious that squishing the 240 tall sky to 200 is not the intended behavior. They look all better if left unsquished and having the base line moved down.
I'll try to find more skies but so far I haven't found any aside from my own that aren't just space clouds etc which aren't affected by positioning either way.

Re: Problem with tall sky rendering

by Xaser » Fri Nov 13, 2009 9:59 pm

Ah, that explains it. I take it that's the tallest the sky can be while still keeping the pitch clamped, which I assume works the same between ZDoom and Heretic/Hexen.

Re: Problem with tall sky rendering

by randi » Fri Nov 13, 2009 9:53 pm

Xaser wrote:I've always seen tall ones as 256, myself. Never had any idea that the actual intended size was less than that. :shrug:
It was 200 because that was what Heretic and Hexen used. They're the only games that had tall skies as standard features.

Re: Problem with tall sky rendering

by Graf Zahl » Fri Nov 13, 2009 11:07 am

That would be a non-issue if the software renderer could expand the skies like GZDoom does in hardware mode. Yes, it would just be a solid color but is there really a better option?

Re: Problem with tall sky rendering

by phi108 » Fri Nov 13, 2009 11:02 am

Actually, back when I was manually stretching all skies in pwads that I played, I would stretch them or add stuff on top to make them 228 pixels tall, because that is the distance I deduced from looking at the bottom of the rendered sky up to where the vertical view stops.

I wondered why automatic stretching did it a bit differently.

(but for another complication, the new skulltag lets the software view go even higher, but I have it disabled with "cl_oldfreelooklimit 1". It doesn't change sky stretching though.

Re: Problem with tall sky rendering

by Graf Zahl » Fri Nov 13, 2009 10:33 am

randy wrote:Are all third-party tall skies taller than 200 pixels? They were only meant to be 200 pixels tall, but if everybody is making them taller, I suppose something should be done about it.

I have seen several up to 240 (which all look strange) and created some 256 pixel tall ones myself.

I have addressed this issue in GZDoom today because I noticed that extra-tall skies didn't work properly there, too. But instead of being cut off at the top they were positioned too low because when I implemented them I used my own 256 pixel skies as guideline and I had the baseline placed far too high there (at y=160)

I've changed it now so that the baseline is always at y=200 for anything >= 200 pixels tall. Except for my own skies this appears to work fine with everything I checked. But to keep my own skies I'll add an offset option to ANIMDEFS so that I can easily reposition them. Could be used as a real feature... ;)

Re: Problem with tall sky rendering

by Xaser » Fri Nov 13, 2009 10:22 am

I've always seen tall ones as 256, myself. Never had any idea that the actual intended size was less than that. :shrug:

Re: Problem with tall sky rendering

by randi » Fri Nov 13, 2009 9:23 am

Are all third-party tall skies taller than 200 pixels? They were only meant to be 200 pixels tall, but if everybody is making them taller, I suppose something should be done about it.

Re: Problem with tall sky rendering

by Graf Zahl » Fri Nov 13, 2009 4:43 am

No idea. I scanned through 100 WADs already and all tall skies I saw so far were of the kind where shifting the sky down looks better.

Maybe some advanced sky rendering options like explicitly specifying the position would be a good idea. Then we could add a compatibility option for affected WADs and if necessary handle them in compatibility.txt.

Based on what I saw I already made some changes to GZDoom which also had it wrong, but in a completely different way.

Re: Problem with tall sky rendering

by Enjay » Fri Nov 13, 2009 3:56 am

Would doing so mess up WADs where the author has spent time positioning his sky graphic based on Zdoom behaviour? It's quite a while since I used a single tall sky graphic for anything but I do remember that I would go back and forth between my graphics editor and Zdoom to ensure that the sky I was making looked as I wanted it to in the game.

Top