|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
When a slope pattern based pigment is used in a function, it always returns
the beginning of the color_map.
This seems logical, because the function only has the position in space and
not the normal vector.
Does anyone know a workaround (or dirty trick ;) for this?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 27 Feb 2002 12:51:36 -0500, the### [at] webde (theVIPER) wrote:
> This seems logical, because the function only has the position in space and
> not the normal vector.
> Does anyone know a workaround (or dirty trick ;) for this?
There can't be any trick to obtain normal of any point in space becouse point
has no normal vector as you pointed. There can be trick for particular usage
but then you have to specify where/how you want to use it.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
theVIPER wrote:
>
> When a slope pattern based pigment is used in a function, it always returns
> the beginning of the color_map.
> This seems logical, because the function only has the position in space and
> not the normal vector.
>
> Does anyone know a workaround (or dirty trick ;) for this?
The slope pattern is only defined at the surface of the object it is
applied to. Therefore you question does not seem to make sense to me.
Using intersection information with an arbitrary object is of course an
interesting concept for a pattern or function. See:
http://www-public.tu-bs.de:8080/~y0013390/povcyg/docu/docu_pattern01.html#OBJSLOPE
for an example. It might be that in the future 'trace' will be made
available in functions too but not in Povray 3.5.
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 21 Feb. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>There can't be any trick to obtain normal of any point in space becouse point
>has no normal vector as you pointed. There can be trick for particular usage
>but then you have to specify where/how you want to use it.
Christoph Hormann <chr### [at] gmxde> wrote:
>The slope pattern is only defined at the surface of the object it is
>applied to. Therefore you question does not seem to make sense to me.
Actually I don't want the normal of any point in space, but only on the
surface of an object.
I would like to use the value of a given slope pigment in a function which
should be used to as a pattern for another pigment. So only the value on the
surface of an object using this pigment is needed.
Something like this:
#declare slopePigment = pigment
{
slope
...
}
#declare slopeFunction = function
{
pigment
{
slopePigment
}
}
#declare anotherFunction = function(x,y,z)
{
...slopeFunction(x,y,z)...
}
object
{
anObject
pigment
{
function
{
anotherFunction(x,y,z)
}
}
...
}
Or is there any other way doing something similar?
>Using intersection information with an arbitrary object is of course an
>interesting concept for a pattern or function. See:
>
>http://www-public.tu-bs.de:8080/~y0013390/povcyg/docu/docu_pattern01.html#OBJSLOPE
>
>for an example. It might be that in the future 'trace' will be made
>available in functions too but not in Povray 3.5.
That's exactly what I was looking for. A shame it's not supported by 3.5.
theVIPER
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3c7d1ca8@news.povray.org>, the### [at] webde (theVIPER)
wrote:
> When a slope pattern based pigment is used in a function, it always returns
> the beginning of the color_map.
> This seems logical, because the function only has the position in space and
> not the normal vector.
>
> Does anyone know a workaround (or dirty trick ;) for this?
The only thing I can think of would be to do *all* the calculations in
the function. This would be fairly easy for simple objects like spheres,
but very difficult for more complex ones. A height_field should be
fairly easy to approximate, though.
The main problem is that the functions will be extremely complex,
because functions currently can't handle vector expressions. This also
means they will be quite slow...
Hmm...use the slope pattern with a black-white color_map, a finish with
diffuse 0 and ambient 1, and render an image with that. Use that image
as input to a function...and you have slope data available to functions!
It'll only work for flat objects like height fields though.
Really, this information should be made available to functions...when a
function pattern is evaluated on a surface, the ray and intersection
information could be passed to it through predefined parameters like the
xyz coordinates are now. The information could also be passed along to a
pattern or pigment if applicable. If evaluated elsewhere, as media
density for example, dummy information could be used.
However, actually writing the code for all this is a bit more work...
--
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |