Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] General Discussion => Topic started by: mitchino on 2021-04-30, 16:10:40

Title: opacity mask problem
Post by: mitchino on 2021-04-30, 16:10:40
I'm rendering a yoghurt pot. I want to create an opacity map so the top of the yoghurt fades away to transparency over a short distance. I have created this as a black and white map in Photoshop, blurred it, and applied it to the opacity channel. I'm getting an ugly darkening at the transparent edge of the mask. This doesn't happen if the map is not blurred.

This pic demonstrates the problem, to exaggerate it I've created a map with castellations.

How can I fix this and have the edge fading to transparency cleanly?

Title: Re: opacity mask problem
Post by: mitchino on 2021-05-01, 11:56:33
Anyone care to comment?
Title: Re: opacity mask problem
Post by: burnin on 2021-05-01, 15:27:58
idk and from description, undefined
so start by providing your test scene.

otherwise, does this look fine?

(https://forum.corona-renderer.com/index.php?action=dlattach;topic=33119.0;attach=147148;image)

16bpc EXR used for opacity / Pixel values show no darkening


Edit:
& Here's version using jpg for opacity.
(https://forum.corona-renderer.com/index.php?action=dlattach;topic=33119.0;attach=147150;image)


Edit2:
No PS here, I'm using GIMP ;)
Title: Re: opacity mask problem
Post by: mitchino on 2021-05-01, 22:35:35
yours looks fine yes

my material is uv mapped to a slightly conical shape, could you try yours that way?

Title: Re: opacity mask problem
Post by: mitchino on 2021-05-01, 22:36:47
looking at mine, I can't see the darkening on the inside of the pot shape at the back, only on the front faces
Title: Re: opacity mask problem
Post by: mitchino on 2021-05-03, 12:56:32
I've attached a zip file with a c4d file and an opacity map.

I just cannot figure out why this is happening.



Title: Re: opacity mask problem
Post by: mitchino on 2021-05-03, 12:58:06
How the file renders. The problem only visible on the cone.

Title: Re: opacity mask problem
Post by: mitchino on 2021-05-03, 13:41:18
Here's the problem with a newly created texture. Same material applied to a sliced cylinder primitive using cylindrical projection, and a plane using flat projection.

The cylinder does not show the edge problem, the plane does.

In fact the problem shows up on every mesh I've tried except a cylinder.

Title: Re: opacity mask problem
Post by: Beanzvision on 2021-05-04, 12:59:54
Hi, what happens if you enable "Clip" in the opacity channel? ;)
Title: Re: opacity mask problem
Post by: mitchino on 2021-05-04, 15:28:41
tried that - the soft edge is replaced by a hard edge
Title: Re: opacity mask problem
Post by: burnin on 2021-05-05, 18:37:33
My usual suspect is photoshop and how it handles things...

PS
attached file has a map made with GIMP
Title: Re: opacity mask problem
Post by: mitchino on 2021-05-06, 09:58:34
I can't render that file as I don't have Corona 7 with the new Physical material installed.

To be honest I've given up on Corona for this job and switched back to Octane - I have a deadline to meet.
Title: Re: opacity mask problem
Post by: burnin on 2021-05-07, 10:46:51
Well, you could simply test in your scene using included texture & next time start with your specs...

Enjoy
Title: Re: opacity mask problem
Post by: mitchino on 2021-05-09, 10:19:54
Could you use my c4d file showing the problem from earlier, and create a similar map in GIMP and see if it works on my cone mesh?