is this possible? I cant make it to work. In latest update, announcement said - Slowdown when blending materials with displacement using VRayDirt as blend amount.
I am trying to blend two materials one with displacement and one without together with dirt map or curvature map. But it just doesnt work. Is it possible or what do you mean in the announcement?
Hi could you send an example scene to https://support.chaos.com/hc/en-us/requests/new Do not forget to collect and include any external assets (textures, proxies, etc.) that you may use in your scene.
It is only a test, so very simple scene, I will sent it.
I mean it is just not working, displacement is everywhere or nowhere but not on the mask I made with map. Maybe I am doing something wrong but dont know what.
Displacement is calculated first, hence the VRayDirt is applied to the new geometry. You would have to bake the VRayDirt and use it as a texture. You may also experiment with vertex painting.
Indeed, it looks like an order of operations issue.
Or a dog chasing its tail, however you want to put it.
It means *attempting* to use the dirt as mask resulted in severe slowdowns (that was the dog chasing its tail.).
Those are cured, but the result is still not what you’d expect: dirt is calculated after the displacement is done, and will render across the displaced surface (same happens for curvature).
See attached: the bluish surface carries displacement, and the dirt is blending with the red material, not displaced.
With displacement off, the dirt has one look.
With displacement on (happening across the whole mesh), the dirt computes something entirely different.
Eh yes, but it’s a logical conundrum, more than a limitation: you’re asking a geometry-based shader to affect the geometry it depends on.
This is why when baking it, the mask doesn’t depend on the geometry it should affect, and things work.
If we evaluated dirt first, the mask would work, but the dirt would not (basing itself on the base geo.).
Perhaps there could be an option to evaluate only on the base mesh, but i am entirely unsure if it’s doable, and if doable, at what cost.
I understand that, it makes sense. But last point you had is what would be great. If dirt takes into account the base mesh and then displacement calculate things on the mask from base mesh. It would be great. Not sure if this is ram consuming or something, but this is exactly it
Can you discuss this with Vlado?
It would likely mean having two meshes in memory (fine for my teapot, not so for complex mesh) and the tracing would have to alternate to the base mesh for the dirt, and the displaced for the other.
At the very least it’d be exceptionally messy to code, and it could potentially lead to endless woes.
I can surely ask, but given that baking is a viable, cheap option, i’m also pretty sure of the answer.