Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: RecentSpacesSam on 2024-04-02, 16:44:35

Title: Texture map colour in RawComponent (diffuse)
Post by: RecentSpacesSam on 2024-04-02, 16:44:35
Hey all, we're currently looking into using render element compositing/back-to-beauty workflow as a means of being able to swap out textures on a product without having to re-render.

The issue that we're running into is that we can't get a "clean" diffuse component element (i.e. purely lighting, no texture information) to work with as the CShading_RawComponent (set to diffuse) still includes the texture detail.

Comparitively, the VRayRawLighting render element only includes lighting information and can be multiplied over the diffuse filter element to obtain a RawLighting element (or the math works backwards too).
https://docs.chaos.com/display/VMAX/VRayRawLighting (https://docs.chaos.com/display/VMAX/VRayRawLighting)

Am I missing a trick here or is this just the way that Corona is set up?

For reference I'm setting the comp up in Blackmagic Fusion with 32bit exr's. Attached is a sample of the comp layout.

Thanks
Title: Re: Texture map colour in RawComponent (diffuse)
Post by: RecentSpacesSam on 2024-04-02, 17:08:11
My apologies, wrong screenshot attached originally.

Correct one on this post. I've also included a screenshot showing the "expected" result, which was achieved by rendering with a grey override material and using the CShading_RawComponent (set to diffuse) element from the override render.
Title: Re: Texture map colour in RawComponent (diffuse)
Post by: RecentSpacesSam on 2024-04-04, 16:09:00
I had another play around with this today and discovered that a CoronaLegacyMtl renders the RawComponent (diffuse) correctly, but the CoronaPhysicalMtl does not.

I've attached a couple of renders to illustrate the issue as well as each version overlayed on top of each other, set to "difference" blending mode.

BTB_PhysMat.jpg and BTB_LegMat.jpg are the final comps, the issue is present but not hugely visible.
It's more clear in the RawDiff images.

Title: Re: Texture map colour in RawComponent (diffuse)
Post by: piotrus3333 on 2024-04-26, 10:29:31
not much difference between Legacy and Physical in RawComponentDiffuse here:
Title: Re: Texture map colour in RawComponent (diffuse)
Post by: maru on 2024-04-26, 15:52:01
Sorry, I somehow missed this thread. I tested this on a simple scene and it seems to be working as expected.
I am saving to 32-bit EXR. With 16-bits I was never able to get the correct lighting (the highlights looked too dark).
Added all CShading_SourceColor and CShading_RawComponent render elements (diffuse, reflect, refract, in this case I didn't need translucency or opacity).
Then in Photoshop:

[CShading_Raw_diffuse x CShading_SourceColor_diffuse] + [CShading_Raw_reflect x CShading_SourceColor_reflect] + [CShading_Raw_refract x CShading_SourceColor_refract]