POV-Ray : Newsgroups : povray.newusers : UV texture scale center : Re: UV texture scale center Server Time
3 May 2024 19:47:46 EDT (-0400)
  Re: UV texture scale center  
From: Mr
Date: 24 Jan 2015 15:05:01
Message: <web.54c3f9bf1bfbdbf6c31ce6010@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 24.01.2015 um 11:29 schrieb Mr:
>
> >   #declare MAT_MaterialTex =
> > texture{
> >      pigment_pattern {
> >          uv_mapping image_map{
> >
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\SpecularTest.png"
> > map_type 0  interpolate 2 }
> >          translate <-0,0,0> scale <1,1,1>
> >
> >      }
> >      texture_map {
> >          [0
> >              pigment {
> >                  pigment_pattern {
> >                  uv_mapping image_map{
> > "F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\AlphaTest.png"
> > map_type 0  interpolate 2 } translate <-0,-0,0> scale <1,1,1>}
> >                  pigment_map {
> >                      [0 color rgbft<0,0,0,1,1>]
> >                      [1 uv_mapping image_map {
> >
"F:\BlenDivers\Scenes\blenderpovrayTestScenes\TexturesTest\textures\DiffuseTest.png"
> > map_type 0  interpolate 2 } translate <0.25,0,-1> scale <1.5,1,1>]
>
>                                          ^^^^^^^^^^^
> Beware - you're moving the texture here, not just scaling it!
>
> Note again that scaling /always/ has its origin at <0,0,0>; if you do
> this /after/ translation, it's no longer the <0,0> of the image, but
> rather its <-0.25,0>. To scale from the /image's/ <0,0>, you need to
> scale first, and only then translate; you'll probably need to fix the
> translation vector though:
>
>      scale <1.5,1,1> translate <1.5,1,1>*<0.25,0,-1>

This looks almost ok, thank you, but not yet :
Here is the Blender result
http://www.pasteall.org/pic/show.php?id=82782
it uses repeat factor of 0.75

And here is POV
http://www.pasteall.org/pic/show.php?id=82783
It uses scale factor of 1/0.75 = 1.33
and the method you advised for translation

the translate I have to add to get closer to the original is of <-0.175,0,0> but
this is not constant: with a slightly higher tiling number still under 1 it
reduces slightly closer to <0,0,0>

I'm at a loss. what's happening here?


Post a reply to this message

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