|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
This formula was posted in one of the groups not so long ago (a couple
of weeks ?).
It was meant to make planets out of planet maps, if I remember well.
The map was used as a pigment map, turned into a function added to the
regular sphere function :
x*x+y*y+z*z + stuff here (hfld())
with hfld=function{pigment{image_mape{tga "mymap"}}}
The nice thing was that the height field coordinates were mapped to the
sphere (or so I guessed by looking at the code). So it was not
x*x+y*y+z*z +1-hfld(x,y,z) but something slightly more complicated.
I can't find it, and I don't remember the author's name... I could be
mistaken too.
Any help very much appreciated !
G.
Post a reply to this message
|
|
| |
| |
|
|
From: mr art
Subject: Re: Formula to add pigment image map to isosurface sphere ?
Date: 5 Feb 2000 09:05:51
Message: <389C2E4C.25A2B350@gci.net>
|
|
|
| |
| |
|
|
This is how I do it:
#declare Pic=function{pigment{image_mape{tga "mymap"}}}
#declare FUNC1=function {"sphere",<R0>}
#declare RO = //Radius of planet
#declare Prec = // % difference that the image map
// makes to the surface of the sphere
isosurface
{
function{FUNC1(x,y,z)-(Pic(x,y,z)*R0*Prec)}
contained_by {sphere {0,R0*(1+Prec)}}
...
}
Seems to work well.
Gilles Tran wrote:
>
> This formula was posted in one of the groups not so long ago (a couple
> of weeks ?).
> It was meant to make planets out of planet maps, if I remember well.
> The map was used as a pigment map, turned into a function added to the
> regular sphere function :
> x*x+y*y+z*z + stuff here (hfld())
>
> with hfld=function{pigment{image_mape{tga "mymap"}}}
>
> The nice thing was that the height field coordinates were mapped to the
> sphere (or so I guessed by looking at the code). So it was not
> x*x+y*y+z*z +1-hfld(x,y,z) but something slightly more complicated.
>
> I can't find it, and I don't remember the author's name... I could be
> mistaken too.
> Any help very much appreciated !
>
> G.
--
Mr. Art
"Often the appearance of reality is more important
than the reality of the appearance."
Bill DeWitt 2000
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"mr.art" wrote:
> This is how I do it:
The formula rings a bell. It may not be what I expected (I was looking for
something that would actually map the image around the sphere) but it is
probably what I had seen before. And yes it works fine enough for my current
project.
Thanks a lot.
G.
Post a reply to this message
|
|
| |
| |
|
|
From: David Fontaine
Subject: Re: Formula to add pigment image map to isosurface sphere ?
Date: 5 Feb 2000 16:46:38
Message: <389C99FF.5FD07069@faricy.net>
|
|
|
| |
| |
|
|
To map to a sphere:
#declare foo=function{...}
...
function {
foo(atan2(x,z)/pi,atan2(y,sqrt(x^2+z^2))/(.5*pi),sqrt(x^2+y^2+z^2))
}
...
X goes around the equator from -1 to 1
Y goes from southern pole to northern pole from -1 to 1
Z goes outward from center from 0 to infinite
--
Homepage: http://www.faricy.net/~davidf/
___ ______________________________
| \ |_ <dav### [at] faricynet>
|_/avid |ontaine <ICQ 55354965>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <389C8433.8D799243@inapg.inra.fr>, Gilles Tran
<tra### [at] inapginrafr> wrote:
> The formula rings a bell. It may not be what I expected (I was
> looking for something that would actually map the image around the
> sphere) but it is probably what I had seen before. And yes it works
> fine enough for my current project.
Wouldn't the mapping types built into image_map be enough? Or the
mapping warps?
--
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|
| |
| |
|
|
From: mr art
Subject: Re: Formula to add pigment image map to isosurface sphere ?
Date: 5 Feb 2000 21:50:46
Message: <389CE198.989A8153@gci.net>
|
|
|
| |
| |
|
|
This does map the image to the sphere, as a displacement.
I have used the pigment{image_map{ png "*.png" map_type 1}}
statement for the pigment. See the thread "My first MegaPOV0.4 image(26k
bu)"
for an example. I have set this up as a macro to be used with
various planet images.
Gilles Tran wrote:
>
> "mr.art" wrote:
>
> > This is how I do it:
>
> The formula rings a bell. It may not be what I expected (I was looking for
> something that would actually map the image around the sphere) but it is
> probably what I had seen before. And yes it works fine enough for my current
> project.
>
> Thanks a lot.
> G.
--
Mr. Art
"Often the appearance of reality is more important
than the reality of the appearance."
Bill DeWitt 2000
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris Huff wrote:
> Wouldn't the mapping types built into image_map be enough? Or the
> mapping warps?
They do work perfectly.
Stupid me just realized this this week-end after writing my answer to Mr
Art.
G.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |