[Radiance-general] manipulate rtrace for desired outcome

Greg Ward gregoryjward at gmail.com
Fri Sep 30 11:49:00 PDT 2016


Hi Mengdi,

Did you try using the 'T' option of rtrace, e.g., "-oTMv" will report materials and values for each ray traced.  The lower case 't' leaves out rays to light sources specifically, since there are so many of them in general.  To filter out just the source rays, you need to check the deepest-level (most tabbed) reports in the output and check that the material matches one in your scene description that is the "light" type.

There is no easy way in Radiance to differentiate "specular" from "diffuse" rays in the calculation.  Within the code itself, you can get clues from the ray type, but this isn't one of the things reported by rtrace.  You can of course hack the C code if you like.  That's what it's there for....

Cheers,
-Greg

> From: Mengdi Guo <mengdi.guo1988 at gmail.com>
> Date: September 26, 2016 6:28:21 AM PDT
> 
> Dear Andy,
> 
> I've got two more questions about Radiance. 
> 1) I'm using only 'light' type of source for rtrace operation, the output of which contains a lot of rays that didn't hit the source in the end. Loading the ray information of such output takes a long time. I'm curious if it's possible to export only valid rays that connects receivers with sources through radiance operation?
> 
> 2) Another question is about the specular rays and diffuse rays. Is it possible to specify specular ray from diffuse ones via Radiance operation? Or have you already counted the energy distribution of these two types of rays via cosine law in Radiance?
> 
> Thank you very much for your help.
> 
> Cheers,
> Mengdi
> 
> On 27 June 2016 at 22:43, Andy McNeil <mcneil.andrew at gmail.com> wrote:
> I assumed a total surface reflectance of 50%, with a split of 30:70 ratio of diffuse to specular ratio. The roughness was a wild guess. Though I see now that I flipped your diffuse - specular ratio, but you get the point. 
> 
> Andy
> 
> On Mon, Jun 27, 2016 at 7:21 AM, Mengdi Guo <mengdi.guo1988 at gmail.com> wrote:
> Dear Andy,
> 
> I have one more question about this part of your reply:
> 
> The relative weight of specular vs. diffuse rays is a result of the material applied to the surface. if you use a plastic material such as below (with 15% diffuse reflectance, 35% specular reflectance, and 0.05 roughness):
> 
> How do you get the value: '5% diffuse reflectance, 35% specular reflectance, and 0.05 roughness' from the setting of 'specular weight 30% and diffuse weight 70% after reflection'.
> 
> void plastic test70-30
> 0
> 0
> 5 0.15 0.15 0.15 0.35 0.05
> 
> then the specular rays will account for 30% of the final ray value and the diffuse rays will account for 70% of the final ray value.
> 
> Thanks a lot.
> 
> Cheers,
> Mengdi
> 
> On 23 June 2016 at 05:53, Andy McNeil <mcneil.andrew at gmail.com> wrote:
> Mengdi,
> 
> Answers inline below...
> 
> 1.       No matter what parameters I’ve set for rtrace function, there’s only one ray in the output. Yet, I’m expecting multiple rays emitted from the receiver points to the light source, as described in radiance manual.
> 
> By default rtrace outputs the accumulated value of the input ray. If you want it to output information for rays traced to arrive at the reported value you should use -o with either t or T.  See the rtrace manual page for more output options: http://radiance-online.org/learning/documentation/manual-pages/pdfs/rtrace.pdf
> 
> 2.       I’d also like to know what parameters can control reflections characters of rays. For instance, I want the rays to partly diffuse after reflecting on the surface. The desirable condition is: for a bundle of rays hitting the surface, 1) 70% of the rays will follow specular reflection, 30% will be scattered after reflection. 2) for the scattered part, I want them to be reflected within an angle (e.g. 30 degree) to the specular reflected ray.
> 
> The relative weight of specular vs. diffuse rays is a result of the material applied to the surface. if you use a plastic material such as below (with 15% diffuse reflectance, 35% specular reflectance, and 0.05 roughness):
> void plastic test70-30
> 0
> 0
> 5 0.15 0.15 0.15 0.35 0.05
> 
> then the specular rays will account for 30% of the final ray value and the diffuse rays will account for 70% of the final ray value. However the actual number of rays spawned are controlled by the -ad parameter for diffuse rays and -ss parameter for specular rays, with the caveat that only one ray is traced for the specular reflections if the roughness is 0, otherwise you'd be tracing the same ray several times.
> 
> It seems to me that you want pure specular and scattered specular rays together, so you'll probably need want to use a plasdata material definition. The reference manual provides info on materials: http://radsite.lbl.gov/radiance/refer/refman.pdf
> 
>  
> 3.       Another question is: acknowledged that the emitted rays are not evenly distributed for hemispherical sampling. I'm still wondering if it's possible to evenly send rays with radiance.
> 
> The spawned rays are random, but are distributed such that each ray as equal influence on the result. This produces a non-biased estimate. If by even you mean that you don't want a cosine factor on the distribution of rays, you should look at plasdata. If however by evenly distributed you don't want them to be randomized, I'm not sure that's possible without going into the Radiance code, and doing this will result in a biased estimate.
> 
> John Mardaljevic gives a good presentation on how radiance spawns rays in order to find a result:
> http://radiance-online.org/community/workshops/2014-london/presentations/day1/Mardaljevic_AmbientCrash.pdf
> 
> And chapter 12 in Rendering with Radiance gives a detailed overview of how this all works: http://radiance-online.org/learning/documentation/book/rwrcontents
> 
> Best,
> Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20160930/47652a63/attachment-0001.html>


More information about the Radiance-general mailing list