Page 1 of 2

Dirt Shader Question / Bug

Posted: Tue Aug 18, 2020 4:04 pm
by AaronWestwood
In the 2020 version with the new Dirt shader, I wondered if there's a reason/fix for it adding a huge amount of processing to the render time. The older versions didn't do this (but of course it had less features).

I'm finding every texture I use it in (across all projects), especially if I play with the tolerance/details parameters or have multiple dirts in my mix, my render times go through the roof (easily doubled and tripled)!

Interested if the devs have any thoughts on this, or if anyone else has had this issue?

Using 4 x 2080ti's + Threadripper 2950x + 64GB RAM.

Re: Dirt Shader Question / Bug

Posted: Tue Aug 18, 2020 5:11 pm
by Goldorak
That’s the first i’ve heard of this. first, Is RTX on? Second if you have a scene in an older version that is showing 2-3x the perf for the same dirt shader output, could you share (orbx is best), so the devs can profile?

Re: Dirt Shader Question / Bug

Posted: Wed Aug 19, 2020 3:43 am
by AaronWestwood
Goldorak wrote:That’s the first i’ve heard of this. first, Is RTX on? Second if you have a scene in an older version that is showing 2-3x the perf for the same dirt shader output, could you share (orbx is best), so the devs can profile?
Thanks for getting back to me so quickly! This dirt thing has really been a thorn in my side since the 2020 version, should of really posted sooner.

Find reference image attached. Mixing a bunch of colours using 1. Falloff 2. Falloff and Dirt. You can see the Dirt version is 3-4x longer. So working with big landscapes where im mixing normals, various ao maps, textures etc, this can make the difference of a 30second render to a 5 minute one....simply because of dirt.

RTX on or off didn't influence results, im working with RTX on though.

Re: Dirt Shader Question / Bug

Posted: Wed Aug 19, 2020 3:44 am
by AaronWestwood
Heres the .orbx

Very curious if you get the same results :)

Re: Dirt Shader Question / Bug

Posted: Wed Aug 19, 2020 6:33 am
by bepeg4d
Hi Aaron,
it seems that you have shared the orbx of the version without Dirt node, do you mind to share the scene again, but with Dirt nodes connected?
21B5B6E8-2DAC-4DD9-842F-E071EA822BC2.jpeg
ciao Beppe

Re: Dirt Shader Question / Bug

Posted: Wed Aug 19, 2020 6:39 am
by AaronWestwood
bepeg4d wrote:Hi Aaron,
it seems that you have shared the orbx of the version without Dirt node, do you mind to share the scene again, but with Dirt nodes connected?
The attachment 21B5B6E8-2DAC-4DD9-842F-E071EA822BC2.jpeg is no longer available
ciao Beppe
Oops, see attached! Thanks so much for the quick response. Keen for your findings :)

Re: Dirt Shader Question / Bug

Posted: Wed Aug 19, 2020 10:03 am
by bepeg4d
Hi Aaron,
thanks for sharing the scene.

Please consider that the Dirt node is a live node, and the calculation depends from the complexity of the geometry nodes involved.
Since it is related to geometry, if animated, the dirt node will be automatically updated.

So, the scene needs ~7” to be calculated without Dirt, if we add a single Dirt node, 4/5” are necessary to calculate the Dirt for this geometry node, so the rendering time grows to 12”:
17E01DA6-C12E-4B51-92ED-0DD3611AADE7.jpeg
If we add teo more Dirt nodes, the rendering time grows to 7+4+4+4= 19”:
38DDAC49-013F-4F4B-B2FA-F5A524A7B018.jpeg
But, if the geometry is not animated, and you don’t need a live version of the Dirt node, you can always bake it, by copying the Dirt nodes into a Diffuse mat, with Baking Camera active:
F831F00E-F00F-4422-8108-8F217F40BE77.jpeg
And replace the Dirt nodes with the Baked textures, to go back to the original 7” rendering time:
47DC320B-F690-4755-A7C3-526129F87ACB.jpeg
Here is the modified .orbx scene:
DIRT_ISSUE_BAKED.zip
(12.38 MiB) Downloaded 116 times
Obviously, you can do the same also with c4doctane.
ciao Beppe

Re: Dirt Shader Question / Bug

Posted: Wed Aug 19, 2020 12:13 pm
by Goldorak
Separately from Beppe’s suggestion, i am having a look into why 2020 would be slower than 2019 and what we can do to fix.

Re: Dirt Shader Question / Bug

Posted: Wed Aug 19, 2020 2:07 pm
by AaronWestwood
Goldorak wrote:Separately from Beppe’s suggestion, i am having a look into why 2020 would be slower than 2019 and what we can do to fix.
Thankyou both for you replies, thats really interesting Bepeg. So it seems it is working as intended (?)

Currently im using the dirt node on 8k displaced displacement maps.....which is absolutely brutal to the render time.

So I guess baking is the current solution, although undesirable as it adds so many steps to something which involves constant tweaking/baking/tweaking/etc.

Would an option be to add a legacy Dirt node for a more simple approach (2019 version), or add a baking command into the dirt node to lock it (I know NOTHING about coding if this is even possible)?

Thanks again, loving the back and forth.

Re: Dirt Shader Question / Bug

Posted: Thu Aug 20, 2020 1:59 am
by mojave
Hi Aaron,

We have been testing your scene with the latest 2020.1.4 build as well as 2019.1.5 and could in fact experience the performance drop you are talking about.

We will be looking into some optimizations to be able to bring the old performance back soon, in the meantime there is a workaround that might be useful: if you limit the amount of dirt nodes per material tree to just a single one the performance should be pretty much the same if not equal to that you saw in 2019.

Hope that helps.