![](/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) |
POV 3.1 or 3.5?
-tgq
--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}// TGQ
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) |
POV 3.5 beta2
robert
Trevor Quayle schrieb:
> POV 3.1 or 3.5?
>
> -tgq
>
> --
> camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
> }pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
> *4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
> diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
> plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}// TGQ
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) |
3.5 does have uv mapping for boxes now. The downfall of it is how the
texture is applied. For perfect cubes, it works fine but for anything else
it the results are not what you would expect (or maybe they are what you
should expect though). Look at section "6.7.7 UV Mapping". For boxes, the
texture used is divided into 6 squares as indicated. Anything lyingoutside
the limits of these squares is not used in the texture mapping. Note that
each square is 1x1 units.
The face on the -x side uses the texture located in the square
<-1,0>-<0,1>, -z= <0,0>-<1,1>, +x=<1,0>-<2,1>,
+z=<2,0>-<3,1>, -y=<0,-1>-<1,0>, +y=<0,1>-<1,2>.
The problem is each of these squares is stretched to fit the corresponding
face of your cube, therefore if you have a box that is <0,0,0> to <2,1,1>,
the textures on the +/-z faces will be stretched, the aspect ratio is not
maintained. So if you have text wrapping around the box in this case, on the
x faces it will look fine but the z faces will look wunky. Same with any
other type of texture or pigment. Some places you may be able to get away
with it, but in textures that you want to keep the aspect ratio, it doesn't
work and I can't seem to find anything that tells me how to control it
otherwise (uv_vectors can only be used in bicubic patches and meshes).
If I am wrong here, someone else may correct me (I'd like to know myself).
Therefore the only real option in this case is to revert to using meshes,
even for boxes.
That's all for now, maybe later I (or someone else can brush over meshes and
uv mapping)
-tgq
--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}// TGQ
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) |
Many thanks for your explanations.
That makes some things clear. Nevertheless, i can't figure out, how to activate
uv mapping on, let's say, perfect cubes (that's for the moment what i want.
Later on, i would use a super ellipsoide, but as i understood, there will arise
those problems you mentioned.)
What i tried is the following:
box {
<-1, -1, -1>, <1, 1, 1>
texture {
uv_mapping pigment {
image_map {
sys "Earth3d.bmp"
map_type 0
interpolate 0
}
}
}
scale 10.0
rotate <0,45,45>
}
but that gives me on every side of the cube the whole (the same) picture, that
i want to wrap arround the whole cube.
Is there any possibility that you can give me a piece of source code, so that i
can figure out, how it should work?
i'm really an absolute beginner on that topic
sorry,
and thanks for your patience!
Robert
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) |
image_maps are positioned from 0,0 to 1,1 no matter what the size of the
original image is and by default, it will repeat itself every 1 unit
interval (unless you specify the "once" option), therefore you should be
getting the same image on every side of the cube. if you add "once" to the
image_map, you will only get it on the -z face of the cube. What you need
to do her is to scale your image map.
Now remember that the uv map texture runs from -1 to 3 so scale your image
map by <4,1,1> and then translate it <-1,0,0> and add "once" to the
image_map. The image should wrap around every face of the cube with the y
faces blank. Now replace the scaling with <4,3,1> and the translate with
<1,-1,0> and see what you get.
The key to what you are doing here is the way image_map works.
> box {
> <-1, -1, -1>, <1, 1, 1>
>
> texture {
> uv_mapping pigment {
> image_map {
> sys "Earth3d.bmp"
> map_type 0
> interpolate 0
once // add to prevent image from repeating
> }
scale <4,1,1> translate <-1,0,0> // scale and translate
image_map
> }
> }
> scale 10.0
> rotate <0,45,45>
> }
-tgq
--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}// TGQ
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) |
: i just want to wrap a
: wordmap arround a cube.
You don't need uv-mapping for that.
Read the help about image maps.
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
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) |
"Warp" <war### [at] tag povray org> wrote in message
news:3baa6273@news.povray.org...
> : i just want to wrap a
> : wordmap arround a cube.
>
> You don't need uv-mapping for that.
>
> Read the help about image maps.
I don't see what you mean in the docs. Unless something is missing from
them, there is no option to use box mapping with image map and for text, I
don't think spherical or cylindrical would give the results one was looking
for when applied to a cube. The only alternative would be to use a
different texturing method to apply the planar texture you wanted to each
face individually. Am I missing something here as well?
-tgq
--
camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
}pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
*4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}// TGQ
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) |
haven't read the help about image maps so far (ok, my fault).
But nevertheless, although it may not necessary for tha twhat i wanted to do
'til now, Travor helped me a lot to understand the handling of uv mapping ;-)
Robert
Warp schrieb:
> : i just want to wrap a
> : wordmap arround a cube.
>
> You don't need uv-mapping for that.
>
> Read the help about image maps.
>
> --
> #macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
> rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
> ],13),8)-3,10>#end blob{N(array[6]{11117333955,
> 7382340,3358,3900569407,970,4254934330},0)}// - Warp -
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) |
thanks for your help!
i will try it.
Robert
Trevor Quayle schrieb:
> image_maps are positioned from 0,0 to 1,1 no matter what the size of the
> original image is and by default, it will repeat itself every 1 unit
> interval (unless you specify the "once" option), therefore you should be
> getting the same image on every side of the cube. if you add "once" to the
> image_map, you will only get it on the -z face of the cube. What you need
> to do her is to scale your image map.
>
> Now remember that the uv map texture runs from -1 to 3 so scale your image
> map by <4,1,1> and then translate it <-1,0,0> and add "once" to the
> image_map. The image should wrap around every face of the cube with the y
> faces blank. Now replace the scaling with <4,3,1> and the translate with
> <1,-1,0> and see what you get.
>
> The key to what you are doing here is the way image_map works.
>
> > box {
> > <-1, -1, -1>, <1, 1, 1>
> >
> > texture {
> > uv_mapping pigment {
> > image_map {
> > sys "Earth3d.bmp"
> > map_type 0
> > interpolate 0
> once // add to prevent image from repeating
> > }
> scale <4,1,1> translate <-1,0,0> // scale and translate
> image_map
> > }
> > }
> > scale 10.0
> > rotate <0,45,45>
> > }
>
> -tgq
>
> --
> camera{location z*13look_at 0}light_source{15 15looks_like{sphere{0 10
> }pigment{rgb 1}finish{ambient 15}}}union{torus{3,0.5rotate x*90}cone{y
> *4,.5,-y*8,0}cone{-x*4,.5,x*8,0}pigment{rgb<.7,.6,.4>}finish{ambient 0
> diffuse 0reflection{1fresnel on metallic 1}}interior{ior 25}rotate 15}
> plane{y,-7pigment{checker rgb 0rgb 1scale 4}finish{diffuse.1}}// TGQ
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) |
Trevor Quayle <Tin### [at] hotmail com> wrote:
:> : i just want to wrap a
:> : wordmap arround a cube.
: I don't see what you mean in the docs. Unless something is missing from
: them, there is no option to use box mapping with image map
From what I understood, he wanted to wrap a rectangular image map to
a box. The only way of doing this (so that everything is mapped onto the
box) is to use spherical mapping.
If you use box-mapping, you'll lose parts of the original image map
(unless the image map is designed specifically for box mapping, ie. with
those missing parts being just black or whatever).
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
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) |