POV-Ray : Newsgroups : povray.binaries.scene-files : Skybox script Server Time
1 Sep 2024 18:16:55 EDT (-0400)
  Skybox script (Message 1 to 4 of 4)  
From: Shrike
Subject: Skybox script
Date: 6 Jun 2004 12:48:47
Message: <40C3470D.E4DBB306@pandora.be>
Hi all,

I'm currently doing a project in OpenGL and I want to add a skybox to my
world.

There are several skybox textures available on the net, but non that are

satisfactory for my application.

I also have povray installed.

So, does some know a POV script that can build skybox textures.
You know: 6 views: front, left, back, right, top and bottom, where the
sides match exactly with the ajoining texture.

I've done some experimenting myself, but I can't make the 6 views match
up.


Thx
Shrike


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Skybox script
Date: 7 Jun 2004 03:04:43
Message: <40c4138b@news.povray.org>
Shrike wrote:
> So, does some know a POV script that can build skybox textures.
> You know: 6 views: front, left, back, right, top and bottom, where the
> sides match exactly with the ajoining texture.

   I was just doing that for a friend, and found this example by Paul 
Bourke:

  http://astronomy.swin.edu.au/~pbourke/rendering/cuberender/

   Hope this helps...

--
Jaime


Post a reply to this message

From: Slime
Subject: Re: Skybox script
Date: 7 Jun 2004 21:40:00
Message: <40c518f0$4@news.povray.org>
> So, does some know a POV script that can build skybox textures.
> You know: 6 views: front, left, back, right, top and bottom, where the
> sides match exactly with the ajoining texture.


You should check the thread "rendering skyboxes" in povray.general, posted
on Friday, May 07, 2004 11:47 PM by Barron Gillon. The exact same question
was asked and got a few responses.

(Hopefully it's still there?)

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: miriam english
Subject: Re: Skybox script
Date: 7 Sep 2004 02:20:00
Message: <web.413d5204517c99aa38f1caf60@news.povray.org>
Shrike <shr### [at] pandorabe> wrote:

> So, does some know a POV script that can build skybox textures.
> You know: 6 views: front, left, back, right, top and bottom, where the
> sides match exactly with the ajoining texture.

This was developed by the guys who created SkyPaint, a program that let you
paint directly onto cubic panorama as one continuous image even though it
is actually 6. The script they gave below used POV-Ray to generate the
cubic panorama in the first place. Unfortunately the site where this
originally was in no longer on the net so I can't point you to their page,
but here is the tiny script. (It also can use POV-Ray to make cubic
panoramas suitable for Quake.)

I use the script to generate cubic panoramas for mapping onto the background
node of VRML scenes.

// POV VRML background generator
// Created by Armagon <arm### [at] my-dejanewscom>  Aug. 24, 1998
// Modified for Quake II use Mar. 6, 1999

// Render with something like +KFF6 +W256 +H256 +FN
// +KFF6 sets it to render six frames; one for each view
// +W and +H control the width and height, repectively
// +FN sets it to render PNGs; +FT instead does uncompressed TGAs
// The width and height may be changed to other powers of 2,
// and although this saves files as PNGs, you probably want to change
// them to jpegs.

#declare Quake2 = 1; // Comment out this line for use with VRML

#include "MyScene.pov" // Replace with name of your POV scene

camera{
 up y
 right x
   location 0
 look_at z * -100
 angle 90

 #switch (int(clock*5))
  #case (0)
   // Front
   // Do nothing
  #break
  #case (1)
   // Left
   rotate y * 90
  #break
  #case (2)
   // Right
   rotate y * -90
  #break
  #case (3)
   // Back
   rotate y * 180
  #break
  #case (4)
   // Top
   rotate x * 90
   rotate y * 180
   #ifdef (Quake2)
    rotate y * 90
   #end
  #break
  #case (5)
   // Bottom
   rotate x * -90
   rotate y * 180
   #ifdef (Quake2)
    rotate y * 90
   #end
  #break
 #end

 // Move the camera to somewhere in the world.  It may also be rotated.
 translate y * 200      // This spot will be the center of the background.
}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.