Home Technical Talk

Triplanar Projection in Maya

polycounter lvl 6
Offline / Send Message
Urzaz polycounter lvl 6
I found a couple results on triplanar projection in Mari, but nothing for Maya. I set up a triplanar projection material in Maya, which if you don't know, it constantly projects a (tiling) texture from all 3 axes and doesn't distort as you change geometry, which makes it incredibly useful for modelling around tiling textures.

Check out a GIF here

I'm pretty proud of setting it up in Maya, (first time working with nodes in Hypershade) but I do have some questions:

1) Can I adjust individual projections of the triplanar projection (rotate, offset) or do I need to somehow assemble multiple planar projections to recreate the effect?

2) Tangentially related, how do I view the networks of a material in hypershade? After assembling my material, I can't see any of the network that I made in the workspace when I select the material, and I don't know how to "frame" the nodes, if that's the problem.

3) Can I "bake" the triplanar projection down to the UVs when I'm done? I would assume so, but I have no idea how to go about this.

4) Is this a method environment artists commonly use? I've never heard of using it for modelling, (not that that means much), but it seems useful, especially if you have a texture that's a little more organic and needs the geo to conform to it a bit more.

Thanks all, let me know if you have questions or answers, I welcome both.

Replies

  • throttlekitty
    Options
    Offline / Send Message
    Hey, that's smart! mind sharing how you did it? I was actually thinking about something similar this morning, fun how that works. (I could never wrap my head around "uvless" parametric materials that don't stretch.)

    2) rClick a material in the Hypergraph and Graph Network

    3) I'm not sure how your setup woks, but I'm kind of guessing its based around mapping nodes? so probably?
  • Urzaz
    Options
    Offline / Send Message
    Urzaz polycounter lvl 6
    Here's the basics of how it works.

    6ShkDv9.jpg

    You can attach the Projection node either by searching and adding it to the work area and CTRL+MMB dragging to connect it to your lambert material node, or by selecting projection instead of "file" when you'd normally choose what to fill the color attribute with. Then you add your texture file to the projection node instead, as you normally would to your material node.

    On the projection node you can choose what type of projection you want, planar is the default but triplanar is in the dropdown. If you click the "interactive placement" button, it will create a 3D placement node that you can edit the settings of, similar to normal UV projection.

    Thanks for the tip about the RMB click on the material. Seems obvious now, oh well.

    It's pretty useful, but using it for games I really need to figure out how to translate it to actual UVs. You can make a triplanar shader in-engine (which is definitely useful in some cases) but I want this to just be a modeling technique, no other requirements.
  • throttlekitty
    Options
    Offline / Send Message
    Oh, that's... much simpler than what I was imagining somehow.

    AFAIK you're not able to convert a projection to UVs, but you can convert the resulting texture to existing UVs. (Hypershade: Edit>Convert to File Texture) But this is going to be lossy and defeats the purpose of a tiling texture.

    There isn't really a super-easy way to do UVs. Automatic mapping works pretty well for most boxy shapes; but you'd need to do a little more unwrapping. -And probably fighting the urge to line things back up how you had them during the projection.

    I don't see a way to connect a projection/place3d node up to a mesh, but I don't really understand how it works under the hood, the docs make it sound like it's transforming the texture to match nearest planes in the geo.
Sign In or Register to comment.