Duke4.net Forums: [ASK] How to define a skybox ? - Duke4.net Forums

Jump to content

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

[ASK] How to define a skybox ?

User is offline   Seb Luca 

#1


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.

Attached Image: Sans titre-1.png

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 :)


0

#2

I think you may need a file called duke3d.def and put it in there?

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"
0

User is offline   Seb Luca 

#3

Thanks, but nothing happens :unsure:
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

0

User is offline   Mark 

#4

If this is for your MTK project I'll mention to any potential helpers that you are using .art files and they are packed into a grp file. That might make a small difference on how to proceed. I don't work with those so the way I add skyboxes will not be what you are looking for.

This post has been edited by Mark: 30 June 2021 - 04:06 AM

1

User is offline   Seb Luca 

#5

Thanx, Mark :)
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 ... :blink:

EDIT : nothing more happens :(


This post has been edited by Seb Luca: 30 June 2021 - 04:53 AM

0

User is offline   jimbob 

#6

1, make sure you have all six sides in a map in PNG format
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

2

User is offline   Seb Luca 

#7

View Postjimbob, on 30 June 2021 - 09:27 AM, said:

1, make sure you have all six sides in a map in PNG format
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 :D

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 ! :)

Attached Image: duke0001.png

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

0

User is offline   Mark 

#8

I guess its my turn to be confused. The path of the def lines assumes there is a skybox folder with the textures in it. But if you are using art files how does the def find them without that folder?
1

User is offline   Seb Luca 

#9

(EDITED)

@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

0

User is offline   Mark 

#10

I thought you were trying to stay with only the art tiles which is why I didn't give the same help you got from Jimbob. ;)
0

User is offline   Seb Luca 

#11

No problemo, thank you :)

PS : squares in 512*512 work too !


This post has been edited by Seb Luca: 01 July 2021 - 12:58 AM

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