17 votes

How can I fix zig-zagging UV mapping artifacts on a generated mesh that tapers?

Typical UV mapping is what's called an affine transformation. That means the mapping of each triangle between 3D space and texture space can include rotation, translation, scaling/squash, and skew (ie....
DMGregory's user avatar
  • 134k
7 votes

Applying a face image to a mesh head

I am one of the developers of the itSeez3D application you linked in your post. Accidentally stumbled upon your question. @Kevin van der Velden provided an entirely relevant reference here, I would ...
Aleksei Petrenko's user avatar
5 votes
Accepted

How to UV map a procedural cylinder mesh? (Unity)

It looks like you're trying to use (rotated) vertex positions as UV coordinates. When you're using this to look up into a 2D texture, only the x & y values are used and the z is ignored, giving ...
DMGregory's user avatar
  • 134k
4 votes

Generating a UV map for a procedural mesh

If we take as the requirements: no distortion no constraints on seam placement OK to overlap faces then we can use a pretty simplistic approach, independently rotating each face into a 2D plane and ...
DMGregory's user avatar
  • 134k
4 votes

Is it OK to use 6-7k texture map in Unity?

Going by WebGL Caps it looks like 4k textures are a very safe bet (which is why everyone is using them) but 8k textures still have a ways to go. Ideally you'll want to have a 4k fallback option if ...
Nimphious's user avatar
  • 141
4 votes

What is "mapping seams" and "hard edges (doubled-up vertices)" in UV?

