POV-Ray : Newsgroups : povray.general : looks_like Server Time
5 Nov 2024 03:17:52 EST (-0500)
  looks_like (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: SharkD
Subject: looks_like
Date: 6 Dec 2008 12:50:00
Message: <web.493aba7a9123d02fba19b81b0@news.povray.org>
Couple of questions regarding the looks_like statement:

1) If I use the looks_like statement, do I need to display the object
separately, or is it enough to simply define the object within the statement
itself?

2) Do I need to specify absolute coordinates within the scene for both the
object and the light source, or just for one? I.e., if the light source is
located at <3,2,5>, then do I need to translate both the light source and the
object to these coordinates?

Thanks!

-Mike


Post a reply to this message

From: clipka
Subject: Re: looks_like
Date: 6 Dec 2008 14:35:00
Message: <web.493ad38be29f6516890bf690@news.povray.org>
"SharkD" <nomail@nomail> wrote:
> 1) If I use the looks_like statement, do I need to display the object
> separately, or is it enough to simply define the object within the statement
> itself?

It is enough to specify the object in the looks_like.


> 2) Do I need to specify absolute coordinates within the scene for both the
> object and the light source, or just for one? I.e., if the light source is
> located at <3,2,5>, then do I need to translate both the light source and the
> object to these coordinates?

Because this is poorly documented, I can only speak from my experience. The
position of the looks_like object seems to be given *relative* to the light
sorce (and probably the same for rotation). So a sphere { <0,0,0>, 1 } will
appear right where the light source is.

However, because of the poor documentation I'd recommend using a separate object
instead, using no_shadow to make the light shine through. It will have the same
effect, but with well-documented control over the object's placement.


Post a reply to this message

From: Reactor
Subject: Re: looks_like
Date: 6 Dec 2008 17:10:00
Message: <web.493af82ee29f65190e667980@news.povray.org>
"clipka" <nomail@nomail> wrote:

> Because this is poorly documented, I can only speak from my experience. The
> position of the looks_like object seems to be given *relative* to the light
> sorce (and probably the same for rotation). So a sphere { <0,0,0>, 1 } will
> appear right where the light source is.
>
> However, because of the poor documentation I'd recommend using a separate object
> instead, using no_shadow to make the light shine through. It will have the same
> effect, but with well-documented control over the object's placement.


Ah, I used to have problems with this also.  What I typically do is create both
the object and the light source at (or around) <0,0,0> and translate them
together at the end.

  Reactor


Post a reply to this message

From: SharkD
Subject: Re: looks_like
Date: 6 Dec 2008 18:45:00
Message: <web.493b0d96e29f651397126680@news.povray.org>
"clipka" <nomail@nomail> wrote:
> "SharkD" <nomail@nomail> wrote:
> > 1) If I use the looks_like statement, do I need to display the object
> > separately, or is it enough to simply define the object within the statement
> > itself?
>
> It is enough to specify the object in the looks_like.
>
>
> > 2) Do I need to specify absolute coordinates within the scene for both the
> > object and the light source, or just for one? I.e., if the light source is
> > located at <3,2,5>, then do I need to translate both the light source and the
> > object to these coordinates?
>
> Because this is poorly documented, I can only speak from my experience. The
> position of the looks_like object seems to be given *relative* to the light
> sorce (and probably the same for rotation). So a sphere { <0,0,0>, 1 } will
> appear right where the light source is.
>
> However, because of the poor documentation I'd recommend using a separate object
> instead, using no_shadow to make the light shine through. It will have the same
> effect, but with well-documented control over the object's placement.

Thanks for the tips!

-Mike


Post a reply to this message

From: Thomas de Groot
Subject: Re: looks_like
Date: 7 Dec 2008 03:39:19
Message: <493b8bb7$1@news.povray.org>
If you want to make a light source visible (like the Sun) there is a very 
clever little trick invented by Sam Benge back in 2004:

Just place a cylinder starting at the camera location and ending at the 
light source location, use open, hollow, no_shadow, pigment {rgbt 1}, and 
some appropriate finish. This works very, very well (thanks again, Sam!)

Thomas


Post a reply to this message

From: SharkD
Subject: Re: looks_like
Date: 7 Dec 2008 05:45:01
Message: <web.493ba8b9e29f6514913be380@news.povray.org>
"Thomas de Groot" <tDOTdegroot@interDOTnlANOTHERDOTnet> wrote:
> If you want to make a light source visible (like the Sun) there is a very
> clever little trick invented by Sam Benge back in 2004:
>
> Just place a cylinder starting at the camera location and ending at the
> light source location, use open, hollow, no_shadow, pigment {rgbt 1}, and
> some appropriate finish. This works very, very well (thanks again, Sam!)
>
> Thomas

The scene I'm working on is indoors, and you'd only see the sun through the
windows. I was planning on calculating the proper disc size for a realistic sun
based on the scale of the scene, though, but haven't gotten around to doing it
yet.

-Mike


Post a reply to this message

From: Christian Froeschlin
Subject: Re: looks_like
Date: 8 Dec 2008 18:11:39
Message: <493da9ab$1@news.povray.org>
Thomas de Groot wrote:

> Just place a cylinder starting at the camera location and ending at the 
> light source location, use open, hollow, no_shadow, pigment {rgbt 1}, and 
> some appropriate finish. This works very, very well (thanks again, Sam!)

I don't get it. Why do you see a light source when looking through an
open cylinder, and a transparent one at that? What is an appropriate
finish for that? Do you add media or is hollow just a Warp bait? ;)


Post a reply to this message

From: Thomas de Groot
Subject: Re: looks_like
Date: 9 Dec 2008 03:16:54
Message: <493e2976@news.povray.org>
"Christian Froeschlin" <chr### [at] chrfrde> schreef in bericht 
news:493da9ab$1@news.povray.org...
>
> I don't get it. Why do you see a light source when looking through an
> open cylinder, and a transparent one at that? What is an appropriate
> finish for that? Do you add media or is hollow just a Warp bait? ;)

Add a bit of fog (or media probably). This is Sam's original code for a 
simple scene:

//=== start code ===
//
// visible_light_source.pov
//
// 2004 Sam Benge
// This scene demonstrates a
// technique for making light_sources
// visible in POV-Ray 3.5.
//
// This code is free for any kind of use.
//

global_settings{
 assumed_gamma 1
}

#default{ finish{ ambient 0 }}

#declare lpos=<.25,.15,1>*100000;
#declare cpos=<0,5,-30>;

camera{
 fisheye
 right x*.5*1.33 up y*.5
 location cpos
 look_at y*5
 angle 50
}

background{rgb<.1 .2 .5>}

fog{
 rgb<.7 .6 .3>
 distance 10000
 fog_type 2
 fog_alt 900
 fog_offset 0
}

// Light Setup
light_source{lpos,<1 1 .6>*2 }
cylinder{
 cpos,lpos,1
 open
 pigment{rgbt 1}
 finish{
  specular .3 roughness .005
  phong 1 phong_size 50000
 }
 hollow no_shadow
}

// Water
plane{y,-10
 finish{
  reflection{0,1 fresnel}
  specular .3 roughness .005
  phong 1 phong_size 50000
 }
 normal{
  average
  normal_map{
   [1 granite -.8 scale 30 poly_wave .2]
   [1 granite -.6 scale 10 poly_wave .2]
   [1 granite -.4 scale 3 poly_wave .2]
  }
 }
 interior{ior 1.33}
 hollow
}

//=== end code ===


Post a reply to this message

From: Christian Froeschlin
Subject: Re: looks_like
Date: 9 Dec 2008 06:53:36
Message: <493e5c40$1@news.povray.org>
Thomas de Groot wrote:

> Add a bit of fog (or media probably). This is Sam's original code for a 
> simple scene:

oh, nice! So it's more like a fast atmospheric effect. And
the cylinder is long enough you don't see the opening ;)


Post a reply to this message

From: Thomas de Groot
Subject: Re: looks_like
Date: 9 Dec 2008 08:26:37
Message: <493e720d@news.povray.org>
"Christian Froeschlin" <chr### [at] chrfrde> schreef in bericht 
news:493e5c40$1@news.povray.org...
> Thomas de Groot wrote:
>
>> Add a bit of fog (or media probably). This is Sam's original code for a 
>> simple scene:
>
> oh, nice! So it's more like a fast atmospheric effect. And
> the cylinder is long enough you don't see the opening ;)


Yes, isn't that really smart?

Thomas


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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