Procedural Mask for Displacement
-
I like to find a procedural workflow in the Redshift node graph to add dirt, grunge, etc., to the concave areas of a mesh using displacement. I have tried using the AO and Curvature nodes but they do not work (I asked in the RS forum and was informed that my observation was correct).
Is there some other workflow to create a map that identifies the concave portions of a mesh? Both internal corners as well as depressions created by a Displacer.
This is very simple to do in Substance Painter, however, the output is just a set of texture maps and thus incur all the issues with texture maps, e.g., repetition.
Attached is a link to a simple test project file.
Thanks,
Greghttps://www.dropbox.com/scl/fi/zpy5cl5dbuvduxakwd4ms/AOInputToDispTest-Oct23.c4d?rlkey=mkrpese78zfmytttnidbsv1f5&dl=0
-
Hi Greg,
Not to my knowledge, as the AO would have to be evaluated twice to drive the Displacement and then cover it newly. It can't also drive the Displacement and cover it; you might check with tech support.
The curvature covers the new (black) area but not sufficiently; I tried to combine both (Layer> Add), but I'm not convinced.
The only procedure I can think of is to use AO and bake that into a texture (RAW texture), then apply the texture. I have a quick example here done in Photoshop as an alternative.
https://stcineversityprod02.blob.core.windows.net/$web/Cineversity_Forum_Support/2023_PROJECTS_DRS/20231020_CV4_2024_drs_23_RSad_01.zipAll the best
-
@Dr-Sassi Yes, I can do baking but that's not interesting. Saul and the folks on the RS forums explained that AO and Curvature cannot affect displacement because they are calculated after the geometry is modified, which, in hindsight, makes perfect sense. One cannot know the occlusion or curvature of the geometry until the geometry is in its final state. So, other than painting a Vertex Color or baking some kind of map there doesn't seem to be a fully procedural solution.
Greg
-
Hi Greg,
I have no better answer than baking.
When in doubt, Saul is right. He is the first one that I typically ask in our internal chat. I haven't asked him for this. I find that I go in the same direction Saul said ("Not to my knowledge…".) Your setup wants to drive the Displacement and have it applied to the Displacement, which means it would need to be used twice, which is not an option.
What makes me wonder is the black stripe, when you solo the AO node.
All the best.
-
@Dr-Sassi Hi. Through the RS forum I became aware of a technique that solves this problem so beautifully!
First observation was to use a Vertex Map Tag on the object then use the object itself as a field in the tag. You are then given some controls to color the map with curvature (convex or concave). In the RS node editor then use a Vertex Attribute node with the vertex map tag as the source for the attributes. The VA node can then bu used like a texture map into the Displacement node. This is great but not a lot of control.
The real win was the suggestion to use the xpVertexMap object in the scene to create a Vertex Map tag on an object. Same connections as above but the xpVertexMap object allows a lot of control and has both AO and Curvature functions which can be layered! A beautiful technique.
Would you want me to post the project file even though it will have an X-Particles-specific object in it?
G
-
Hi Greg,
If I get it correctly, you found a solution. When it is discussed in the RS forum, then all is good.
All the best