|
![](/i/fill.gif) |
>
> I'm trying to render a realistic looking Earth. I'm texturing an image and
> nomral map now I want to have specular map. I found I can do this with a
> material_map however when I add that into the mix (shown below) I get the above
> error. How can I have all 3 things: image_map, bump_map and material_map?
>
>
>
> 54 sphere {0,1
> 55 //finish { ambient 0.1 diffuse 0.5 specular 0.7 }
> 56 //pigment { White }
> 57 pigment {
> 58 image_map {
> 59 jpeg "earthmap4k.jpg" once map_type 2
> 60 }
> 61 translate <0,-0.5,0>
> 62 scale <1,2,1>
> 63 }
> 64 normal {
> 65 bump_map {
> 66 jpeg "earthbump4k.jpg" once map_type 2
> 67 bump_size 15.0
> 68 }
> 69 translate <0,-0.5,0>
> 70 scale <1,2,1>
> 71 }
> 72 texture {
> 73 material_map {
> 74 jpeg "earthspec4k.jpg"
> 75 once map_type 2
> 76 //interpolate 2 once
> 77 texture { LandTex }
> 78 texture { WaterTex }
> 79 }
> 80 translate <0, -0.5, 0>
> 81 scale <1,2,1>
> 82 }
> 83 rotate -180.0*y
> 84 }
>
>
>
A material_map is designed to works with palleted images. Using a high
or true colour leads to problems as you'll need maps spanning a huge
array of values.
A material_map DON'T contain materials but textures.
So, you may want to have a palleted, or B&W, source image with one index
for the water and another for the ground areas. A pure black and white
image will do just right and will be relatively small as a bonus: 1 bit
per pixel.
Now, you need to provide the image_map for the ground areas with it's
finish and normals and a texture for the water areas with the wanted
specular.
Alain
Post a reply to this message
|
![](/i/fill.gif) |