0

I have 3D rectangles representing walls in a room but only a part of these walls is seen inside the photo that I want to use as a texture for the rectangles.

To map the texture, camera projections of the vertices of the rectangle are used as the uv coordinates. Some of the projections, however, fall outside the boundary of the image, creating negative uv values. For example, the projections of top left and bottom left coordinates of the left wall in the attached image below lie outside of the image.

In threejs, the mapped texture with those uv values doesn't look correct. See attached images.

So is the problem entirely due to negative uv values or the texture constants need to set correctly?

texture mapped walls unaltered texture with walls

Ajay
  • 360
  • 1
  • 11
  • UV values should never be negative, unless you're trying to do some tricky texture mapping, or maybe something abstract. All images, regardless of size, have a 0-1 range, and your UVs should reflect that. What does your UV mapping look like in your 3D editor? – M - Jul 14 '20 at 02:16
  • top left corner of the left wall has following uv: u: -0.8748520416600589 v: 1.167531253393578 – Ajay Jul 14 '20 at 04:55

0 Answers0