POV-Ray : Newsgroups : povray.general : uv mapping triangles in mesh {} : Re: uv mapping triangles in mesh {} Server Time
12 Jun 2024 12:04:54 EDT (-0400)
  Re: uv mapping triangles in mesh {}  
From: Leroy
Date: 23 Mar 2023 17:40:00
Message: <web.641cc619eebe912cc2a84cbff712fc00@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Can someone tell me what stupid thing I'm doing wrong, or if somehow
> uv mapping of meshes got broken?
>
> I'm using the latest 3.8 beta.
>
>
>
>
> #version 3.8;
> global_settings {assumed_gamma 1.0}
> default {finish {diffuse 1}}
>
> camera {
>  location <0, 0, -4>
>  right     x*image_width/image_height
>  up y
>  look_at <0, 0, 0>
> }
>
> light_source {<0,  0, -1> rgb 1.0}
> sky_sphere {pigment {rgb <0.6, 0.6, 1.0>}}
>
> #declare Line = 0.003;
>
>
>
> #declare Square = box {0, x+y}
>
>
> #declare Torus = torus {sqrt(3)/8, Line rotate x*90 translate <0.5, sqrt(3)/4,
> 0>}
>
> object {Torus pigment {rgb x}}
>
>
> #declare Test2 = texture {pigment {rgb 1 }}
>
> #declare Test = texture {pigment {object {Torus rgbt 1, rgb 0}}}
>
> #declare Zero = <0, 0>;
> #declare Mid = <0.5, sqrt(3)/2>;
> #declare X = <1, 0>;
>
> #declare FZero = <0, sqrt(3)/2>;
> #declare FMid = <0.5, 0>;
> #declare FX = <1, sqrt(3)/2>;
>
> #declare hx = x/2;
>
>
> mesh {
>  triangle {
>   <0, 0, 0>, x, Mid
>   uv_vectors <0, 0>, Mid, <1, 0>
>   texture {Test}
>  }
>
>   triangle {
>   FZero+hx, FMid+hx, FX+hx
>   uv_vectors FZero, FMid, FX
>   //uv_vectors X, X+Mid, Mid
>   texture {Test2}
>  }
>
>  triangle {
>   <0, 0, 0>+x, x+x, Mid+x
>   uv_vectors <0, 0>, Mid, <1, 0>
>   texture {Test}
>  }
>
>
>
>  texture {pigment {rgb 1}}
>  translate <-1, -1, 0>
> }

It doesn't do what ya want on 3.7 either.


Post a reply to this message

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