|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I require a planar surface that truly has a rough surface. So my idea is to
implement an isosurface and use the function f_noise3d() as in the documentation
here: http://www.povray.org/documentation/view/3.6.1/73/#l27
However, I also need to map the rough plane with an image. Whenever I try to use
image_map with map_type 0 (plane-map), the object disappears completely but with
map_type 1 (sphere-map), the plane is mapped with a spherical mapping and I can
still see the object. But I do not want a sphere mapping. Any thoughts on how to
achieve a plane mapping onto an isosurface?
I have tried adjusting the accuracy and max_gradient as in the documentation
here: http://www.povray.org/documentation/view/3.6.1/157/. However, this does
not help.
#include "colors.inc"
#include "functions.inc"
#declare filename = concat("myfile.png")
isosurface {
function { x + f_noise3d(0, y, z) }
contained_by { box { <-5,-5,-5>, <5,5,5> } }
accuracy 0.1 //adjust?
max_gradient 1.1 //adjust?
open
pigment {
image_map {
png filename
map_type 0 //changing to 1 allows me to see object but with spherical
mapping
interpolate 2
once
}
}
scale 1
rotate<0,90,0>
translate<0,0,10>
}
light_source { <0, 0, 0> color White}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I require a planar surface that truly has a rough surface. So my idea is to
> implement an isosurface and use the function f_noise3d() as in the documentation
> here: http://www.povray.org/documentation/view/3.6.1/73/#l27
>
> However, I also need to map the rough plane with an image. Whenever I try to use
> image_map with map_type 0 (plane-map), the object disappears completely but with
> map_type 1 (sphere-map), the plane is mapped with a spherical mapping and I can
> still see the object. But I do not want a sphere mapping. Any thoughts on how to
> achieve a plane mapping onto an isosurface?
>
> I have tried adjusting the accuracy and max_gradient as in the documentation
> here: http://www.povray.org/documentation/view/3.6.1/157/. However, this does
> not help.
>
> #include "colors.inc"
> #include "functions.inc"
>
> #declare filename = concat("myfile.png")
>
> isosurface {
>
> function { x + f_noise3d(0, y, z) }
> contained_by { box { <-5,-5,-5>, <5,5,5> } }
> accuracy 0.1 //adjust?
> max_gradient 1.1 //adjust?
> open
> pigment {
> image_map {
> png filename
> map_type 0 //changing to 1 allows me to see object but with spherical
> mapping
> interpolate 2
> once
> }
>
> }
> scale 1
> rotate<0,90,0>
> translate<0,0,10>
>
> }
>
> light_source { <0, 0, 0> color White}
>
>
>
Your image only cover a 1 by 1 square, and with once, the rest is
apparently getting a totaly transparent pigment.
Change your object as follow:
isosurface {
function { z + f_noise3d(x, y, 0) }
// Surface now in it's desired orientation
// use this if you want smaller bumps
// #declare Bump_Size = 10;
// function{z+ f_noise3d(x*Bump_Size, y*Bump_Size, 0)/Bump_Size) }
contained_by { box { <-5,-5,-1>, <5,5,0> } }
// Tight container = faster rendering
accuracy 0.1
max_gradient 1.1 //adjust if needed but should be OK
open
pigment {
image_map {
png filename
map_type 0
interpolate 2
translate <-0.5, -0.5, 0>// center the image
scale 10 // scale it to fit the isosurface
// once
// no longer needed as the image now cover the whole isosurface
}
}
scale 1
//rotate<0,90,0>
// As the isosurface is now created parallel to the
// X-Y plane, you don't need to rotate it.
translate<0,0,10>
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>> I require a planar surface that truly has a rough surface. So my idea
>> is to
>> implement an isosurface and use the function f_noise3d() as in the
>> documentation
>> here: http://www.povray.org/documentation/view/3.6.1/73/#l27
>>
>> However, I also need to map the rough plane with an image. Whenever I
>> try to use
>> image_map with map_type 0 (plane-map), the object disappears
>> completely but with
>> map_type 1 (sphere-map), the plane is mapped with a spherical mapping
>> and I can
>> still see the object. But I do not want a sphere mapping. Any thoughts
>> on how to
>> achieve a plane mapping onto an isosurface?
>>
>> I have tried adjusting the accuracy and max_gradient as in the
>> documentation
>> here: http://www.povray.org/documentation/view/3.6.1/157/. However,
>> this does
>> not help.
>>
>> #include "colors.inc"
>> #include "functions.inc"
>>
>> #declare filename = concat("myfile.png")
>>
>> isosurface {
>>
>> function { x + f_noise3d(0, y, z) }
>> contained_by { box { <-5,-5,-5>, <5,5,5> } }
>> accuracy 0.1 //adjust?
>> max_gradient 1.1 //adjust?
>> open
>> pigment {
>> image_map {
>> png filename
>> map_type 0 //changing to 1 allows me to see object but with
>> spherical
>> mapping
>> interpolate 2
>> once
>> }
>>
>> }
>> scale 1
>> rotate<0,90,0>
>> translate<0,0,10>
>>
>> }
>>
>> light_source { <0, 0, 0> color White}
>>
>>
>>
>
> Your image only cover a 1 by 1 square, and with once, the rest is
> apparently getting a totaly transparent pigment.
>
Also, the image is actualy situated just above the highest points of the
surface.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Great! Thank you for your help. What is not also clear to me from the
documentation: Which surface is being imaged? Is it the surface with corner
<-5,-5,-1> or the surface with corner <-5,-5,0>?
So, if a translation of <0,0,10> is applied to the isosurface, is the plane now
at <0,0,9> or <0,0,10>?
Is scaling the isosurface the same? For example, if I apply a scale 10, the
corner coordinates are now at <-50,-50,-10> and <-50,-50,0>?
So:
isosurface {
function { z + f_noise3d(x, y, 0) }
// Surface now in it's desired orientation
// use this if you want smaller bumps
// #declare Bump_Size = 10;
// function{z+ f_noise3d(x*Bump_Size, y*Bump_Size, 0)/Bump_Size) }
contained_by { box { <-5,-5,-1>, <5,5,0> } }
// Tight container = faster rendering
accuracy 0.1
max_gradient 1.1 //adjust if needed but should be OK
open
pigment {
image_map {
png filename
map_type 0
interpolate 2
translate <-0.5, -0.5, 0>// center the image
scale 10 // scale it to fit the isosurface
// once
// no longer needed as the image now cover the whole isosurface
}
}
scale 1 // --->Scale 10 changes corners to <-50,-50,-10> and <-50,-50,0>?
//rotate<0,90,0>
// As the isosurface is now created parallel to the
// X-Y plane, you don't need to rotate it.
translate<0,0,10> //--->is the isosurface plane imaged now at <0,0,9> or 10?
}
Alain <kua### [at] videotronca> wrote:
> >> I require a planar surface that truly has a rough surface. So my idea
> >> is to
> >> implement an isosurface and use the function f_noise3d() as in the
> >> documentation
> >> here: http://www.povray.org/documentation/view/3.6.1/73/#l27
> >>
> >> However, I also need to map the rough plane with an image. Whenever I
> >> try to use
> >> image_map with map_type 0 (plane-map), the object disappears
> >> completely but with
> >> map_type 1 (sphere-map), the plane is mapped with a spherical mapping
> >> and I can
> >> still see the object. But I do not want a sphere mapping. Any thoughts
> >> on how to
> >> achieve a plane mapping onto an isosurface?
> >>
> >> I have tried adjusting the accuracy and max_gradient as in the
> >> documentation
> >> here: http://www.povray.org/documentation/view/3.6.1/157/. However,
> >> this does
> >> not help.
> >>
> >> #include "colors.inc"
> >> #include "functions.inc"
> >>
> >> #declare filename = concat("myfile.png")
> >>
> >> isosurface {
> >>
> >> function { x + f_noise3d(0, y, z) }
> >> contained_by { box { <-5,-5,-5>, <5,5,5> } }
> >> accuracy 0.1 //adjust?
> >> max_gradient 1.1 //adjust?
> >> open
> >> pigment {
> >> image_map {
> >> png filename
> >> map_type 0 //changing to 1 allows me to see object but with
> >> spherical
> >> mapping
> >> interpolate 2
> >> once
> >> }
> >>
> >> }
> >> scale 1
> >> rotate<0,90,0>
> >> translate<0,0,10>
> >>
> >> }
> >>
> >> light_source { <0, 0, 0> color White}
> >>
> >>
> >>
> >
> > Your image only cover a 1 by 1 square, and with once, the rest is
> > apparently getting a totaly transparent pigment.
> >
> Also, the image is actualy situated just above the highest points of the
> surface.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Great! Thank you for your help. What is not also clear to me from the
> documentation: Which surface is being imaged? Is it the surface with corner
> <-5,-5,-1> or the surface with corner <-5,-5,0>?
When you apply an image_map, the image is mapped crom <0,0> to <1,1> in
the X-Y plane and extent along the Z axis to infinity.
If you want the image to cover some other area, you need to scale it
appropriately.
That's why, in the example, I translate the image by <-0.5,0.5,0> before
scalling it to fit your isosurface.
>
> So, if a translation of <0,0,10> is applied to the isosurface, is the plane now
> at <0,0,9> or <0,0,10>?
Your isosurface, as defined in your code have it's "top" at Z=0 and
extend toward -1*z. When you add a value in the function, the surface
moves in the oposite direction.
Your isosurface start in the -1 to 0 range along the z axis. After you
translate +10 units on the Z axis, it moves to the 9 to 10 range.
>
> Is scaling the isosurface the same? For example, if I apply a scale 10, the
> corner coordinates are now at <-50,-50,-10> and <50,50,0>?
Exactly. <-5,-5,-1> become <-50,-50,-10> and <5,5,0> become <50,50,0>
You don't need to scale by the same value in each directions.
If you want to make the object larger but keep the same depth, you can
use : scale<10, 10, 1>
Alain
>
> So:
>
> isosurface {
>
> function { z + f_noise3d(x, y, 0) }
> // Surface now in it's desired orientation
>
> // use this if you want smaller bumps
> // #declare Bump_Size = 10;
> // function{z+ f_noise3d(x*Bump_Size, y*Bump_Size, 0)/Bump_Size) }
>
> contained_by { box { <-5,-5,-1>, <5,5,0> } }
> // Tight container = faster rendering
>
> accuracy 0.1
> max_gradient 1.1 //adjust if needed but should be OK
> open
> pigment {
> image_map {
> png filename
> map_type 0
> interpolate 2
> translate <-0.5, -0.5, 0>// center the image
> scale 10 // scale it to fit the isosurface
> // once
> // no longer needed as the image now cover the whole isosurface
> }
>
> }
> scale 1 // --->Scale 10 changes corners to <-50,-50,-10> and <-50,-50,0>?
// Yes
> //rotate<0,90,0>
> // As the isosurface is now created parallel to the
> // X-Y plane, you don't need to rotate it.
>
> translate<0,0,10> //--->is the isosurface plane imaged now at <0,0,9> or 10?
// The front is at 10 and the back at 9.
>
> }
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|