x

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"

Procedural flat shading

I would like to get advice/ opinions regarding stylized flat shading material for flat surfaces. It will be used on modular flat wall/flooring/ceiling kits. My aim is to make a flat plane with texture applied to it look like a typical low poly flat shaded asset, with well defined triangles visible.

This set of constraints should be adhered to:

  • -Triangles should somewhat follow the actual texture, not just randomly placed.

  • -Triangles must be actual geometry. Normals alone are not enough.

  • -No anything above of what material editor/blueprints can offer.

  • -Avoid repetition when modular pieces are placed into the game level.

So far I've identified three possible paths for me to follow:

  1. Procedural mesh generation in blueprints, based of height map and noise.

  2. Use of tessellation shader. Something like tessellation multiplier map, that controls the size of triangles, height map for displacement, and random noise to offset the vertices, coupled with reconstructing new normals after that. I'm frankly favoring this option so far as I've successfully used it before, but I have concerns, mostly because whole scene is likely to be always transform bottlenecked.

  3. Instead of doing it in the engine, automate the process in content creation software, and export several variations of the same mesh.

Maybe anyone has something to say regarding that? My thanks in advance.

Product Version: UE 4.13
Tags:
more ▼

asked Oct 03 '16 at 01:10 PM in Rendering

avatar image

Deathrey
7.8k 130 31 293

avatar image xSheim Nov 27 '18 at 07:19 PM

Hi, I am currently struggling with the same problem. Right now what I have is a procedurally created mesh that is unfortunately way too smooth. How did you approach the wanted result? I see the answer below was accepted but I'd be incredibly grateful if you showed your method in more detail. Thanks in advance!What I have currently

screenshot-4.png (680.0 kB)
avatar image Deathrey Nov 27 '18 at 07:34 PM

Jeez, that was two years ago. I've ended up following advice by Ed Burgess and using procedurally generated normal map and displacement map, based on several octaves of Voronoi noise.

avatar image xSheim Nov 27 '18 at 07:42 PM

Oh, and you still remember :) Thank you, it's a big help. One more little question: did you manage to get the collision working? Or maybe you didn't even need the collision?

avatar image Deathrey Nov 27 '18 at 09:47 PM

The scope did not involve collision. I only needed flat shaded appearance on models, that were not authored with flat shading in mind.

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

1 answer: sort voted first

If I am understanding you correctly I would create a tileable normal map based off a triangulated mesh like this alt text.

Granted I would make it more random and less grid like, but this image is just an example. I don't think tessellation is needed if you use a plane with enough triangles already in it. You would save on performance rather than actively tessellating though the shader. You can still use your height map and noise idea, but just world position offset should suffice.

Also make sure the plane has no smoothing groups and the mesh is set to compute normals.

Thats my opinion anyway,

Ed Burgess

lowpoly_n.png (585.8 kB)
more ▼

answered Oct 04 '16 at 08:46 PM

(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