← All ideas
  • Published 2 Dec 2019

Cached pointiness

We all know that currently the pointiness attribute of the Geometry node is only available for Cycles and not EEVEE. This is real shame because the pointiness node is extremely useful for material making. You can use it for everything from dirt maps to edge weathering effects. Almost every material authoring package out there has this in some way or shape and It's about time Blender has this too, in a realtime environment.

Now Cycles can have the pointiness value because it samples it via its raytracing engine. EEVEE being intended as a realtime engine cannot afford that. But what if we could cache the pointiness value of a mesh at regular intervals and store this in the mesh data somehow?

Already we can use the "Dirty Vertex" option in vertex painting to get a similar effect, but it's tedious to have to manually redo the process every time the mesh has changed. It also does not respect any modifiers such as the bevel modifier or subsurf modifier, which makes it only useful for the end process of a model, but when you really want this information in the creative and experimental phase of your project.

Having this data in a realtime environment will be crucial if Blender is gonna mature as a material authoring software. Now obviously EEVEE can't sample this information, but caching it is the second best. It could also be beneficial to Cycles, if the mesh hasn't changed there's no reason to recalculate it and you would save some shader performance.

example.png

100%

Development Status: Open

Upvote 21 Downvote 0
hubertekvall
2 Dec 2019

3 Comments

testure

How would you propose this cache works, how does the user interface with it? Technically what you're asking for is already possible, you just bake it out and use the resulting map in your shader. A screenshot mockup would go a long way to getting some traction on your proposal.

1
hubertekvall Author

* @testure *

Fair points, I have not really thought about a complete technical solution just yet. Regarding baking, It's slow, tedious and requires you to have decent UVs. I want something that give us this info automatically.

But, we already have the underlying fundamentals for doing this already in the software and that is in vertex colors. Basically in Vertex painting we can choose "Paint-> Dirty Vertex Color" and it will do this effect for us. The problem is that vertex painting only works on the final mesh and does not take any modifiers into account.

My suggestion would basically be to store an extra set of vertex colors that reflect the mesh at the end of the modifier stage. Heck, it could even be a modifier in itself!

That's actually all we need, someway to store vertex colors in a mesh after the modifier stage and something that automatically does the "Dirty Vertex Color" behind the scenes when the mesh has changed.

jason

Sounds an awful lot like just baking pointiness to a texture.