POV-Ray : Newsgroups : povray.general : Scaling mesh2 objects with uv_vectors : Re: Scaling mesh2 objects with uv_vectors Server Time
2 Oct 2022 18:42:51 EDT (-0400)
  Re: Scaling mesh2 objects with uv_vectors  
From: Alain Martel
Date: 10 Aug 2022 11:50:40
Message: <62f3d3d0$1@news.povray.org>
Le 2022-08-09 à 11:11, Chris R a écrit :
> I have been playing with some code for modeling paper using mesh2 objects.  The
> code starts with a flat rectangle for the paper and creates the vertices based
> on the size of paper I want.  It creates uv coordinates in that same range,
> assuming that any texture I apply later will be scaled to the size of the paper.
>   I then have various options for adding wrinkles, bends, scrolls, etc. to the
> paper, which moves the vertices around, but leaves the original uv coordinates.
> 
> This was all working fine until I decided to scale one of the mesh2 objects (by
> 2), and scale the texture by the same amount.  When I rendered the object,
> however, the texture (I used an image map), was 2x too big.
> 
> Does scaling a mesh2 object only scale the vertices and not the uv_vectors?  If
> so, am I better off creating the uv_vectors with some constant scale and
> ensuring that the texture is also kept at that constant scale?
> 
> -- Chris R.
> 
> 
As I understand it, UV mapping maps locations from the pattern to 
specific locations of the mesh. This have the effect that the pattern 
will follow any deformation of the mesh.

So, when scaling the mesh, the pattern should follow.
Solution : Just don't scale the image_map and you should be fine.


Post a reply to this message

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