[Bf-committers] Ray option make slow render with scene using only shadow buffer lamps

Stephane SOPPERA stephane.soppera at wanadoo.fr
Fri Dec 23 16:23:38 CET 2005

> Since nobody seem to have a clue, I'll have to invistigate that myself.


I'm done with my invistigation.
The slowdown comes from the following function in 
source/blender/renderconverter/intern/convertBlenderScene.c file:
static void set_fullsample_flag(void)
    VlakRen *vlr;
    int a, trace;

    trace= R.r.mode & R_RAYTRACE;
    for(a=R.totvlak-1; a>=0; a--) {
        vlr= RE_findOrAddVlak(a);
        if(vlr->mat->mode & MA_FULL_OSA) vlr->flag |= R_FULL_OSA;
        else if(trace) {
            if(vlr->mat->mode & MA_SHLESS);
            else if(vlr->mat->mode & (MA_RAYTRANSP|MA_RAYMIRROR|MA_SHADOW))
                vlr->flag |= R_FULL_OSA;

You can notice in this function that as soon as ray button is on (trace 
is TRUE), if the material has the "MA_SHADOW" flag (meaning it can 
receive shadows), then the material is considered to be FULL_OSA.

That explains the slow down. If I manually flag the two materials in my 
test scene with "Full OSA" and render them then it will take one minute 
even if Ray is not pushed, instead of the 10 seconds.

That also explain what Alexander has seen for textures that looked 
crispier when "Ray" is on.

So Jean was right, for most materials (since the shadow button is 
usually pushed) having Ray pushed make them rendered "Full OSA" even if 
the option is not set.

I can't find the documentation about "Full OSA" so I don't know if this 
behavior is wanted or not.
Where is it in the release logs Jean?

Moreover, I don't know if most user want this "automatic" full OSA. 
Personnaly I'd like to have the choice without having to composite my 
scene with a specific pass for ray-traced shadows were I render them 
with basic (ie not textured) materials. Can't ray-traced shadows be 
rendered in "Full OSA" without the material itself be rendered this way 
(textures would only be evaluated once).?


More information about the Bf-committers mailing list