POV-Ray : Newsgroups : povray.programming : Primitive BOX, how to wrap a texture? : Re: Primitive BOX, how to wrap a texture? Server Time
19 May 2024 09:02:48 EDT (-0400)
  Re: Primitive BOX, how to wrap a texture?  
From: GioSeregni
Date: 12 Nov 2023 10:55:00
Message: <web.6550f50179784ca8d0d0a7c459126100@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "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

Thanks!

in fact I tried but I didn't understand how to implement UV mapping. We would
need at least one example on a cube, on which the texture is wrapped uniformly.
Then everything else, scaling, translating, rotating, re-proportioning on the
axes, is simple.
G


Post a reply to this message

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