Advertisement

Basic ShaderGraph question

Started by April 07, 2020 04:23 AM
2 comments, last by dpadam450 4 years, 8 months ago

I'm trying to seamlessly tile a vertex displaced sphere with a seamless texture. The mesh is displaced during runtime and I can't figure out how to properly texture the sphere in ShaderGraph.

I did a little more research and what I think I'm looking for triplanar-mapping. My sphere is divided into four pieces that are then stuck together:

So as you can see the top and bottom are mapped correctly, but not the sides. When I up the resolution to get a sphere, the distorted texture remains of course:

Here's a sample a basic version of my shader:

Not sure how to do this, I'm assuming I'd have to consider the normal vectors some how?

Thanks!

Granted, I figured it out. I honestly felt I just crawled out of a gutter after all this. It's no coincidence that the top and bottom faces of the cube image I shared above are okay but the side faces are not. I had to consider 3 axis:

I could have used a triplaner node, but I found a couple of nice tutorials that did it differently. I'll go ahead and share the two videos that helped me just in case somebody runs into the same issue.

Short Video (Done on Shader Graph and straight to the point):

Longer Video (Done in Unreal but highly detailed and you can definitely port what he did to Shader Graph):

Advertisement

Tri-planar is only good for procedural materials. If you need a cube or sphere with proper texturing (such as rendering earth with an earth texture on a sphere), you will need to actually unwrap it.

NBA2K, Madden, Maneater, Killing Floor, Sims

This topic is closed to new replies.

Advertisement