[Radiance-general] Reflection vs specularity

atelier iebele abel atelier at iebele.nl
Fri Jul 22 18:40:16 CEST 2005


Hi Carsten,

Many thanks for your reply, I am happy to hear that at least the problem 
I am facing is something that is recognized.
Alhough you clearly described why  the material I work on is hard (or 
even impossible) to model in Radiance, I continued searching for a solution.

First let me list all the 'requirements' for the material of the floor:
1. Distant objects seem to reflect more as nearby objects, in term of 
renderings: the reflection changes as a funtion of the angle between ray 
direction ad surface normal
2. Some roughness/noise is visible at a distance, while nearby the 
surface is just dull.
3. The color changes somehow as a funtion of the distance to a bit more 
blue/less saturation
4. Specular highlights are very soft and relative to the 'eye-position'

I tried to put these requirements in a BRTDfunc. This is my first(!) 
BRTDfunc and my first .cal file I ever wrote from scratch, and I have 
some questions about it.

1.
The first question of all is how I could possibly find the ray-direction 
and value of incident light within  a  brtdf. Are there globally defined 
variables for these (like Dx, Dy, Dz) ?

Ok, I clearly can't solve the specular highlight thing yet, so I forgot 
about specular highlights for a moment and figured out the brtdf and 
.cal file like below, for the 'requirements' 1, 2 and 3.

2.
My general question is: are there any smart remarks on this brtdf an cal 
file, is there anything very stupid in this material that I should 
know?  ( I am not a real math guru )

3.
The last question is: can I change the line below in a more elegant way, 
like the pow(base,exp) function in c: :
refl  =  
(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi) 
;


{

        reflection.cal

        add reflection relative of angle between ray direction and 
surface normal
        arg10 red reflection value
        arg11 green reflection value
        arg12 blue reflection value
        arg13 noise grain
        arg14 noise value

}

{ RGB values for the reflection  }
valr  = arg(10);
valg  = arg(11);
valb  = arg(12);
noisegrain= arg(13);
noisevalue= arg(14);

{ dot product of ray direction and normal }
DdN = (-Dx*Nx)+(-Dy*Ny)+(-Dz*Nz);

{ always return a positive value }
multi = if(DdN, DdN, -DdN) ;

{ replace with a pow( base, exp ) alike function }
refl  =  
(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi)*(1-multi) 
;

{  noise  }
noise =  1 - ( noisevalue * fnoise3(Px/noisegrain, Py/noisegrain, Pz, 
noisegrain ) );

{ add noise to reflection value }
mult = refl + (refl*noise) ;

reflr = CrP * mult * valr * noise ;
reflg = CgP * mult * valg * noise ;
reflb = CbP * mult * valb * noise ;



{
       { bfloor is the name of a pattern }
        usage:
                bfloor BRTDfunc LAYER114
                10
                reflr reflg reflb
                0 0 0
                0 0 0
                reflection.cal
                0
                12
                1 1 1
                1 1 1
                0 0 0
                R_REFLVALUE G_REFLRVALUE B_REFLVALUE
                NOISE_SIZE   NOISE_VALUE
               

}



Carsten Bauer wrote:

> Hi Iebele
>
> AFAIK, for a view ray hit, Radiance checks if the current view ray 
> direction lies in the'highlight cone' of any light source.
> E.g. for a point source and a perfect zero roughness reflector this 
> 'highlight cone' would just be a delta peak, i.e. the mirror 
> direction, if you start to add microscopic roughness to the surface  
> your highlight  will start to spread, you'll receive reflection also  
> if you don't look exactly in the mirror direction.
>
> Ok, so far you probably know that yourself, I just repeated it to 
> emphasis which effects you control with the mentioned parameters: the 
> roughness
> parameter determines how much the highlight will spread out, and the 
> -sj setting determines how much of this spread will actually be 
> sampled, (-st as threshold finally  decides if it will be considered 
> specular at all or just added to the diffuse component.) So  the sense 
> of -sj lies more in setting values < 1 to produce sharper highlights 
> also for rough surfaces to reduce noise in the image, -- whereas 
> you're looking for the opposite, a way to make them appear more diffuse.
>
> Now it might be that the problem in your case lies in the method being 
> to limited to describe the floor material adequately
> As mentioned above, you can tweak the amout of spreading for the 
> highlight, but you cannot consider e.g. materials whose specular 
> reflection coefficient itself changes with the incident angle, which 
> might be the reason in your case for the highlights being less 
> apparent in the direction you're looking.
> And even if you provide BRTDF data for the floor material, it would be 
> rather tedious as they would have to be inverted during this 
> calculation which is -again AFAIK -currently not possible in Radiance.
>
> -cb
> PS you might still revert to Giulios Photoshop idea, you could also do 
> it in Radiance, i.e. make a pic form two base pics with pcomb (I hope 
> I name the correct one here, I always mix them up, pcomb, pcompos, 
> pcond, pwhatever....), then write a script for that purpose to convert 
> all your frames automatically..
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
>



More information about the Radiance-general mailing list