[Bf-committers] Layer system

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Dec 21 15:52:31 CET 2007


Hi,

I'd say that for 3d view drawing and creating the render database, layer check performance is pretty much a non issue. But do keep in mind that this layer checking is also done in the renderer, where a slow layer check might become a performance issue. For example when raytracing shadows, for each ray, the code has to check for all intersecting faces if they are on the same layer as the lamp.

The design shouldn't be limited due to performance concerns, but please do keep in mind that the layer system is used for different purposes, like render layers and groups. And that objects can be on multiple layers at the same time (this is a feature, not an accident).

Brecht.

>----- Oorspronkelijk bericht -----
>Van: Timothy Baldridge [mailto:tbaldridge at gmail.com]
>Verzonden: vrijdag, december 21, 2007 03:45 PM
>Aan: 'bf-blender developers'
>Onderwerp: Re: [Bf-committers] Layer system
>
>Actually linked list would probably be the best way, as objects that
>do not exist on the layer being rendered wouldn't even need to be
>iterated over. This would most likely be the fastest method since
>there are no comparisons and hence no branches (except at the end of
>the for loop). So we have
>
>for (lstelm = lststart; listelm = listelm->next; listelm != NULL) {
>      drawobj(listelm->obj);
>
>}
>
>Timothy
>
>-- 
>If you put tomfoolery into a computer, nothing comes out but
>tomfoolery. But this tomfoolery, having passed through a very
>expensive machine, is somehow ennobled and no one dares criticize it.
>(Pierre Gallois)
>_______________________________________________
>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