AWS Thinkbox Discussion Forums

Draft comping plate with rendered element.

Hi,
Im trying to make certain render element and the plate of the shot to be composited in the same draft,but for some reason when I put lets say the element(exr) in A slot (think of Nuke merge node) and the plate(jpg) in B slot Im getting only the element on black BG.When I switch the process I`m getting only the plate.When I try with two separate elements its fine. Heres part of the code:


element = ReplaceFilenameHashesWithNumber(element_pattern, frame_N)
element_read = Image.ReadFromFile(element)
element_read.Resize(width, height)

	plate = ReplaceFilenameHashesWithNumber(plate_pattern, frame_N)
	plate_read = Image.ReadFromFile(plate)
	plate_read.Resize(width, height)

	plate.Composite( element, 0.0, 0.0, CompositeOperator.OverCompositeOp)

Hi there,

I believe what you need to do is to set the alpha channel of your plate_read. You could try doing something like the following:

(…)
plate_read.Resize(width, height)
plate_read.SetChannel( ‘A’, 1.0 )

and composite your plate_read over your element_read like this:

element_read.Composite( plate_read, 0.0, 0.0, Draft.CompositeOperator.OverCompositeOp )

This should solve your problem. Please, let me know how it goes.

Kind regards,

Julie

Hi,
thank you for the very fast replay : >.I will try it tomorrow and post the result ^_^.

Edit:I tried it and it didnt work as intended T_T.I did the SetChannel(“A”,1.0) for the plate but when I composite it with OverCompositeOp A(plate) B(element) as suggested it didnt work I couldnt see my element so I changed the operator to PlusCompositeOp for a test and it really showed my element tho it was transparent due to the operation.When I tried to switch A and B same problem element was on black BG.

Fixed it.Forgot to switch the encoder to the plate after the comp : >.Thx for the help again : >.

Good to hear your problem is fixed!

Have a great day,

Julie

Privacy | Site terms | Cookie preferences