Finding correct settings for rendering layer masks

Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderators: ChrisHekman, aoktar

SundancePioneer
Licensed Customer
Posts: 19
Joined: Mon Mar 04, 2019 12:39 pm

Dear Octane for C4D users,

I'm currently doing my first bunch of product renderings and I am really struggling to find the correct settings to render an accurate Layer Mask that i can use as an alpha channel when editing in Photoshop.

I found several Threads regarding a white fringe on the mask (it is a few pixels too big) - but none of the solutions seemed to work. As i will be working on tons of products, i really need to limit the amount of post-processing necessary.
White fringe too to mask being a few pixels too big always.
White fringe too to mask being a few pixels too big always.
I'm using the most recent drivers for my 1070TI, Octane Render V4.02.1-R3.

My current Settings are as follows:

C4D - Render Settings
  • C4D "Save" toggled to render flat image
    16bpc / Linear / Exporting as EXR (global setting)
Octane Rendering Settings (Render Passes)
  • Render Buffer set to Float (linear)
    Render Passes enabled
    16bpc / Linear
    Show passes On
    Save Beauty OFF
    Multilayer File OFF
    Beauty Passes - Reflection, Refl. direct, Shadow
    Render Mask ID2 enabled (Layer i need the mask for)
    Info Passes - "Distributed Rays" selected, 128 max samples (unchanged)
Octane Settings
  • Alpha Channel On
    Alpha Shadows On
    Keep Environment On
    Alpha Channel Toggled
    Partial Alpha & Pre-Multiplied Alpha both Off in CameraImager
When trying to use the "render Mask" File in Photoshop, the mask is too big (see picture attached).

I couldn't really find any setting that worked or gave me different results. If using render-masks is not the right tool for this job, i'd greatly appreciate if you suggested another method! :)
The reason i need the mask is that i need to seperate the contact shadow on the floor from the object itself, as floor shadows need to be toggled on/off later.

Any help in finding the correct settings is greatly appreciated!

Thanks in advance

Sundance
SundancePioneer
Licensed Customer
Posts: 19
Joined: Mon Mar 04, 2019 12:39 pm

bepeg4d wrote:Please, use Object Layer Color pass, and set the desired color with an Octane Object tag:
Hi Beppe,

thanks for your reply - i tried it, but i still get a white fringe. It's smaller now, but it's still not accurate. Anything else i can try? :)

Thanks in advance

Sundance
mitchino
Licensed Customer
Posts: 450
Joined: Thu Jul 14, 2016 4:49 pm

I do a lot of product shots. I don’t bother with Octane for masks. Instead I create two standard c4d materials, one with only luminance (pure white) and one with no channels ticked (pure black). I apply these to my products/labels/lids/backgrounds etc and render using the standard render engine. The anti-aliasing settings must be set to best. I find this workflow incredibly versatile and fast, the masks render in seconds.
SundancePioneer
Licensed Customer
Posts: 19
Joined: Mon Mar 04, 2019 12:39 pm

mitchino wrote:I do a lot of product shots. I don’t bother with Octane for masks. Instead I create two standard c4d materials, one with only luminance (pure white) and one with no channels ticked (pure black). I apply these to my products/labels/lids/backgrounds etc and render using the standard render engine. The anti-aliasing settings must be set to best. I find this workflow incredibly versatile and fast, the masks render in seconds.
Hi, Mitchino,

thanks for that, it sounds like a possible workaround - but if i understand you correctly, it is also one additional step to be done for rendering. I was hoping there might be a way to only have to render once per product, as i will be rendering a lot of different variations..

Is there a way to use your method "on the fly" without having to go back and re-render?

Thanks in advance!

Sundance
Gregor.Zimmermann
Licensed Customer
Posts: 50
Joined: Mon Jul 16, 2018 8:18 pm
Location: Cologne, Germany

I'm not a hundred percent sure, if Mitchino's workaround is the best here, as it does not consider the Depth of Field/Motion Blur inside the octane camera. Or am I missing something here?
SundancePioneer
Licensed Customer
Posts: 19
Joined: Mon Mar 04, 2019 12:39 pm

As a workaround, it is probably the easiest solution as i don't need DoF or Motion Blur. All i need is a clean alpha channel to use as a matte to seperate the hero object from anything else. The layer masks and Object Id passes do that, but not without a white fringe that i would have to remove manually each time..
niestudio
Licensed Customer
Posts: 265
Joined: Fri Aug 21, 2015 10:03 pm

can you upload a simple scene with the setup that causes this?
I render products all the time and never see this.
OSX 10.12.4 | Intel 12 core @ 3.33 ghz | 128 gb ram | NVIDIA GeForce GTX 1080TI | Ubuntu Linux slave with 3x 1080ti
SundancePioneer
Licensed Customer
Posts: 19
Joined: Mon Mar 04, 2019 12:39 pm

niestudio wrote:can you upload a simple scene with the setup that causes this?
I render products all the time and never see this.
Sure thing - i'd be thrilled if you could take a look and share your expertise. Thanks in advance!

I have attached the simplified scene (dummy product with same textures and similar structure, since the original stuff is under NDA) with all the settings i currently use to render. I'm sure that i am just missing a setting somewhere, but i just can't find out which one it is. I have lowered the samples to speed up the test-renderings. (you might have to re-link the included HRDI file to get the same result)
RenderingSupport.zip
(1.25 MiB) Downloaded 132 times
I have also attached the problems in the resulting render again, using the settings from the file. (you can see the white spill on the edges - it happens when i try to use the Object ID Color pass as a mask in Photoshop - same thing in After Effects using it as a track matte. so it's unlikely to be a PS error):
Alpha Problem
Alpha Problem
Thank a lot for your kind help!

Greetings

Sundance
niestudio
Licensed Customer
Posts: 265
Joined: Fri Aug 21, 2015 10:03 pm

Perhaps you can upload a cropped version of your photoshop file.
It looks to me like your mixup is there rather than your render.
masked.png
OSX 10.12.4 | Intel 12 core @ 3.33 ghz | 128 gb ram | NVIDIA GeForce GTX 1080TI | Ubuntu Linux slave with 3x 1080ti
Post Reply

Return to “Maxon Cinema 4D”