|
|
Bjorn Jonsson wrote:
> Is it possible to create an isosurface (heightfield on a sphere in this
> case) from a grayscale PNG image ? What I have in mind is something
> comparable to a surface object where this is easy to do but it doesn't
> look obvious to me how to do this with an isosurface if it is possible.
>
http://www.imagico.de/pov/ic/docu02.html#HF_Sphere
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 31 Oct. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|
|
|
|
Am 06.11.2005, 19:05 Uhr, schrieb Bjorn Jonsson <bjj### [at] mmediais>:
> Is it possible to create an isosurface (heightfield on a sphere in this
> case) from a grayscale PNG image ?
Yes,
first declare a function like this:
#include "functions.inc"
#declare fn_drop = function{
pigment{
image_map {
png "your_file.png"
// ================
map_type 1 // 1=spherical
interpolate 4 // 4=normalized distance
// =====================
}
}
}
And then call the isosurface:
isosurface {
function { f_sphere (x, y, z, 1) - your_file.png (x,y,z).blue *
0.1 }
// ================================================or red or
green========
contained_by { sphere {0, 1.5} }
open
max_gradient 4
texture {
// your tex
}
}
In this case, your ping will be substracted. This means that black part
does nothing while white extends the radius of the f_sphere at that point.
Fine tuning with the factor, start with 0.01 or 0.1 for a first test.
In the attachment find a working example of two files, the drops2 produces
the file (Output_File_Type=N) that you need for the "BubbleSphere".
Yours,
Bu.
Post a reply to this message
Attachments:
Download 'bubble_sphere.zip' (2 KB)
|
|
|
|
sorry, my fault:
isosurface {
function { f_sphere (x, y, z, 1) - fn_drop (x,y,z).blue * 0.1 }
// ======= your function =======
Bu.
Post a reply to this message
|
|