POV-Ray : Newsgroups : povray.newusers : how to do simple uv mapping? : Re: how to do simple uv mapping? Server Time
4 Nov 2024 21:24:18 EST (-0500)
  Re: how to do simple uv mapping?  
From: Robert Günther
Date: 20 Sep 2001 18:10:35
Message: <3BAA6965.A9A35BBD@exmail.de>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.