Author Topic: Artifacts around edges of render selected region  (Read 7291 times)

2017-01-08, 20:25:47

Nate101

  • Active Users
  • **
  • Posts: 33
    • View Profile
Hi,

Working on a script that utilizes the "render selected" functionality in Corona and having some issues getting a clean output.  I put together an illustration below:

 

In image A I rendered the whole scene.  The outer circle has a green material and the inner has a gray.  In image B, I changed the material of the inner circle to green and enabled "render selected" in Corona.  As you can see the output image has some artifacts where the inner and outer circles meet (looks like some of the old gray material is still showing through).



In image C I rerendered the whole image (ie "render selected" turned off) with both the inner and outer circles in green and the artifacts disappear.  Am I doing something wrong or is this just a limitation of the "render selected" functionality?  I am using Corona v1.3 if that is relevant.  I thought the issue might get better with additional passes but that doesn't really help.
« Last Edit: 2017-01-10, 13:28:13 by Nate101 »

2017-01-10, 17:44:14
Reply #1

Nate101

  • Active Users
  • **
  • Posts: 33
    • View Profile
I guess nobody else has had this issue?  Was going to try some different ways of selecting the inner circle (with object ID, include/exclude list, etc.) and see if that made any difference.

I've been noodling on the problem a little more, and realized all I really need is to expand the render region by a couple pixels in all directions.  It's almost like the region Corona is drawing around the inner circle is cut too tight (like in Photoshop when you need to increase the tolerance of the magic wand tool).

Even if I could just select a square region that fully encompassed the inner circle that would accomplish my goal.  Is there anyway to automate that process?  Basically create a square render region that is sized to the "extents" of a selected object in the scene.

2017-01-10, 18:25:01
Reply #2

mferster

  • Active Users
  • **
  • Posts: 525
    • View Profile
Yah I've had this issue before too. But I just ended up using render region exclusively instead. Unfortunately... I may be wrong, but I'm pretty sure there wouldn't be a way to translate an object selection to render region coordinates.

2017-01-10, 18:31:23
Reply #3

Romas Noreika

  • Active Users
  • **
  • Posts: 163
    • View Profile
    • romasnoreika
mferster - do you use max region rendering or corona region rendering. And for region rendering are you using passes limitation or the noise threshold instead?
RN

2017-01-10, 18:53:23
Reply #4

Nate101

  • Active Users
  • **
  • Posts: 33
    • View Profile
Yah I've had this issue before too. But I just ended up using render region exclusively instead. Unfortunately... I may be wrong, but I'm pretty sure there wouldn't be a way to translate an object selection to render region coordinates.

Thanks, unfortunately I have to render thousands of images so manually selecting an appropriate region each time isn't feasible. Wish there was a way I could just add some cushion to the "render selected" region that Corona is calculating.
« Last Edit: 2017-01-10, 18:56:46 by Nate101 »

2017-01-10, 21:33:25
Reply #5

mferster

  • Active Users
  • **
  • Posts: 525
    • View Profile
@Nate - hmmmm can you describe what you are planning on rendering?Is it an animation? If not Is it possible for you to render a backplate without the changing objects and then follow up the backplate render with your your changing element as an isolated render w/ shadowcatcher & alpha and then just comp the variations after the fact?

@Romas - I use the corona render region and i use a pass # threshold.

2017-01-11, 00:07:45
Reply #6

Nate101

  • Active Users
  • **
  • Posts: 33
    • View Profile
@Nate - hmmmm can you describe what you are planning on rendering?Is it an animation? If not Is it possible for you to render a backplate without the changing objects and then follow up the backplate render with your your changing element as an isolated render w/ shadowcatcher & alpha and then just comp the variations after the fact?

Not an animation, more of a configurator where I need to render every combination of materials the product could be configured with (and from multiple angles).  Was hoping to utilize render selected to make the rendering process more efficient but I need the output to be pixel perfect.

2017-01-11, 18:09:41
Reply #7

mferster

  • Active Users
  • **
  • Posts: 525
    • View Profile
