Author Topic: Clean Masks  (Read 7741 times)

2017-06-04, 20:38:23

dj_buckley

  • Active Users
  • **
  • Posts: 869
    • View Profile
What's the best way to get clean luminance (B&W) masks for selected objects.

When using VRay i just used RenderMask and you'd get pixel perfect masks.

I've tried to use the CMasking Mask in Corona but you still effectively have to wait for it to 'clean up' there's no guarantee that it's pixel perfect

2017-06-05, 17:18:57
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Do you mean disabling antialiasing for the masks?
You can do it using string options. I just need to find the right one...
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-06-05, 17:24:14
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Got it!
bool shading.enableAa = false
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-06-05, 20:06:01
Reply #3

dj_buckley

  • Active Users
  • **
  • Posts: 869
    • View Profile
Apologies - I meant if I open a scene to get a mask out after I've done the main render (using Render only masks) - I'd have to let it render for as long as the initial render to ensure it was Pixel perfect i.e. the black and white mask selection perfectly selected the area in PS, as it gradually improves longer it renders.

Basically I just want to select an object and get a white mask for it - exactly the way Render Mask works with Vray - although I've since read that RenderMask has been updated to work with Corona so i'll give that a go.

I'm just trying to avoid halos

2017-06-07, 13:33:08
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
If you render your mask with the same amount of passes as the final image, you should get a perfect mask.

Also, you can try the Scene > Render Selected > Viewport selection option, which will render only your selected object(s) and adequate masks.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-06-08, 21:20:22
Reply #5

dj_buckley

  • Active Users
  • **
  • Posts: 869
    • View Profile
Yep as I thought - the problem with that is it's not as instant as Rendermask.

With VRay you could have a 40 hour render, but get a 10 second mask on a different day using Rendermask and it would be perfect.

I guess it's an issue with progressive rendering though rather than Corona itself.

I'll just remember to setup my masks with the render in future ...

2017-09-21, 19:28:12
Reply #6

dj_buckley

  • Active Users
  • **
  • Posts: 869
    • View Profile
I just want to revive this as it's still bugging me, I just can't seem to be able to get a clean mask that doesn't result in halos/black edges around the selection.

I normally render to a noise percentage.

I've got a 5000px render that I set to 3% noise.

I now need a mask for one of the objects.

If I open the file, and add those objects to a monochromatic CMasking_Mask element, tick render only masks, and hit render, it gives me a mask but it's not correct.  Mainly because I don't know when to stop the render?

During the main render I can see the noise percentage reducing in the stats tab, but when I'm just rendering a mask, it just says Unknown?

If i zoom in to the point where I can see the antialiasing, i can see the white mask constantly refining which means I'll never know when it matches the render for a perfect mask.

I feel like I've gone back to 2010 when it comes to masking :(

I appreciate it would be perfect has I set it up with the render, but that's not always the case.

2017-09-22, 09:10:51
Reply #7

RolandB

  • Active Users
  • **
  • Posts: 335
  • Corona fan
    • View Profile
    • Béhance portfolio
This is a problem indeed. I work for illustrators regularly and they need perfect masks, and with the CMasking_Mask element there is always a kind of "halo" around the mask, even after 300 passes in 6000 pixels...
What could be the solution ? 500-600 passes ?

Roland
Portfolio on Béhance
http://www.behance.net/GCStudio

2017-09-25, 07:55:21
Reply #8

urbanite

  • Active Users
  • **
  • Posts: 13
    • View Profile
It would be great if it solution for that. I am saving beauty with exr output and I am getting those "halo" effect too (background invisible). It is not a problem with vray, but as somebody mentioned before maybe it is connected with progressive/bucket rendering?

2017-09-26, 15:08:03
Reply #9

dj_buckley

  • Active Users
  • **
  • Posts: 869
    • View Profile
Well I found a temporary solution - switch the render engine to Vray, save a separate file, and use Rendermask in the vray file to get perfect masks.

2017-09-26, 15:16:03
Reply #10

dj_buckley

  • Active Users
  • **
  • Posts: 869
    • View Profile
Just to add to this.  Another variation of this problem.

I have my main 5000px render which rendered to 3% noise.  Let's say it took 5 hours and 184 passes.

I then needed to rerender just one object completely as the texture was wrong (in this case a sofa).

So I rendered just the sofa (render selected) - this took about 20 minutes and about 50 passes to get to 3% noise.

When I overlayed the new sofa onto the old one in the main render - using the alpha for the sofa, I again got a halo ....

2019-10-08, 23:40:41
Reply #11

arqrenderz

  • Active Users
  • **
  • Posts: 990
  • https://www.behance.net/Arqrenderz1
    • View Profile
    • arqrenderz
Is this solved? i have the same issue with masks on 5k renders, using render only mask option.

2019-10-09, 18:53:35
Reply #12

arqrenderz

  • Active Users
  • **
  • Posts: 990
  • https://www.behance.net/Arqrenderz1
    • View Profile
    • arqrenderz
I found it, just un-check the filtering on render elements

2019-11-18, 12:16:26
Reply #13

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 838
  • George
    • View Profile
I just want to revive this as it's still bugging me, I just can't seem to be able to get a clean mask that doesn't result in halos/black edges around the selection.
I normally render to a noise percentage.
I've got a 5000px render that I set to 3% noise.
I now need a mask for one of the objects.
If I open the file, and add those objects to a monochromatic CMasking_Mask element, tick render only masks, and hit render, it gives me a mask but it's not correct.  Mainly because I don't know when to stop the render?
During the main render I can see the noise percentage reducing in the stats tab, but when I'm just rendering a mask, it just says Unknown?
If i zoom in to the point where I can see the antialiasing, i can see the white mask constantly refining which means I'll never know when it matches the render for a perfect mask.
I feel like I've gone back to 2010 when it comes to masking :(
I appreciate it would be perfect has I set it up with the render, but that's not always the case.

In cases like this it would be preferred if you render and export the masks separately, depending on scene complexity I'd say 100-150+ passes always worked for me personally, even on 5000+ resolution. For the moment the masks seem to be linked to the noise limitation constrain when rendered with beauty. And while beauty might look fine with a minor de-noising  and scene noise limit at 3%, that can be achieved in 10 passes (for very simple scenes), the edges on certain elements won't look great.

We are looking more into this issue for further improvements, issue has been reported.

(internal id=424033922)
George Karampelas | chaos-corona.com
Chaos Corona QA Specialist | contact us

2019-11-18, 15:04:32
Reply #14

dj_buckley

  • Active Users
  • **
  • Posts: 869
    • View Profile
Thanks for the speedy response - just over 2 years not bad haha