|
|
I have defined a simple texture, e.g.:
#declare paper1 = texture {
uv_mapping pigment { color rgb <0.8,0.8,1> }
normal { leopard 1 turbulence 1.7 scale 0.01 }
}
Now I want to draw a line on top of the texture (say I want black line of
thickness 0.1 from point (u,v) = (0,0) to point (u,v) = (1,1)).
What is the best approach to define such texture?
Post a reply to this message
|
|
|
|
"bocovp" <nomail@nomail> wrote:
> I have defined a simple texture, e.g.:
> #declare paper1 = texture {
> uv_mapping pigment { color rgb <0.8,0.8,1> }
> normal { leopard 1 turbulence 1.7 scale 0.01 }
> }
>
> Now I want to draw a line on top of the texture (say I want black line of
> thickness 0.1 from point (u,v) = (0,0) to point (u,v) = (1,1)).
> What is the best approach to define such texture?
I'd probably use layered textures, if you want to keep the adaptive uv-mapping.
http://www.f-lohmueller.de/pov_tut/tex/tex_890e.htm
Either that, or use a color map or one of the special pigment patterns.
I guess it all depends on the uv-mapped object's shape, and how you want it to
look.
Post a reply to this message
|
|
|
|
> I have defined a simple texture, e.g.:
> #declare paper1 = texture {
> uv_mapping pigment { color rgb <0.8,0.8,1> }
> normal { leopard 1 turbulence 1.7 scale 0.01 }
> }
>
> Now I want to draw a line on top of the texture (say I want black line of
> thickness 0.1 from point (u,v) = (0,0) to point (u,v) = (1,1)).
> What is the best approach to define such texture?
>
>
The best way would be using layered texture.
Start with the base texture, and follow with the second texture to be
applyed over it.
The second texture will be mostly transparent.
In your case, the dificulty comes from the fact that the line have a
finite length. For that, I suggest using the object pattern:
#declare PatternObject = box{0, <sqrt(3), 0.1, 0.1>rotate<-45, 0, 45>}
About the correct orientation.
You should use reorient() to get exactly the direction needed.
The distance between <0,0,0> and <1,1,1> = sqrt(3)
#declare Paper1 = texture{
uv_mapping pigment { color rgb <0.8,0.8,1> }
normal { leopard 1 turbulence 1.7 scale 0.01 }
}
texture{
object{PatternObject
rgbt 1 // outside the object is transparent
rgb 0 // inside is black
}
}
If you want the line do be as long as possible, then, you can use a
gradient texture:
texture{
gradient -1
color_map{[0.1 rgb 0] [0.1 rgbt 1]}
}
You may also use the planar or cylindrical pattern if you don't want the
line to repeat. Those need to be rotated.
Post a reply to this message
|
|