3D_SKYBOX

3D_SKYBOX N

CREATES A SKYBOX AND GIVES IT THE NUMBER N AS REFERENCE

  • Type: Command
  • Parameter: 1
  • Group: 3D Objects

ACTION

The command 3D_SKYBOX creates a skybox and gives it a number N.

The number N is used to designate the skybox.

A skybox must be the first created 3D object.

A skybox is an infinite and steady cube, which must have a texture on each side by the commands:

3D_LOAD_TEXTURE_BACK

3D_LOAD_TEXTURE_BOTTOM

3D_LOAD_TEXTURE_FRONT

3D_LOAD_TEXTURE_LEFT

3D_LOAD_TEXTURE_RIGHT

3D_LOAD_TEXTURE_TOP

Remark: by default, the skybox is created in the first created SCENE3D, but another SCENE3D can be used. For that, create a new SCENE3D, and send it all the commands by 3D_TARGET_IS before creating the skybox.

SYNTAX: 3D_SKYBOX N

  • N = 3D object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of 3D objects.

USE

  • The command 3D_SKYBOX is used to create a skybox in a SCENE3D.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of 3D objects.
  • If number N is less than or equal to 0.
  • If number N is already used for another 3D object.
  • If no SCENE3D is created.

EXAMPLE

rem create a 3D world

scene3d 1

rem create a skybox

3d_skybox 1

rem give it a bottom texture

3d_load_texture_bottom 1,"bottom.bmp"

rem give it a top texture

3d_load_texture_top 1,"top.bmp"

rem give it a front texture

3d_load_texture_front 1,"front.bmp"

rem give it a back texture

3d_load_texture_back 1,"back.bmp"

rem give it a right texture

3d_load_texture_right 1,"right.bmp"

rem give it a left texture

3d_load_texture_left 1,"left.bmp"

SEE ALSO

3D_LOAD_TEXTURE_BACK

3D_LOAD_TEXTURE_BOTTOM

3D_LOAD_TEXTURE_FRONT

3D_LOAD_TEXTURE_LEFT

3D_LOAD_TEXTURE_RIGHT

3D_LOAD_TEXTURE_TOP