[Radiance-general] Upcoming Radiance 3.9 release

Greg Ward gregoryjward at gmail.com
Thu May 1 20:52:35 PDT 2008


Hi Steve,

Thanks for your input.  As I mentioned, I split the decision and made  
them available on one site and not the other.  Directions for  
converting additional models are below.  Thankfully, I had them in an  
e-mail, because I sure don't remember doing this.

Best,
-Greg

++++++++++++++++++++

Instructions for converting additional models
=============================================

1) Download and unpack .OBJ and .PPM files from:
         http://people.csail.mit.edu/tmertens/textransfer/data

2) Rename atlas.ppm to something more specific.

3) Convert the .OBJ file to a Radiance triangle mesh using the command:
         obj2mesh object.obj > object.rtm

4) Convert the .PPM file to a Radiance picture:
         ra_ppm -r object.ppm > object.pic

5) Average the non-zero color values in the texture atlas to arrive  
at a background color:
         pvalue -h -H -df object.pic \
         | rcalc -if3 -e 'cond=$1+$2+$3-.01' -of -e '$1=$1;$2=$2;$3= 
$3' \
         | total -if3 -m

6) Use the above three values (red_val, green_val, blue_val) in a  
Radiance input file that looks like so:

void colorpict object_pat
7 lim_r lim_g lim_b object.pic climit.cal Lu Lv
0
3 (red_val) (green_val) (blue_val)

object_pat plastic object_mat
0
0
5 1 1 1 0 0

object_mat mesh object
1 object.rtm
0
0
-----------

If you want a specular component, change the arguments of  
"object_mat" to "1 1 1 0.04 0.07" -- feel free to alter the roughness  
(final) parameter to suit, but unless the object is metallic, the  
specular value should not be greater than 0.04.

The file "climit.cal" is used to avoid black areas on the object  
where it isn't covered by the texture atlas:

{ Avoid zero pixel values }
lim_r(r,g,b) = if(grey(r,g,b)-.01, min(r,1), A1);
lim_g(r,g,b) = if(grey(r,g,b)-.01, min(g,1), A2);
lim_b(r,g,b) = if(grey(r,g,b)-.01, min(b,1), A3);
-----------

> From: steve michel <smichel_designer at hotmail.com>
> Date: May 1, 2008 8:15:33 PM PDT
>
> I agree with John on that one. I think a readme text file on  
> converting these files simply (tensor textures too-why not?) into a  
> form usable in radiance would take less space but open a world of  
> possibilities.
>
>
> ----------------------------------------
>> From: jm at dmu.ac.uk
>> To: radiance-general at radiance-online.org
>>
>> Ready availability of 'tons' of storage space notwithstanding, I'll
>> cast a 'no' vote. Very neat, but also very niche.
>>
>> -John (the disk curmudgeon)
>>
>> -----------------------------------------------
>> Dr. John Mardaljevic



More information about the Radiance-general mailing list