Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

custom render targets for MRenderOverrride

custom render targets for MRenderOverrride

Anonymous
Not applicable
610 Views
1 Reply
Message 1 of 2

custom render targets for MRenderOverrride

Anonymous
Not applicable

Each render operation(MRenderOverride) can override writableTargets() and targetOverrideList() methods. How does Maya know which of them are color targets and which of them is depth target. Maya needs to know to bind them as output for that render operation.

 

Suppose I return this array from targetOverrideList(), [color1, color2, color3, depth, color4, color5]. Also suppose I return 4 as count and 2 as first writable target from writableTargets(). What and why does Maya bind as targets for this operation?

 

Another related question. If true is returned from getInputTargetDescription(), then Maya creates a render target from the description given and associates it with the given name. What happens if I return false? Docs state something about writing  this input to color or depth target, but I don't get it.

0 Likes
Accepted solutions (1)
611 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Ok. Me thinking that Maya uses MRenderTargetDescription::rasterFormat() to see which of them is depth target and bind that target to depth. Remaining color targets are bound to a series of render target slots. I have overridden the MSceneRender::targetOverrideList() and returned a list of standard targets in reverse order. Yet my plugin works.