Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Material slope on spherical worlds

Hi everybody!

I would like to create a material which change per terrain slope to see cliffs/plains/mountains...etc.

I can do this with a landscape (with lerp and world aligned blend). But I don't know how to do the same effect on a spherical landscape like a planet.

Any idea is welcome! Thank you!

Product Version: UE 4.17
more ▼

asked Oct 05 '17 at 01:20 PM in Blueprint Scripting

avatar image

12 3 8 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Well, you should follow more or less the same way. Blend mask would be obtained by taking a dot product between vertex normal and world up direction in a classic landscape case. For a spherical world, everything remains the same, with exception that world up direction varies with location.

more ▼

answered Oct 09 '17 at 04:39 PM

avatar image

7.9k 130 31 293

avatar image Goetheus Oct 10 '17 at 11:00 AM

Quite simply... I could have looked for weeks! Thank you very much Deathrey!

EDIT: Oops! This is half-resolved because my entire world is in rotation on itself! So the material changes with this rotation :/ I'm trying to find a solution...

avatar image Deathrey Oct 10 '17 at 11:45 AM

Take your world up vector, and rotate it with RotateAboutAxis material expression using the same axis and angle, as you use to rotate the planet.

avatar image Goetheus Oct 14 '17 at 06:46 PM

I tried a lot of things without any success. Details are welcomed ;)

avatar image Gampersnaz Aug 05 '18 at 11:10 PM

Sorry to bump and old issue, but I am looking for some clarification of this issue as well. When Deathrey said that the up vector varies by location on the sphere, how can that be expressed in a material graph?

avatar image Gampersnaz Aug 05 '18 at 11:40 PM

Ok I got it. I'm using the local position node normalized , and the pixel normal ws node normalized, and getting the dot product from that. add a multiply, power and clamp to control the falloff :)

avatar image HOUmmel Oct 16 '18 at 02:42 PM

somehow this does not work for me. this is what i get:

alt text

alt text what am i doing wrong :(?

world.jpg (59.2 kB)
nodes.jpg (284.8 kB)
avatar image HOUmmel Oct 17 '18 at 10:28 AM

never mind i found the problem. i used wrong normals uvs tangents etc. in my sphere creation function

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question