Inside the GPU pipeline, each vertex represents a unique combination of: a position (so we know where to draw this corner of the adjacent polygon(s) on the screen) a normal vector (which way the ...
DMGregory's user avatar
  • 134k
3 votes

Is it OK to use 6-7k texture map in Unity?

So long as the platform is able to handle the texture size for performance reasons it's better to use one big texture in virtually all cases instead of lots of little ones. So I would generally put ...
Yudrist's user avatar
  • 963
3 votes
Accepted

Multiple UV coordinates in Unreal Engine Procedural Mesh Component?

The only possibilty you have is to add the vertex twice, if no collision is generated, this will have almost no performance impact, if you do want collision, subclass the UProceduralmeshComponent ...
Maxim DC's user avatar
  • 139
3 votes
Accepted

Strange artifacts in Unity Lightmaps

You have a warning in the next-to-last screenshot which says "This GameObject has overlapping UVs". I also see that you've tried the suggested fix - to check "Generate Lightmap UVs" - but often this, ...
Chaosed0's user avatar
  • 763
3 votes
Accepted

How to set the UVs of a procedurally generated road mesh?

You are setting the UV coordinates to exactly the same coordinates as the vertices. That means when you move a vertex, the texture doesn't move. It always stays perfectly aligned with the world grid. ...
Philipp's user avatar
  • 119k
3 votes
Accepted

Unity: White outline around seams in my character, make it stop!

Lines around texture seems aren't usually caused by anti aliasing, since that's only doing multiple passes per fragment. If it isn't visible without anti aliasing, it won't be visible after either. ...
Bálint's user avatar
  • 14.9k
3 votes
Accepted

Finding the position of a point inside a triangle, based on the position of a point in another triangle (barycentric coordinates in Godot)

As DMGregory suggested, Barycentric Coordinates were indeed the solution. Since there are no built-in functions for converting Cartesian to Barycentric in Godot, I converted the c++ answer here What&#...
Kasper Arnklit Frandsen's user avatar
3 votes
Accepted

UVs Distored When Importing Mesh?

Blender and unreal engine read the meshes in a different way, I don't know the geometry of your object, but sometimes when you have n-gons, sometimes even quads, blender triangulates the mesh in a ...
Raffaele Lungarella's user avatar
3 votes
Accepted

D3D12: how to enable perspective correction when interpolating UV coordinates?

You've lost perspective correctness due to the way you've written your vertex shader. Ordinarily, we'll transform our vertex from view space to clip space by multiplying it by a projection matrix that ...
DMGregory's user avatar
  • 134k
3 votes
Accepted

How are the unwrapped textures created?

There are some dedicated software tools that allow you to paint a texture directly on a model. An example of this would be Substance Painter as you mentioned in the comments. Personally, I don't have ...
Pikalek's user avatar
  • 12.4k
3 votes
Accepted

If UV coordinate is Vector2, then why does UV node in shader graph output Vector4?

Texture coordinates are usually 2-dimensional. But developers can add a third or fourth component to achieve some effects, like sampling from a volume texture, specifying which layer of an array ...
DMGregory's user avatar
  • 134k
2 votes

Perspective-Correct Texture Mapping

Your code isn't wrong at all. You are dealing with matrices and vertices the right way (your 3D simulation actually works), and even texture mapping is fine. Matter is, your texture mapping algorithm ...
liggiorgio's user avatar
  • 4,656
2 votes

Wrong UV calculation

I think the line you've highlighted is the problem: vs_uv = (1.0 / vec2(8, 13)) * (vec2(tile / 8, tile % 13) + vertex); Your vertices have coordinates that are ...
user1118321's user avatar
  • 2,632
2 votes

How can I use Blender-style UVs (and not per-vertex) in OpenGL?

Roughly speaking, you can't. That's just not how GL or the like work. For every unique set of vertex attributes you want, you must duplicate the entire vertex. That said, that's not necessarily what ...
Sean Middleditch's user avatar
2 votes

Multiple Texture Coordinates Per Vertex (DirectX11)

Duplicating vertices is probably the wrong way to go for this particular use case. If all you have is an extra set of UVs, just send in an extra set of UVs. D3D has attributes named TEXCOORD0, ...
Sean Middleditch's user avatar
2 votes
Accepted

Unity: Texture huge areas with decals

Yes, this can be done with the Unity Standard Shader. Check the section labelled "Secondary Maps" - here you can specify an additional albedo (surface colouration) and normal (bump) texture to layer ...
DMGregory's user avatar
  • 134k
2 votes

Finding texture coordinates for plane

To go from a point in worldspace, p = (x, y, z) and on the plane to texture coordinates u, v, you must first create a basis of 2 vectors, e1, e2 of the plane. Given that N is the plane's normalized ...
The Coding Wombat's user avatar
2 votes
Accepted

What are these three different texture types I found in Pokémon sun?

While you should never use assets from someone else's game in your own game, there is a lot you can learn from reverse-engineering the games of other people and figuring out how they did things. The ...
Philipp's user avatar
  • 119k
2 votes
Accepted

How can I sample objects color based on position and apply to an object in a shader?

I wrote this answer based on your initial reply "All one colour would be fine" - so it doesn't handle weighted blending. If you want that, it's doable, but would take more work. The basic ...
DMGregory's user avatar
  • 134k
2 votes
Accepted

Unity texture shows UV border

@DMGregory in the comment pointed out what to check and I was able to find and solve this problem. My normal map was generated by photogrammetry software and looked like this: In Shader Graph (since ...
Amarth Gûl's user avatar
2 votes
Accepted

Custom Mesh with single texture - suspected uv issues

Here's how to get rid of both the duplicated vertices and the reversed UVs: ...
DMGregory's user avatar
  • 134k
1 vote

How to texture a floor so that edges have slightly different texture than the rest of the floor

You can use tileable nine slices. These are textures that have 3 parts, corners, edges and a center. (This is a scaled one, but you get the point) So, first of all, get or create a texture that has ...
Bálint's user avatar
  • 14.9k
1 vote

How to deal with texture coordinates without range?

Texture coordinates that go greater than abs(1) generally are used to specify tiling. So if you have a coordinate (such as in your example) that goes from 3.619507 to -0.260944, then that means that ...
Tom K's user avatar
  • 1,319
1 vote

What is "mapping seams" and "hard edges (doubled-up vertices)" in UV?

When you have mapping seams, there are 2 texture coordinates in one position to make sure the triangles lie on completely different parts of the UV coordinate system. Since you can't do that normally, ...
Bálint's user avatar
  • 14.9k

Only top scored, non community-wiki answers of a minimum length are eligible