![]() PNG is perfectly fine for a "transport" data format. The information suffers no distortion and is as precise as when you rendered your scene in the first place. OpenEXR is a format that has been designed to store linear data and has no issues with values larger than 1. The values will have been re-mapped yet again to a point that will not reflect the proper scale of the distances represented on the Z depth information. Even on 16 bit where you can have a much larger different gradations from black to white (4096) you might find that values that are close together are no longer represented.īut the main reason not to use display referred formats like PNG is that those formats presume to be encoding values in sRGB, that is not a linear format anymore, but has a transfortmation curve in which 3+3 might not equal 6 anymore. Saving to an 8bit format will result in 255 possible values, greatly reducing the precision of the information. ![]() But when you save as an image format you are re-mapping those values yet again to a very limited number of values. Normalizing the image to make it fit on a 0 to 1 scale is really not the problem (because even though normalizing has moved the values for the scale, it has kept the values linear). Normalize only when you want to make sure that the Z pass is working, or to use it on programs that cannot deal with the Z channel properly and need the information as an image in grayscale. Inversion is a reversible (invertible) operation ( source)īecause the information contained can then be viewed as an image, since it has values from 0 to 1 that can then be expressed as an image. ![]() All other numbers in between are also inverted. The maximum value is set to 0 and the minimum value is set to the maximum value. The values for absolute distance are converted in relative values and from then on you have to do conversions to find what the real values are. The real effect of doing this is that the scale is both compressed and offset from the real values. The minimum and maximum values are set as 0 and 1 respectively and all other values are spread in a linear scale in between. What happens when you normalize the Z pass? The main issue is that Z depth information, will generate values larger than 1 and image formats cannot deal with values larger than 1 (where 0 is black, and 1 is white) The Z depth values work in a linear scale, meaning that 6 will be twice as far than 3 and one half of 3 will always be 1.5 The minimum and maximum value are clipped according to the camera's start and end clip distances. The camera is the 0 on the scale and the units used for its values are the working units set for the scene (blender units, meters, cm, inches, etc). The Z pass is the absolute distance from the camera to objects in the scene for every given pixel on the image. The Z pass should not be thought of as an image, since its values do not fall into the parameters set for most image formats. Long Answerįirst let's separate the apples from the oranges: Just plug the Z information to a file output node, and save as OpenEXR. The only way to get a Z depth pass without distortion is by avoiding any kind of processing except inversion or normalization. OpenEXR is the only format that will allow you to use the linear information from the Z pass. If you are looking for accuracy, Do not save the Z pass as PNG or any other display referred format.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |