texfunc with -aa 0

Does anyone know why a texfunc has no effect on the material it modifies
with -aa 0? The same material/geometry/octree appear as expected with -aa

0.

Thanks,

Stephen Wasilewski
*LOISOS *+* UBBELOHDE*
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

Hi Stephen,

A texfunc perturbs the surface normal, which should be visible at least in directly lit areas with -ab 0. Are you saying that you have directly lit surfaces that look flat with a texfunc applied? That would be unexpected.

In the shadows, there is nothing for a perturbation in the surface normal to affect, so everything looks the same as it would without the texfunc. With -ab 1, you see variation again, as the surface normal influences the shading of the indirect component.

-Greg

···

From: Stephen Wasilewski <[email protected]>
Date: October 31, 2016 4:08:52 PM PDT

Does anyone know why a texfunc has no effect on the material it modifies with -aa 0? The same material/geometry/octree appear as expected with -aa > 0.

Thanks,

Stephen Wasilewski
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

Barring Greg's low-ab hypothesis, is it possible the "expected" texture you
see with -aa > 0 is really an interpolation artifact?

In my experience textfuncs should reveal themselves @ -aa 0. E.g.,

shiny linoleum floor, perfectly smooth:

shiny linoleum floor, with wave and microbump texfunc modifiers:



(Both with -ab 2).

Jon

···

On Mon, Oct 31, 2016 at 4:26 PM, Greg Ward <[email protected]> wrote:

Hi Stephen,

A texfunc perturbs the surface normal, which should be visible at least in
directly lit areas with -ab 0. Are you saying that you have directly lit
surfaces that look flat with a texfunc applied? That would be unexpected.

In the shadows, there is nothing for a perturbation in the surface normal
to affect, so everything looks the same as it would without the texfunc.
With -ab 1, you see variation again, as the surface normal influences the
shading of the indirect component.

-Greg

*From: *Stephen Wasilewski <[email protected]>

*Date: *October 31, 2016 4:08:52 PM PDT

Does anyone know why a texfunc has no effect on the material it modifies
with -aa 0? The same material/geometry/octree appear as expected with -aa
> 0.

Thanks,

Stephen Wasilewski
*LOISOS *+* UBBELOHDE*
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Greg and Jon,
This is an indirectly lit surface (a ceiling). I am not seeing the same
patterning I get with -aa >0. In a small test scene, I see the normal
pertubation if I apply a specularity to the material, but not if it is
purely diffuse, images below are with a diffuse material. In longer runs
that clean up the noise I see the same lack of pattern:

vwrays -ff -vf 1.vf -x 400 -y 400 | rtrace `vwrays -d -vf 1.vf -x 400 -y
400` -ffc -n 8 -ab 3 -lr -4 -lw 1e-4 -ad 200 -as 0 -aa 0 -av .04 .04 .04
test.oct > nocache.hdr:

<img src=’/uploads/default/original/1X/041c2ee6c8c1e7e344971222a8f45332ef73459e.png’ width=‘200’ height=‘200’>

vwrays -ff -vf 1.vf -x 400 -y 400 | rtrace `vwrays -d -vf 1.vf -x 400 -y
400` -ffc -n 8 -ab 3 -ar 300 -ad 500 -as 250 -aa .1 -av .04 .04 .04 -af
cache.amb test.oct > ambcache.hdr:

<img src=’/uploads/default/original/1X/0351ec2e3ac2ad457b0937a6f2ffd02f7568e065.png’ width=‘200’ height=‘200’>

Thanks,

Stephen Wasilewski
*LOISOS *+* UBBELOHDE*
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

···

Hi Stephen,

I only now realize that I misread your initial post, thinking you were talking about the -ab setting rather than -aa. Mea culpa.

Are you sure the texture isn't just being masked by all the noise you get with -aa 0? Is it indeed a texture rather than a pattern you have applied? In either case, it should have some effect whatever your -aa setting. If you increase the -ad setting and decrease the -lw setting to 1/(ad) accordingly, the noise should go down to where you may be able to discern the texture again. Can you share what texture you are using, exactly?

Cheers,
-Greg

···

From: Stephen Wasilewski <[email protected]>
Date: November 1, 2016 9:53:12 AM PDT

Hi Greg and Jon,
This is an indirectly lit surface (a ceiling). I am not seeing the same patterning I get with -aa >0. In a small test scene, I see the normal pertubation if I apply a specularity to the material, but not if it is purely diffuse, images below are with a diffuse material. In longer runs that clean up the noise I see the same lack of pattern:

vwrays -ff -vf 1.vf -x 400 -y 400 | rtrace `vwrays -d -vf 1.vf -x 400 -y 400` -ffc -n 8 -ab 3 -lr -4 -lw 1e-4 -ad 200 -as 0 -aa 0 -av .04 .04 .04 test.oct > nocache.hdr:

vwrays -ff -vf 1.vf -x 400 -y 400 | rtrace `vwrays -d -vf 1.vf -x 400 -y 400` -ffc -n 8 -ab 3 -ar 300 -ad 500 -as 250 -aa .1 -av .04 .04 .04 -af cache.amb test.oct > ambcache.hdr:

Thanks,

Stephen Wasilewski
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

Hi Greg,

here is my cal file to simulate metal decking:

{
A1 = length of 1 period
A2 = angle of ribs (0-90)
A3 = bottom length
A4 = top length
}
angle = A2*DEGREE;

F1 = A3/A1;
F2 = (A1-A3-A4)/2/A1 + F1;
F3 = A4/A1 + F2;
inc = frac(Px/A1);
zcor = if(and(inc-F1,F2-inc),cos(-angle),if(inc-F3,cos(angle),0));
xcor = if(and(inc-F1,F2-inc),sin(-angle),if(inc-F3,sin(angle),0));
ycor = 0;

and here is the material I am applying:

void texfunc NS
6 xcor ycor zcor ./decking.cal -rz 14
0
4 .667 71.5673 .1808 .3186

NS plastic NSdeck
0
0
5 .8 .8 .8 0 0

here is the same scene with the geometry physically modeled, the pattern is
more prominent because of self shading, but I would expect to see something
like this because of the normal perturbation (even with the noise).
<img src=’/uploads/default/original/1X/5de77b8ce39608e2006c94e27cb3c0a2f1a6d197.png’ width=‘200’ height=‘200’>

and here is the scene run with higher settings (-ad 20000) to reduce the
noise (still no discernible texture):
<img src=’/uploads/default/original/1X/7ce48f9f048bfa5667ffc1e589c1add023b3f076.png’ width=‘200’ height=‘200’>

thanks,

Stephen Wasilewski
*LOISOS *+* UBBELOHDE*
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

···

On Tue, Nov 1, 2016 at 10:06 AM, Greg Ward <[email protected]> wrote:

Hi Stephen,

I only now realize that I misread your initial post, thinking you were
talking about the -ab setting rather than -aa. Mea culpa.

Are you sure the texture isn't just being masked by all the noise you get
with -aa 0? Is it indeed a texture rather than a pattern you have
applied? In either case, it should have some effect whatever your -aa
setting. If you increase the -ad setting and decrease the -lw setting to
1/(ad) accordingly, the noise should go down to where you may be able to
discern the texture again. Can you share what texture you are using,
exactly?

Cheers,
-Greg

*From: *Stephen Wasilewski <[email protected]>

*Date: *November 1, 2016 9:53:12 AM PDT

Hi Greg and Jon,
This is an indirectly lit surface (a ceiling). I am not seeing the same
patterning I get with -aa >0. In a small test scene, I see the normal
pertubation if I apply a specularity to the material, but not if it is
purely diffuse, images below are with a diffuse material. In longer runs
that clean up the noise I see the same lack of pattern:

vwrays -ff -vf 1.vf -x 400 -y 400 | rtrace `vwrays -d -vf 1.vf -x 400 -y
400` -ffc -n 8 -ab 3 -lr -4 -lw 1e-4 -ad 200 -as 0 -aa 0 -av .04 .04 .04
test.oct > nocache.hdr:

vwrays -ff -vf 1.vf -x 400 -y 400 | rtrace `vwrays -d -vf 1.vf -x 400 -y
400` -ffc -n 8 -ab 3 -ar 300 -ad 500 -as 250 -aa .1 -av .04 .04 .04 -af
cache.amb test.oct > ambcache.hdr:

Thanks,

Stephen Wasilewski
*LOISOS *+* UBBELOHDE*
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Stephen,

Perfect -- thanks for the additional explanation and renderings. Now I know what's happening, which I should have known had I only remembered the age-old limitation built into the indirect calculation from the beginning.

The basic problem is that the perturbed normal cannot be used to assign the sampling hemisphere, because this would inevitably lead to sampling behind the surface, which would introduce nasty light leaks in many situations. This is one of the main problems with "bump mapping" as it is commonly referred to in graphics, and Radiance adds some special tests in the specular material sampling routines to avoid generating rays that penetrate an opaque surface. Modeling the object as actually geometry avoids this problem, and is really the best way to get an accurate result if you don't mind all the extra polygons....

The trick I employ when using the ambient cache is to take the calculated "rotational gradient" and apply it using the perturbed surface normal to simulate the cosine effect you get with a different surface orientation. Thus, the hemispherical ray samples are generated based on the unperturbed normal, but the perturbed normal is used to adjust the final value.

This trick doesn't happen with -aa 0, because I don't bother to calculate the rotational gradient, figuring that I'm not caching any values so I won't need it. However, I *could* calculate it in cases where there is a normal perturbation, and use it in the same way I do with the irradiance cache on. I don't think it would be that much trouble to add this capability after looking again at the code, so I might send you a version to try a little later today.

Cheers,
-Greg

···

From: Stephen Wasilewski <[email protected]>
Date: November 1, 2016 10:53:20 AM PDT

Hi Greg,

here is my cal file to simulate metal decking:

{
A1 = length of 1 period
A2 = angle of ribs (0-90)
A3 = bottom length
A4 = top length
}
angle = A2*DEGREE;

F1 = A3/A1;
F2 = (A1-A3-A4)/2/A1 + F1;
F3 = A4/A1 + F2;
inc = frac(Px/A1);
zcor = if(and(inc-F1,F2-inc),cos(-angle),if(inc-F3,cos(angle),0));
xcor = if(and(inc-F1,F2-inc),sin(-angle),if(inc-F3,sin(angle),0));
ycor = 0;

and here is the material I am applying:

void texfunc NS
6 xcor ycor zcor ./decking.cal -rz 14
0
4 .667 71.5673 .1808 .3186

NS plastic NSdeck
0
0
5 .8 .8 .8 0 0

here is the same scene with the geometry physically modeled, the pattern is more prominent because of self shading, but I would expect to see something like this because of the normal perturbation (even with the noise).

and here is the scene run with higher settings (-ad 20000) to reduce the noise (still no discernible texture):

thanks,

Stephen Wasilewski
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

On Tue, Nov 1, 2016 at 10:06 AM, Greg Ward <[email protected]> wrote:
Hi Stephen,

I only now realize that I misread your initial post, thinking you were talking about the -ab setting rather than -aa. Mea culpa.

Are you sure the texture isn't just being masked by all the noise you get with -aa 0? Is it indeed a texture rather than a pattern you have applied? In either case, it should have some effect whatever your -aa setting. If you increase the -ad setting and decrease the -lw setting to 1/(ad) accordingly, the noise should go down to where you may be able to discern the texture again. Can you share what texture you are using, exactly?

Cheers,
-Greg

From: Stephen Wasilewski <[email protected]>
Date: November 1, 2016 9:53:12 AM PDT

Hi Greg and Jon,
This is an indirectly lit surface (a ceiling). I am not seeing the same patterning I get with -aa >0. In a small test scene, I see the normal pertubation if I apply a specularity to the material, but not if it is purely diffuse, images below are with a diffuse material. In longer runs that clean up the noise I see the same lack of pattern:

vwrays -ff -vf 1.vf -x 400 -y 400 | rtrace `vwrays -d -vf 1.vf -x 400 -y 400` -ffc -n 8 -ab 3 -lr -4 -lw 1e-4 -ad 200 -as 0 -aa 0 -av .04 .04 .04 test.oct > nocache.hdr:

vwrays -ff -vf 1.vf -x 400 -y 400 | rtrace `vwrays -d -vf 1.vf -x 400 -y 400` -ffc -n 8 -ab 3 -ar 300 -ad 500 -as 250 -aa .1 -av .04 .04 .04 -af cache.amb test.oct > ambcache.hdr:

Thanks,

Stephen Wasilewski
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general