[ASK] How to define a skybox ?
#1 Posted 30 June 2021 - 02:18 AM
Hi, guys
I tinkered with this skybox, in 6 images of 256 * 256. I would like to make a skybox out of it but I lack information on how to do it.
There is this example: http://wiki.eduke32....ki/Skybox_(DEF)
It has no effect if I use it in the "tiles.cfg" file and causes an error if I try to put it in "DEFS.CON".
Does anyone know how to do this? Many thanks in advance
#2 Posted 30 June 2021 - 02:41 AM
Here is a example
// tilefromtexture 232 { file "HR/krypto_sky_front.jpg" }
defineskybox 232 0 0 "HR/krypto_sky_front.jpg" "HR/krypto_sky_right.jpg" "HR/krypto_sky_back.jpg" "HR/krypto_sky_left.jpg" "HR/krypto_sky_top.jpg" "HR/blank_dn.jpg"
#3 Posted 30 June 2021 - 03:05 AM
Maybe the "duke3d.def" file has to be "included" in another file, like a .CON ?
This post has been edited by Seb Luca: 30 June 2021 - 03:05 AM
#4 Posted 30 June 2021 - 03:58 AM
This post has been edited by Mark: 30 June 2021 - 04:06 AM
#5 Posted 30 June 2021 - 04:46 AM
I understood that it was necessary to mention the 6 files according to the root, that's what I did. There is indeed a tile in a .ART, the one called to deploy the skybox, but I did not mention the 6 images by sprite numbers.
I could try that, however ...
EDIT : nothing more happens
This post has been edited by Seb Luca: 30 June 2021 - 04:53 AM
#6 Posted 30 June 2021 - 09:27 AM
2, name them propperly ( front back left right top down )
3, in duke3d.def include the lines
skybox { tile 94 pal 0 // this replaces tile94 with the defined skybox, but only then it has no pal set ( pal 0 ) front "skybox/yourskybox/front.png" right "skybox/yourskybox/right.png" back "skybox/yourskybox/back.png" left "skybox/yourskybox/left.png" top "skybox/yourskybox/top.png" down "skybox/yourskybox/down.png" }
note, you need to add a new skybox for every different one you want to add, so if you want to add a new skybox to tile 96 you cant just put a new branch under the first skybox, but instead need to add a new piece of code
else it will give wonky results or not load at all
skybox { tile 94 pal 0 // this replaces tile94 with the defined skybox, but only then it has no pal set ( pal 0 ) front "skybox/yourskybox/front.png" right "skybox/yourskybox/right.png" back "skybox/yourskybox/back.png" left "skybox/yourskybox/left.png" top "skybox/yourskybox/top.png" down "skybox/yourskybox/down.png" } skybox { tile 96 pal 0 // this replaces tile94 with the defined skybox, but only then it has no pal set ( pal 0 ) front "skybox/yourskybox/front.png" right "skybox/yourskybox/right.png" back "skybox/yourskybox/back.png" left "skybox/yourskybox/left.png" top "skybox/yourskybox/top.png" down "skybox/yourskybox/down.png" }
This post has been edited by jimbob: 30 June 2021 - 09:29 AM
#7 Posted 30 June 2021 - 09:40 AM
jimbob, on 30 June 2021 - 09:27 AM, said:
2, name them propperly ( front back left right top down )
3, in duke3d.def include the lines
skybox { tile 94 pal 0 // this replaces tile94 with the defined skybox, but only then it has no pal set ( pal 0 ) front "skybox/yourskybox/front.png" right "skybox/yourskybox/right.png" back "skybox/yourskybox/back.png" left "skybox/yourskybox/left.png" top "skybox/yourskybox/top.png" down "skybox/yourskybox/down.png" }
Dafok, it works perfeclty ! Thank you so much, dude
Yes, I had assumed that straight away: I directly changed the "94" to the sprite value that I had already used for my previous test (and I also kept my own filenames). I didn't want to replace the blue sky
Thanks again !
I guess I'll re-test with a more HD version of the picture
This post has been edited by Seb Luca: 30 June 2021 - 09:48 AM
#8 Posted 30 June 2021 - 09:52 AM
#9 Posted 30 June 2021 - 10:01 AM
@Mark : Effectively ... It doesn't work if I replace the file paths with sprite numbers. But that's okay I don't mind storing this skybox out of my .ART
This post has been edited by Seb Luca: 30 June 2021 - 10:40 AM
#10 Posted 30 June 2021 - 02:08 PM
#11 Posted 30 June 2021 - 09:10 PM
PS : squares in 512*512 work too !
This post has been edited by Seb Luca: 01 July 2021 - 12:58 AM