Duke4.net Forums: multipsky tile/image dimensions - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

multipsky tile/image dimensions  "What are the ideal or optimal dimensions to use for multipsky tiles?"

User is offline   dwtietz 

#1

I'm trying to create some custom multipsky tiles and I can't seem to locate any documentation anywhere that mentions what the dimensions of the tiles should be (whether they be formatted to a specific size, or a suggested size for example)...

I noticed that both Duke 3D WT and the Total Meltdown TC use tiles that are 128 x 400 pixels in size. Is this a hard set value regarding what the tiles should be? In a test last night I tried increasing the factor by 1.25x, so my tiles were 160 x 500 pixels but that didn't work and everything appeared quite broken.

Is there a minimum or maximum x,y size that the tile should be, or is the 128 x 400 pixel size an undocumented recommendation?

In another test today, I tried a multipsky with 16 faces instead of the default 8. The tiles were kept at 128 pixels wide in this test and it looked much better horizontally, but unfortunately my images didn't end up being 400 pixel high (only about half of that), so things looked messed up if you looked up or down.

I imagine that there should be some "magic numbers" regarding the dimensions of the tiles that should be used, and I'm just wondering if anyone has any idea what these tiles sizes should really be.
0

User is offline   dwtietz 

#2

I don't think that this is relevant, but I'm trying to use this in Ion Fury, and I'd like to end up with something that looks a little more hi-res than you'd typically see in Duke 3D.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3

https://wiki.eduke32...Multipsky_(DEF)
0

User is offline   MC84 

#4

Do you have a copy of World Tour? If you browse the local files you'll find under the 'def' folder a "skybox_data" file that includes the examples used in the game. From memory not all of the tiles conformed to the 400x200 dimension, but I may be wrong. I've only dabbled once or twice with these sorts of skies, but I find cubemaps are more straightforward and intuitive.
0

User is offline   dwtietz 

#5

View PostFox, on 02 January 2021 - 11:28 PM, said:


I've referred to this wiki page, and while it does vaguely indicate that it will create a parallax sky from a set of tiles regardless of their width, there is nothing that mentions what kind of calculations can be performed in order to determine what is optimal or ideal, and there is no mention of what the height of the tiles should be at all.

View PostMC84, on 02 January 2021 - 11:31 PM, said:

Do you have a copy of World Tour? If you browse the local files you'll find under the 'def' folder a "skybox_data" file that includes the examples used in the game.

Yes, I've looked at these and they were all 128 x 400. I'm guessing at the moment that there may be other tile dimensions that could also be used that would yield higher quality results though; I mean... 128 x 400 works, but it looks pretty rough. I am already using skyboxes, and this is where the real quality comes into play, but if someone should particularly need (or want) to switch over to the classic renderer, I'd like to be able to substitute the skybox with a similarly designed parallax sky that doesn't look half bad.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#6

View Postdwtietz, on 03 January 2021 - 04:34 AM, said:

I've referred to this wiki page, and while it does vaguely indicate that it will create a parallax sky from a set of tiles regardless of their width, there is nothing that mentions what kind of calculations can be performed in order to determine what is optimal or ideal, and there is no mention of what the height of the tiles should be at all.

There's no standard for the size. You use what you want...
0

User is offline   dwtietz 

#7

Surely there must be some sort of a formula that could be used in order to derive suitable tile sizes that don't end up doing weird things like this when you look up and down though.

Attached thumbnail(s)

  • Attached Image: This doesn't work.png

0

User is offline   Striker 

  • Auramancer

#8

View Postdwtietz, on 03 January 2021 - 06:10 AM, said:

Surely there must be some sort of a formula that could be used in order to derive suitable tile sizes that don't end up doing weird things like this when you look up and down though.

If you use tilefromtexture for your tiles, add the "truenpot" keyword to them.

Like:
tilefromtexture 8000 { file "tiles/8000.png" truenpot }


Looks like your problem is just due to the textures not being a power of two in height. (ie: 8, 16, 32, 64, 128, 256, 512, 1024, etc) That keyword changes the behavior.

If they're ART tiles, you may be able to just do the following:
tilefromtexture 8000 { truenpot }


After that, you may still need to adjust the y scale and/or horizon fraction for your multipsky as well just so you don't see the top or bottom of the texture.

This post has been edited by Striker: 03 January 2021 - 06:59 AM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#9

View Postdwtietz, on 03 January 2021 - 06:10 AM, said:

