|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi, I want to get the directions of the normals of a surface to use them in
a pigment. I thought that I could use a combination of 3 slope patterns to
do that
but I don't know how to get the direction when I have 3 vectors and the
degrees in that it stands to them.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 19 Dec 2001 13:46:11 +0100, "Simon Adameit" <gom### [at] gmxde> wrote:
>Hi, I want to get the directions of the normals of a surface to use them in
>a pigment. I thought that I could use a combination of 3 slope patterns to
>do that
>but I don't know how to get the direction when I have 3 vectors and the
>degrees in that it stands to them.
I'm not sure I understand slope pattern well but perhaps you expect something
like this ?
#version 3.5;
global_settings{
assumed_gamma 1.0
noise_generator 2
}
background{color rgb 1}
camera{
orthographic
location -2*z
direction z
right x*image_width/image_height
up y
sky y
look_at z
}
light_source{
<-30,30,-30>
color rgb 1
}
sphere{
0 .5
normal{granite}
pigment{
average
pigment_map{
[3 slope x color_map{[0 rgb 0][1 red 3]}]
[3 slope y color_map{[0 rgb 0][1 green 3]}]
[3 slope z color_map{[0 rgb 0][1 blue 3]}]
}
}
}
// ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I'm not sure I understand slope pattern well but perhaps you expect
something
> like this ?
>
> pigment{
> average
> pigment_map{
> [3 slope x color_map{[0 rgb 0][1 red 1]}]
> [3 slope y color_map{[0 rgb 0][1 green 1]}]
> [3 slope z color_map{[0 rgb 0][1 blue 1]}]
> }
> }
>
> ABX
>
I have something like this but my question is how I can get the direction of
the normal from the colors I get from this pigment.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Simon Adameit" <gom### [at] gmxde> wrote in message
news:3c20a1a3@news.povray.org...
>
> I have something like this but my question is how I can get the direction
of
> the normal from the colors I get from this pigment.
Ah, well then you want to use trace(). It can get you the normal vector
which could then be used as color vector. The example in the documentation
should be enough to go by.
--
text{ttf"timrom""bob h"0,0pigment{rgb 7}translate 7*z}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Ah, well then you want to use trace(). It can get you the normal vector
> which could then be used as color vector. The example in the
documentation
> should be enough to go by.
I want to make a pigment that uses the direction of the normal at each point
of the surface, this is not possible with trace.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 19 Dec 2001 16:00:12 +0100, "Simon Adameit" <gom### [at] gmxde> wrote:
> I want to make a pigment that uses the direction of the normal at each point
> of the surface, this is not possible with trace.
If slope pattern is proportional to normal vie on Direction parameter then I
think
pigment{
average
pigment_map{
[3 slope x color_map{[0 red -3][1 red 3]}]
[3 slope y color_map{[0 green -3][1 green 3]}]
[3 slope z color_map{[0 blue -3][1 blue 3]}]
}
}
returns direction of the normal. But if slope pattern is proportional to the
angle then I'm wrong.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I want to make a pigment that uses the direction of the normal at each
point
> of the surface, this is not possible with trace.
Using your 3-slopes trick, you should be able to define a function,
and then use it as a pattern. A pattern of a function of three patterns.
Fabien.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>
> Using your 3-slopes trick, you should be able to define a function,
> and then use it as a pattern. A pattern of a function of three patterns.
>
That's what I wanted to do :-)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> returns direction of the normal. But if slope pattern is proportional to
the
> angle then I'm wrong.
>
From reading the Docs I thought it is but I'm not sure.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |