Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] I need help! => Topic started by: 3dkobi on 2024-06-20, 10:08:27

Title: Layers compositing problem
Post by: 3dkobi on 2024-06-20, 10:08:27
Hi,
I have a jewelry store and I need to render 3 different images for my client:
1. Only the store (walls\floor\pictures on the wall\trees outside ect.) without the jewelry and without all the stands of the all the jewelry pieces.
2. Only the stands of the all the jewelry pieces without anything else.
3. Only all the jewelry pieces without anything else.
The client need the images in PNG with the correct alpha imbedded so that when he put the layers together the image will look perfect. Note that he can put them together only in "normal" mode (no linear dodge\screen or any other photoshop layer blend mode - he is doing that with python script for further use in a certain application)  - So I can't use the multipass system for that and export a PSD file. It has to be PNG.
Another thing to think about - for example, when rendering only the jewelry, I need that all the jewelry that is obscured by other objects (like the stands\store) will not be rendered.

The problem - No matter what I've tried, when I compose the Images There is a halo around the layer of the jewelry and the layer of the stands. Sometimes is a black halo, and in other methods is a transparent halo.
I've tried using the compositing tag and tick\untick the "seen by camera" on each render as needed.
I've also tried using the Include\Exclude option in the Corona render menu in the General settings tab.
Obviously I'm doing something wrong because it's only logical that I could do what I need....

So...What am I missing ? What is the correct way ?
Title: Re: Layers compositing problem
Post by: davetwo on 2024-06-20, 10:53:05
Caveat - I'm not an expert in compositing - but there are things I would do differently.
1. Dont export direct to PNG. Make your comp in PS and export the PNGs from there...'
2. If time is not an issue just render the whole image and (not render selected), then use multipass masks to make selections of what you need.
3. if you absolutely must render directly with an alpha, try checking the 'straight alpha' box. that should give you less halo
Title: Re: Layers compositing problem
Post by: 3dkobi on 2024-06-20, 11:04:58
* Can't use multipass. This has to be a PNG solution
* Already tried to tick the "straight alpha" - didn't help
Title: Re: Layers compositing problem
Post by: RecentSpacesSam on 2024-06-24, 11:23:10
try a direct visibility override with a more neutral colour than black
Title: Re: Layers compositing problem
Post by: James Vella on 2024-06-24, 12:51:11
You need to pre-multiply the alpha in post.
Title: Re: Layers compositing problem
Post by: maru on 2024-06-24, 18:15:16
How exactly are you rendering those separate objects like the cone in your example? Render selected or...?

I just tried this with 3ds Max + Photoshop and when an object is rendered (regardless of background color) and saved to PNG with alpha channel, it loads correctly for me, without any halos/fringes. 
Title: Re: Layers compositing problem
Post by: 3dkobi on 2024-06-25, 06:18:59
Thanks everyone, I've already rendered everything, The best solution I've found (Not perfect results but almost perfect):
1. Background layer: The background is rendered regular and on the stands and jewelry I've used a compositing tag and unticked "seen by camera"
2. Stands layer: I used the render selected and included the stands. On the jewelry I put a compositing tag and unticked "seen by camera"
3. Jewelry layer: I used the render selected and included the jewelry

I also ticked the straight alpha on all renders, at first I thought it didn't help but after close examination I saw it helped a little.

BTW, I talked to a colleague that worked on a similar project for the same company in 3dmax+corona and he did exactly what I did, the result he got was 100% perfect, for me it was only 99% perfect
Title: Re: Layers compositing problem
Post by: BigAl3D on 2024-06-26, 21:53:18
From Davetwo:  "1. Don't export direct to PNG. Make your comp in PS and export the PNGs from there...'"

I don't think you understood what he suggested. Export using Multi-Pass to PSD layers. In Photoshop, turn on one layer at a time and export to PNG with transparency.


The only times I've ever had a halo issue, was when using a Sky Object. I had to tick Not Seen By Camera for the sky. This way you get the lighting only. Don't know if you have a Sky or not.
Title: Re: Layers compositing problem
Post by: 3dkobi on 2024-06-27, 05:08:50
Actually I did understood what davetwo suggested, but as I wrote, I needed to render the layers separately and not render the whole image together and separate it after in post. This is because in the future the client will need to replace some jewelry pieces and he doesn't want to render everything just to replace several objects