1
$\begingroup$

For example, if I'd like to render Normal/Parametric in Geometry, Generated/UV in Texture Coordinate, View Z Depth in Camera Data,

enter image description here

I am currently rendering one by one, is there any more convenient and faster way?

enter image description here

There are currently two questions:

  1. I don't know how to forbid the default /tmp/.png output, so there will be many unnecessary export operations(larger images take longer to export, but for /tmp/.png this is wasteful):
Saved: '...'       # [This is what I need]
Saved: '/tmp/.png' # [This is what I don't need]
  1. I can check the options in Cycles, but it is too slow, I only need to use Eevee(some geometric properties are not affected by the material, so there is no need for a Cycles engine)

enter image description here

$\endgroup$
7
  • 1
    $\begingroup$ Do AOV passes go some way to helping you out? $\endgroup$
    – Robin Betts
    Commented Nov 20, 2021 at 10:12
  • $\begingroup$ I upload an image here. When I test "Generated" in "Texture Coordinate" with a "Human Mesh", I found a slight difference between two settings: Left(Generated >> Emission >> Material Output) and Right(Generated >> AOV Output). Most of the pixel values are slightly different(i.e.: 0.1888,0.6513,0.4644>>0.1880,0.6538,0.4656), and the values of some pixels are quite different(not found in the default Cube and Monkey). What may be the cause of this phenomenon? $\endgroup$
    – LogWell
    Commented Nov 21, 2021 at 3:44
  • $\begingroup$ I can't be sure... curious. Is there a difference between Generated > Material Output and Generated > AOV ? (Skipping all use of Emission) $\endgroup$
    – Robin Betts
    Commented Nov 21, 2021 at 10:47
  • $\begingroup$ The result is the same as before. Link to the testing file. Here is a comparison of results. I choose "Texture Coordinate"(the result is between 0~1 and can be converted to color) and do a bbox-based transformation to restore the point cloud. The result of "Material" is correct, but the result of "AOV" has two problems: the first one is outlier, the second is the value of some rows to be the same, and the restored point cloud is incorrect(staircase effect). $\endgroup$
    – LogWell
    Commented Nov 22, 2021 at 9:17
  • 1
    $\begingroup$ I have updated the test file with code for restoring the point cloud. $\endgroup$
    – LogWell
    Commented Nov 22, 2021 at 11:25

1 Answer 1

2
$\begingroup$

AOV passes are the way to go (Edit: Actually View Layers might be the way to go).

The reason why you have artifacts in the AVO pass is because of numerical precision limitations.

I did two things to fix the problems you encountered in the file you provided.

First, I set the near and far clipping values for the camera to fit the character better and maximize the precision. Your values were (Start: 0.01 m, End: 10000 m). I set them to (Start: 2 m, End: 2.5 m).

Minor note: You can enable the viewport display limits in the camera properties to visualize the clipping values.

Second, I increased the number of render samples from 64 to 256.

With these two changes, the two EXR files generated by your Blend file now appear to be identical close enough for most purposes.

The Changes

(EDIT)

Since it appears there are still minor discrepancies, allow me to propose another solution.

Another way to tackle your problem is by using view layers. You can assign materials to linked duplicate objects and render each to a separate view layer. An in depth explanation for how to set it up can be found here: Material Overrides for view layers (per object).

This is how it looks in the compositor.

$\endgroup$
3
  • $\begingroup$ This method should work, and I'll implement it as a script. Two related videos: Blender 2.8 Beginner Tutorial : Collections, View Layers and render layers, Blender 2.8 Tutorial: View Layers and Render Layers as separate images || PS: 1. How to forbid '/tmp/.png' in script. 2. How to feed back the inconsistency of AOV and Material results in order to help more people who need numerical accuracy? AOV seems to be more convenient for scripting. $\endgroup$
    – LogWell
    Commented Nov 24, 2021 at 12:38
  • $\begingroup$ PS: 3. Another reason for using AOV may be that the Material Overide in the Multi View Layer needs to be performed in Cycles, but for speed, Eevee is what I need. $\endgroup$
    – LogWell
    Commented Nov 24, 2021 at 12:56
  • $\begingroup$ Answer to PS1: bpy.ops.render.render(write_still=False) $\endgroup$
    – LogWell
    Commented Nov 25, 2021 at 2:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .