Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / HighRes Landscape testing
1 2 Previous Next
Parent - By Newton [de] Date 2011-07-03 17:10
If the landscape has a size of powers by two, not even the border of that material is visible.
- - By PeterW [gb] Date 2011-07-16 21:08 Edited 2011-07-20 17:36
The potrace utility Sven2 uses can actually be used to ramp up the scaler quality quite a bit further. Behold: HQ8x [1] :)



This really illustrates the limit of the technique though. But I guess having three mip-map levels for the scaler won't hurt.

[1] Note however that it's now increasingly inaccurate to call it that.
Parent - - By PeterW [gb] Date 2011-08-04 00:02 Edited 2011-08-04 00:24


After a bit more of mucking around with graphics tools I managed to get a much nicer high-res scaler. Not completely smooth, but now we definetely have all important zoom factors covered. Still might have to look into mip-mapping.

Also of note: Having the scaler case selection in CPU means that I can put a bit more effort into selecting the right case. The three-way-meet of materials now uses the scaler for one edge, and just GPU scaling for the remaining edge. If you're lucky you don't see anything. If you're unlucky, you see an actual blocky pixel - but that still looks better than artifacts imo (just compare the two posted pictures where three materials meet).

Btw: 8x textures plz? :P

Edit: And as usual, a quick tour of frozen fortress shows just how often this corner case happens. Still, reverting to solid pixels seems like the cleaner solution to me.

Parent - - By Newton [de] Date 2011-08-04 11:52
don't forget that the player should not zoom in more than about 4x anyway
Parent - - By Sven2 [de] Date 2011-08-04 12:12
Actually, that's a bad restriction. Because we also want to restrict the view range, setting the max zoom to 4x would limit the maximum resolution you can set.
Parent - - By Newton [de] Date 2011-08-04 12:30
There has to be a limit of detail somewhere. And "back then" we used the guideline that modelled objects and textures should look good still on 3x zoom.
Parent - - By Sven2 [de] Date 2011-08-04 12:41
It's fine if the resolution is not fully utilized. The landscape may get blurry and the models look less detailed. But still it should be possible to zoom if you set a high resolution. Otherwise, a scenario designer cannot use SetPlayerZoomByViewRange/SetPlayerViewLock to lock the player into a close-up view.
Parent - By PeterW [gb] Date 2011-08-04 14:06 Edited 2011-08-04 14:10
Well, it's not like resolutions are skyrocketing. Wide-screen TVs have 1920 pixels horizontally, so we can probably assume that 2000 pixels is the upper bound on how many pixels the human eye can even see. This means that 3x zoom bound translates into a minimum view range of 666 landscape pixels, which is about what you saw in CR with 640x480.

Zooming in 8x would be 250 pixels, so we'd arrive somewhere below 320x240, which could probably work for something like conversation zoom-in in adventures, but little else.

Edit: But we should really stop talking about 3x too much, that's bound to become a mathematical nightmare. We should switch to 4x - I already did that for landscape textures, in case somebody noticed.
Parent - - By Pyrit Date 2015-10-02 19:20
Would it be possible to smoothen the corners of the singe pixels? Even after 4 years, the squares annoy me :o
Parent - By PeterW [gb] Date 2015-10-03 08:28
Not easily. Basically, every pixel can only interpolate between two material textures (here: snow and ground). To do more would require a significantly more complex scaler texture (plus shader magic to texture *3* materials per output pixel) or subdividing landscape pixels so we can use a different interpolation method per direction (which wouldn't look very consistent either).

Best "easy" idea I could come up with would be changing the selection of that "other" material to sometimes prefer sky. However, that would mean that the earth edge would move (and get more pixely) when the snow falls on it. That seemed less desirable to me.
Parent - By Sven2 [us] Date 2015-10-05 17:15
At least that way it's obvious that it's a single pixel of a different material.
- - By Newton [de] Date 2011-07-25 17:11

> http://hg.openclonk.org/openclonk/rev/deafb273dd46


With the shader activated, the game runs smooth now on my PC. However this is how it looks.
Parent - By Maikel Date 2011-07-25 17:50
About the same as for my laptop.
Parent - By PeterW [gb] Date 2011-07-25 18:08
Ah, the rounding issue again. What was I thinking. The better performance sounds encouraging, though.
Parent - - By PeterW [gb] Date 2011-07-25 22:13
Pushed another version. Does it work better?
Parent - - By Maikel Date 2011-07-25 22:40
Actually a little better, performance here seems also better(little hard to judge quantitavily).

See attached screenshot for issues with water which still remain.
Attachment: landscape.PNG (205k)
Parent - - By PeterW [gb] Date 2011-07-25 23:07
Hm. Does it help if the landscape size is power-of-two?
Parent - - By Maikel Date 2011-07-26 00:37
Yes, then it looks as it should(judging from a pc which rendered the landscape just fine recently).
Parent - - By PeterW [gb] Date 2011-07-26 15:47
Good to hear. Maybe we can actually get to a decent GPU coverage. My Intel-GPU laptop still doesn't work, though :(
Parent - - By timi [de] Date 2011-07-26 16:00
Not even Intel's new GPUs? Intel HD 3000? Looks bad on the Mac side then :/
Parent - By PeterW [gb] Date 2011-07-26 16:21
How should I know? I just know that my laptop doesn't work. Might also be the Linux drivers or something. If you can find somebody with this kind of hardware, please have them test and post into the organised testing thread. Then we can see whether a pattern emerges.
Up Topic Development / Developer's Corner / HighRes Landscape testing
1 2 Previous Next

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill