POV-Ray : Newsgroups : povray.general : Scaling mesh2 objects with uv_vectors : Scaling mesh2 objects with uv_vectors Server Time
2 Dec 2022 11:26:13 EST (-0500)
  Scaling mesh2 objects with uv_vectors  
From: Chris R
Date: 9 Aug 2022 11:15:00
Message: <web.62f2791756acd0a064326bc25cc1b6e@news.povray.org>
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.


Post a reply to this message

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