Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: aaouviz on 2022-01-13, 09:19:52

Title: Find displacement materials
Post by: aaouviz on 2022-01-13, 09:19:52
Hi all,

I'm rendering a big set of very large scenes (not large as in 1,000,000 trees) but many London city blocks from eye level with many many 3d people, buildings, vehicles etc. The biggest, heaviest scene I've ever built + rendered.

Anyway, I'm finding that generally the rendering is going smoothly. Surprisingly. (Side note; I'd recommend staying away from Humano 3d people - I bought their full collection for a sweet €1,000+ and they've been nothing but trouble!)

But if I turn on displacement it basically doesn't render (or displacement calc takes hours).

I'm almost certain there is only 1 object in the whole scene that has displacement, and is quite small, but important.

But I'm guessing, given the long displacement calc, that there must be more in the scene somehow.

My question: how do I find which objects/materials have displacement? The scene has thousands of materials (and about 10 xref files). So I'm struggling to come up with a solution as to how to find the troublesome displaced texture, remove it, and hopefully allow the render to get past the displacement calculation.

Many thanks for any tips!
Title: Re: Find displacement materials
Post by: romullus on 2022-01-13, 09:41:54
You could use batch material edit (https://forum.corona-renderer.com/index.php?topic=12857.0) script to disable displacement map slot on all materials and then enable it back by hand on the materials that you want.
Title: Re: Find displacement materials
Post by: aaouviz on 2022-01-13, 09:59:39
Solid suggestion! Thank you.
Title: Re: Find displacement materials
Post by: Frood on 2022-01-13, 10:03:27
... or use a simple script to find the names of materials using displacement:

Code: [Select]
if CoronaMtl!=undefined do (
print "CoronaMtls with active displacement:"
for m in getClassInstances CoronaMtl where (m.texmapDisplace!=undefined and m.texmapOnDisplacement==true) do (
print m.name
)
)

if CoronaPhysicalMtl!=undefined do (
print "CoronaPhysicalMtls with active displacement:"
for m in getClassInstances CoronaPhysicalMtl where (m.displacementTexmap!=undefined and m.displacementTexmapOn==true) do (
print m.name
)
)


You'd have to merge the xrefs first though.


Good Luck



Title: Re: Find displacement materials
Post by: dj_buckley on 2022-01-13, 12:11:54
Sini Software have a free plugin, Forensic, that will scan the scene and then gives you the option to put all materials with displacement to the material editor.  I can't remember off hand, but it might also let you select all objects with a displace modifier too
Title: Re: Find displacement materials
Post by: aaouviz on 2022-01-14, 13:44:14
Sini Software have a free plugin, Forensic, that will scan the scene and then gives you the option to put all materials with displacement to the material editor.  I can't remember off hand, but it might also let you select all objects with a displace modifier too

Thanks mate. I actually already use Sini, so this seems like the best option...

However, it doesn't seem to work!? I tested it multiple times and the search always come back at 0.

I'll check in with Sini and see what they say...