[Bf-committers] Layer system

Ken Hughes khughes at pacific.edu
Fri Dec 21 22:43:30 CET 2007


Not sure if you visit the IRC channel, but it might be better/faster to 
hash out details of this before or after one of the Sunday meetings.

Ken

David Bryant wrote:
> That makes a lot of sense.I agree 100 percent.
> Hope we can talk more to solidify the layer code to be solid and not just 
> hacking it through.
>
> ----- Original Message ----- 
> From: "Bob Holcomb" <bholcomb at mak.com>
> To: <bf-committers at blender.org>
> Sent: Friday, December 21, 2007 8:09 AM
> Subject: [Bf-committers] Layer system
>
>
>   
>> This never made it on the ML from before since I used my work account
>> (naughty me).
>>
>> I just don't want it be a premature optimization (or feature in this
>> case).  I've seen a lot of talk about expanding the layers, and
>> comparison to Maya/Lightwave, but I haven't seen empirical evidence to
>> support that 20 layers is not enough.  Is it truly a problem?  How many
>> layers is reasonable?  What do the Peach guys think-they're probably
>> pushing blender harder than the average user.  I personally would
>> probably lose stuff given 999 layers to choose from.
>>
>> Edit:  After talking to Cambo on irc, he says that people routinely need
>> more than 20 layers, plus some other considerations.
>>
>> That being said, bit fields are great, but they come at a cost.  If we
>> want named layers and more than 32 of them, why don't we create an array
>> (or linked list) of layer structs that has a list of the objects in the
>> layer.  The layer struct itself can have data (like a name, visible) and
>> then can point to all of its objects.  This way the object doesn't need
>> to worry about what layer it is on, the layer struct does that.
>>
>> The code:
>>
>> if (objectmask & viewmask) {
>>    draw_object();
>> }
>>
>> becomes:
>>
>> for (x = 0; x < numLayers; x++){
>>  if(objectlayer[x]->active){
>>    draw_objects_in_layer();
>>  }
>> }
>>
>> Also, I would be seriously surprised if looping over an array of 1000
>> layers  every redraw event  has an impact on the user experience (not
>> frame rate).  I have yet to be able to find anybody who can tell the
>> difference between 60 fps and 6000 fps.  I recommend  1) determining if
>> there is a problem (edit: yes there is) 2)coming up with a good
>> (flexible, easy to maintain) solution that works and then 3) optimize
>> only if is identified as a bottleneck.
>>
>> Just my 2 cents.
>>
>> Cheers,
>>
>> Bob
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers 
>>     
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
>   



More information about the Bf-committers mailing list