Author Topic: G-Buffer channels to RPF or OpenEXR  (Read 1905 times)

2017-11-25, 06:19:20

AndyQ

  • Active Users
  • **
  • Posts: 14
    • View Profile
Hi all. I'm trying to render an animation to a sequence of RPF (preferable) or OpenEXR frames, but I don't seem to be able to create G-Buffer channels (I'm wanting Z-depth, Object ID's, Coverage). I used to do this a lot with Mentalray, to RPF files, then process them in After Effects (e.g. object specific effects, depth-based effects like fogging or blurs). Does Corona correctly save the G-Buffer channels with RPF/RLA/OpenEXR files? Another problem I've got with the simple 3D logo scene I'm working on is that with RPF output I'm getting "black cracks" and artifacts around the geometry. This doesn't show up in the Corona preview or in output to other file formats (rendering to TGA or OpenEXR looks perfect in the RGBA channels).  Any ideas?

2017-11-25, 10:55:21
Reply #1

mraw

  • Active Users
  • **
  • Posts: 162
    • View Profile
Hi. You really should render exr and use the render-elements. RPF/RLA is a dinosaur- I'm surprised that anyone still uses it all. No wonders you're encountering problems.
Maybe I'm wrong and there are still reasons to work with the G-Buffers. In this case I would love to know why.

2017-11-25, 14:52:32
Reply #2

pokoy

  • Active Users
  • **
  • Posts: 1885
    • View Profile
...I'm getting "black cracks" and artifacts around the geometry...
I can't say for sure but I've seen it a few times and I believe it's sharpening/blurring causing this. If you use it try disabling and see if that helps.

2017-11-25, 17:54:53
Reply #3

AndyQ

  • Active Users
  • **
  • Posts: 14
    • View Profile
Hi. You really should render exr and use the render-elements. RPF/RLA is a dinosaur

I have started doing that, running some tests yesterday. The main reason to use RPF is compatibility with After Effects: doing effects in AE, the 3D channel effects (fog, DOF etc.) recognise the pre-defined G-Buffer channels, whereas OpenEXR has arbitrarily named channels which these effects were not built for. There are ways around this it seems but it is taking a lot of stuffing around. The other reason is file size - I'm trying to keep the frame sequences as light as possible, and for my application 8-bit-per-channel colour is enough. Apart from that, all of the output options let you select G-Buffer channels to include in the output files, so if Corona is not doing that it's negligent and effectively a "bug". The least that should be done is some warning message to say G-Buffer channels will be omitted, the next level would be modifying the file output dialogues to remove those options, the best method would be to support the capabilities of the file format. If Corona will render to RPF then it should support the RPF channels.

2017-11-26, 09:49:45
Reply #4

AndyQ

  • Active Users
  • **
  • Posts: 14
    • View Profile
Further to this, using "Render elements" and the "CMasking_ID", I can't see which suboption passes the G-Buffer "ObjectID". Is this the wrong render element? Am I interpreting it wrongly? the wiki at https://corona-renderer.com/wiki/render_elements only mentions two possible ID options (PrimitiveID and MaterialID), however there are four options and I'm not seeing that they relate to my object ID. if I have a bunch of objects with the same ObjectID they appear different "colours" in the preview of the CMasking_ID channel, regardless of which option I choose. Material ID does work as expected, but that's not the ID I want to use.