|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Can someone help me out with this scene? I'm trying to create a glowing
cylindrical object (to look like a spotlight that fallsoff without using an
actual light source) and I'm getting some results that look like coincident
surfaces. Code is below.
Also, how would I go about modifying this so it does not look like a black end
has been pasted on a green cylinder?
#include "colors.inc"
#declare cam_pos=(x*4+y*3+z*-2)*2;
camera {
location cam_pos
look_at (x*1+y*0+z*0)*0.5
}
light_source {
cam_pos
color White
}
cylinder { 0, <1,0,0>, 1
pigment {
gradient x
pigment_map{
[0.0 color Green filter 1]
[0.05 color Green filter 1]
[0.8 color Green filter 0]
[1.0 color Green filter 0]
}
}
hollow
finish{ ambient 0.000 diffuse 0.000 specular 0}
interior{
media{
emission 1
} }
scale x*3
}
light_source{
cam_pos
color White
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Woody napsal(a):
> Can someone help me out with this scene? I'm trying to create a glowing
> cylindrical object (to look like a spotlight that fallsoff without using an
> actual light source) and I'm getting some results that look like coincident
> surfaces. Code is below.
>
make the cylinder a little bit shorter or scale the pigment. Your
pigment has a sharp transition right on the {x,3} surface.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Woody" <nomail@nomail> wrote:
> Can someone help me out with this scene? I'm trying to create a glowing
> cylindrical object (to look like a spotlight that fallsoff without using an
> actual light source) and I'm getting some results that look like coincident
> surfaces. Code is below.
Coincident surfaces also occur with patterns like gradient. There is a hard
transition from 1 back to zero at each frequency. Adjust the map size or the
cylinder size as you would for any coincident surface.
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Woody nous apporta ses lumieres en ce 2007/12/23 21:11:
> Can someone help me out with this scene? I'm trying to create a glowing
> cylindrical object (to look like a spotlight that fallsoff without using an
> actual light source) and I'm getting some results that look like coincident
> surfaces. Code is below.
>
> Also, how would I go about modifying this so it does not look like a black end
> has been pasted on a green cylinder?
I would alter the scene as follow:
>
> #include "colors.inc"
>
> #declare cam_pos=(x*4+y*3+z*-2)*2;
> camera {
> location cam_pos
> look_at (x*1+y*0+z*0)*0.5
>
>
> }
>
>
> light_source {
> cam_pos
> color White // add *2 if this light is not bright enough
> }
>
cylinder { 0, <1,0,0>, 1
pigment {rgbt 1} // No need to see the container
hollow
finish{ ambient 0.000 diffuse 0.000 specular 0}
interior{
media{
emission y/2 // to prevent the oversaturation
//adjust the colour to your taste
density {gradient -x scale 1.01}//prevent second ramp
from apearing
} }
scale x*3
}
>
> //remove this second light. It will make the rendering faster.
> light_source{
> cam_pos
> color White
> }
>
>
Whenever you have more than 1 light_source at the same location you should
replace them with a single one having the sum of all the original ones. It
render faster as you now need only 1 shadow test instead of two, or more. The
color value of a light is not limited to 1.
light_source{0 color 2}
and
light_source{0 color 1} light_source{0 color 1}
both have exactly the same effect on your scene.
--
Alain
-------------------------------------------------
But I thought YOU did the backups...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Whenever you have more than 1 light_source at the same location you should
> replace them with a single one having the sum of all the original ones. It
> render faster as you now need only 1 shadow test instead of two, or more. The
> color value of a light is not limited to 1.
> light_source{0 color 2}
> and
> light_source{0 color 1} light_source{0 color 1}
> both have exactly the same effect on your scene.
>
> --
> Alain
> -------------------------------------------------
> But I thought YOU did the backups...
The double light was actually an accident. But thanks for the info. I was not
aware of light_sources being greater than 1. Thanks for all the good advice.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Woody nous apporta ses lumieres en ce 2007/12/25 19:49:
>> Whenever you have more than 1 light_source at the same location you should
>> replace them with a single one having the sum of all the original ones. It
>> render faster as you now need only 1 shadow test instead of two, or more. The
>> color value of a light is not limited to 1.
>> light_source{0 color 2}
>> and
>> light_source{0 color 1} light_source{0 color 1}
>> both have exactly the same effect on your scene.
>>
>> --
>> Alain
>> -------------------------------------------------
>> But I thought YOU did the backups...
>
> The double light was actually an accident. But thanks for the info. I was not
> aware of light_sources being greater than 1. Thanks for all the good advice.
>
>
In the samples scenes, there is one with a light that have a value of 1000!
--
Alain
-------------------------------------------------
I drive way too fast to worry about cholesterol.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Woody" <nomail@nomail> wrote:
> Can someone help me out with this scene? ...I'm getting some results that look
> like coincident surfaces.
>
Another solution would be to add a slight translation to your color_map, which
will pull its sharp index-list "crossover" position away from the cylinder's
end cap:
pigment {
gradient x
pigment_map{
[0.0 color Green filter 1]
[0.05 color Green filter 1]
[0.8 color Green filter 0]
[1.0 color Green filter 0]
}
translate .0001*x
...etc. ....
Ken W.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Woody" <nomail@nomail> wrote:
> Also, how would I go about modifying this so it does not look like a black end
> has been pasted on a green cylinder?
>
Looking over your scene code and running it, I was wondering if the following
alternate code is what you're trying to achieve? I've reworked yours (and
eliminated the lights, which actually aren't necessary):
#include "colors.inc"
#declare cam_pos=(x*4+y*3+z*-2)*2;
camera {
location cam_pos
look_at (x*1+y*0+z*0)*0.5
}
cylinder { 0, <1,0,0>, 1
hollow
pigment {color rgbt 1} // transparent
finish{ ambient 0.000 diffuse 0.000 specular 0} // finish is optional
// with this rgbt 1 object
interior{
media{
emission .6
density{
gradient x
color_map{
[0.0 color Green] // green media
[1.0 color rgb 0] // no media at all
}
}
}
}
scale x*3
}
Ken W.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |