Announcement

Collapse
No announcement yet.

Maxscript: Accessing gbuffer bitmaps in render effect plugin.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Maxscript: Accessing gbuffer bitmaps in render effect plugin.

    I'm trying to write a simple render effect plugin and I need to get the bitmaps from vray gbuffer channels. In plugin I'm able to read the rendered image using
    on preApply map do().
    For example I can access the proprietes from listner:
    ch1=VraySelfIllumination()
    but when I try to enable it doesn't work:
    ch1.enabled=true
    I tried to add manualy the channel and after rendering I'm still unable to access the proprietes and the bitmap too:
    map=ch1.bitmap
    display map

    I know that I'm doing something wrong, I'm stuck.

  • #2
    From MaxScript, you need to use the RenderElementMgr interface to actually add the newly created render element to the list of render elements for the current renderer. Just creating the render element does not do this automatically.

    So in your case, you also need to add this code:
    Code:
    mgr=MaxOps.GetCurRenderElementMgr()
    mgr.AddRenderElement ch1
    Also note that render elements are different than G-buffers; both are accessed in a completely different way.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment

    Working...
    X