![](/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) |
"Danny" <danzaetz> wrote:
> Alain <aze### [at] qwerty gov> wrote:
> > Danny nous apporta ses lumieres ainsi en ce 2004/05/18 15:08... :
> >
> > >"Danny" <danzaetz> wrote:
> > >
> > >
> > >>Alain <aze### [at] qwerty gov> wrote:
> > >>
> > >>
> > >>>Danny nous apporta ses lumieres ainsi en ce 2004/05/17 16:39... :
> > >>>
> > >>>
> > >>>
> > >>>>Alain <aze### [at] qwerty gov> wrote:
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>>Danny nous apporta ses lumieres ainsi en ce 2004/05/17 05:23... :
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>>Alain <aze### [at] qwerty gov> wrote:
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>I used exactly what you told me, and I got a cylinder with white edges that
> > >>>>>>fades to nothing in the middle (without any red at all), and even those
> > >>>>>>white edges disappear as the cylinder continues on. I'm using POV-Ray 3.5,
> > >>>>>>and here is the code I used:
> > >>>>>>
> > >>>>>>cylinder{<100,0,0>,<0,0,0>, .20
> > >>>>>> texture {
> > >>>>>> pigment { color rgbt 1}
> > >>>>>> finish{reflection 0}}
> > >>>>>> interior{media{emission rgb 1
> > >>>>>> density{ cylindrical
> > >>>>>> color_map{[0 rgb 0][0.5 rgb<1,0,0>][0.98 rgb 1][1 rgb 2]}
> > >>>>>> }}}
> > >>>>>> hollow
> > >>>>>> translate<0,0,2>
> > >>>>>> }
> > >>>>>>
> > >>>>>>Can you tell me what I'm doing wrong, and how to fix it?
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>>Set the radius of the cylinder to 1, then rescale it by scale<.2,1,.2>
> > >>>>>just before you rotate it.
> > >>>>>You don't need to set finish{reflection 0}}, it's the default value.
> > >>>>>Set your cylinder verticaly, as it's the orientation of the cylindrical
> > >>>>>pattern, then rotate the whole thing.
> > >>>>>...
> > >>>>>scale<0.2, 1, 0.2>
> > >>>>>rotate -90*z
> > >>>>>translate<0, 0, 2>
> > >>>>>}// that's the last brace
> > >>>>>
> > >>>>>Alain
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>OK, now it looks good when I don't scale it, but scaling it seems to mess it
> > >>>>up.
> > >>>>When I scale it up it still seems to look OK, except the inner white part
> > >>>>has become enlarged disproportionately. But when I scale it down, I lose
> > >>>>the white part completely, and all I have is a very dimly red cylinder.
> > >>>>Can you explain why it's doing this and how I can make it scale down right?
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>Try lowering the 0.98 to a smaler value, thus enlarging the central
> > >>>part. As it is now, the white center part only have a radius of 0.02
> > >>>units and may disappears when scaled down or if the image is generated
> > >>>at a low resolution.
> > >>>Don't scale only the media but the whole cylinder containing the media.
> > >>>
> > >>>Alain
> > >>>
> > >>>
> > >>Thanks a lot for all your help! I managed to fix the scaling problem by
> > >>multiplying the brightness of all the color map values by 5. I guess this
> > >>is because there is less matter in the media to show up if I scale it down
> > >>to a fifth of its size.
> > >>
> > >>
> > Good guess
> >
> > >>Thanks,
> > >>Danny
> > >>
> > >>
> > >
> > >I've got another problem. For some strange reason, my media cylinder is
> > >acting like a convex lens. It's showing an narrowed image on the right side
> > >of the cylinder of an object behind and to the left of it. It's refracting
> > >(not reflecting) light, I think. When I zoom out, it looks like ugly white
> > >lines on the side of my laser. How do I get rid of them?
> > >
> > >Danny
> > >
> > >
> > >
> > With emissive only media, the beam is effectively transparent, that is,
> > you see anything that may be behind. That was (barely) visible in the
> > small sample as a slight discontuity near the middle of the image. You
> > may want to add some absorbtion and/or scattering, it's not realistic as
> > the beam is only light, but may be more aestetic.
> >
> > Alain
>
> Neither the absorption nor any of the scatterings are able to get rid of the
> image. It's odd. It's not like the stars I have in the distance, which
> are right behind the the laser and are completely visible through the
> laser. The object is not directly behind the laser, it's back and to the
> left, and not obstructed by the laser at all, but it's projecting a thinned
> and flipped image of itself on the right side of the laser. Have you seen
> anything like this?
I still can't figure out how to get rid of the images on the surface of the
laser. Please help.
Danny
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) |
On Fri, 21 May 2004 00:27:24 EDT, Danny <danzaetz> wrote:
<snip>
> I still can't figure out how to get rid of the images on the surface of
> the
> laser. Please help.
>
Have you thought about doing it as a cylinder light_source, slower but it
might solve your problem:
//code
union{
cylinder{0,x*100, 1 hollow
pigment {rgbt 1}
interior{
media{
scattering{3,1}
density{
cylindrical rotate 90*z
color_map{
[0 rgb 0]
[0.5 red 3]
[0.9 rgb 5]
[1 rgb 10]}
}
}
}
scale <1,.2,.2>
}
light_source{0 rgb 10 cylinder point_at x*100}
translate<-50,0,10>
}
//end code
This is done with a non-defined camera so you'll need to tweak the
intensities and translate to get it to look right.
HTH
--
Phil Cook
--
All thoughts and comments are my own unless otherwise stated and I am
happy to be proven wrong.
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) |
Phil Cook <phi### [at] nospamdeckingdeals co uk> wrote:
> On Fri, 21 May 2004 00:27:24 EDT, Danny <danzaetz> wrote:
>
> <snip>
> > I still can't figure out how to get rid of the images on the surface of
> > the
> > laser. Please help.
> >
>
> Have you thought about doing it as a cylinder light_source, slower but it
> might solve your problem:
>
> //code
> union{
> cylinder{0,x*100, 1 hollow
> pigment {rgbt 1}
> interior{
> media{
> scattering{3,1}
> density{
> cylindrical rotate 90*z
> color_map{
> [0 rgb 0]
>
> [0.5 red 3]
> [0.9 rgb 5]
>
> [1 rgb 10]}
> }
> }
> }
> scale <1,.2,.2>
> }
>
> light_source{0 rgb 10 cylinder point_at x*100}
> translate<-50,0,10>
> }
> //end code
>
> This is done with a non-defined camera so you'll need to tweak the
> intensities and translate to get it to look right.
>
> HTH
>
> --
> Phil Cook
> --
> All thoughts and comments are my own unless otherwise stated and I am
> happy to be proven wrong.
Is this cylinder light_source supposed to produce a visible light beam that
can be seen outside where it's pointing at, or is it more like a laser pen
that produces a dot on the surface it's aimed at? I tried it along with
scattering and it did nothing to get rid of the images.
Also, in order to round off the ends of my laser beam, I put some
half-spheres on either end, both filled with the same media, except the
density is spherical instead of cylindrical. For some reason, this created
tons more problems. When you look at the half-spheres perpendicularly,
there's no problem, but when you look at them obliquely, you get very odd
results, such as grey rings, spots, etc. Here's what I'm doing:
#default {
texture {
pigment {Grey}
finish {
diffuse 0.6
ior 1.5
ambient 0.300000
phong 0.5
phong_size 50
}
}}
camera {
location <0,0.5,2>
look_at <0,0.5,0>
}
background {color rgb <0,0,0>}
light_source {
<-1000.000000,1000.000000,1000.000000> // x=-1000,y=1000,z=1000
color rgb <1.0000,1.0000,1.0000>
}
#declare clock1=1;
union{
cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
from front
texture {
pigment { color rgbt 1}}
interior{media{emission rgb 1
density{ cylindrical
color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
16][1 rgb 30]} //[0 rgb 0][0.02 rgb <0.004,0,0>][0.5 rgb<4,0,0>][0.96 rgb
5][1 rgb 10]
}}}
hollow
scale<0.1, 1, 0.1>
}
difference{
sphere{<0,0,0>, 1
texture {
pigment { color rgbt 1}}
interior{media{emission rgb 1
scattering{3,1}
density{ spherical
color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
16][1 rgb 30]}
}}}
hollow
scale<0.1, 0.1, 0.1>
translate <0,2*clock1,0>
}
cylinder{<0,2*clock1,0>,<0,0,0>,5}
}
difference{
sphere{<0,0,0>, 1
texture {
pigment { color rgbt 1}}
interior{media{emission rgb 1
density{ spherical
color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
16][1 rgb 30]}
}}}
hollow
scale<0.1, 0.1, 0.1>
}
cylinder{<0,5,0>,<0,0,0>,5}
}
light_source{0 rgb 10 cylinder point_at y*2}
}
sphere{<.2,.5,-.5>,0.1}
Try running this and you'll see the image of the sphere on the laser.
You'll also see the grey ring where the laser cylinder and the laser
half-sphere meet(try looking at that location perpendicularly and the grey
ring disappears).
You can also see a small white dot on the bottom half-sphere, which is also
an image of the grey sphere. I have a background of stars, and so the ends
of my laser end up looking speckled. How can I make all those images and
grey rings go away?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Alain
Subject: Re: I Need Help With Media (small sample image)
Date: 21 May 2004 23:20:12
Message: <40aec6ec@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Danny nous apporta ses lumieres ainsi en ce 2004/05/21 16:22... :
> <snip>
>
>
>Is this cylinder light_source supposed to produce a visible light beam that
>can be seen outside where it's pointing at, or is it more like a laser pen
>that produces a dot on the surface it's aimed at? I tried it along with
>scattering and it did nothing to get rid of the images.
>Also, in order to round off the ends of my laser beam, I put some
>half-spheres on either end, both filled with the same media, except the
>density is spherical instead of cylindrical. For some reason, this created
>tons more problems. When you look at the half-spheres perpendicularly,
>there's no problem, but when you look at them obliquely, you get very odd
>results, such as grey rings, spots, etc. Here's what I'm doing:
>
>
>
Why do you use this default texture, it's the source of most of your
problems
> #default {
> texture {
> pigment {Grey}
> finish {
> diffuse 0.6
> ior 1.5
> ambient 0.300000
> phong 0.5
> phong_size 50
>}
>}}
>
>
>camera {
> location <0,0.5,2>
> look_at <0,0.5,0>
>}
>
>background {color rgb <0,0,0>}
>
>light_source {
> <-1000.000000,1000.000000,1000.000000> // x=-1000,y=1000,z=1000
> color rgb <1.0000,1.0000,1.0000>
> }
>
>#declare clock1=1;
>
>union{
>cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
>from front
> texture {
> pigment { color rgbt 1}}
> interior{media{emission rgb 1
> density{ cylindrical
> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
>16][1 rgb 30]} //[0 rgb 0][0.02 rgb <0.004,0,0>][0.5 rgb<4,0,0>][0.96 rgb
>5][1 rgb 10]
> }}}
> hollow
> scale<0.1, 1, 0.1>
> }
>
>
removing this don't change anything in your cene
>difference{
>sphere{<0,0,0>, 1
> texture {
> pigment { color rgbt 1}}
> interior{media{emission rgb 1
> scattering{3,1}
> density{ spherical
> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
>16][1 rgb 30]}
> }}}
> hollow
> scale<0.1, 0.1, 0.1>
> translate <0,2*clock1,0>
> }
>cylinder{<0,2*clock1,0>,<0,0,0>,5}
> }
>
>
-----------------------------------------------------------------
>difference{
>sphere{<0,0,0>, 1
> texture {
> pigment { color rgbt 1}}
> interior{media{emission rgb 1
> density{ spherical
> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
>16][1 rgb 30]}
> }}}
> hollow
> scale<0.1, 0.1, 0.1>
> }
>cylinder{<0,5,0>,<0,0,0>,5}
> }
>light_source{0 rgb 10 cylinder point_at y*2}
>}
>
>sphere{<.2,.5,-.5>,0.1}
>
>
>Try running this and you'll see the image of the sphere on the laser.
>
>
Default ior applied to the cylinder
>You'll also see the grey ring where the laser cylinder and the laser
>half-sphere meet(try looking at that location perpendicularly and the grey
>ring disappears).
>
>
Default texture applied to the substracting cylinder
>You can also see a small white dot on the bottom half-sphere, which is also
>an image of the grey sphere.
>
Default texture's ior again
> I have a background of stars, and so the ends
>of my laser end up looking speckled. How can I make all those images and
>grey rings go away?
>
>
>
1- Remove the ior statement in your default. Thin add an ior to your
cylinder, this is what cause the sphere to apears in your beam.
2- Use merge instead on an union. This will remove the internal surfaces.
3- Use difference{sphere{...}cylinder{...}texture{...}interior{...}}.
That is, apply the texture and interior to the whole
union/difference/intersection/merge. The cylinder get the default
texture and apply it to where it intercect the sphere, giving you that
gray circle.
Alain
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) |
On Fri, 21 May 2004 16:22:02 EDT, Danny <danzaetz> wrote:
> Phil Cook <phi### [at] nospamdeckingdeals co uk> wrote:
>> On Fri, 21 May 2004 00:27:24 EDT, Danny <danzaetz> wrote:
<snip>
> Is this cylinder light_source supposed to produce a visible light beam
> that
> can be seen outside where it's pointing at, or is it more like a laser
> pen
> that produces a dot on the surface it's aimed at?
It constrains the light to within a cylinder so it won't illuminate
anything that is not within it's path just like a laser pen, so if you
stick a media through it, it will show the path in the same way shining a
laser pen through smoke will. All of the light_sources act in this way,
they won't light up anything not in their path, the default point_light of
course shines light in all directions. Take a look at spotlite.pov in the
scenes/lights directory in fact have a look at most of that directory if
you want to know more about lights
> I tried it along with
> scattering and it did nothing to get rid of the images.
> Also, in order to round off the ends of my laser beam, I put some
> half-spheres on either end, both filled with the same media, except the
> density is spherical instead of cylindrical. For some reason, this
> created
> tons more problems. When you look at the half-spheres perpendicularly,
> there's no problem, but when you look at them obliquely, you get very odd
> results, such as grey rings, spots, etc. Here's what I'm doing:
<snip>
I think Alain has answered this one.
--
Phil Cook
--
All thoughts and comments are my own unless otherwise stated and I am
happy to be proven wrong.
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) |
Alain <aze### [at] qwerty gov> wrote:
> Danny nous apporta ses lumieres ainsi en ce 2004/05/21 16:22... :
>
> > <snip>
> >
> >
> >Is this cylinder light_source supposed to produce a visible light beam that
> >can be seen outside where it's pointing at, or is it more like a laser pen
> >that produces a dot on the surface it's aimed at? I tried it along with
> >scattering and it did nothing to get rid of the images.
> >Also, in order to round off the ends of my laser beam, I put some
> >half-spheres on either end, both filled with the same media, except the
> >density is spherical instead of cylindrical. For some reason, this created
> >tons more problems. When you look at the half-spheres perpendicularly,
> >there's no problem, but when you look at them obliquely, you get very odd
> >results, such as grey rings, spots, etc. Here's what I'm doing:
> >
> >
> >
> Why do you use this default texture, it's the source of most of your
> problems
>
> > #default {
> > texture {
> > pigment {Grey}
> > finish {
> > diffuse 0.6
> > ior 1.5
> > ambient 0.300000
> > phong 0.5
> > phong_size 50
> >}
> >}}
> >
> >
> >camera {
> > location <0,0.5,2>
> > look_at <0,0.5,0>
> >}
> >
> >background {color rgb <0,0,0>}
> >
> >light_source {
> > <-1000.000000,1000.000000,1000.000000> // x=-1000,y=1000,z=1000
> > color rgb <1.0000,1.0000,1.0000>
> > }
> >
> >#declare clock1=1;
> >
> >union{
> >cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
> >from front
> > texture {
> > pigment { color rgbt 1}}
> > interior{media{emission rgb 1
> > density{ cylindrical
> > color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> >16][1 rgb 30]} //[0 rgb 0][0.02 rgb <0.004,0,0>][0.5 rgb<4,0,0>][0.96 rgb
> >5][1 rgb 10]
> > }}}
> > hollow
> > scale<0.1, 1, 0.1>
> > }
> >
> >
> removing this don't change anything in your cene
>
> >difference{
> >sphere{<0,0,0>, 1
> > texture {
> > pigment { color rgbt 1}}
> > interior{media{emission rgb 1
> > scattering{3,1}
> > density{ spherical
> > color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> >16][1 rgb 30]}
> > }}}
> > hollow
> > scale<0.1, 0.1, 0.1>
> > translate <0,2*clock1,0>
> > }
> >cylinder{<0,2*clock1,0>,<0,0,0>,5}
> > }
> >
> >
> -----------------------------------------------------------------
>
> >difference{
> >sphere{<0,0,0>, 1
> > texture {
> > pigment { color rgbt 1}}
> > interior{media{emission rgb 1
> > density{ spherical
> > color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> >16][1 rgb 30]}
> > }}}
> > hollow
> > scale<0.1, 0.1, 0.1>
> > }
> >cylinder{<0,5,0>,<0,0,0>,5}
> > }
> >light_source{0 rgb 10 cylinder point_at y*2}
> >}
> >
> >sphere{<.2,.5,-.5>,0.1}
> >
> >
> >Try running this and you'll see the image of the sphere on the laser.
> >
> >
> Default ior applied to the cylinder
>
> >You'll also see the grey ring where the laser cylinder and the laser
> >half-sphere meet(try looking at that location perpendicularly and the grey
> >ring disappears).
> >
> >
> Default texture applied to the substracting cylinder
>
> >You can also see a small white dot on the bottom half-sphere, which is also
> >an image of the grey sphere.
> >
> Default texture's ior again
>
> > I have a background of stars, and so the ends
> >of my laser end up looking speckled. How can I make all those images and
> >grey rings go away?
> >
> >
> >
> 1- Remove the ior statement in your default. Thin add an ior to your
> cylinder, this is what cause the sphere to apears in your beam.
> 2- Use merge instead on an union. This will remove the internal surfaces.
> 3- Use difference{sphere{...}cylinder{...}texture{...}interior{...}}.
> That is, apply the texture and interior to the whole
> union/difference/intersection/merge. The cylinder get the default
> texture and apply it to where it intercect the sphere, giving you that
> gray circle.
>
> Alain
Thanks, Alain, all the images on the laser are gone now that ior has been
deleted. It also helped by making the outer edge fuzzier. However, I'm
still having problems with the grey circle. This time, instead of a grey
circle, there's a disk that matches the color of the media (white in the
middle, red on the outside), but a little wider than the laser so it
doesn't match up (probably b/c removing the ior also seemed to shrink the
laser's width a little). Is this what you wanted me to do:
merge{
cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
texture {
pigment { color rgbt 1}}
interior{media{emission rgb 1
density{ cylindrical
color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
16][1 rgb 30]}
}}}
hollow
scale<0.1, 1, 0.1>
}
difference{
sphere{<0,0,0>, 1}
cylinder{<0,5,0>,<0,0,0>,5}
texture {
pigment { color rgbt 1}}
interior{media{emission rgb 1
density{ spherical
color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
16][1 rgb 30]}
}}}
hollow
scale<0.1, 0.1, 0.1>
}
}
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) |
Danny nous apporta ses lumieres ainsi en ce 2004/05/27 23:04... :
>Alain <aze### [at] qwerty gov> wrote:
>
>
>>Danny nous apporta ses lumieres ainsi en ce 2004/05/21 16:22... :
>>
>>
>>
>>><snip>
>>>
>>>
>>>Is this cylinder light_source supposed to produce a visible light beam that
>>>can be seen outside where it's pointing at, or is it more like a laser pen
>>>that produces a dot on the surface it's aimed at? I tried it along with
>>>scattering and it did nothing to get rid of the images.
>>>Also, in order to round off the ends of my laser beam, I put some
>>>half-spheres on either end, both filled with the same media, except the
>>>density is spherical instead of cylindrical. For some reason, this created
>>>tons more problems. When you look at the half-spheres perpendicularly,
>>>there's no problem, but when you look at them obliquely, you get very odd
>>>results, such as grey rings, spots, etc. Here's what I'm doing:
>>>
>>>
>>>
>>>
>>>
>>Why do you use this default texture, it's the source of most of your
>>problems
>>
>>
>>
>>>#default {
>>> texture {
>>> pigment {Grey}
>>> finish {
>>> diffuse 0.6
>>> ior 1.5
>>> ambient 0.300000
>>> phong 0.5
>>> phong_size 50
>>>}
>>>}}
>>>
>>>
>>>camera {
>>> location <0,0.5,2>
>>> look_at <0,0.5,0>
>>>}
>>>
>>>background {color rgb <0,0,0>}
>>>
>>>light_source {
>>> <-1000.000000,1000.000000,1000.000000> // x=-1000,y=1000,z=1000
>>> color rgb <1.0000,1.0000,1.0000>
>>> }
>>>
>>>#declare clock1=1;
>>>
>>>union{
>>>cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
>>>
>>>
>>>from front
>>
>>
>>> texture {
>>> pigment { color rgbt 1}}
>>> interior{media{emission rgb 1
>>> density{ cylindrical
>>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
>>>16][1 rgb 30]} //[0 rgb 0][0.02 rgb <0.004,0,0>][0.5 rgb<4,0,0>][0.96 rgb
>>>5][1 rgb 10]
>>> }}}
>>> hollow
>>> scale<0.1, 1, 0.1>
>>> }
>>>
>>>
>>>
>>>
>>removing this don't change anything in your cene
>>
>>
>>
>>>difference{
>>>sphere{<0,0,0>, 1
>>> texture {
>>> pigment { color rgbt 1}}
>>> interior{media{emission rgb 1
>>> scattering{3,1}
>>> density{ spherical
>>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
>>>16][1 rgb 30]}
>>> }}}
>>> hollow
>>> scale<0.1, 0.1, 0.1>
>>> translate <0,2*clock1,0>
>>> }
>>>cylinder{<0,2*clock1,0>,<0,0,0>,5}
>>> }
>>>
>>>
>>>
>>>
>>-----------------------------------------------------------------
>>
>>
>>
>>>difference{
>>>sphere{<0,0,0>, 1
>>> texture {
>>> pigment { color rgbt 1}}
>>> interior{media{emission rgb 1
>>> density{ spherical
>>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
>>>16][1 rgb 30]}
>>> }}}
>>> hollow
>>> scale<0.1, 0.1, 0.1>
>>> }
>>>cylinder{<0,5,0>,<0,0,0>,5}
>>> }
>>>light_source{0 rgb 10 cylinder point_at y*2}
>>>}
>>>
>>>sphere{<.2,.5,-.5>,0.1}
>>>
>>>
>>>Try running this and you'll see the image of the sphere on the laser.
>>>
>>>
>>>
>>>
>>Default ior applied to the cylinder
>>
>>
>>
>>>You'll also see the grey ring where the laser cylinder and the laser
>>>half-sphere meet(try looking at that location perpendicularly and the grey
>>>ring disappears).
>>>
>>>
>>>
>>>
>>Default texture applied to the substracting cylinder
>>
>>
>>
>>>You can also see a small white dot on the bottom half-sphere, which is also
>>>an image of the grey sphere.
>>>
>>>
>>>
>>Default texture's ior again
>>
>>
>>
>>>I have a background of stars, and so the ends
>>>of my laser end up looking speckled. How can I make all those images and
>>>grey rings go away?
>>>
>>>
>>>
>>>
>>>
>>1- Remove the ior statement in your default. Thin add an ior to your
>>cylinder, this is what cause the sphere to apears in your beam.
>>2- Use merge instead on an union. This will remove the internal surfaces.
>>3- Use difference{sphere{...}cylinder{...}texture{...}interior{...}}.
>>That is, apply the texture and interior to the whole
>>union/difference/intersection/merge. The cylinder get the default
>>texture and apply it to where it intercect the sphere, giving you that
>>gray circle.
>>
>>Alain
>>
>>
>
>
>Thanks, Alain, all the images on the laser are gone now that ior has been
>deleted. It also helped by making the outer edge fuzzier. However, I'm
>still having problems with the grey circle. This time, instead of a grey
>circle, there's a disk that matches the color of the media (white in the
>middle, red on the outside), but a little wider than the laser so it
>doesn't match up (probably b/c removing the ior also seemed to shrink the
>laser's width a little). Is this what you wanted me to do:
>
>merge{
>
>
OK
>cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
> // texture {
> // pigment { color rgbt 1}}
> interior{media{emission rgb 1
> density{ cylindrical
> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
>16][1 rgb 30]}
> }}}
> hollow
> scale<0.1, 1, 0.1>
> }
>
>difference{
>sphere{<0,0,0>, 1}
>cylinder{<0,5,0>,<0,0,0>,5}
>
>
Why is it so large? cylinder{<0,1.1,0>,<0,0,0>,1.1} is large enough
center your sphere and cylinder about <0,0.000001,0> is better, remove
coincidence surfaces.
> // texture {
> // pigment { color rgbt 1}}
> interior{media{emission rgb 1
> density{ spherical
> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
>16][1 rgb 30]}
> }}}
> hollow
> scale<0.1, 0.1, 0.1>
> }
>
>
texture{pigment{rgbt 1}finish{ambient 0 diffuse 0}}// apply texture
once to whole merge
>}
>
Now, I don't see a discontinuity, as long as I stay with a point of view
close to perpendiculat near the base, even zooming in, smooth trensition.
Alain
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) |
Alain <aze### [at] qwerty gov> wrote:
> Danny nous apporta ses lumieres ainsi en ce 2004/05/27 23:04... :
>
> >Alain <aze### [at] qwerty gov> wrote:
> >
> >
> >>Danny nous apporta ses lumieres ainsi en ce 2004/05/21 16:22... :
> >>
> >>
> >>
> >>><snip>
> >>>
> >>>
> >>>Is this cylinder light_source supposed to produce a visible light beam that
> >>>can be seen outside where it's pointing at, or is it more like a laser pen
> >>>that produces a dot on the surface it's aimed at? I tried it along with
> >>>scattering and it did nothing to get rid of the images.
> >>>Also, in order to round off the ends of my laser beam, I put some
> >>>half-spheres on either end, both filled with the same media, except the
> >>>density is spherical instead of cylindrical. For some reason, this created
> >>>tons more problems. When you look at the half-spheres perpendicularly,
> >>>there's no problem, but when you look at them obliquely, you get very odd
> >>>results, such as grey rings, spots, etc. Here's what I'm doing:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>Why do you use this default texture, it's the source of most of your
> >>problems
> >>
> >>
> >>
> >>>#default {
> >>> texture {
> >>> pigment {Grey}
> >>> finish {
> >>> diffuse 0.6
> >>> ior 1.5
> >>> ambient 0.300000
> >>> phong 0.5
> >>> phong_size 50
> >>>}
> >>>}}
> >>>
> >>>
> >>>camera {
> >>> location <0,0.5,2>
> >>> look_at <0,0.5,0>
> >>>}
> >>>
> >>>background {color rgb <0,0,0>}
> >>>
> >>>light_source {
> >>> <-1000.000000,1000.000000,1000.000000> // x=-1000,y=1000,z=1000
> >>> color rgb <1.0000,1.0000,1.0000>
> >>> }
> >>>
> >>>#declare clock1=1;
> >>>
> >>>union{
> >>>cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
> >>>
> >>>
> >>>from front
> >>
> >>
> >>> texture {
> >>> pigment { color rgbt 1}}
> >>> interior{media{emission rgb 1
> >>> density{ cylindrical
> >>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> >>>16][1 rgb 30]} //[0 rgb 0][0.02 rgb <0.004,0,0>][0.5 rgb<4,0,0>][0.96 rgb
> >>>5][1 rgb 10]
> >>> }}}
> >>> hollow
> >>> scale<0.1, 1, 0.1>
> >>> }
> >>>
> >>>
> >>>
> >>>
> >>removing this don't change anything in your cene
> >>
> >>
> >>
> >>>difference{
> >>>sphere{<0,0,0>, 1
> >>> texture {
> >>> pigment { color rgbt 1}}
> >>> interior{media{emission rgb 1
> >>> scattering{3,1}
> >>> density{ spherical
> >>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> >>>16][1 rgb 30]}
> >>> }}}
> >>> hollow
> >>> scale<0.1, 0.1, 0.1>
> >>> translate <0,2*clock1,0>
> >>> }
> >>>cylinder{<0,2*clock1,0>,<0,0,0>,5}
> >>> }
> >>>
> >>>
> >>>
> >>>
> >>-----------------------------------------------------------------
> >>
> >>
> >>
> >>>difference{
> >>>sphere{<0,0,0>, 1
> >>> texture {
> >>> pigment { color rgbt 1}}
> >>> interior{media{emission rgb 1
> >>> density{ spherical
> >>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> >>>16][1 rgb 30]}
> >>> }}}
> >>> hollow
> >>> scale<0.1, 0.1, 0.1>
> >>> }
> >>>cylinder{<0,5,0>,<0,0,0>,5}
> >>> }
> >>>light_source{0 rgb 10 cylinder point_at y*2}
> >>>}
> >>>
> >>>sphere{<.2,.5,-.5>,0.1}
> >>>
> >>>
> >>>Try running this and you'll see the image of the sphere on the laser.
> >>>
> >>>
> >>>
> >>>
> >>Default ior applied to the cylinder
> >>
> >>
> >>
> >>>You'll also see the grey ring where the laser cylinder and the laser
> >>>half-sphere meet(try looking at that location perpendicularly and the grey
> >>>ring disappears).
> >>>
> >>>
> >>>
> >>>
> >>Default texture applied to the substracting cylinder
> >>
> >>
> >>
> >>>You can also see a small white dot on the bottom half-sphere, which is also
> >>>an image of the grey sphere.
> >>>
> >>>
> >>>
> >>Default texture's ior again
> >>
> >>
> >>
> >>>I have a background of stars, and so the ends
> >>>of my laser end up looking speckled. How can I make all those images and
> >>>grey rings go away?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>1- Remove the ior statement in your default. Thin add an ior to your
> >>cylinder, this is what cause the sphere to apears in your beam.
> >>2- Use merge instead on an union. This will remove the internal surfaces.
> >>3- Use difference{sphere{...}cylinder{...}texture{...}interior{...}}.
> >>That is, apply the texture and interior to the whole
> >>union/difference/intersection/merge. The cylinder get the default
> >>texture and apply it to where it intercect the sphere, giving you that
> >>gray circle.
> >>
> >>Alain
> >>
> >>
> >
> >
> >Thanks, Alain, all the images on the laser are gone now that ior has been
> >deleted. It also helped by making the outer edge fuzzier. However, I'm
> >still having problems with the grey circle. This time, instead of a grey
> >circle, there's a disk that matches the color of the media (white in the
> >middle, red on the outside), but a little wider than the laser so it
> >doesn't match up (probably b/c removing the ior also seemed to shrink the
> >laser's width a little). Is this what you wanted me to do:
> >
> >merge{
> >
> >
> OK
>
> >cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
> > // texture {
> > // pigment { color rgbt 1}}
> > interior{media{emission rgb 1
> > density{ cylindrical
> > color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> >16][1 rgb 30]}
> > }}}
> > hollow
> > scale<0.1, 1, 0.1>
> > }
> >
> >difference{
> >sphere{<0,0,0>, 1}
> >cylinder{<0,5,0>,<0,0,0>,5}
> >
> >
> Why is it so large? cylinder{<0,1.1,0>,<0,0,0>,1.1} is large enough
> center your sphere and cylinder about <0,0.000001,0> is better, remove
> coincidence surfaces.
>
> > // texture {
> > // pigment { color rgbt 1}}
> > interior{media{emission rgb 1
> > density{ spherical
> > color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> >16][1 rgb 30]}
> > }}}
> > hollow
> > scale<0.1, 0.1, 0.1>
> > }
> >
> >
> texture{pigment{rgbt 1}finish{ambient 0 diffuse 0}}// apply texture
> once to whole merge
>
> >}
> >
> Now, I don't see a discontinuity, as long as I stay with a point of view
> close to perpendiculat near the base, even zooming in, smooth trensition.
>
> Alain
Thanks. It was the coincident surfaces that were causing my problems. My
problems are fixed now.
Danny
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) |
"Danny" <danzaetz> wrote:
> Alain <aze### [at] qwerty gov> wrote:
> > Danny nous apporta ses lumieres ainsi en ce 2004/05/27 23:04... :
> >
> > >Alain <aze### [at] qwerty gov> wrote:
> > >
> > >
> > >>Danny nous apporta ses lumieres ainsi en ce 2004/05/21 16:22... :
> > >>
> > >>
> > >>
> > >>><snip>
> > >>>
> > >>>
> > >>>Is this cylinder light_source supposed to produce a visible light beam that
> > >>>can be seen outside where it's pointing at, or is it more like a laser pen
> > >>>that produces a dot on the surface it's aimed at? I tried it along with
> > >>>scattering and it did nothing to get rid of the images.
> > >>>Also, in order to round off the ends of my laser beam, I put some
> > >>>half-spheres on either end, both filled with the same media, except the
> > >>>density is spherical instead of cylindrical. For some reason, this created
> > >>>tons more problems. When you look at the half-spheres perpendicularly,
> > >>>there's no problem, but when you look at them obliquely, you get very odd
> > >>>results, such as grey rings, spots, etc. Here's what I'm doing:
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>Why do you use this default texture, it's the source of most of your
> > >>problems
> > >>
> > >>
> > >>
> > >>>#default {
> > >>> texture {
> > >>> pigment {Grey}
> > >>> finish {
> > >>> diffuse 0.6
> > >>> ior 1.5
> > >>> ambient 0.300000
> > >>> phong 0.5
> > >>> phong_size 50
> > >>>}
> > >>>}}
> > >>>
> > >>>
> > >>>camera {
> > >>> location <0,0.5,2>
> > >>> look_at <0,0.5,0>
> > >>>}
> > >>>
> > >>>background {color rgb <0,0,0>}
> > >>>
> > >>>light_source {
> > >>> <-1000.000000,1000.000000,1000.000000> // x=-1000,y=1000,z=1000
> > >>> color rgb <1.0000,1.0000,1.0000>
> > >>> }
> > >>>
> > >>>#declare clock1=1;
> > >>>
> > >>>union{
> > >>>cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
> > >>>
> > >>>
> > >>>from front
> > >>
> > >>
> > >>> texture {
> > >>> pigment { color rgbt 1}}
> > >>> interior{media{emission rgb 1
> > >>> density{ cylindrical
> > >>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> > >>>16][1 rgb 30]} //[0 rgb 0][0.02 rgb <0.004,0,0>][0.5 rgb<4,0,0>][0.96 rgb
> > >>>5][1 rgb 10]
> > >>> }}}
> > >>> hollow
> > >>> scale<0.1, 1, 0.1>
> > >>> }
> > >>>
> > >>>
> > >>>
> > >>>
> > >>removing this don't change anything in your cene
> > >>
> > >>
> > >>
> > >>>difference{
> > >>>sphere{<0,0,0>, 1
> > >>> texture {
> > >>> pigment { color rgbt 1}}
> > >>> interior{media{emission rgb 1
> > >>> scattering{3,1}
> > >>> density{ spherical
> > >>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> > >>>16][1 rgb 30]}
> > >>> }}}
> > >>> hollow
> > >>> scale<0.1, 0.1, 0.1>
> > >>> translate <0,2*clock1,0>
> > >>> }
> > >>>cylinder{<0,2*clock1,0>,<0,0,0>,5}
> > >>> }
> > >>>
> > >>>
> > >>>
> > >>>
> > >>-----------------------------------------------------------------
> > >>
> > >>
> > >>
> > >>>difference{
> > >>>sphere{<0,0,0>, 1
> > >>> texture {
> > >>> pigment { color rgbt 1}}
> > >>> interior{media{emission rgb 1
> > >>> density{ spherical
> > >>> color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> > >>>16][1 rgb 30]}
> > >>> }}}
> > >>> hollow
> > >>> scale<0.1, 0.1, 0.1>
> > >>> }
> > >>>cylinder{<0,5,0>,<0,0,0>,5}
> > >>> }
> > >>>light_source{0 rgb 10 cylinder point_at y*2}
> > >>>}
> > >>>
> > >>>sphere{<.2,.5,-.5>,0.1}
> > >>>
> > >>>
> > >>>Try running this and you'll see the image of the sphere on the laser.
> > >>>
> > >>>
> > >>>
> > >>>
> > >>Default ior applied to the cylinder
> > >>
> > >>
> > >>
> > >>>You'll also see the grey ring where the laser cylinder and the laser
> > >>>half-sphere meet(try looking at that location perpendicularly and the grey
> > >>>ring disappears).
> > >>>
> > >>>
> > >>>
> > >>>
> > >>Default texture applied to the substracting cylinder
> > >>
> > >>
> > >>
> > >>>You can also see a small white dot on the bottom half-sphere, which is also
> > >>>an image of the grey sphere.
> > >>>
> > >>>
> > >>>
> > >>Default texture's ior again
> > >>
> > >>
> > >>
> > >>>I have a background of stars, and so the ends
> > >>>of my laser end up looking speckled. How can I make all those images and
> > >>>grey rings go away?
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>1- Remove the ior statement in your default. Thin add an ior to your
> > >>cylinder, this is what cause the sphere to apears in your beam.
> > >>2- Use merge instead on an union. This will remove the internal surfaces.
> > >>3- Use difference{sphere{...}cylinder{...}texture{...}interior{...}}.
> > >>That is, apply the texture and interior to the whole
> > >>union/difference/intersection/merge. The cylinder get the default
> > >>texture and apply it to where it intercect the sphere, giving you that
> > >>gray circle.
> > >>
> > >>Alain
> > >>
> > >>
> > >
> > >
> > >Thanks, Alain, all the images on the laser are gone now that ior has been
> > >deleted. It also helped by making the outer edge fuzzier. However, I'm
> > >still having problems with the grey circle. This time, instead of a grey
> > >circle, there's a disk that matches the color of the media (white in the
> > >middle, red on the outside), but a little wider than the laser so it
> > >doesn't match up (probably b/c removing the ior also seemed to shrink the
> > >laser's width a little). Is this what you wanted me to do:
> > >
> > >merge{
> > >
> > >
> > OK
> >
> > >cylinder{<0,2*clock1,0>,<0,0,0>, 1 //the laser, top right
> > > // texture {
> > > // pigment { color rgbt 1}}
> > > interior{media{emission rgb 1
> > > density{ cylindrical
> > > color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> > >16][1 rgb 30]}
> > > }}}
> > > hollow
> > > scale<0.1, 1, 0.1>
> > > }
> > >
> > >difference{
> > >sphere{<0,0,0>, 1}
> > >cylinder{<0,5,0>,<0,0,0>,5}
> > >
> > >
> > Why is it so large? cylinder{<0,1.1,0>,<0,0,0>,1.1} is large enough
> > center your sphere and cylinder about <0,0.000001,0> is better, remove
> > coincidence surfaces.
> >
> > > // texture {
> > > // pigment { color rgbt 1}}
> > > interior{media{emission rgb 1
> > > density{ spherical
> > > color_map{[0 rgb 0][0.03 rgb <0.0004,0,0>][0.6 rgb<8,0,0>][0.98 rgb
> > >16][1 rgb 30]}
> > > }}}
> > > hollow
> > > scale<0.1, 0.1, 0.1>
> > > }
> > >
> > >
> > texture{pigment{rgbt 1}finish{ambient 0 diffuse 0}}// apply texture
> > once to whole merge
> >
> > >}
> > >
> > Now, I don't see a discontinuity, as long as I stay with a point of view
> > close to perpendiculat near the base, even zooming in, smooth trensition.
> >
> > Alain
Is there a way I can make the transition smooth even from a point of view
nowhere near perpendicular? It's fine when viewed from the pos. y
direction, but from the neg. y direction it looks like a full sphere (not
half-sphere) in front of a black background, and that the cylinder stops
short and is black when viewed through the base. (I hope you can understand
the picture I'm trying to describe, since I can't attach pictures.) When I
change it from a merge to a union, it looks fine from the neg. y direction,
but from the pos. y direction the media doesn't transition well. Is there a
way to make it transition well from both directions?
Danny
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) |
Danny nous apporta ses lumieres ainsi en ce 2004/06/04 23:40... :
> Is there a way I can make the transition smooth even from a point of view
>
>nowhere near perpendicular? It's fine when viewed from the pos. y
>direction, but from the neg. y direction it looks like a full sphere (not
>half-sphere) in front of a black background, and that the cylinder stops
>short and is black when viewed through the base. (I hope you can understand
>the picture I'm trying to describe, since I can't attach pictures.) When I
>change it from a merge to a union, it looks fine from the neg. y direction,
>but from the pos. y direction the media doesn't transition well. Is there a
>way to make it transition well from both directions?
>
>Danny
>
I don't know how. I my testings, that's exactly what I got. I think that
the spherical media just continue and mixes with the other even if it's
bounding shape is an half-sphere. Try removing the sylindrical media,
but keep the cylinder container, to check it.
Alain
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) |