[Radiance-general] Rendering fields

atelier iebele abel atelier at iebele.nl
Fri Jul 8 20:05:47 CEST 2005


Hi Greg,

Thanks so much for pointing this out for me, and sharing your knowledge 
all the time.
It took some time to reply  because I needed to study on rcalc to make 
your suggestion really work.

It's funny but the commands you wrote results in images with _vertical_ 
fields  :)
Please look at http://www.toren.com/radiance/field.jpg for an example of 
this.
After some time studying what you wrote (and discovering rcalc in the 
meanwhile!), I spotted the error.
I changed your commands like this:

rlam '!vwrays -vf view01.vp -pa 0 -x 720 -y 576' '!vwrays -vf  view02.vp 
-pa 0 -x 720 -y 576'  \
 | rcalc -e 'odd=floor(recno/720) - floor ( (recno/720) / 2 ) *2   - 0.5 ' \
-e '$1=if(odd,$1,$7); $2=if(odd,$2,$8);$3=if(odd,$3,$9)'  \
-e '$4=if(odd,$4,$10);$5=if(odd,$5,$11);$6=if(odd,$6,$12)' \
| rtrace -fad  -av 20 20 20 -ab 0 -st 0.01  -x 720 -y 576  -ovpN 
model-ani.oct  | imgshader -lf lights.lit | ximage -g 1.7 -e -6

and now it works fine!  ( see http://www.toren.com/radiance/fieldsok.jpg )

One problem that remains now, is that the above commands will not work 
when oversampling 4 times the image size, to obtain sharper results.
I have to figure that out soon, and will post the result at that time.

The really good news is that a simple test comparing rendering times 
resulted in 14 minutes rendering time using this 'field' rendering 
against 11 minutes when just sending doubles from vwrays to rtrace. This 
means that this kind of field rendering is quite a time-saving approach. 
Great!

Iebele

PS: Please note that where you wrote  '\vwrays,  I wrote  `!vwrays ( 
omitting the slash)
This is because Linux uses bash as standard, while you probably uses csh.



Greg Ward wrote:

> Hi lebele,
>
> I don't have a beautiful solution for this, but the following should  
> work:
>
> rlam '\!vwrays -vf view1.vp -pa 0 -x 2880 -y 2304' '\!vwrays -vf  
> view2.vp -pa 0 -x 2880 -y 2304' \
>     | rcalc -e 'odd=recno-floor(recno/2)*2-.5' -e '$1=if(odd,$1,$7); 
> $2=if(odd,$2,$8);$3=if(odd,$3,$9)' \
>         -e '$4=if(odd,$4,$10);$5=if(odd,$5,$11);$6=if(odd,$6,$12)' \
>     | rtrace -fad (etc.)
>
> The rlam command puts rays corresponding to your two views on each  
> line together, and rcalc chooses between them based on scanline  
> oddity.  This requires a lot of ASCII/double conversions, which can  
> be slow, but since rlam doesn't handle binary floats or doubles, this  
> is the simplest way.  A more complex solution that could write  
> doubles directly would use rcalc alone and two view calculations, but  
> I don't have time to write that one for you.
>
> -Greg
>
>> From: atelier iebele abel <atelier at iebele.nl>
>> Date: July 5, 2005 2:39:19 AM PDT
>>
>> Hi,
>>
>> Working on an animation for video/tv, I need to render fields.  
>> Instead of rendering two frames apart and composit both into one  
>> image with fields later, I am thinking about a solution in wich I  
>> render two viewpoints in one image directly.
>> In this image all even scanlines should show view01 and all odd  
>> scanlines should show view 2 (or in reverse order, I dont know yet).
>>
>> Currently I work with the following command to render my animation  
>> with:
>> vwrays -fd -vf view8_0001.vp -pa 0 -x 2880 -y 2304 | rtrace -av 20  
>> 20 20 -ab 0 -st 0.01  -x $1  -y $1 -fdd -ovpN model-ani.oct
>>
>> I think it should be possible to extend this command in order to  fit 
>> my need, but I don't know where to start.
>>
>> An example of the result I like to achieve can be found on http:// 
>> www.toren.com/radiance/fields.jpg
>>
>> Iebele
>
>
> _______________________________________________
> 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