A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Object Buffer question
Posted: 01 December 2015 03:48 PM   [ Ignore ]  
Total Posts:  37
Joined  2008-06-17

I keep getting a slight gab with my object buffers. Is there a setting to stop that from happening?

Profile
 
 
Posted: 01 December 2015 04:53 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Shadowgin,

I guess After Effects, or are you seeing it in another comp-app?

What kind of gap? Time-wise, shadows-based or alfa?

If it is a seam around an object, you need to check you color management.

Without a scene file which has one or two objects in it that produces it, I can’t really help.

A description of how you use them might be helpful as well. To use a Buffer on an already masked object might also produce such a result.

Please provide more details. Thanks

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 01 December 2015 05:00 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  37
Joined  2008-06-17

Hi Dr Sassi

It’s being comped in photoshop.
I’m making elements for an illustrator.

There is a small gap in the alpha of the object buffer.

File Attachments
output_file.c4d.zip  (File Size: 163KB - Downloads: 152)
Profile
 
 
Posted: 01 December 2015 06:23 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for the file, Shadowgin.

I hope I was able to set the scene as you would have, most of the things were switched on or off.

Anyway, the problem with Photoshop is, that it can’t handle two Color Profiles at the same time. It is either linear or gamma. In the moment you merge the RGB to the Buffer files it becomes problematic. The rendering in C4D is always 32bit/channel. In the render settings I got, the RGB content is 8bit/channel sRGB and the Buffer is 16bit/channel linear. Not something Photoshop handles nicely. You can have only one or the other, in hi end comp work we need mostly both, image values and data values. Hence my suggestion to do it in format that serves both well (see below). Another problem with Photoshop since ever is the premultiplied material handling, and in a way, this is what happens here.

In a nutshell, think of the edge of an mask as a gradient. With 8bit/channel you have a maximum of 256 steps to provide a definition to that, but it is gamma based, so not really a similar step by step. With 16 bit/channel that step problem vanish, but combined with a linear version of the same information is like a bow and a straight line, it doesn’t match. It becomes even more of a problem if the edge of an object is already mixed with another, a mask can’t separate the mix anymore, as it is a single value with no separation of object a or b. If the mask is used for color correction of a single object for example, then the mixed values of that area become a huge problem. The only way, is straight alpha, more about below. The problem with object to object edges is, that if you Anti Alias them, they mix to a certain degree. If you shrink now one mask and the other one as well, to avoid the mixed material, you end up with a gap between both. Either way you have a problem, with that render at once and avoid straight alpha. Straight Alpha can have both objects. Here is the take system a great solution, BTW, e.g., for Matte Objects.

The checkboxes for Multi-Pass>shadow correction might help a little as well, test this case wise.
As well as well Anti Alias> Consider Multi-Pass

====

My tip for absolute professional work would be always to stay in 32bit/channel and keep it as long as possible. If the file gets too big (PSD needs to be below 2GB) go to PSB, which has shown for me over the last decade to be a more stable format than PSD. (My image work is typically min 16K wide, files are between 1 and 20 GB). Render each part as Straight Alpha. I guess that might be not suitable to do it for many parts in a complex scene. But straight alpha gives you zero problems with seams and is considered industry standard in VFX feature film work, as pixel will be delivered full and color correction is possible for each part very precisely. If you like to dive deeper into this theme, Pre-Multiplied is the key word to look up in VFX standard books.
Going with RGB and Buffer the 32bit/channel route will allows for a more clean conversion to gamma or integer material, and the seam will get noticeable smaller. Oversampling as discussed later might help here. As a side note, pretty all my comp work is based on edge-glow or edge reflection. In a nutshell, I find the edge in a new mask, and blur it inwards the object. Then I take the BG/FG with the given mask/comp and blur this in an copy. Then I apply the edge mask with the blur copy as Light-Wrap on top of it, adjust the transparency and get a very natural handling of the seam. CG results are mostly un-natural. (Not my idea, but a typical technique in VFX) This would eliminate even more the problem.

====

A more practical way would be to render and save in 32bit/channel. (I write per channel, as some people add 8bit four times and call it 32 bit, as in “.hdr/radiance” which is nothing that I ever would suggest for print work for example, it is the least format to deliver color!)
Render it all in one file and in Photoshop go then to 16 bit/channel and Adobe RGB. I would avoid sRGB during production as much as possible, it is a delivery format in my book; It has the smallest color gamut possible.

The only downside, going with the full provided bit-depth, is that values in the scene should be well controlled, as Anti Alias is not really equipped that goes way beyond 100% for one object and not the other. If you need a super white background, perhaps do it in post (Ps) later, which gives you more control—needless to say that the Background Object has only limited influence on opaque objects anyway.

Another way, if the objects have such an strong contrast, you render with a Compositing Tag>Matte Object on.

====

The quick and dirty way would beset the 100% luminance value to 0% for one render and back to 100% for the other render, then pick what makes the most sense. I had no images for all these tests. I rendered each possible variation, as I do not just answer from memory, and r17 and Ps might have changed something, so, if all of that is not helping, please contact the support. http://www.maxon.net/support/support-questions.html

Quick and dirty part 2 would be oversampling, but with 6K already that sounds not reasonable. (E.g., overample to ~24K and scale down, after setting the colorspace for both correctly.)

My best wishes

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 December 2015 03:07 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

I have here an one minute clip, how I render the file and how it is quickly assembled (compositing would be a little bit more, as mentioned above):

https://www.amazon.com/clouddrive/share/fXeihUwmdipvZJXh0HO5ipz9A8dGc4fdrWNeF0U8Mxa?ref_=cd_ph_share_link_copy

