All posts related to V2
User avatar
By oz42
#342440
Now, it's entire possible that I'm doing something wrong but I'm sure it used to work and I'm using the same workflow as before. [I'm using the Softimage 2012 plugin with Maxwell 2.5.1]

I want to composite a Maxwell render onto a background plate, complete with shadow. I've created my model, added a ground plane with a shadow material. I've then rendered out the colour, alpha and shadow channels. I've then used Tom's Photoshop action to cut-out the colour image from the background using the alpha channel. I've added a Photoshop layer below this and filled it with white (ultimately it will contain an image). I've then shift-dragged (to make sure it is exactly centred) the shadow channel image on top of the colour channel layer and changed it's blend mode to multiply.

This should work (and I'm sure it did in the past) but there is a white halo around the resulting image, caused (I think) by the shadow channel not containing data in the anti-aliased fringes of the colour image - the shadow channel only seems to contain non-white pixels outside of the alpha channel's 'positive' (non pure black) area!?

Image

In a possibly related issue I've also noted that sometimes the shadow channel has very strange results. In the following example you can see that there is odd shading variation in the shadow channel under the lid, bottom left (it almost looks like a reflection channel!?). The floor material is a shiny surface with the shadow channel turned on - I'm not sure if the shininess may be causing the problems? Does a shadow material need to be a one layered, lambertian mxm?

Image
Image

Any help on what I'm (or Maxwell's?) doing wrong would be greatly appreciated.
Last edited by oz42 on Tue May 10, 2011 1:33 pm, edited 1 time in total.
User avatar
By JamesColeman
#342455
On the first issue, you may know this technique already, but my workflow is to use a file format where an alpha can be embedded, like .png, then choose embedded instead of separate in the render options output mode, to save on compositing in Photoshop.
User avatar
By oz42
#342463
James,

thanks for the reply. I must admit, I've always used a separate alpha channel but I'll give this a go and see if it improves things? Not sure if it will clear up the shadow channel issue??
User avatar
By Mihai
#342485
Richard, can you send me the render output files?

For the reflective shadow pass, I'd think that's normal since the high reflectivity of the object makes the shadows brighter in some places...it's just the difference between what is reflective, what is diffuse when determining the "shadow" part of the shadow channel. If it would have given you just a straight diffuse shadow (as if the object material was a simple lambert), the shadows wouldn't have been too accurate no?
User avatar
By oz42
#342487
Mihai,

thanks for getting in touch. I'll pm you the files from the children's play area.

For the tin renders, I would have thought that the actual shadow of the object would not have been effected by the shininess of the surface but only by the lights? I definitely think there is something wrong with the shadow channel in this respect. Here is another render from the same project and the reflective writing on the tin can actually be seen in the shadow channel! I'm sure this isn't right?

Image
User avatar
By oz42
#342489
Thanks for letting me know. Could the texture issue be related to the 'reflection' issue? I'm sure the partial reflection of the lid wouldn't show up in a realworld shadow? Could it indicate that the shadow object material need to be simpler (i.e. one layer lambertian)?
User avatar
By Mihai
#342513
There is a problem here but doesn't seem to show up all the time - a half pixel gap in the shadow channel. What you can do to make a proper composite is first render your alpha, objects etc with the floor hidden to camera. Then do a second render with the shadow option activated in the floor material, objects hidden to camera and floor hidden to camera. You will get the "full" shadow pass (without the white area where objects used to be). Then do the compositing as usual.
User avatar
By oz42
#342516
Thanks for the tip about hiding the objects, that should work. Trouble is, it means rendering twice - I was hoping to avoid that!

I'm glad you found the half-pixel gap issue - it confirms that I wasn't going mad! Is this a recognised bug that is on the todo list?
User avatar
By Mihai
#342538
Well it's not something that always shows up, it's because when you have the shadow pass cut off exactly where the alpha is, the AA will make it so there can't be a perfect match, and it will be more visible where shadow is composited with white background as in your example. I guess there are faster ways to work around this than rendering twice. For example where that small gap appears you can load a selection of the object, invert it, contract the selection by a pixel (haven't even checked if it's possible to contract it by 0.5 pixels in PS) and paint in those areas quickly with the same tone as the shadow. Or perhaps you don't need to contract the selection, just paint.
User avatar
By tom
#358322
There's no way to match an antialiased knocked-out shadow pass with the render pass without half pixel gap because, both render and shadow pass are antialiased against background, so the overlapping half pixel gap becomes visible. Makes sense? Alternatively try doing this in PS. Open any image, turn it into a layer, select some part of the image, cut and paste the selection into a new layer. You will see that irrecoverible half pixel gap.
User avatar
By simmsimaging
#358323
I must be missing something still.... I have the gap between the object and the shadow, shouldn't the antialiasing only be between the shadow and the object? Anyway, this kind of shadow pass is possible with other engines without that white line, so what would they be doing different to get around that?

Would it make any difference if the ground plane (catching the shadows) was *not* a matte object?

/b
Help with swimming pool water

I think you posted a while back that its best to u[…]

Sketchup 2026 Released

Considering how long a version for Sketchup 2025 t[…]

Greetings, One of my users with Sketchup 2025 (25[…]

Maxwell Rhino 5.2.6.8 plugin with macOS Tahoe 26

Good morning everyone, I’d like to know if t[…]