Home Technical Talk

Maya Projection Mapping for 2D Character Facial Texture

LeighKimmer
polycounter lvl 3
Offline / Send Message
LeighKimmer polycounter lvl 3
Hello guys. I'm having a bit of trouble finding this one online.. but is there anyway to achieve this kind of look in Maya, where the 2D face is projected onto a 3D character mesh?

[ame]https://www.youtube.com/watch?v=DIjON_NOzbk[/ame]

I have a 3D liquid character whose form shifts and merges and cannot be uv-mapped or textured the traditional way, but must have its 2D face shift and deform with its body.

[ame]https://www.youtube.com/watch?v=1yN6xPX2efo[/ame]

Something along the lines of this tutorial would be very helpful.. though I would still need to have control over the character's overall transparency and colour. There doesn't seem to be a way where I get to keep both the alpha of the texture and the default transparency of the shader. Hopefully there's a way to achieve this.. Does anyone know of a good solution for this?

Replies

  • DireWolf
    On our LEGO rig, we layered a sprite sheet PNG on the face texture.

    [ame]https://www.youtube.com/watch?v=V9emxZ_wFgU[/ame]

    We then animate it by snapping UV to different parts of the sprite. Our riggers set it up so that the animators can simply key a slider or input numbers to get the right piece of sprite they need.
  • LeighKimmer
    Offline / Send Message
    LeighKimmer polycounter lvl 3
    Thanks Direwolf! I had used a similar setup for characters that have been uv-unwrapped for animation in the past, but the character I'm having trouble with now cannot be uv-unwrapped, since he is only a blob of liquid with drastic deformations. An alternative I'm looking at is texture projection... if only it doesn't turn everything else transparent! Right now it seems like a lost cause..
  • rube
    Offline / Send Message
    rube polycounter lvl 17
    You can do that just fine with a texture projection and a layered texture. Just your your character texture on the bottom layer and your transparent face texture above it.
  • DireWolf
    Try, Render context > Texture > Create Texture Reference Object. This way you can texture/projection on a static mesh separately from the deforming one.

    Everything turning transparent I believe is user's error. Double check your shader.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    So I take it you are going to render this in Maya as frames then? I.e. not a real-time solution we're talking about?

    You actually don't need to go Layered texture to get simple texture projection working. It all depends on the context and your desired results of course. This setup seems to work fine for me. The Targa image file has an alpha channel masking the eyes. The Blend Colors input value Color 2 and the Default Color input of the Projection node has to be the same color that you want as your base color.

    qJA9eH.jpg
  • LeighKimmer
    Offline / Send Message
    LeighKimmer polycounter lvl 3
    kodde wrote: »
    So I take it you are going to render this in Maya as frames then? I.e. not a real-time solution we're talking about?

    You actually don't need to go Layered texture to get simple texture projection working. It all depends on the context and your desired results of course. This setup seems to work fine for me. The Targa image file has an alpha channel masking the eyes. The Blend Colors input value Color 2 and the Default Color input of the Projection node has to be the same color that you want as your base color.

    qJA9eH.jpg


    Wow thanks so much for the tut! Yes the character is going to be used for a rendered video, not for game. Sorry for not pointing that out earlier.

    I've followed your setup and right now this is what it's looking like. It's almost complete but I'm having a bit of trouble getting the alpha to work as it should (the square bit in the middle of his face is the alpha)

    I've tried using different image formats with alpha (.tga, .tiff, .png).. but it still showed in the render. Is there something I'm not doing right?


    [IMG][/img]Blob.jpg
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    You are welcome.

    Does it look the same in the viewport? Is there any kind of post processing or something else going on?

    That green base color you have going on. Is it just a single solid color or is there anything else going on? Did you feed this base color you already had straight into Color 2 of the Blend Color node and also into the Default Color of the Projection node? It doesn't show in my screenshot as I cannot easily create just a float4/color node in Maya in that sense(at least not to my knowledge).
  • DireWolf
    Can you maybe upload this scene for us to take a look, with the textures?
  • LeighKimmer
    Offline / Send Message
    LeighKimmer polycounter lvl 3
    Hi Kodde - yes the square shows up in the viewport as well. No post just straight render in maya. The base is a velvet shader with incandescence but it looks the same on a solid colour too.

    I've attached a screenshot of the node tree and what it looks like in the viewport

    nodes.jpg



    viewport.jpg


    To DireWolf - Thank you for offering to look at the file. I've uploaded it onto dropbox. Here is the download link:

    https://www.dropbox.com/s/1tfqfy2hj1aaz2t/Projection_TEST.mb?dl=0
  • LeighKimmer
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    You needed to disable "wrap" on the Projection node AND move the 3D-placement node(move in viewport) to intersect your model where you want the texture projection to show.

    Enjoy

    uuW0O7.jpg
  • LeighKimmer
    Offline / Send Message
    LeighKimmer polycounter lvl 3
    kodde wrote: »
    You needed to disable "wrap" on the Projection node AND move the 3D-placement node(move in viewport) to intersect your model where you want the texture projection to show.

    Enjoy

    uuW0O7.jpg

    Hi Kodde - thanks so much for looking at the file for me. I gave it a shot but not sure why the square is still showing up in my render. Did this happen to you when you first opened the file, too? I'm beginning to think this is a version thing (I use maya 2013)

    [IMG][/img]wrap_Off.jpg
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    That looks about right, but judging by your screenshot you haven't set the Default Color(grey) on the Projection node to match the Color 1/2(red) on the Blend Colors node.
  • DireWolf
    Hey sorry internet was down at my studio all day yesterday. Looks like Kodde already showed you some great result there :)
  • LeighKimmer
    Offline / Send Message
    LeighKimmer polycounter lvl 3
    YES IT'S WORKING!!!!!!!!!!

    yay.jpg



    ; w ; thank you Kodde and DireWolf. You guys are wonderful..and especially to Kodde for walking me through the setup in baby steps. It really means a lot.


    Thank you so much for your help..
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    You're welcome. Good luck with your project!
    Try to pay it forward in the future :)
  • LeighKimmer
    Offline / Send Message
    LeighKimmer polycounter lvl 3
    Definitely - thank you so much!
  • LeighKimmer
    Offline / Send Message
    LeighKimmer polycounter lvl 3
    Hello Kodde, 

    Sorry for bumping this up again all out of the blues, but is it at all possible to have two projections, each controlling one eye, but both projecting onto a single shader? 

    I've been playing around with the layered shader and layered textures node, but the alphas of the projections are always blocking each other, with the second layer dominating over the first (shown in image below)






    I've tried plugging a transparency map into the projection nodes' alpha channels, but the white colour in the texture's negative space is still being projected. I've tried everything I can think of and looked at various tutorials including
    http://s211.photobucket.com/user/hockey123755/media/shadingNetwork.jpg.html and 
    https://www.youtube.com/watch?v=3Y9Xhrtvmsw, 

    but the result is always the same as the above images. If you have time, would you please be able to look at my scene file to see if there is something I'm doing wrong? 

    https://www.dropbox.com/s/ddfo6cw6dcqryzj/MultipleTexturesProjectionSampleScene.rar?dl=0 

     
    Thank you so much!
  • nromick
    I actually made a tutorial on how to do it with one shader... I was going for something like the Lego movies...

    In my rig, I can control the mouth expression AND both eyes separately using only one shader... :)

    https://youtu.be/mamEj9TdkYU


Sign In or Register to comment.