[Bf-committers] A contribution

Dan Brown bf-committers@blender.org
Tue, 29 Jun 2004 22:58:13 +0100

Kent Mein wrote:
> In reply to Dan Brown (dan@harthinian.com):
>>The first is a simple modification that is almost completed now. The 
>>ability to
>>save the depth buffer. 
> I would personally do it with a known format like tga and just make
> all 3 channels the z value, would make it more portable that way probably
> as well.

The Iriz+zbuf seems to do it like that, 8 channels, 1 each for bits 0-7, 8-15, 
16-23 and 24-31 and 4 channels for RGBA. I wanted to save floats though, mainly 
because OpenGL and Direct3D use floats internally for their depth buffers and it 
would be more in keeping with that for people to use. Using tga though means it 
is easier to visualise quickly for testing.

>>The second is a bit more involved. It is to upgrade the Empty system to 
>>allow both a few lines of meta data and a few different Empty primitives 
>>(point with radius, plane, triangle, quad).
> What extra data do you want, and why not just use a mesh that is in the
> shape you want in place of an empty?  Just make all of the shapes in
> a different layer and lay them out.  Then users just goto that
> layer and duplicate them and goto town.
> (For the meta data you could just attach properties to that mesh no?
> The only real reason to use an empty is you just want a position and nothing
> else.  There is nothing that says you have to have any faces on a mesh you
> have it can also just be a collection of points, and it would probably
> simplify your life a bit.  ;)

The extra data is in the form of text fields. So each empty would have 4 (for 
example) fields that could be used when loaded into a game, so an Empty point 
primitive might represent a enemy spawn point in the game. You could store what 
kind of enemy, how often, difficulty, etc all inside that 1 primitive with. It 
just keeps all the data together.

I am using normal meshes now for a hidden low-poly collision version of the 
scene now which works fine, but being able to attach extra data would be very 
handy (full location name, local gravity, stuff like that).

Points with a radius would probably be the most useful thing. It wouldn't use up 
the resources of a mesh sphere and can be used for things like damage zones, 
sound limits, visibility, character limits, etc.

> Kent