Announcement

Collapse
No announcement yet.

[TUTORIAL] Triplanar material

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Sorry about the late response, I've been afk for a bit. I had started to roll the shaders into one of my other projects to simplify code maintenance.

    - For substance, you should be able to create a parent material and use material instances just like any other material.

    - An object with no UVs should be fine. Worst case scenario, you have to auto generate UVs. They don't have to be pretty since you're using texture projection.
    Create procedural cabinetry in UE4 - WIP

    Leave a comment:


  • replied
    Hi Steve, yes please re-upload if possible. This material looks great.

    I'm coming from the world of Solidworks looking to visualize in Unreal and UV's have been holding me from being able to do this. My Cad assemblies have 100's of parts, most of which would be fine with a standard cubic mapping (I think that's what is referred to here as tri-planar?). So this could be the solution? I would still create UV's for the large and important parts, but small things like bolts or whatever could really benefit from this.

    A couple questions:
    - Would existing materials like a Substance material be able to plug into this, or would I be looking to create all materials from scratch?
    - Also am I correct that you could bring in an object with no UV's applied, and this material would map it tri-planar?
    - Am I on the right track with this or am I missing some other workflow to easily throw a cubic mapping to a non-UV object?

    Thanks very much.

    Leave a comment:


  • replied
    Can you re-upload it please?

    Leave a comment:


  • replied
    Thanks for this, download now to check it out

    Leave a comment:


  • replied
    Oh sweet, i had a bit of an issue getting pattern variation right and was curious about decals, thanks for posting will check it out soon!

    Leave a comment:


  • replied
    Damaged wall prof of concept

    Leave a comment:


  • replied
    Originally posted by Cinebeast View Post
    Very cool. I see this is actually a pretty old post? I'm glad you bumped it back into relevance.
    I got distracted with another project and never quite finished this one. I got a few questions on the materials so I decided that it would be best to get off my butt and clean it up so that I could share it.

    This is what's in the project for those that are interested:


    For the material experts out there, I'm changing the projection angle for the projection material by creating a new transform basis based on 2 scalar values (stored in a vector). The values work between 0.0001 and .49999 with larger and smaller values repeating. At 0 and .5 it suffers from what seems like gimbal lock. I can prevent this by clamping the values, but it feels kind of hackey to me. If anyone has a better method I'd love to hear it.

    One cool thing about using a vector is that I can use a texture to determine projection direction. There's a raised panel door in the project which has the stiles and rails projected at different directions.


    Leave a comment:


  • replied
    Very cool. I see this is actually a pretty old post? I'm glad you bumped it back into relevance.

    Leave a comment:


  • replied
    The most current version of the projection material allows for local or world space mapping (no heightmap based displacement on the local one though), wood grain type noise, and a rudimentary system for determining the projection direction. Instead of just being based on the XY or YZ planes you specify a rotation amount which is stored in the red and green channels of a vector. I'll make a vid about the usage of the material soon.

    https://dl.dropboxusercontent.com/u/...onMaterials.7z

    Leave a comment:


  • replied
    Looks fantastic. Will this work with terrains as well; say the height is grass and the sides of the elevations are rock?

    Leave a comment:


  • replied
    Repost bc forum outage

    I uploaded 2 more triplanar tuts to youtube

    https://www.youtube.com/watch?v=F2WKGIVr39E

    https://www.youtube.com/watch?v=9yuvt3RatIE

    and here is the material functions I used. Next up, projection texturing in local space.

    Leave a comment:


  • replied
    In the end, I wasn't able to use the world aligned blend node. It has a pixelnormalWS node in it that prevents it from working with normal maps or displacement maps. I did figure out how to get the textures to project almost completely without stretching. Here's the (slightly modified) default UE4 rock that has vertex paintable displaced snow on top.

    Leave a comment:


  • replied
    It's a flexible material function with a few static switches that compile out based on what you're doing with it - you can open it right up and see what it's doing. You could quite happily use one for each planar blend through an axis though

    Leave a comment:


  • replied
    Originally posted by ambershee View Post
    You could instead just use the World Aligned Blend node, which is basically planar mapping.
    It took me a little time to dig up documentation on the world aligned blend node (This is all that I found), it seems to work by modulating the alpha based on a surface slope. I'll play with the node a bit and post what I come up with.

    Leave a comment:


  • replied
    You could instead just use the World Aligned Blend node, which is basically planar mapping.

    Leave a comment:

Working...
X