![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Shrike <shr### [at] pandora be> 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-dejanews com> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |