Jump to content

Aliasing and Image Planes


protean

Recommended Posts

Hi,

Firstly I'm sorry for the poor image but I hope it will illustrate the problem. Also attached is the comp file plus passes.

It seems that when we try and combine passes from our shader setup that there seems to be different results in the edge aliasing between objects, most noticeable around objects with high contrast in either diffuse or colour passes. Having tested by outputting diffuse lighting passes (ambient, diffuse and irradience) pre-multiplied with the colour (and therefore dispensing with a separate colour image plane) the effect is much less noticeable if at all.

[edit] I should ad that the effect only appears when the lighter object is behind the darker one so is there some kind of bias related to anti aliasing?

What I'm wondering is if this is a limitation of multipass rendering (particularly with separating the colour from diffuse) or if this can be overcome within Houdini magikery? It seems that, by default at least, it is a limitation.

post-1428-125717420884_thumb.jpg

renderPassesHou.rar

Edited by protean
Link to comment
Share on other sites

Hi Protean,

you can specify in your Mantra rop, under Properties--Output tab: Extra Image planes.

you will call your Shader Exports in the "VEX Variable".

and will render them as Extra Planes to your image file.

Most shaders have Exports already such as "diffuseExport", "paintExport" but you can easily add your own Exports in any shader by just putting an Extra parameter VOP, name and call it from your rop as an extra ImagePlane.

Now each plane you will specify will have options for different "Sample Filter" and "Pixel Filter" rendering.

As you can see in the image attched.

If both plans set to same aliasing method, results should have the same edges!

Good luck problem solving this.

Best,

Ronen.

post-3649-125718329173_thumb.png

Link to comment
Share on other sites

Hi Protean,

you can specify in your Mantra rop, under Properties--Output tab: Extra Image planes.

you will call your Shader Exports in the "VEX Variable".

and will render them as Extra Planes to your image file.

Most shaders have Exports already such as "diffuseExport", "paintExport" but you can easily add your own Exports in any shader by just putting an Extra parameter VOP, name and call it from your rop as an extra ImagePlane.

Now each plane you will specify will have options for different "Sample Filter" and "Pixel Filter" rendering.

As you can see in the image attched.

If both plans set to same aliasing method, results should have the same edges!

Good luck problem solving this.

Best,

Ronen.

Thanks, this is how we export the Image Planes. All the pixel filter setting and sample filter settings are the same for every plane. All I can think of is that individually filtered passes can't ever add up to the beauty pass.

John

Link to comment
Share on other sites

According to SESI it's a limitation. The problem is quite subtle in your example, but we've stumbled across some glaringly different renders recently... making me wonder what the point of multipass rendering is if it looks so different?

bah humbug.

M

Link to comment
Share on other sites

According to SESI it's a limitation. The problem is quite subtle in your example, but we've stumbled across some glaringly different renders recently... making me wonder what the point of multipass rendering is if it looks so different?

bah humbug.

M

Indeed. The example isn't that extreme but I have others :) the greater the contrast and the motion blur the greater the problem. It is better with lighting passes premultiplied by the colour but you sacrifice lighting tricks in post and various other flexibility. At least I know it's not just me though I'd like to be sure exactly why :)

Cheers

John

Link to comment
Share on other sites

Hi John,

I would be interested in seeing the shader you use to get the passes shown.Also by chance have you spoken to SESI about this ?

rob

Hi there,

My theory is that it is impossible to reconstruct the beauty pass...

Basically, the beauty render is made by taking the result of the entire shader and samples taken for aa and motion blur purposes based on the result of the entire shader.

We cant reconstruct the way the samples were combined, because in the individual pass the AA and motion blur is the result of samples taken within the same pass (it has no idea what the others look like). So, when we add/multiply the passes in the comp the same way as the shader does we are producing a result where the aa and motion blur wasnt created the same as the renderer.

If sesi made it possible to spit out passes which comp correctly, these passes would probably have weird fringing all over the place when observed individually, and we probably would be able to touch them anyway without introducing fringing or incorrectness of some sort in the result.

I hope I'm wrong though :)

cheers

Serg

Edited by Serg
Link to comment
Share on other sites

And the whole mess is amplified by rendering with linearized color maps (for 2.2 output), so the bright areas eat into the darks way more than if we ignored the whole linear thang, which of course isn't gonnae happen.

Edited by Serg
Link to comment
Share on other sites

Hi John,

I would be interested in seeing the shader you use to get the passes shown.Also by chance have you spoken to SESI about this ?

I can't give you the shader as it's the company uberShader but I have done a couple of rough tests with a simple built-from-scratch shader that show the same issue. When I get time I (or maybe Serg :))will package a good example for you to look at. I will also get it sent to SESI.

Cheers

John

Edited by protean
Link to comment
Share on other sites

My theory is that it is impossible to reconstruct the beauty pass...

Basically, the beauty render is made by taking the result of the entire shader and samples taken for aa and motion blur purposes based on the result of the entire shader.

We cant reconstruct the way the samples were combined, because in the individual pass the AA and motion blur is the result of samples taken within the same pass (it has no idea what the others look like). So, when we add/multiply the passes in the comp the same way as the shader does we are producing a result where the aa and motion blur wasnt created the same as the renderer.

As far as I can tell, this is SESI's answer to it too. I can understand what the argument is, and I may even agree with some of it ;)... but to me, it completely invalidates the whole point of multipass rendering. Unless there are some specific use cases where it's ok to use it since the artifacts aren't that obvious. In my experience so far though the artifacts are always noticeable and the comp just looks wrong. Especially in motion blurred areas.

Oddly enough we're getting similar artifacts when we render something with a matte holdout (ie object B is a matte in object A's render). Trying to comp them back together doesn't work right. Same answer from SESI though.

Hopefully you guys can speak to SESI about this too, I keep hoping I phrased it wrong or something ;).

M

Link to comment
Share on other sites

I've managed to extract an alternative colour pass from the beauty by first subtracting specular and reflection and then dividing the result by the combined diffuse lighting passes. I can then use the result as a colour pass as usual. The results so far are very good.

If someone could tell me how to do a divide operation in compositing operators then I could post an example. (for some reason there is multiply, add and subtract nodes but no divide)

Cheer

John

Edited by protean
Link to comment
Share on other sites

Hi,

You want to use the premultiply node in cops and set it to divide by alpha. I cannot help thinking that some of the more extreme cases people get are somewhat connected to the way the shader has been constructed then assembled in comp.

rob

Link to comment
Share on other sites

Hi,

You want to use the premultiply node in cops and set it to divide by alpha. I cannot help thinking that some of the more extreme cases people get are somewhat connected to the way the shader has been constructed then assembled in comp.

rob

Hi

This isnt the divide the color by Alpha thing (the artefacts manifest in the interior of the image in areas of contrasting color).

What John did was extract the color from the beauty pass. As long as you save the beauty in some fp format (in our case 16fp exr's) it's possible to peel layers in the beauty pass by reversing the operations used to comp them together.

What this gives us is a color pass that has been weighted by all the others in motion blurred and aa areas, and that makes it safe to use in a multiply operation in the comp. As far as we can tell under close scrutiny in Fusion, the result of the comp is visually identical to the beauty pass.

cheers

S

Link to comment
Share on other sites

Hi Serg ,

This isnt the divide the color by Alpha thing (the artefacts manifest in the interior of the image in areas of contrasting color).

I know, my answer refers to a question posed by John

If someone could tell me how to do a divide operation in compositing operators then I could post an example. (for some reason there is multiply, add and subtract nodes but no divide)

I have always had the rule that what gets built in comp from the arbs should be an exact reflection of the way the shader comes togeather in Houdini.Hence my interest in the problem.

r

Edited by rob
Link to comment
Share on other sites

Hi,

You want to use the premultiply node in cops and set it to divide by alpha. I cannot help thinking that some of the more extreme cases people get are somewhat connected to the way the shader has been constructed then assembled in comp.

rob

Unless I'm missing something then it only allows me to divide by alpha. I want to divide rgb by a second rgb

John

Link to comment
Share on other sites

duh, sorry Rob, my bad.

yeah 2 days ago I was convinced of that too. It only holds true if you render without motion blur and aa.

what is strange is that there is zero info on the subject. Like the problem doesnt exist.

Is every one fudging it in comp like? or doing something like what we found yesterday? or simply not rendering separate color pass?

S

Edited by Serg
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...