POV-Ray : Newsgroups : povray.advanced-users : FAQ? height_field on a sphere, or uv_mapping => isosurface Server Time
24 Nov 2024 14:57:49 EST (-0500)
  FAQ? height_field on a sphere, or uv_mapping => isosurface (Message 1 to 5 of 5)  
From: Bill Hails
Subject: FAQ? height_field on a sphere, or uv_mapping => isosurface
Date: 4 Jun 2006 13:59:44
Message: <44831f90@news.povray.org>
Probably this should go to p.newusers, but I can't seem
to find anything in the manual.

I'm doing a simple moon - sphere, uv_mapping, image_map and bump_map:

#declare Luna = sphere {
    0, 1
    texture {
        uv_mapping
        pigment {
            image_map {
                jpeg "albedo.simp750.jpeg"
            }
        }
        normal {
            bump_map {
                jpeg "moonbump4k.jpg"
                bump_size 1.8
            }
        }
        finish {
            ambient VeryDarkBlue
            diffuse 1.0
            specular 0.1
            roughness 0.35
        }
    }
    rotate -90 * y
}

but that just doesn't cut it because at the terminator
the bump map just abruptly stops.

So I want to replace the sphere with either a height_field
(are spherical height fields possible? I can't find any
references) or an isosurface, using the bump map file as data.

I'm sure this question must have been asked a hundered
times before, so please excuse me if I've missed it,
but I can't seem to find anything relevant.

-- 
Bill Hails
http://billhails.net/


Post a reply to this message

From: M a r c
Subject: Re: FAQ? height_field on a sphere, or uv_mapping => isosurface
Date: 4 Jun 2006 14:46:17
Message: <44832a79$1@news.povray.org>

news:44831f90@news.povray.org...
> Probably this should go to p.newusers, but I can't seem
> to find anything in the manual.
>
You could want to have a look at this page :-)
http://www.oyonale.com/ressources/english/sources09.htm

Marc


Post a reply to this message

From: Bill Hails
Subject: Re: FAQ? height_field on a sphere, or uv_mapping => isosurface
Date: 4 Jun 2006 14:59:38
Message: <44832d9a@news.povray.org>
M_a_r_c wrote:

> 

> news:44831f90@news.povray.org...
>> Probably this should go to p.newusers, but I can't seem
>> to find anything in the manual.
>>
> You could want to have a look at this page :-)
> http://www.oyonale.com/ressources/english/sources09.htm
> 
> Marc

Instant bookmark. Thanks!

-- 
Bill Hails
http://billhails.net/


Post a reply to this message

From: Bill Hails
Subject: Re: FAQ? height_field on a sphere, or uv_mapping => isosurface
Date: 4 Jun 2006 16:28:01
Message: <44834251@news.povray.org>
M_a_r_c wrote:

> 

> news:44831f90@news.povray.org...
>> Probably this should go to p.newusers, but I can't seem
>> to find anything in the manual.
>>
> You could want to have a look at this page :-)
> http://www.oyonale.com/ressources/english/sources09.htm
> 
> Marc

Having tried this, it got me half way there,
The isosurface takes the image_map function and looks
fine, but I needed to duplicate the technique to get
the ambient map to colour the surface.

I now have:

#local hf_fn = function {
    pigment {
        image_map {
            jpeg "moonbump4k"
            map_type 1
            interpolate 2
        }
    }
}

#local pg_fn = function {
    pigment {
        image_map {
            jpeg "albedo.simp750.jpeg"
            map_type 1
            interpolate 2
        }
    }
}

#local rs = 0.002;

#declare Luna = isosurface {
    function{
        f_sphere(x, y, z, 1) + rs - hf_fn(x,y,z).gray * rs
    }
    // contained_by { sphere { 0, 1.2 } }
    max_gradient 1.810
    texture {
        pigment {
            function { pg_fn(x, y, z).gray }
        }
        finish {
            ambient VeryDarkBlue
            diffuse 1.0
            specular 0.1
            roughness 0.35
        }
    }
    rotate -90 * y
}


Weird thing is the contained_by { sphere 0, 1 }  was clipping,
I had to change it to sphere { 1, 1.2 } to reduce that, then
commenting it out altogether seemed to fix it.

I am using megapov, maybe there's a difference in behaviour.
Anyway, I have a moon that looks great, so thanks again for
the pointers.

-- 
Bill Hails
http://billhails.net/


Post a reply to this message

From: binarycortex
Subject: Re: FAQ? height_field on a sphere, or uv_mapping =3D> isosurface
Date: 4 Feb 2008 15:30:01
Message: <web.47a7755b7568186edddf88110@news.povray.org>
Bill Hails <me### [at] billhailsnet> wrote:
> Probably this should go to p.newusers, but I can't seem
> to find anything in the manual.
>
> I'm doing a simple moon - sphere, uv_mapping, image_map and bump_map:
>
> #declare Luna = sphere {
>     0, 1
>     texture {
>         uv_mapping
>         pigment {
>             image_map {
>                 jpeg "albedo.simp750.jpeg"
>             }
>         }
>         normal {
>             bump_map {
>                 jpeg "moonbump4k.jpg"
>                 bump_size 1.8
>             }
>         }
>         finish {
>             ambient VeryDarkBlue
>             diffuse 1.0
>             specular 0.1
>             roughness 0.35
>         }
>     }
>     rotate -90 * y
> }
>
> but that just doesn't cut it because at the terminator
> the bump map just abruptly stops.
>
> So I want to replace the sphere with either a height_field
> (are spherical height fields possible? I can't find any
> references) or an isosurface, using the bump map file as data.
>
> I'm sure this question must have been asked a hundered
> times before, so please excuse me if I've missed it,
> but I can't seem to find anything relevant.
>
> --
> Bill Hails
> http://billhails.net/

There is a way to do a spherical height field, and its in the help file.
http://www.povray.org/documentation/view/3.6.1/468/

Enjoy,
Ian


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.