Surely there must be some sort of a formula that could be used in order to derive suitable tile sizes that don't end up doing weird things like this when you look up and down though.

I don't know what's the size of the texture you are using.

And did you just replaced the sky texture in Ion Fury? That one is supposed to repeat on the horizon.
0

User is offline   dwtietz 

#10

View PostStriker, on 03 January 2021 - 06:54 AM, said:

If you use tilefromtexture for your tiles, add the "truenpot" keyword to them.


Thank you for the suggestion, but this didn't have any effect. It still looks the same when the player looks up or down. I haven't found anything that really works yet aside from tiles that are 128 x 400 in size, but I still suspect that there are likely other resolutions that should work just as well, I just need to know what sort of a formula should be followed while planning out the layout for each face of the cylinder.
0

User is offline   dwtietz 

#11

View PostFox, on 03 January 2021 - 07:11 AM, said:

I don't know what's the size of the texture you are using.


I've tried a variety of different sizes and scales, and so far only 128 x 400 has really worked. The tiles that I have in the example shown above are 128 x 196 (but I'd possibly like to use something with a much higher resolution).

View PostFox, on 03 January 2021 - 07:11 AM, said:

And did you just replaced the sky texture in Ion Fury? That one is supposed to repeat on the horizon.

No, I'm not using or replacing the sky texture in Ion Fury at all. I've created a multipsky using new tile numbers outside of the range used by the tiles000.art file. With some tiles that are not 128 x 400, (like the ones mentioned above), it looks fine horizontally, but if I look up and down vertically is gets all messed up, but I do want it to pan a bit when the player looks up or down.
0

User is offline   Striker 

  • Auramancer

#12

View Postdwtietz, on 03 January 2021 - 07:12 AM, said:

Thank you for the suggestion, but this didn't have any effect. It still looks the same when the player looks up or down. I haven't found anything that really works yet aside from tiles that are 128 x 400 in size, but I still suspect that there are likely other resolutions that should work just as well, I just need to know what sort of a formula should be followed while planning out the layout for each face of the cylinder.

Try with the latest EDuke32 synthesis build instead of the official Ion Fury binary. I don't think the official binary has this keyword yet.

This post has been edited by Striker: 03 January 2021 - 08:41 AM

0

User is offline   dwtietz 

#13

That looks like it might have done something...

In this test run using eduke32 synthesis build 20201221-9297, a sixteen faced cylinder for the multipsky using tiles that are 256 x 392 pixels, and using truenpot in the tilefromtexture def statements, the view seems fine both horizontally and vertically, but.... I still can't look up or down without having the whole cylinder repeating. More importantly, even if it had worked, it still wouldn't make it work in Ion Fury if it's relying on a setting that doesn't yet exist in that binary.

I'm not giving up hope that there should be some kind of a mathematical formula that I can follow in order to determine what tile/image resolutions can be made to work.

Attached thumbnail(s)

  • Attached Image: truenpot_1.png
  • Attached Image: truenpot_2.png


This post has been edited by dwtietz: 03 January 2021 - 09:14 AM

0

User is offline   dwtietz 

#14

Well... using tiles that are 256 x 419 pixels partially works, but only if I set yscale and horizfrac both to 32768, but this prevents any panning up or down at all, so it's not *really* what I'm aiming for either.
0

User is offline   dwtietz 

#15

If it should help any, here are a couple of video examples...

First, this is a test where the parallax multipsky is using 8 faces on the inside of the cylinder with tiles that are 128 x 400 pixels. You'll be able to see that I can pan up and down a little bit (although I had to cut the panning off by setting horizfrac to 33024, which is fine... at least I still was able to pan up and down a bit).

multipsky 128x400 tiles

and here is the test from earlier today where I have 16 faces on the cylinder and I've used larger tiles that are 256 x 419 pixels. As far as the resolution goes, it looks better that the earlier test, but I had to make sure that there was no panning up and down at all, otherwise the pattern would repeat which basically breaks the visual effect - I would like to be able to do at least a little bit of vertical panning though):

multipsky 256x419 tiles

There simply must be some sort of a mathematical equation that I could use that should allow me to determine what the optimal tile size (x/y) should be to achieve such an effect.

This post has been edited by dwtietz: 03 January 2021 - 01:20 PM

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#16

I'm having a hard time understand what you want.

Doesn't you just need a sky tall enough to fill the whole screen?

Also remember that Eduke let's you change the FOV, meaning you need an even taller texture depending of the setting.
0