The movie clip example is in 100%, (not oversampled)

The file is attached here (link below), as well with an double oversampled render (200% to get the final result super clean in the targeted 100%). I have placed a one of my typical tests into the file—the red square—to see if the edge is clean. The link contains a scene file, radically stripped to the needed parts, and a psd file [crop] in 16bit/channel Adobe RGB. I have checked (to my knowledge) all possible options, so you might find that the edges checked off or on, but I saw no improvement here while oversampling.

https://www.amazon.com/clouddrive/share/TU97LDWehjxu1qyxMSTRbQROsqNnli1vcMsX5cRyckA?ref_=cd_ph_share_link_copy

I think that should be a sufficient workflow. I use here straight alpha, as you can see it on the jaggy line in the video clip. This gives enough material to use the buffer or alpha. All done with Compositing tag> Matte [black]

Below is a crop and jpg with the typical reduction in quality (8bit/channel and sRGB, downscaled, etc), I hope it supports a little bit to read here.

Again, it is not a problem of Cinema 4D, as Anti Aliasing merges along the edge, and a simple alpha can’t divide them back. Hence the effect that you describe as seam.

I have created this example on an 5K retina monitor, and it looks clean here.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 December 2015 04:38 PM   [ Ignore ]   [ # 5 ]  
Total Posts:  37
Joined  2008-06-17

Hi Dr Sassi
I still notice the small gap in your file. If the bg is white you see it. I may try doing a material ID to solve the problem. That maybe a work around.
When I have used the obj buffer I’ve know the issue but worked around it. It’s mainly since I have to pass the files off I wanted to see if there was a setting I was missing.

Thank you for all your help as always.

Profile
 
 
Posted: 02 December 2015 04:59 PM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Shadowgin,

If that is really visible to you and you need that precision, you need to oversample 4x times as mentioned above. But after going down to your target resolution and perhaps integer/gamma, you need to have them all separated very carefully before. Again, not possible from a single render with the target of Photoshop.

I can only try to explain it again. In any way you don’t use Straight Alpha with a per rendering separated objects and oversampling, chances that you get a something between the object is a given, hence the Anti Alias mixes e.g., 4x4 areas, and merge these 16 fields in one. With 8x8 up to 64 single squares per pixel. Which means with two objects you might have up to 2 times 64 values to create one pixel, and that mix should be know by two alpha channels (each only a single pixel and perhaps gamma based…) or two ID numbers etc. I doubt it! No way this can be retrieved back. I hope this little math make it clear now what you are asking here. IF one likes this precision, this would be the way.

Even with Straight Alpha, in the moment you go back to anything gamma based and integer I have no answer for you, it will have a certain amount of mix. Not a lot, and even in twice oversampling I and 32bit/channel I can see a hair line, really tiny.

As long you try in a single render you will not separate the Anti Alias mix. I haven’t seen any solution to that problem in the past two decades for that. Once two pixel areas are mixed in AA, a single pixel gray value can’t split it back to its value.

Take the psd that was in the file reduce it to 50% with gradient preservation, not sharping ( which make any seam more prominent) if you can’t see it then, 4times oversampling is your key then.

I know that there are a lot of ideas how to dilate or erode a mask, sometimes those methods fell like a sledgehammer. Given the nature of the request here, I would not even remotely think about such archaic procedures. I guess you agree. Details in masks do not follow procedural and global adjustments.

Typically with straight alpha and applied mask, which is then a premultiplied image, things can be retrieved, if then mask information is stored. It can not, however, dome with one image and and multiple masks.

I guess you need to talk to the support now, as I have given you all from my side. Anything else is a technical limitation, or a limitation of the way it is produced internally. Deep Compositing might have an answer for that, but that is not part of Cinema 4D nor Photoshop.

http://www.maxon.net/support/support-questions.html

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 December 2015 10:21 PM   [ Ignore ]   [ # 7 ]  
Total Posts:  37
Joined  2008-06-17

Thanks Dr Sassi

Yeah it just came down to clean up in photoshop. I don’t think anyone sees that line anyway since it’s being comped.
Don’t worry, all your information helped. I will use it in the future. I usually use AE with a mask feather to help.
Since I’m not the one doing the comping I just thought I would ask the question since I was out of ideas. I did try upping the anti alias but as we know that increases render time.
That was time I don’t have. As soon as I finish an object I get another request. I do monitor the render while I build the new stuff. Haha, now I’m rambling.

Thank you for always answering my questions. As always I learn a great amount from you.

Profile
 
 
Posted: 03 December 2015 01:21 AM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re welcome, Shadowgin, and thanks for going through the stuff.

I’m a firm believer in sharing what could be needed to know. I want to share as much as possible to give anything there could be needed to know. As it is a public forum I try to be detailed. I have not seen any use of these quick fix answers over the decades I’m doing this work, they are short sighted and only a temporally relief. They feel good for a short moment—but I fear they increase dependency instead of shrinking it.

As long as the tech is a concern, the art can’t evolve as it could, and with it so will be the quality limited. Like with a camera, if it is not all already in the muscle memory of how to operate it, the attention will get away from the things we like to capture in the first place. A 3D work has other dependencies, but I hope my little example makes it clear where I see the real support of an artist. There are many level of knowledge, and I hope we create the deepest level possible over time here. At least that is my wish to do so.

The theme of image compositing has some complexity, needless to stress how many books are given for that subject, and the endless stream of tutorials. ;o)
On the end, it is as usual just an flow of information.

My best wishes for your project.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile