POV-Ray : Newsgroups : povray.newusers : UV texture scale center : Re: UV texture scale center Server Time
18 May 2024 01:03:02 EDT (-0400)
  Re: UV texture scale center  
From: Mr
Date: 25 Jan 2015 02:00:08
Message: <web.54c4939e1bfbdbf6c31ce6010@news.povray.org>
"Mr" <nomail@nomail> wrote:
> clipka <ano### [at] anonymousorg> wrote:
> > Am 24.01.2015 um 21:02 schrieb Mr:
> >
> > > 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>
> >
> > Could that be <-0.16666,0,0> rather than <-0.175,0,0>?
>
> Indeed, this looks perfect for the case. Why this number?

Stupid question, it was the same logic applied to the example I guess, because
it works seamlessly, now both uv textures map the same. this is the python
making the translation (z can be scaled and offset as well):

mappingDif = ("scale <%.4g,%.4g,%.4g> translate <%.4g,%.4g,%.4g>" % \
              ( 1.0 / t_dif.scale.x,
              1.0 / t_dif.scale.y,
              1.0 / t_dif.scale.z,
              0.5-(0.5/t_dif.scale.x) + t_dif.offset.x,
              0.5-(0.5/t_dif.scale.y) + t_dif.offset.y,
              0.5-(0.5/t_dif.scale.z) + t_dif.offset.z))


Post a reply to this message

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