User is offline   dwtietz 

#17

View PostFox, on 04 January 2021 - 10:50 AM, said:

I'm having a hard time understand what you want.

Doesn't you just need a sky tall enough to fill the whole screen?

Also remember that Eduke let's you change the FOV, meaning you need an even taller texture depending of the setting.


Oh yeah, I haven't even taken FOV in account yet, but surely there must be some sort of a mathematical formula (if not a specific tile size) for determining what *should* work best. It certainly doesn't appear to be entirely "anything goes" though as I've had a number of attempts where it completely bugs out if the player looks up or down even the smallest amount.

If I can end up with tiles that will work with any FOV setting that also allows the player to pan up or down a bit that would be cool (Cutting off the ability to pan up/down too much with horizfrac is fine though).


But... since my original source images, which span a full 360 deg horizontal coverage, may not be the same x,y dimensions, there must be some sort of an equation that I could use to determine what I'd need to resize them too, and which would also determine the x and y dimensions of each of the 8 or 16 panels, depending on how many faces I use for the multipsky.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #18

I would highly recommend making your image dimensions exact powers of two.
1

User is offline   dwtietz 

#19

I can easily have the panel widths being exact powers of two, but I can't control the height. Well... maybe I can sometimes, but often enough it might not be ideal to do so.

I have been graphing what has been working for me so far, but I'm still certain that there must be some sort of an equation that I could use to determine exactly what values I should be using. As it is, I am using multipskies with 16 panels, panel widths are always 256 pixels wide, panel heights may vary, yscale is 32768, FOV is set to 120, and these are the horizfrac values that I have found that work so far (attached image)


I've had to find these values by tedious trial and error, but there just must be some sort of a universal equation that could calculate this sort of stuff for you.

Attached thumbnail(s)

  • Attached Image: Horizfrac Graph.png

0

User is offline   Mark 

#20

I could be wrong but my impression is that software renderer players have learned to accept skybox shortcomings because it doesn't affect gameplay much which is the most important thing. Then the other group, me included, prefer the standard 6 tile skyboxes in Polymost or polymer. So there may not be anyone else experimenting like you are to help. This formula sounds like a quest for Lara Croft. :P

This post has been edited by Mark: 09 January 2021 - 07:44 PM

0

User is offline   dwtietz 

#21

That would be very unfortunate if nobody seems to know what math could be applied to calculate these sort of things quickly.

Me and my partner are using skyboxes in our project, but we both tend to be quite particular when it comes to detail - so when a skybox can't be rendered (albeit rarely) we'd like to make use of multipsky parallax skies when needed, and they are capable of displaying a decent amount of quality. Some of these could potentially be used even without a skybox counterpart.

Attached thumbnail(s)

  • Attached Image: multipsky_sample.png

0

User is offline   dwtietz 

#22

Well, for anyone that might have some future interest in this particular topic, I think that I have have found the minimum dimensions that you'd ever want to use for the panels in a multipsky setup. In the form of a ratio, the minimum x:y, or width:height of a image file appears to be 1:2.70703125. Anything less causes things to start to break down and not always work perfectly.

Using this ratio with a panel that is 256 pixels wide gives you a minimum panel height of 693 pixels. With this being the absolute minimum, you wouldn't want any panning up or down, so horizfrac would be set to 0.

I don't know yet what the maximum panel height could be yet as I haven't tried pushing it to it's limits in that direction. The stock panels in WT are 128 x 400 pixels which is a ratio of 1:3.125. 256 x 800 is the same ratio and is also usable. The highest I've gone yet is 256 x 1024 which is a ratio of 1:4 and it hasn't broken yet at that point.

As the height of the panels increase or decrease, horizfrac needs to be adjusted to control how much panning up or down can occur as the player looks around in order to prevent things form breaking. At some point I'd like to determine what the maximum ratio should be for the panels and then come up with a scale to determine what horizfrac should be set to based in the height of the tiles.

[UPDATE] A ratio of 1:8 (256 x 2048 pixels) still works fine with horizfrac set to 111442. I believe I could still keep pushing the height more yet, but this might be a good number to use as a practical limit (although I haven't explored beyond this point yet).

This post has been edited by dwtietz: 10 January 2021 - 12:01 PM

0

User is offline   dwtietz 

#23

Whoops, there were a few test runs where I'd apparently missed trying them out at the lowest game resolutions, so I had to adjust the values a bit.

Attached thumbnail(s)

  • Attached Image: Untitled.png

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options