Auto material on sphere?

How can I get an auto material to be on a sphere with hills on it? For example I have an auto material that applies grass on flat areas and rocks on sloped areas. If I applied this to a sphere mesh, the grass would be at the top of the sphere and the rocks around the rest if it just like how it displays in the material editor. How can I get it to be equally distributed around the displaced sphere? Like on a planet.

This question keeps cropping up. Basically you have to edit the auto material to change the way it decides the slope / height of the land.

I can’t find it right now, but I know for sure someone solved this and put the answer up pretty recently. Time to hit the search box… :-/

Are you able to go into a bit more depth? I cannot find anything on this.

Not really I’m afraid, because it depends how your particular auto-material works. Basically you have to pull the code of the material apart until you find the bit that changes the texture based on slope value and re-code it to be able to handle a sphere… :-/

Oh. Thanks. By the way, I saw that you were mentioned as 3rd in a livestream a few days ago! Congrats. Funny thing, I found an answer to this like 4 hours ago. It works but the person uses 2 colors. But, like you said, it depends on the material. I’m planned for mine to be really complicated with multiple layers. But the answer I found is a start.

For anyone searching for a starting point, I’ll try to post an image but it’s not letting me upload.
Thanks for the answer ClockworkOcean!

You’re welcome :slight_smile: Main two reasons for not being able to upload an image are

  1. It’s too big

  2. You’re not logged in. ( It might look like you are, but sometimes you’re not… )

Okay
Its probably too big. I’ll try to put it in words. I haven’t tried this yet since I’m busy but I’m confident it will work.
So add a lerp into the material editor. In the a and b, plug in any texture or color or material function you need. In the alpha: get a local position function, and plug local position into transform vector which you will drop into the editor. Plug the transform vector into a normalize node. Drop in a dot and plug the normalize into A. Get a pixelnormalWS and connect that to another normalize. Plug that into the B of your dot. Now plug the result of your dot into the alpha of your lerp with the 2 colors.

Again I haven’t tried it out yet and I’m on mobile so yeah.