2
$\begingroup$

I want to make 1 face of an object be the only thing that is affected by the UV Projection modifier

enter image description here

I tried recreating this but I can only do it by separating the face and having it as an individual object

enter image description here

I have read that I can use more materials and more UV maps to achieve this in the same object, but doing it that way would create confusion and make things more complicated since this will be used in a rig and that rig will be used multiple times in several scenes, I will also need to change the image texture a lot and doing it with more materials and UVs will take more steps

I believe it's possible with some sort of trick because one guy did it, I tried contacting him but he never responds, it's not impossible

Here's the blend file of a comparison with both test and result objects

$\endgroup$
  • $\begingroup$ Is there a particular reason, you use the UV project modifier and not do it in edit mode with seams and unwrap? regardless, if you want to di it using the modifier i would suggest you split it like before, then apply the modifier to all your separate parts so its gone, and then join everything. $\endgroup$ – Gerald Degeneve Jun 16 '18 at 2:10
  • 1
    $\begingroup$ The reason I'm using the modifier is for the face's UV to not deform, in Minecraft animation beacuse the textures are too small, when you move a vertice it streches all the pixels, so by doing it with this modifier it won't deform the UV's $\endgroup$ – user55023 Jun 16 '18 at 2:36
  • 2
    $\begingroup$ You should pack the needed textures in your file (menu "file>External data>Automatically pack into .blend". Above that, what is not clear in the question is either the final result is to be used in Blender or Minecraft? If it is Minecraft, surely you'll bake all finally? Another aspect: have you tried to use multiple projectors in the same UV project modifier? $\endgroup$ – lemon Jun 18 '18 at 10:18
  • $\begingroup$ oops forgot to pack textures, the final result is for cycles blender, I'll also add an example rig of what it should be like $\endgroup$ – user55023 Jun 18 '18 at 17:35
  • $\begingroup$ Are you sure there aren't any other limits you'd like to impose? Limiting the influence of a UV project modifier is doable with 1 object, 1 material, 2 UV maps. But odds are good that you don't actually need a UV project modifier to do what it is that you're doing. If you're rendering in Blender, then Minecraft texturing limitations don't apply; if you're rendering in Minecraft, your export function is probably just writing your UV Project modifier to UV anyways. $\endgroup$ – Nathan Jun 21 '18 at 0:07
0
+50
$\begingroup$

I'll get to an answer in a second.

We've been back and forth in comments, and no, your latest .blend clarifies nothing. Presumably, your object on the viewer's left demonstrates the need for the UV project modifier, but if you alt-g reset the bone and apply the UV project modifier, then move it back into position, it behaves exactly the same as it would with the active UV Project modifier. So, yeah, I still have no idea about why this needs to occur.

Now, I'll give you an answer, but it's not the answer you're looking for, because I'll instead tell you how to limit a UV project modifier using only 2 UV maps, no extra objects (beyond the required projector and projectee), no extra materials. Why ignore your explicit limits? Because I still haven't heard any reason why your limits are important to your output, and because the reality is, doing it with 2 UV maps is extraordinarily simple and easy to implement. Maybe you've been doing it a different way and think it's too complicated; it's not, and I'll show you.

Let's start with a single object and a single UV map. Unbelievably, yours is already perfect...

enter image description here

Why is it perfect? Because the faces that you want to use your UV projector modifier on are already out of bounds: all of the faces have U coordinates <0. This is important as we'll see.

Now let's make another UV map.

enter image description here

So ugly! But the actual content of this UV map doesn't even matter. Do anything you want here. Arrange your UVs into NWA lyrics as an easter egg, it's cool. I just reset the whole thing to demonstrate that it doesn't matter. In practice, it's just going to be a copy of your first UV map, since that's what you get when you hit the + button for a new UV map and don't do any other work, because you don't need to.

Time for the modifier. This is the exact same modifier you have on your .blend, except it uses our second UV map. I'll give you a picture, but you already know how it works. You might want to notice that I'm back on UV0, and so I've got an ugly white face where my beautiful pixelly face ought to be.

enter image description here

Now, we don't need any additional materials, but we do need to edit our existing material. I'm doing some hacky things here, just to save us some nodes, and I'll explain them; you can always feel free to do it the "right" way instead, and I can explain that too. Here's our nodes.

enter image description here

So, first, notice the face is now there; it wasn't before. This is working. It's working in rendered preview too, but the lighting's poor, so I used mat preview instead.

Now, let's explain what I'm doing. I'm getting two different UV coords. And then I'm mixing between them on the basis of whether the first UV coords are out of bounds. More particularly, on whether the U coordinate is less than 0. So what I'm doing is using UV0 to code for whether or not my face should get affected by the UV project modifier.

The hacks are:

1) I'm just sending UV vector to a math node. The math node ends up operating on the first element of the vector only, which is U. That's why it works. More professional would be to run this through a separate XYZ node first.

2) I'm using a Mix RGB node to blend between the UV. Mix RGB doesn't actually know whether it's getting a vector or a color, all it does is mix. Here, it does fine. We could separate XYZ, multiply each channel by fac or 1 - fac, then add them, which would be more professional, but harder to fit into a screenshot, and Mix RGB works fine.

What do I end up with? A single object where the OOB status of faces on UV0 determines whether or not we use UV1. Add the armature modifier and you're good to go.

See? Not so complicated.

$\endgroup$
  • $\begingroup$ It worked... sometimes I block myself to one idea on how to do things, I make easy things complicated, I'm sorry if I got to be annoying at one point for not listening to other options, but I appreciate that you got the patience to help me, thank you $\endgroup$ – user55023 Jun 25 '18 at 14:47
  • $\begingroup$ It's cool. It's just better to focus on the desired outcome, and the undesired side effects of things you've tried, than to get too locked into, "It has to be done via x method." $\endgroup$ – Nathan Jun 26 '18 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy