|
|
"Kenneth" <kdw### [at] earthlinknet> wrote:
> Since you're trying to keep all of the textures as part of your macro (and not
> added later), here's an idea (I haven't tried it though) that uses Jim's
> suggestion of inside_texture, but done differently:
>
> #macro dome(position, rayon, insideTexture, outsideTexture)
> difference{
> difference{
> sphere{position, rayon*1.11 texture{outsideTexture}}
> sphere{position, rayon
> texture{pigment{rgb .5}} // any color at all, for the 'outside'
> // of this dome shape
> texture{insideTexture}
> }
> box{position-<rayon*1.11,0,rayon*1.11>,
> position+<rayon*1.11,rayon*1.11,rayon*1.11>}
> }
> #end
>
> Due to the fact that, for any object, an inside_texture needs a preceding
> texture (an 'outside' one) to work at all, the idea is that the 'outside' of the
> 'inner' dome shape gets some kind of arbitrary texture first (which will not be
> seen in your case--hopefully!), *then* an inside_texture can be applied to it.
>
> Again, just a suggestion; I'd be curious to know if it works!
>
> Ken W.
Thanks, I gave it a try but this result in only the grey color (rgb .5) showing
up in the inside of the hemisphere...
I think my macro :
#macro dome(position, rayon, insideTexture, outsideTexture)
difference{
difference{
sphere{position, rayon*1.11 texture{outsideTexture}}
sphere{position, rayon texture{insideTexture}}
}
box{position-<rayon*1.11,0,rayon*1.11>,
position+<rayon*1.11,rayon*1.11,rayon*1.11>}
}
#end
is not the problem because it does produce a dome with 2 different textures for
the outer surface and the inside surface.
I believe the problem is in the projection of the texture on the inside of the
dome. I should have made that clearer in the first post.
I can't find the proper texture definition. I tried different
parameters for the image_map but I'm going nowhere.
Pictures are worth thousands of words:
For instance, if I want to use this image as a texture:
http://imgur.com/C2fQp.gif
Here are some settings I tried :
NOTE: the black ring is the rim of the dome, the camera is looking straight into
the interior of the dome.
1)http://imgur.com/IGjYT.png
texture{
pigment{
uv_mapping
image_map{gif "data/grid.gif"}
}
}
and it produce the same result as
texture{
pigment{
image_map{gif "data/grid.gif" map_type 1}
}
}
where map_type 1 is a spherical mapping.
2)http://imgur.com/Vna78.png
texture{
pigment{
image_map{gif "data/grid.gif"}
}
}
3)http://imgur.com/7CPyk.png
texture{
pigment{
image_map{gif "data/grid.gif" once}
}
}
In this case the texture doesn't show up, all you can see is the dark rim, which
I think is using data from the image_map. The green colour comes from the
outside part of the dome for some reason....
I hope this will make the problem clearer. I'm not very familiar with the
mathematics and the vocabulary involved here so please bare with me.
For reference : http://www.povray.org/documentation/view/3.6.1/408/
Regards,
Jonsku
Post a reply to this message
|
|