POV-Ray : Newsgroups : povray.general : Missing something basic: Including sky_spheres Server Time
1 Nov 2024 05:22:46 EDT (-0400)
  Missing something basic: Including sky_spheres (Message 1 to 7 of 7)  
From: Neil Kolban
Subject: Missing something basic: Including sky_spheres
Date: 8 Jan 2005 18:02:23
Message: <41e0667f$1@news.povray.org>
Folks,
Hopefully I am missing something basic here ...

The following is my .pov file:

----
#include "colors.inc"
#include "skies.inc"

S_Cloud5
----

Unfortunately, it doesn't render.  I get a message:

----
File: C:\myfile.inc  Line: 4

S_Cloud5 <----ERROR

Parse Error: Expected 'object or directive', sky_sphere identifier found
instead

Returned from renderer with error status
----

When I look into "skies.inc", I find a #declare of S_Cloud5 which starts
with:

#declare S_Cloud5 =
sky_sphere {
    pigment { rgb <0.258, 0.258, 0.435> }
    pigment {
        bozo
....

I had thought that the #declare created a macro that substituted my
"S_Cloud5" for all that was defined.  When I copy the S_Cloud5 body to my
.pov file ... it works.

Why can't I simply "refer" to S_Cloud5?

Neil


Post a reply to this message

From: Jeremy M  Praay
Subject: Re: Missing something basic: Including sky_spheres
Date: 8 Jan 2005 18:20:21
Message: <41e06ab5$1@news.povray.org>
"Neil Kolban" <kol### [at] kolbancom> wrote in message 
news:41e0667f$1@news.povray.org...
> Folks,
> Hopefully I am missing something basic here ...
>
> The following is my .pov file:
>
> ----
> #include "colors.inc"
> #include "skies.inc"
>
> S_Cloud5
> ----
>


change to:

sky_sphere {S_Cloud5}

It's the same as declaring an object.  You still have to put 
"object{MyObject}" around it.

-- 
Jeremy
www.beantoad.com


Post a reply to this message

From: Neil Kolban
Subject: Re: Missing something basic: Including sky_spheres
Date: 8 Jan 2005 18:51:33
Message: <41e07205$1@news.povray.org>
Thanks so much.  Naturally, that works ... but I'm afraid I am still not
sure what is going on.

I had assumed that

#declare X = Y

and then entering

X

in my scene was the same as entering

Y

....

I guess I am missing something more intrinsic.  Do you happen to have a
reference to a POV-Ray documentation section that describes this area?

Neil


"Jeremy M. Praay" <sla### [at] hotmailcom> wrote in message
news:41e06ab5$1@news.povray.org...
> "Neil Kolban" <kol### [at] kolbancom> wrote in message
> news:41e0667f$1@news.povray.org...
> > Folks,
> > Hopefully I am missing something basic here ...
> >
> > The following is my .pov file:
> >
> > ----
> > #include "colors.inc"
> > #include "skies.inc"
> >
> > S_Cloud5
> > ----
> >
>
>
> change to:
>
> sky_sphere {S_Cloud5}
>
> It's the same as declaring an object.  You still have to put
> "object{MyObject}" around it.
>
> -- 
> Jeremy
> www.beantoad.com
>
>


Post a reply to this message

From: GrimDude
Subject: Re: Missing something basic: Including sky_spheres
Date: 8 Jan 2005 19:35:23
Message: <41e07c4b$1@news.povray.org>
It's because it's a sky_sphere, which is not the same as an object.

- Grim


Post a reply to this message

From: Alain
Subject: Re: Missing something basic: Including sky_spheres
Date: 9 Jan 2005 14:03:39
Message: <41e1800b$1@news.povray.org>
Neil Kolban wrote:
> Thanks so much.  Naturally, that works ... but I'm afraid I am still not
> sure what is going on.
> 
> I had assumed that
> 
> #declare X = Y
> 
> and then entering
> 
> X
> 
> in my scene was the same as entering
> 
> Y
> 
> 
If you define a macro, you can use the macro's name, with it's 
parameters) by itself.
When you #declare an object, you need an object{MyObject} construction.
When you #declare a sky_sphere, you need to use sky_sphere{MySkySphere}
Just the name of the object, sky_sphere, texture, pigment, material,... 
is not enough.

Alain


Post a reply to this message

From: GrimDude
Subject: Re: Missing something basic: Including sky_spheres
Date: 9 Jan 2005 14:23:46
Message: <41e184c2$1@news.povray.org>
> If you define a macro, you can use the macro's name, with it's parameters) 
> by itself.
> When you #declare an object, you need an object{MyObject} construction.
> When you #declare a sky_sphere, you need to use sky_sphere{MySkySphere}
> Just the name of the object, sky_sphere, texture, pigment, material,... is 
> not enough.
>
> Alain

I am sorry to inform you that this is incorrect.

The following works just fine:
// **************************
#declare Mice = object { sphere { 0,1 } texture { pigment { color rgb 
1 } } }

#declare Cat = sphere { 0,1 texture { pigment { color rgb 1 } } translate 
<5,0,5> }

camera { location <10,10,-5> look_at 0 }

light_source { <10,10,-5> color rgb 1 }

Mice

Cat

//**************************

but in order for this to work:

//*************************

#declare Mice = object { sphere { 0,1 } texture { pigment { color rgb 
1 } } }

#declare Cat = sphere { 0,1 texture { pigment { color rgb 1 } } translate 
<5,0,5> }

#declare Moon = sky_sphere { pigment { gradient z poly_wave 1.05 color_map {
      [0 color rgb .993]
      [1.03 color rgb 1.03] } } }

camera { location <10,10,-5> look_at 0 }

light_source { <10,10,-5> color rgb 1 }

Mice

Cat

Moon

//*******************************

"Moon" must be written as "sky_sphere { Moon }" or an error will occur.

- Grim


Post a reply to this message

From: Tom Melly
Subject: Re: Missing something basic: Including sky_spheres
Date: 10 Jan 2005 05:25:01
Message: <41e257fd$2@news.povray.org>
"GrimDude" <a36### [at] bellsouthnet> wrote in message
news:41e184c2$1@news.povray.org...
>
> I am sorry to inform you that this is incorrect.
>

IIRC you can get away with simple object declarations w/o an object wrapper.
However, you won't be able to use the object in CSG w/o a wrapper and you
won't be able to apply a texture of other value to it.

So, if I did RC, then:

#declare Foo = sphere{0,1}

union{
    sphere{x*1,1}
    Foo
}

will fail

but
union{
    sphere{x*1,1}
    object{Foo}
}

will be okay.

And

Foo pigment{rgb 1}

is plainly wrong, but

object{Foo pigment{rgb 1}}

is fine.


Post a reply to this message

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