POV-Ray : Newsgroups : povray.programming : Primitive BOX, how to wrap a texture? : Re: Primitive BOX, how to wrap a texture? Server Time
14 Oct 2024 14:05:58 EDT (-0400)
  Re: Primitive BOX, how to wrap a texture?  
From: Bald Eagle
Date: 12 Nov 2023 10:25:00
Message: <web.6550ed8079784ca81f9dae3025979125@news.povray.org>
"GioSeregni" <gms### [at] hotmailcom> wrote:
> First of all, I apologize for the naivety of the question.
> I am not able to get the surfaces of the BOX with the actual texture.
>
> Example:
>
> box{<0.5000,1.0000,0.2500>,<-3,-1.0000,-0.2500>
>  texture {pigment {image_map
>  {png "130PINK" map_type 1
>  interpolate 2
> }
>  scale 1.30
> }}
>  rotate<0,360.0000,0> translate<46.7000,-0.0900,14.0700>
> }
>
> Well, Map 0 fails on some faces, Map 1 and map 2 deform the texture.
> How can I wrap a texture correctly?
> I studied the UV Mapping, but I practically understood nothing.
> How should I correct my example to get the same texture uniformly on all faces?
> A huge thank you if anyone helps me.
>
> BR
> Giovanni

Check out:
https://wiki.povray.org/content/Reference:UV_Mapping

The key lines that you want to pay attention to are:

texture {
    uv_mapping

The uv_mapping statement needs to preceed everything else in the texture
definition for it to work.

Also, depending on how you want that box mapped, then yes, there is indeed a box
mapping, but you need to set up the texture specifically to do that, which might
not be a simple task.

- Bill


Post a reply to this message

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