Home Technical Talk

texture blending in Maya using vertex color

polycounter lvl 13
Offline / Send Message
matthewjvia polycounter lvl 13
I recently got an art test and they want the finished product to be submitted in a Maya scene with all of the shaders set up. The problem is that I want to use a material that can blend between the normal tiling texture and a burnt texture. I would also like the texture to reference two different UV sets since both materials have to be on the same texture sheet.In Unreal I could do this easily, but I can't seem to find anything in Maya that will allow either. Everything I've found online says that I would have to make a custom shader, but I've never written a shader. Does anyone have any ideas?

Replies

  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    If it doesn't need to be real time, mental ray has a node that can make use of vertex color data.
    For the 2 UV sets I think you can use uv linking to the texture2d node.
  • jonatanl
    http://www.lumonix.net/shaderfx.html
    Supereasy node based shader creation tool for 3ds max. You could create the shader you want in max and load it as an cgfx or hlsl-shader in maya:)
  • bugo
    Offline / Send Message
    bugo polycounter lvl 17
    I actually tried to load from shaderfx in Maya, it gets broken, doesn't compile.
    MentalMill would be his best choice, but it doesnt support vertex shaders too.

    Does your test HAVE to be shown in Maya?
  • matthewjvia
    Offline / Send Message
    matthewjvia polycounter lvl 13
    It says that the file must be in Maya and set up for a viewport render. I have always tried to put my stuff in-game, so I haven't played around with that much aside from previewing normal maps. It doesn't say the renders must be done in Maya, but i assume it means that all of the shaders should be set up so they can look at everything in Maya.

    I have a backup plan where I can avoid the vertex painting, so that's not too much of a concern. My problem now is that I don't know too much about working with CGFX and HLSL shaders in Maya.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    Why does it necessarily have to be vertex color that controls the blend? An alternative could be another texture?

    You can get pretty far with Maya's native shaders as well. What are the shader features you want to use? Pre-baked lighting or all dynamic? Tell us more about your project if you can.

    And by "viewport render" I assume we are talking about real-time in the viewport right?
  • matthewjvia
    Offline / Send Message
    matthewjvia polycounter lvl 13
    The project is to make a side and roof of a building that has been partially collapsed. I had planned to make it a building that had been gutted by a fire. The reason I wanted to use vertex painting was to blend between the tiling burnt wood texture and undamaged texture. The reason I wanted to use multiple UV sets is because I have limited texture space, so I considered making a second UV set that mapped the UVs to a strip of burned wood that tiled in one direction on the same texture sheet. That way I wouldn't have to make a second texture that was devoted solely to the burnt wood. It's possible that neither method would have worked, but I wanted to at least be able to test them.

    I need to hurry and finish this before my deadline, so I don't have much time to experiment. I decided to go with a different idea of a very old, abandoned house with some dead vines instead. It would still be nice to know how to get vertex painting to work though, so I can control the alpha channel on the damaged roof.

    I may just give them the Maya scene and do the render in UDK anyway, since I know I can get the effect I want that way. I emailed them to be sure that's ok.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    Good luck with your assignment.

    Sounds like you'd have to go CGFX/HLSL shader to get vertex color based blending live in the viewport.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Why not use a RGBA texture, and use each channel as a mask?

    Takes abit more work, but I think it easily possible in Maya.
  • bugo
    Offline / Send Message
    bugo polycounter lvl 17
    Yes, it's possible to do that.

    I wonder, does the test require you to have like depth channel as being the blend in between each texture? If it does, then he does require to use vertex colors and CGFX.

    If you want to show them a blending of some kind, you could do this:
    (make sure to create another map instead of the ramp, of course)

    zn9e7n.jpg

    easy enough :)
    Just a reminder, it won't show on the viewport.
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    You could also use blendColors node instead unless you are doing some fancy blending. Both layeredTexture and blendColors work in my viewport.

    32832109.jpg
  • bugo
    Offline / Send Message
    bugo polycounter lvl 17
    I noticed I was using a ramp, it needs to be a file map to make it work. Thx Kodde
  • kodde
    Offline / Send Message
    kodde polycounter lvl 19
    Ah, of course.
    Ramp doesn't show in my viewport either.
  • sama.van
    Offline / Send Message
    sama.van polycounter lvl 17
Sign In or Register to comment.