 |
 |
|
 |
|
 |
|  |
|  |
|
 |
From: Zeger Knaepen
Subject: Re: My GL SkySphere (~120kbu) (Was: GL SkySphere)
Date: 16 May 2003 08:39:35
Message: <3ec4dc07$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
"Xilo Musimene" <xil### [at] hotpop com> schreef in bericht
news:3EC### [at] hotpop com...
> I've read your code and you seem to have only 16^2 polygons for your
> skySphere, am I right? Well, I have 10^2, it might explain the
> jaggyness, but I do believe my code is not as optimal as yours! =)
You can get 'perfect' results (without any jaggyness) if you use a skybox
instead of a skysphere. It's a little bit more complicated to make suitable
skybox-textures, but the results are faster and better.
cu!
--
camera{location-z*3}#macro G(b,e)b+(e-b)*(C/50)#end#macro L(b,e,k,l)#local C=0
;#while(C<50)sphere{G(b,e),.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1
;#end#end L(y-x,y,x,x+y)L(y,-x-y,x+y,y)L(-x-y,-y,y,y+z)L(-y,y,y+z,x+y)L(0,x+y,
<.5,1,.5>,x)L(0,x-y,<.5,1,.5>,x) // ZK http://www.povplace.be.tf
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> You can get 'perfect' results (without any jaggyness) if you use a skybox
> instead of a skysphere. It's a little bit more complicated to make suitable
> skybox-textures, but the results are faster and better.
I've been thinking about this and probably I should need to make 6
images for the skybox, right? Or should I still use the exact same
spherical camera I just used...?
Thanks,
Xilo
--
Dedicated to audio/visual and interactive artwork.
http://www.geocities.com/simonlemieux/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> If I didn't want you to use my code, I wouldn't have posted it in the
> first place (I would have just said what I did).
Good! =)
Then you will probably see a new EyeCandy on my website in a week or two!
Thanks!
Xilo
--
Dedicated to audio/visual and interactive artwork.
http://www.geocities.com/simonlemieux/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Zeger Knaepen
Subject: Re: My GL SkySphere (~120kbu) (Was: GL SkySphere)
Date: 16 May 2003 21:37:38
Message: <3ec59262@news.povray.org>
|
|
 |
|  |
|  |
|
 |
"Xilo Musimene" <xil### [at] hotpop com> schreef in bericht
news:3EC### [at] hotpop com...
> > You can get 'perfect' results (without any jaggyness) if you use a
skybox
> > instead of a skysphere. It's a little bit more complicated to make
suitable
> > skybox-textures, but the results are faster and better.
> I've been thinking about this and probably I should need to make 6
> images for the skybox, right? Or should I still use the exact same
> spherical camera I just used...?
no, a spherical camera won't work (at least, I don't think it will :), you
will have to make 6 perspective-views.
I did it once, maybe it's still available online, let me check :)
It *might* be this: http://sad.studentenweb.org/cg/stad.zip
But I don't know if it is just the source, or if it is compiled, or whatever
:-/
good luck anyway :)
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"I'm spinning!"
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> no, a spherical camera won't work (at least, I don't think it will :), you
> will have to make 6 perspective-views.
> I did it once, maybe it's still available online, let me check :)
> It *might* be this: http://sad.studentenweb.org/cg/stad.zip
> But I don't know if it is just the source, or if it is compiled, or whatever
> :-/
I found it in your zip file:
void setSkyBox(GLuint texture,GLfloat helderheid){
glDisable(GL_LIGHTING);
glDisable(GL_CULL_FACE);
glBindTexture(GL_TEXTURE_2D,texture);
gluLookAt
(0.0,0.0,0.0,_lookat.getX()-_locatie.getX(),_lookat.getY()-_locatie.getY(),_lookat.getZ()-_locatie.getZ(),_up.getX(),_up.getY(),_up.getZ());
glColor4f(helderheid*2,helderheid*1.5,helderheid,1.0);
glBegin(GL_QUADS);
// Top
glTexCoord2f(1.0/4.0,1.0/3.0); glVertex3f(-1.0,1.0,-1.0);
glTexCoord2f(0.0/4.0,1.0/3.0); glVertex3f(1.0,1.0,-1.0);
glTexCoord2f(0.0/4.0,2.0/3.0); glVertex3f(1.0,1.0,1.0);
glTexCoord2f(1.0/4.0,2.0/3.0); glVertex3f(-1.0,1.0,1.0);
//Left
glTexCoord2f(1.0/4.0,1.0/3.0); glVertex3f(-1.0,1.0,-1.0);
glTexCoord2f(1.0/4.0,2.0/3.0); glVertex3f(-1.0,1.0,1.0);
glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
//Right
glTexCoord2f(4.0/4.0,2.0/3.0); glVertex3f(1.0,1.0,1.0);
glTexCoord2f(4.0/4.0,1.0/3.0); glVertex3f(1.0,1.0,-1.0);
glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
// Far
glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
glTexCoord2f(2.0/4.0,3.0/3.0); glVertex3f(-1.0,1.0,1.0);
glTexCoord2f(3.0/4.0,3.0/3.0); glVertex3f(1.0,1.0,1.0);
glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
// Near
glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
glTexCoord2f(2.0/4.0,0.0/3.0); glVertex3f(-1.0,1.0,-1.0);
glTexCoord2f(3.0/4.0,0.0/3.0); glVertex3f(1.0,1.0,-1.0);
glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
//Bottom
glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
glEnd();
glColor4f(1.0,1.0,1.0,1.0);
glEnable(GL_LIGHTING);
glEnable(GL_CULL_FACE);
glLoadIdentity();
}
But I don't really understand what texture you used... Did you paste
the six images toghether in one?
Thanks,
Xilo
--
Dedicated to audio/visual and interactive artwork.
http://www.geocities.com/simonlemieux/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Zeger Knaepen
Subject: Re: My GL SkySphere (~120kbu) (Was: GL SkySphere)
Date: 17 May 2003 10:09:07
Message: <3ec64283$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
"Xilo Musimene" <xil### [at] hotpop com> schreef in bericht
news:3EC### [at] hotpop com...
> I found it in your zip file:
>
> void setSkyBox(GLuint texture,GLfloat helderheid){
> glDisable(GL_LIGHTING);
> glDisable(GL_CULL_FACE);
> glBindTexture(GL_TEXTURE_2D,texture);
> gluLookAt
>
(0.0,0.0,0.0,_lookat.getX()-_locatie.getX(),_lookat.getY()-_locatie.getY(),_
lookat.getZ()-_locatie.getZ(),_up.getX(),_up.getY(),_up.getZ());
> glColor4f(helderheid*2,helderheid*1.5,helderheid,1.0);
> glBegin(GL_QUADS);
> // Top
> glTexCoord2f(1.0/4.0,1.0/3.0); glVertex3f(-1.0,1.0,-1.0);
> glTexCoord2f(0.0/4.0,1.0/3.0); glVertex3f(1.0,1.0,-1.0);
> glTexCoord2f(0.0/4.0,2.0/3.0); glVertex3f(1.0,1.0,1.0);
> glTexCoord2f(1.0/4.0,2.0/3.0); glVertex3f(-1.0,1.0,1.0);
>
> //Left
> glTexCoord2f(1.0/4.0,1.0/3.0); glVertex3f(-1.0,1.0,-1.0);
> glTexCoord2f(1.0/4.0,2.0/3.0); glVertex3f(-1.0,1.0,1.0);
> glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
> glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
>
> //Right
> glTexCoord2f(4.0/4.0,2.0/3.0); glVertex3f(1.0,1.0,1.0);
> glTexCoord2f(4.0/4.0,1.0/3.0); glVertex3f(1.0,1.0,-1.0);
> glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
> glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
>
> // Far
> glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
> glTexCoord2f(2.0/4.0,3.0/3.0); glVertex3f(-1.0,1.0,1.0);
> glTexCoord2f(3.0/4.0,3.0/3.0); glVertex3f(1.0,1.0,1.0);
> glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
>
> // Near
> glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
> glTexCoord2f(2.0/4.0,0.0/3.0); glVertex3f(-1.0,1.0,-1.0);
> glTexCoord2f(3.0/4.0,0.0/3.0); glVertex3f(1.0,1.0,-1.0);
> glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
>
> //Bottom
> glTexCoord2f(2.0/4.0,1.0/3.0); glVertex3f(-1.0,-1.0,-1.0);
> glTexCoord2f(3.0/4.0,1.0/3.0); glVertex3f(1.0,-1.0,-1.0);
> glTexCoord2f(3.0/4.0,2.0/3.0); glVertex3f(1.0,-1.0,1.0);
> glTexCoord2f(2.0/4.0,2.0/3.0); glVertex3f(-1.0,-1.0,1.0);
> glEnd();
> glColor4f(1.0,1.0,1.0,1.0);
> glEnable(GL_LIGHTING);
> glEnable(GL_CULL_FACE);
> glLoadIdentity();
> }
>
> But I don't really understand what texture you used... Did you paste
> the six images toghether in one?
Yes. I used a texture similar to
http://www.turbosquid.com/Previews/Content_on_4_26_2003_07_30_53/1-5-flat.jp
gC46C3EF2-BA1E-444C-ACC051D0AB9AC308.jpgLarge.jpg
I believe the texture I used, is included in the zip, probably skybox.raw (I
believe it's 1024*1024*24bit, RGB, no header). If it's not included, you
can download it here: http://sad.studentenweb.org/cg/skyboxzonderflare.raw
(3MB!!)
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"Train you will I. Train you I will. Yes! Step one: touch your tongue to
mine."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Yes. I used a texture similar to
> http://www.turbosquid.com/Previews/Content_on_4_26_2003_07_30_53/1-5-flat.jp
> gC46C3EF2-BA1E-444C-ACC051D0AB9AC308.jpgLarge.jpg
> I believe the texture I used, is included in the zip, probably skybox.raw (I
> believe it's 1024*1024*24bit, RGB, no header). If it's not included, you
> can download it here: http://sad.studentenweb.org/cg/skyboxzonderflare.raw
> (3MB!!)
Ok, now I understand...
But, this takes twice Video RAM as it should... the white squares are
also on the VRAM and I think it would be more optimised to use 6
different square textures...
And I was wondering what exact kind of camera you used?
Simply a normal camera with angle of 90?
Thanks,
Xilo
--
Dedicated to audio/visual and interactive artwork.
http://www.geocities.com/simonlemieux/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Zeger Knaepen
Subject: Re: My GL SkySphere (~120kbu) (Was: GL SkySphere)
Date: 18 May 2003 09:00:25
Message: <3ec783e9@news.povray.org>
|
|
 |
|  |
|  |
|
 |
"Xilo Musimene" <xil### [at] hotpop com> schreef in bericht
news:3EC### [at] hotpop com...
> Ok, now I understand...
> But, this takes twice Video RAM as it should... the white squares are
> also on the VRAM and I think it would be more optimised to use 6
> different square textures...
it would probably indeed be more efficient if you used 6 different textures
instead of 1 big, and possibly even easier, but I had to do this very
quickly (school-reasons :) and I didn't think of that :)
> And I was wondering what exact kind of camera you used?
> Simply a normal camera with angle of 90?
I believe so, yes... Let me check! :)
hmm, I don't have the POV-file here, sorry :-/
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"I won't bite... hard."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> it would probably indeed be more efficient if you used 6 different textures
> instead of 1 big, and possibly even easier, but I had to do this very
> quickly (school-reasons :) and I didn't think of that :)
Good!
>>And I was wondering what exact kind of camera you used?
>>Simply a normal camera with angle of 90?
>
>
> I believe so, yes... Let me check! :)
> hmm, I don't have the POV-file here, sorry :-/
Anyway, it's not a big problem, it's not like if there were thousand
kinds of cameras!
I'll do some tests whenever I have the time!...
Thanks a lot!
Xilo
--
Dedicated to audio/visual and interactive artwork.
http://www.geocities.com/simonlemieux/
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Zeger Knaepen
Subject: Re: My GL SkySphere (~120kbu) (Was: GL SkySphere)
Date: 19 May 2003 07:25:54
Message: <3ec8bf42$1@news.povray.org>
|
|
 |
|  |
|  |
|
 |
"Xilo Musimene" <xil### [at] hotpop com> schreef in bericht
news:3EC### [at] hotpop com...
> Anyway, it's not a big problem, it's not like if there were thousand
> kinds of cameras!
>
> I'll do some tests whenever I have the time!...
ok, good luck! :)
> Thanks a lot!
np :)
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"He can breathe OK, long as nobody unplugs him"
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |