POV-Ray : Newsgroups : povray.newusers : UV texture scale center : Re: UV texture scale center Server Time
18 May 2024 01:56:13 EDT (-0400)
  Re: UV texture scale center  
From: Mr
Date: 25 Jan 2015 06:05:01
Message: <web.54c4cdc11bfbdbf6c31ce6010@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 25.01.2015 um 07:58 schrieb Mr:
>
> > 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))
>
> Looks good. The offset should be fine, too, provided Blender applies
> offset after scaling; if instead it applies offset before scaling,
> dividing the offset by t_dif.scale.* should do the trick.
>
> Glad I could help :)

Thanks a lot. Hum... well,  Now the same formula doesn't apply to environment
mapping, there is another discrepency, I'm trying to get rid of:

Blender:
http://www.pasteall.org/pic/show.php?id=82796
POV:
http://www.pasteall.org/pic/show.php?id=82797


Post a reply to this message

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