[Bf-committers] A contribution

Dan Brown bf-committers@blender.org
Sat, 03 Jul 2004 01:01:43 +0100


Campbell Barton wrote:

> See inline comment-
> 
> Dan Brown wrote:
> 
>> .zpic - Output by softImage from what I can tell and importable into 
>> AfterEffects, Combustion, and Photoshop. This is just a headerless 
>> file of floats, 1 per pixel. I didn't find any more info than that 
>> such as the range used and orientation but I will keep looking.
> 
> This format sounds cool :) very easy to impliment, could probably Make a 
> cinepaint plugin in no time as well as the existing support you mention.

I have now found a sample zpic file and viewer to play around with, so I will 
have a look in the morning to see if I can dissect it properly. As Ton mentioned 
though, there will be a loss of precision converting from the internal unsigned 
int format to a float. But it all depends on if either version are scaled to a 
certain range. If either is just from the camera center to the maximum allowed 
range then the precision may be a problem, but if they are scaled from near cam 
clipping plane to far cam clipping plane then it should be acceptable. It looks 
from the test Iris-Zbuf file I saved (there is a photoshop plugin to read them) 
that it may scale it to 24-bit, but I don't know if that accurately represents 
Blenders internals yet as I haven't tried dumping a raw buffer to look. Scaling 
it like that is common in games, but I don't know about non-real time 'proper' 
rendering/compositing systems.

>>
>> For integrating into Blender, I now think that a toggleable 'save 
>> zbuf' button in the Render panel would be better than adding it as a 
>> new image file format that just saves the depth component. Mainly 
>> because if you render an animation that takes several minutes/hours, 
>> you will only need to render it once that way.
> 
> If this is the case then I think you'll need a NONE image format bacause 
> it IS possible youll have a rendered animation (from a prev version pf 
> blender for instance) and youll want just to render the Zbufer.

Two ideas to combat that - It looks like there is room for a 'Z' button next to 
the BW/RGB/RGBA group just underneath the file format selection. If that was set 
(therefore deselecting the other 3) then it would save just the zbuffer. It may 
be confusing though because it would look like it doesn't save it for the others 
then. Another option would be a option in the setup panel that toggles the 'Save 
zbuffer' button between meaning save it as well or save it instead.

The time saving wouldn't be considerable anyway unless you turn off all 
materials, lights, refraction, etc as it still has to render the image to 
generate a zbuffer. It would save disk space though.

Dan

> - Cam