|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello !
i would like to know if it is possible to use uv mapping for file based height
fields ?
all i get is a stretched texture (long lines) on planar sections parallel to the
xz plane
here is the height field + texture i am trying to uv map (before uv map) :
height_field{ tga "input.tga" smooth water_level 0 double_illuminate
scale <166000,24000,166000>
translate<-83000,0,25000>
texture{
pigment {
bozo
turbulence 0.92
scale 5
color_map {
[0.3 color Orange]
[0.7 color Brown]
[0.9 color Black]
}
}
normal {
crackle 0.75
turbulence 0.25
scale 0.36
}
}
}
Thank you for any help !
I've seen this thread and thought it could help, but it does note reference file
based height fields...
http://news.povray.org/povray.binaries.scene-files/thread/%3C4d28409d@news.povray.org%3E/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 22.04.2012 19:23, schrieb rodv92:
> i would like to know if it is possible to use uv mapping for file based height
> fields ?
You can always give it a try. I /think/ it works (despite not being
mentioned in the docs), but I don't know for sure off the top of my hat.
> all i get is a stretched texture (long lines) on planar sections parallel to the
> xz plane
You can also use "warp { planar y }" at the end of the texture
definition to pick a single slice of the texture in the xz plane and
project that along the y axis onto your height field.
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: height field based on TGA file and UV mapping
Date: 23 Apr 2012 04:26:24
Message: <4f951230$1@news.povray.org>
|
|
|
| |
| |
|
|
On 22-4-2012 19:23, rodv92 wrote:
> Hello !
>
> i would like to know if it is possible to use uv mapping for file based height
> fields ?
>
Iirc, it should be possible, but I am unable to find again an example
where I may have used it :-(
In the Insert Menu, under Special Shapes, there is this:
// ----------------- HF_Square macro ------------------
#declare Fn_1 =
function(x, y, z)
{1-(-f_snoise3d(x*2,y*2,z*2)*0.25)}
// -----------------------------------------------------
object{ HF_Square( Fn_1, //Function,
0, // UseUVheight: 0 or 1
1, // UseUVtexture: 0 or 1
<50,50>, // Resolution,
1, // Smooth: 0 or 1
"",// FileName, ""=no file,
<-1,0,-1>*2, //MnExt,
<1,1,1>*2 //MxExt
) //------------------------------
texture{ pigment{ checker
color rgb<1,0.6,0>
color rgb<1,1,1>*0.9
scale 0.05}
finish { phong 0.1}
} // end of texture
scale<1,1,1>*1
rotate<0,0,0>
translate<0,-1.5,0>
} // end of HF_Square ----------------------------------
Could this help you?
Thomas
Post a reply to this message
|
|
| |
| |
|
|
From: Alain
Subject: Re: height field based on TGA file and UV mapping
Date: 24 Apr 2012 15:59:22
Message: <4f97061a@news.povray.org>
|
|
|
| |
| |
|
|
> Hello !
>
> i would like to know if it is possible to use uv mapping for file based height
> fields ?
>
> all i get is a stretched texture (long lines) on planar sections parallel to the
> xz plane
>
The height field is set along the x-z plane while your image is initialy
mapped on the x-y plane.
You need to rotate 90*x so that it extend in the correct direction.
After the rotation of the image, the hight_field sit in a box extending
from <0,0,0> to <1,1,1> and the image in a tile from <0,0,0> to <1,0,1>
extending infinitely along the y axis.
Also, it would be beter to apply it before you scale the hight_field.
That way, the two will be affected at once, and will probably make the
UV mapping un-needed.
Alain
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: height field based on TGA file and UV mapping
Date: 25 Apr 2012 03:35:44
Message: <4f97a950$1@news.povray.org>
|
|
|
| |
| |
|
|
On 24-4-2012 21:59, Alain wrote:
> The height field is set along the x-z plane while your image is initialy
> mapped on the x-y plane.
>
> You need to rotate 90*x so that it extend in the correct direction.
> After the rotation of the image, the hight_field sit in a box extending
> from <0,0,0> to <1,1,1> and the image in a tile from <0,0,0> to <1,0,1>
> extending infinitely along the y axis.
Yes, this is the thing to do when applying an image_map to a
height_field. However...
>
> Also, it would be beter to apply it before you scale the hight_field.
> That way, the two will be affected at once, and will probably make the
> UV mapping un-needed.
The interesting question here is if uv_mapping is possible on
height_fields. With the method described and (e.g.) a strong vertical
scaling, the image_map gets distorted along the flanks of
mountains/valleys. Am I correct to guess that this would not be the case
when applying uv_mapping? However, adding uv_mapping results in banding.
My tentative conclusion would be that uv_mapping is indeed not
implemented for height_fields, as already shown by its absence in the
documentation (par. 3.5.7.1 Supported Objects).
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|