POV-Ray : Newsgroups : povray.newusers : UV texture scale center : Re: UV texture scale center Server Time
1 May 2024 00:51:02 EDT (-0400)
  Re: UV texture scale center  
From: clipka
Date: 24 Jan 2015 15:56:59
Message: <54c4071b@news.povray.org>
Am 22.01.2015 um 15:06 schrieb Mr:
> Hello, I am meeting a problem with the scale keyword used for texture, it seems
> that the POV scale factor and repetition factor in Blender do not use the same
> center. I would guess that Blender seems to scale the texture from the zero of
> the UV space, like in this picture, it is scaled by half (repeat factor of 2)
> http://www.pasteall.org/pic/show.php?id=82692
> while POV maybe from the 1, I don't know can someone tell me?
> it's result, with a scale of 0.5 is this:
> http://www.pasteall.org/pic/show.php?id=82693

I'm wondering right now, could it be that blender scales textures (at 
least when UV-mapped) from their center (i.e. <0.5,0.5>) rather than the 
corner (<0,0>)?

In that case you'd need to use:

     translate <-0.5,-0.5,0>
     scale <1/REPEAT_X,1/REPEAT_Y,1>
     translate <0.5,0.5,0>

or, to save one translate:

     scale <1/REPEAT_X,1/REPEAT_Y,1>
     translate <0.5-0.5/REPEAT_X,0.5-0.5/REPEAT_Y,0>

or:

     translate <0.5*REPEAT_X-0.5,0.5*REPEAT_Y-0.5,0>
     scale <1/REPEAT_X,1/REPEAT_X,1>


Post a reply to this message

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