|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 8/9/22 11:11, Chris R wrote:
> 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.
It should be, once you have created your initial uv textured object, you
can create a 2x sized version of it with:
object { MyPaperMesh scale 2 }
In other words, the 2x scaling of your texture is not needed and I think
the answer to you final questions are yes.
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 8/9/22 11:11, Chris R wrote:
> > 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.
>
> It should be, once you have created your initial uv textured object, you
> can create a 2x sized version of it with:
>
> object { MyPaperMesh scale 2 }
>
> In other words, the 2x scaling of your texture is not needed and I think
> the answer to you final questions are yes.
>
> Bill P.
Thanks. I am reworking the mesh-creation code and how I use the mesh in my
scenes to account for that.
-- Chris R.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
|
|