1
$\begingroup$

Is there any way to create flat transition using shaders(nodes) just like in second picture? Is it even possible with shaders? I tried constant ColorRamp but it goes half way through, not full face or triangleenter image description here

enter image description here

$\endgroup$
  • $\begingroup$ Whats your goal? Are there only those flat plateaus and wich should have one color from bottom up? In that case a constant Color Ramp + Mapping node should do the trick $\endgroup$ – A M Aug 18 at 18:18
  • $\begingroup$ Another way would be to apply your material by hand after box-selecting from side view+orthogonal $\endgroup$ – A M Aug 18 at 18:21
  • $\begingroup$ I want to create low poly terrain with tris fully colored, so that tris is only ground or only water $\endgroup$ – Rooper K Aug 18 at 18:22
  • $\begingroup$ are you using subdivision surface modifier? $\endgroup$ – A M Aug 18 at 18:23
  • $\begingroup$ Applying materials by hand isn't possible since terrain is quite large and generated on the fly $\endgroup$ – Rooper K Aug 18 at 18:24
1
$\begingroup$

General Answer: You can use a Mapping Node with a constant ColorRamp to do some shading via global height or via other texture coordinate inputs

enter image description here

enter image description here

(I think that the problem comes from bent polygons, because you moved single vertices from the subdivided plane. Therefore maybe a triangulate modifier could also help.)
turned out it wasnt that, but the height-displacement is done via shader-displacent from a noise map witch also was wrongfully pluged in as color enter image description here

Specific Answer for uploaded file:
there you used a standard noise map for colorisation, I replaced it with the setup from this answer:

enter image description here

because of the huge scale of your mesh you have to scale up the object coordinate input in the mapping node, then it works

enter image description here

$\endgroup$
  • $\begingroup$ I tried this solution, but as I said and as in your example, tris between green and red aren't fully colored, like they would be with different materials. If in shaders it not possible, Python script would be nice $\endgroup$ – Rooper K Aug 18 at 18:54
  • $\begingroup$ strange, could you upload a file? the mapping-node setup should color everything by height without exeption.. maby there is realy a seconed material? $\endgroup$ – A M Aug 18 at 18:56
  • $\begingroup$ Added file in post $\endgroup$ – Rooper K Aug 18 at 19:18
  • $\begingroup$ That is is exactly what I was looking for, thanks. But when I do it, it makes weird result Screenshot $\endgroup$ – Rooper K Aug 20 at 6:44
  • $\begingroup$ Maybe there was something with the axis beeing inverted in your file you uploaded, therefore no rotation was necessary, When you do it in a new file you should do it like in the first node setup (img2) of my answer and rotate the coordinated in the mapping node y:90 $\endgroup$ – A M Aug 20 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.