![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> scaling an object doesn't reduce its density. Eight thousand times a piece
> of steel is a piece of steel, not a piece of super-sparse steel.
Yeah, the density isn't dependent on scale, I forgot that.
This should work with diferent radius planets.
#declare PlanetRadius = 50;
#declare PlanetAtmosphere = sphere { <0,0,0>, 1
hollow
material {
texture {
pigment { rgbt <1,1,1,1> }
}
interior {
media {
emission <0,0,2>
density {
spherical
color_map {
[0 rgb 0]
[0.05 rgb 1/PlanetRadius]
[0.05 rgb 0]
[1 rgb 0]
}
}
}
media {
emission <2,2,0>
density {
spherical
color_map {
[0 rgb 0]
[0.05 rgb 0.25/PlanetRadius]
[0.05 rgb 0]
[1 rgb 0]
}
}
}
}
}
scale 1.05
}
#declare PlanetSurface = sphere { <0,0,0>, 1
pigment {
image_map {
jpeg "earth02.jpg"
map_type 1
}
rotate <0,-150,0>
}
};
#declare Planet = union {
object {PlanetAtmosphere}
object {PlanetSurface}
scale PlanetRadius
};
object {
Planet
translate <-PlanetRadius,0,0>
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Tim Attwood" <tim### [at] comcast net> wrote:
> > scaling an object doesn't reduce its density. Eight thousand times a piece
> > of steel is a piece of steel, not a piece of super-sparse steel.
>
> Yeah, the density isn't dependent on scale, I forgot that.
> This should work with diferent radius planets.
>
> #declare PlanetRadius = 50;
>
> #declare PlanetAtmosphere = sphere { <0,0,0>, 1
> hollow
> material {
> texture {
> pigment { rgbt <1,1,1,1> }
> }
> interior {
> media {
> emission <0,0,2>
> density {
> spherical
> color_map {
> [0 rgb 0]
> [0.05 rgb 1/PlanetRadius]
> [0.05 rgb 0]
> [1 rgb 0]
> }
> }
> }
> media {
> emission <2,2,0>
> density {
> spherical
> color_map {
> [0 rgb 0]
> [0.05 rgb 0.25/PlanetRadius]
> [0.05 rgb 0]
> [1 rgb 0]
> }
> }
> }
> }
> }
> scale 1.05
> }
>
> #declare PlanetSurface = sphere { <0,0,0>, 1
> pigment {
> image_map {
> jpeg "earth02.jpg"
> map_type 1
> }
> rotate <0,-150,0>
> }
> };
>
> #declare Planet = union {
> object {PlanetAtmosphere}
> object {PlanetSurface}
> scale PlanetRadius
> };
>
> object {
> Planet
> translate <-PlanetRadius,0,0>
> }
Thanks for your help, but now I get a new error. I replaced "earth02.jpg" with
my file name in:
#declare PlanetSurface = sphere { <0,0,0>, 1
pigment {
image_map {
jpeg "earthmap1k.jpg"
map_type 1
interpolate 2
}
rotate <0,-150,0>
}
};
But the new error highlights the jpeg line stating:
PARSE ERROR: CANNOT OPEN JPEG FILE
I've used jpeg and png maps before, and even tried cutting and pasting those
into here but for some reason this file doesn't like it. Why is it doing this?
Thanks,
James Lake
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Tim Attwood" <tim### [at] comcast net> wrote:
> > scaling an object doesn't reduce its density. Eight thousand times a piece
> > of steel is a piece of steel, not a piece of super-sparse steel.
>
> Yeah, the density isn't dependent on scale, I forgot that.
> This should work with diferent radius planets.
>
> #declare PlanetRadius = 50;
>
> #declare PlanetAtmosphere = sphere { <0,0,0>, 1
> hollow
> material {
> texture {
> pigment { rgbt <1,1,1,1> }
> }
> interior {
> media {
> emission <0,0,2>
> density {
> spherical
> color_map {
> [0 rgb 0]
> [0.05 rgb 1/PlanetRadius]
> [0.05 rgb 0]
> [1 rgb 0]
> }
> }
> }
> media {
> emission <2,2,0>
> density {
> spherical
> color_map {
> [0 rgb 0]
> [0.05 rgb 0.25/PlanetRadius]
> [0.05 rgb 0]
> [1 rgb 0]
> }
> }
> }
> }
> }
> scale 1.05
> }
>
> #declare PlanetSurface = sphere { <0,0,0>, 1
> pigment {
> image_map {
> jpeg "earth02.jpg"
> map_type 1
> }
> rotate <0,-150,0>
> }
> };
>
> #declare Planet = union {
> object {PlanetAtmosphere}
> object {PlanetSurface}
> scale PlanetRadius
> };
>
> object {
> Planet
> translate <-PlanetRadius,0,0>
> }
Please ignore my last post - I realized the JPEG file was in a different folder.
Even then, I had to play with the scales between this include file and the
master POV file to get it to look right. I found out that if I did the scaling
in this include file, then presented it as a scale of "1" in the master POV
file, it looks great. Thank you to those who responded to my pleas for help!
James Lake
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
james lake nous illumina en ce 2008-05-18 13:51 -->
> "Tim Attwood" <tim### [at] comcast net> wrote:
>>> scaling an object doesn't reduce its density. Eight thousand times a piece
>>> of steel is a piece of steel, not a piece of super-sparse steel.
>> Yeah, the density isn't dependent on scale, I forgot that.
>> This should work with diferent radius planets.
>>
>> #declare PlanetRadius = 50;
>>
>> #declare PlanetAtmosphere = sphere { <0,0,0>, 1
>> hollow
>> material {
>> texture {
>> pigment { rgbt <1,1,1,1> }
>> }
>> interior {
>> media {
>> emission <0,0,2>
>> density {
>> spherical
>> color_map {
>> [0 rgb 0]
>> [0.05 rgb 1/PlanetRadius]
>> [0.05 rgb 0]
>> [1 rgb 0]
>> }
>> }
>> }
>> media {
>> emission <2,2,0>
>> density {
>> spherical
>> color_map {
>> [0 rgb 0]
>> [0.05 rgb 0.25/PlanetRadius]
>> [0.05 rgb 0]
>> [1 rgb 0]
>> }
>> }
>> }
>> }
>> }
>> scale 1.05
>> }
>>
>> #declare PlanetSurface = sphere { <0,0,0>, 1
>> pigment {
>> image_map {
>> jpeg "earth02.jpg"
>> map_type 1
>> }
>> rotate <0,-150,0>
>> }
>> };
>>
>> #declare Planet = union {
>> object {PlanetAtmosphere}
>> object {PlanetSurface}
>> scale PlanetRadius
>> };
>>
>> object {
>> Planet
>> translate <-PlanetRadius,0,0>
>> }
> Thanks for your help, but now I get a new error. I replaced "earth02.jpg" with
> my file name in:
>
> #declare PlanetSurface = sphere { <0,0,0>, 1
> pigment {
> image_map {
> jpeg "earthmap1k.jpg"
> map_type 1
> interpolate 2
> }
> rotate <0,-150,0>
> }
> };
>
> But the new error highlights the jpeg line stating:
> PARSE ERROR: CANNOT OPEN JPEG FILE
>
> I've used jpeg and png maps before, and even tried cutting and pasting those
> into here but for some reason this file doesn't like it. Why is it doing this?
>
> Thanks,
>
> James Lake
>
>
>
>
Where is your image located?
The way you call it, it must redide in the same folder as your scene, the
include folder, or some other allowed folder as defined by you.
--
Alain
-------------------------------------------------
You know you've been raytracing too long when you look at waterfalls, dust,
rain, snow, etc, and think: "If only I had a fractalized, vector based
particle-system modeler with collision detection!"
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |