Slide Projector

Hi,

I’m trying to model a “slide projector” by using “colorpict”.
For that purpose I’m mapping a square matrix (the slide) onto some flat object, and using the “Dx/Dz” and “Dy/Dz” and the mapping variables. “colorpict” is then used as the modifier for the “light” material.

I noticed that if I add some translation with xform to colorpict, the rendered result changes slightly (even for large translations), however since I’m only using the angular variables this seems surprising - I would expect no difference at all. Is this an indicator for a subtle bug?

Thanks

There’s not really enough information in your post to reproduce the bug, if indeed there is one. I would not expect the mapping to change with translation, unless other aspects of your scene (such as the projection surface) are also affected.

If you can offer a more complete description of your scene and the unexpected differences you are seeing, perhaps we can help.

-Greg

Hi, I’ll try to give more information. Here’s the colorpict definition:

void colorpict slide
19 red green blue slide.hdr . Dx/Dz+0.5 Dy/Dz+0.5 -i 1 -rx 0.36163252972218862258 -ry 4.02362996646269177603 -rz 2.38006651398999524716 -t 10.0 10.0 100
0
0

I can’t share the actual slide.hdr file but I don’t think it really matters.

Material definition:

slide light mat
0
0
3  1         1                  1

And geometry:


mat ring shape
0
0
8
     -3.08609386546717168187 0.14592491313075642290 0.22750744563020106059
    0.0703680662635  -0.00339231416508     0.997515326927
                  0              0.001

So as you can see, I would expect that the colorpict related translation wouldn’t make any difference, and sure enough it doesn’t matter if I put 10 or 1, but I do see slight differences (on the order of 0.5%), compared to -t 0 0 0

Well, I’m as puzzled as you by this. Mathematically, the translation vector should make no difference to your Dx/Dz and Dy/Dz expressions. You say you switch between 10 and 0, but your translation is 10 10 100. Do you translate the ring at the same time, or are you just playing with the colorpict options? Are you sure your surfaces still have the same relation to each other?

10 10 100 is a typo - should be 10 10 10, but I don’t see why it should make any difference.
I’m just playing with the colorpict options, but again I don’t think it should matter since Dx/Dy/Dz are related to incidence angles on the ring, and then these are used to lookup values from the image. As I understand this, as long as the ring and colorpict have the same rotation, the translation should make no difference in this case (but it does). Since this transformation was created with xform I’m pretty sure everything is aligned correctly.

Well, I just tried rendering a projection onto a wall with 3 different sets of translation arguments and noticed no differences. How are you measuring your difference? There are always small random differences due to sampling, but the projected image is in the same place whatever I do to the colorpict translation.

I agree with your observation, and indeed the differences I see seem random (with some spatial correlation). However since I made sure to disable all sources of randomness I’m not sure why this still happens. Here’s the rtrace command I’m using:

rtrace -h -w -n 10 -ad 1 -av 0.000000e+00 4.447656e-04 1.000000e+00 -ovpn -fff -ab 0 -dj 0 -aa 0.000000 -as 0 -st 1.000000 -ss 0.000000 -lr

Randomness enters in myriad and subtle ways in most ray-tracers, including Radiance. You can try setting the -u- option as well. Otherwise, I’d be surprised if you got the same results from one run to the next, even if you made no changes, since you would start from a different random number seed each time.

Hi Greg,

As you can see from my rtrace command I’m not using any ambient bounces or jitter.
In fact, if I don’t change anything I am getting the same result each run since I’m using the same input rays and there’s nothing to randomize the results.

anyway the problem I saw was related to something else, sorry for wasting your time!