1
$\begingroup$

I tried using armatures for the first time, and noticed that textures on the mesh 'move', when using the armatures to deform it. I tried both generated coordinates and object coordinates, but both seem not to stick to the mesh, during armature movements.

I didn't try UV unwrapping, and I assume this would work, but I would prefer to not having to do that.

Is that behavior the expected one for generated coordinates? The manual seems to say otherwise? Any ideas how to solve the problem of getting automatic coordinates that stick to the mesh under armature deforms?

$\endgroup$
3
  • 1
    $\begingroup$ Sounds like you already know the answer to your question: UV Map your mesh $\endgroup$ Commented Mar 23, 2018 at 0:00
  • 1
    $\begingroup$ I would like to avoid that, because it is quite a bit of extra work, like dealing with the discontinuities at the seams. It bugs me that the description of object coordinates in the manual says it should work the way I would like it to. $\endgroup$
    – omgold
    Commented Mar 23, 2018 at 9:32
  • $\begingroup$ this only happens with "Object" coordinates as far as I know, I know no solution either. $\endgroup$
    – azagwen
    Commented Aug 9, 2018 at 1:41

2 Answers 2

0
$\begingroup$

One possibility is to Bake your "Generated Coordinates" texture. It's a fast and easy process that gives you the best of both worlds:

  1. Go to the UV/Image Editor and create a new image.
  2. Add an Image Texture node that points to said image.
  3. Do a Smart UV unwrap.
  4. Render Tab: Bake the texture that uses "Generated Coordinates".
  5. Attach the "UV Texture Coordinates" to the newly baked texture and use that texture now.

Note: This process appears to be almost exactly the same for more recent versions of Blender than my build.

Example Mushroom

Hope this helps any passersby :) Peace and God bless!

$\endgroup$
0
$\begingroup$

Generated texture coordinates are based on the bounding box of your mesh; that bounding box, and the position of vertices within it, changes with armature deformation, so the texture coordinates change as well. The specific behavior of generated coordinates has changed over Blender versions, and the manual is often slow to keep up. At one point, a mesh with only deformation-type modifiers calculated generated coords from pre-modifier positions, but that created a lot of confusion and bugs when combining deforming modifiers with generative modifiers (generative modifiers like subdivision or triangulate or mask-- many of these do not seem like they should be affecting texture coordinates.)

As has been indicated in comments, the answer is to UV map your mesh. You've stated that the barrier to this for you is the extra work, particularly in dealing with seams. So I'll show your how you can create UV coordinates that you can just plug in, in place of generated coordinates, in under a minute, without marking any seams. There will be no need to bake any textures.

We start with a mesh aligned with world axes. It is not strictly necessary that it is aligned with world axes, but that's simplest for now.

enter image description here

First, adopt a top view (numpad 7), enter edit on your mesh, select all vertices, and u->project from view (bounds):

enter image description here

Now, add a second UV map. Switch to profile view (numpad 3), and u->project from view (bounds) again:

enter image description here

Now we will set up our nodes to combine these two UV maps into coordinates that mimic generated coordinates, but that won't change with deformation:

enter image description here

We combine the X and Y coordinates of the top projection with the Y coordinates of the profile projection.

We can see that, on the undeformed mesh, these coordinates (on the right) are exactly the same as generated coordinates (on the left.)

But on the deformed mesh, we can see that these new coordinates get deformed with the mesh, whereas the original generated coordinates do not:

enter image description here

Similar techniques can be used to create object coordinates, but the details depend on your object and what you need it to do (like, change it's scale?) You've suggested that generated coordinates would otherwise work for you, so I've described only how to quickly replaced generated coordinates with UV coordinates.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .