- Home /
Procedural texturing of low poly plane
Im trying to create a procedurally generated terrain with a low-poly (flat shaded) look. So far its been going well but i've run into a problem:
I dont know how I should texture/color it. Basicly I wanted to only use solid colors for the triangles so right now im using a modified specular surface shader that chooses colors depending on worldPos and worldNormal of the surface in question. But that didnt turn out to be such a great idea. I get lots of branching (is that the right term?) even with 4 different colors. (Sand, plains, mountains and snow) Whats the appropriate way of doing it? I would like to be able to attach quite a alot of logic to what texture/color goes where besides normal and position.
One other thing, the "terrain" is a plane that I applied my a generated heightmap onto. The builtin terrain system kept acting up and I dont like it when I dont know what happens in the background. Should I continue this course or try to "tame" the builtin terrain component?
So basicly, its two questions: 1. Should I keep using a (and then stich together multiple) plane(s) or a switch over to the builtin terrain system? 2. How should I texture/color the plane/terrain?
Please keep in mind, im a shader newbie, but ive got 10+ years of C# behind me.
Thanks in advance.
I've been wondering that same thing. Interestingly renderer can take multiple materials and mesh object has multiple uv arrays.
This isn't really related to the question but how did you do the water, I'm working on a similar project but I don't know how to make different biomes, water and that. Also I colored my terrain by coloring each vertex a different color and then you can kind of go from there, although you do need to get a shader to allow vertex coloring.
SketchyRandom, yeah - I tried vertex coloring with a shader aswell, but I had some performance problems. Can't remember, this project has been shelved. :) Anyway, regarding the water, it's just to semi transparent planes slightly offsetted from each other.
By your requirements, it sounds like it's time to start playing with programmable shaders. Theoretically you would evaluate the elevation of each vertice and decide what color to use from there.
If you plan on using textures in the future, then you will want to look into tri-planar shaders.
Your answer
Follow this Question
Related Questions
How to make cheap terrain for ocean floor? 0 Answers
Speed Tree 8 shader (among others) unnecessarily taking up RAM? 3 Answers
Adding multiple textures to a procedurally generated terrain mesh? 0 Answers
Strange shading on procedural mesh 0 Answers
Procedural heightmap shader - Normals and tangents 0 Answers