In that case I think it would end up being faster for you if you isolate and render each element with the different material variations and then making the different combinations in post. Instead of rendering 1000 individual images you would only need to render like 15.

*I've attached some examples
« Last Edit: 2017-01-11, 18:34:27 by mferster »

2017-01-11, 19:45:51
Reply #8

Nate101

  • Active Users
  • **
  • Posts: 33
    • View Profile
*I've attached some examples

Thanks for the thoughtful response and the illustrations.  I actually am employing post-processing in a similar fashion to what you are describing (to bring the render load down from millions of images to thousands ha) but maybe not as efficiently as what you're proposing.  How did you render this image, for example:



Did you just turn off the visibility for all the other elements in the scene?  Do they still cast shadows, reflections, indirect illumination, etc. upon the yellow backrest?  How would that work if there was another object in front partially obscuring the yellow backrest?  For my purposes, the backrest has to render identically to how it would have if I was rendering the whole scene.

The script I wrote would have rendered the entire scene (including the rest of the chair), and used a c_mask for the backrest to "extract" it in post processing.  I was hoping to implement render selected so I could isolate the backrest during the render process and not be forced to render the rest of the chair (which gets discarded in post anyway).  Maybe what you did here accomplishes the same thing?
« Last Edit: 2017-01-11, 20:13:46 by Nate101 »

2017-01-11, 21:44:02
Reply #9

mferster

  • Active Users
  • **
  • Posts: 525
    • View Profile

Did you just turn off the visibility for all the other elements in the scene?  Do they still cast shadows, reflections, indirect illumination, etc. upon the yellow backrest?  How would that work if there was another object in front partially obscuring the yellow backrest?  For my purposes, the backrest has to render identically to how it would have if I was rendering the whole scene.

The script I wrote would have rendered the entire scene (including the rest of the chair), and used a c_mask for the backrest to "extract" it in post processing.  I was hoping to implement render selected so I could isolate the backrest during the render process and not be forced to render the rest of the chair (which gets discarded in post anyway).  Maybe what you did here accomplishes the same thing?

Yes i just toggled off 'visible to camera' in the object properties for all but the individual object. They still receive/cast shadow and reflections as if the entire scene is visible. If you have something in the foreground that obscures the another object in your scene you would need to render that element too and just layer it over top in your post production. I have yet to mention this, but the problem with this method is that it becomes significantly more complicated if you have prominent reflections in your scene because you have to account for those too, and may end up not being feasible...

2017-01-11, 21:55:48
Reply #10

Nate101

  • Active Users
  • **
  • Posts: 33
    • View Profile
Yes i just toggled off 'visible to camera' in the object properties for all but the individual object. They still receive/cast shadow and reflections as if the entire scene is visible. If you have something in the foreground that obscures the another object in your scene you would need to render that element too and just layer it over top in your post production. I have yet to mention this, but the problem with this method is that it becomes significantly more complicated if you have prominent reflections in your scene because you have to account for those too, and may end up not being feasible...

Thanks that is helpful, I'll mess around with your approach and see if its more compatible with what I've been doing.  Reflections, like you said, are another hurdle I need to tackle.
« Last Edit: 2017-01-11, 22:04:25 by Nate101 »

2017-01-13, 15:37:50
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13707
  • Marcin
    • View Profile
Even if I could just select a square region that fully encompassed the inner circle that would accomplish my goal.  Is there anyway to automate that process?  Basically create a square render region that is sized to the "extents" of a selected object in the scene.
I'm a bit late here, but what about 3ds Max native "auto region selected"?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2017-01-13, 20:10:04
Reply #12

mferster

  • Active Users
  • **
  • Posts: 525
    • View Profile
Oh wow Maru, never even realized that button existed! Dang, learn something new everyday.

2017-01-14, 03:50:26
Reply #13

Nate101

  • Active Users
  • **
  • Posts: 33
    • View Profile
I'm a bit late here, but what about 3ds Max native "auto region selected"?

Yeah that is a new one for me for too.  Thanks for the tip will try it out tonight.
« Last Edit: 2017-01-14, 06:54:43 by Nate101 »