falsecolor's isolux on observer's luminance.

Good day to everybody!

I need yuor help!

I would like to know if it is possible to do what I'm going to explain and how could I obtain such result.

So.. what I need is to have in the end an orthogonal view from above a street which shows isolux lines of luminance from a determined poin of view.

I guess I should tell Radiance for every and each point of the street as seen from above to collect radiance values as if that point was seen from the observer point of view instead than from above, and then to store those data in an .pic image. Then I would have to pass this to falsecolor to compute isolines..

but I don't know how I could do it.. even if I'm quite sure it is possible.. !!

Can someone help me?

Lucio

.. Caminante no hay camino, solo se hace camino al andar ..

Hi Lucio,

It is possible to do what you want, but you need to first generate a view using rpict at a high resolution with the -z option to specify a depth buffer for output. Then, give the picture and depth buffer to pinterp with the desired orthogonal view and resolution for your falsecolor isoluminance image. Pass the output to falsecolor and generate your contours. The actual values will correspond to the original rpict view, but the image will be reprojected into your orthogonal view.

Hope this helps!
-Greg

···

From: "loscotec\@libero\.it" <[email protected]>
Date: February 4, 2008 7:10:05 AM PST

Good day to everybody!

I need yuor help!

I would like to know if it is possible to do what I'm going to explain and how could I obtain such result.

So.. what I need is to have in the end an orthogonal view from above a street which shows isolux lines of luminance from a determined poin of view.

I guess I should tell Radiance for every and each point of the street as seen from above to collect radiance values as if that point was seen from the observer point of view instead than from above, and then to store those data in an .pic image. Then I would have to pass this to falsecolor to compute isolines..

but I don't know how I could do it.. even if I'm quite sure it is possible.. !!

Can someone help me?

Lucio

Wonderfull!!!

So powerfull is Radiance!! :o)

That's really what I wanted ! Thank you very much !!!

Now let's see if I'm able to really do it ! :stuck_out_tongue:

Just a curiosity. Pinterp just interpolates datas, right? So as much going far from the observer, as loosing detail, isn't it? This is probably the reason why I need high resolution image.

It is not possible to just calculate the points needed for the last image orthogonal one) from the observer point of view , and save results in an image format? It would probably need just a quite simple script (which calls rtrace many times) and could save much render time (definition is only were needed). Am I right? Or there is something I didn't contemplate?

Lucio

.Hi Lucio,
.
.It is possible to do what you want, but you need to first generate a
.view using rpict at a high resolution with the -z option to specify a
.depth buffer for output. Then, give the picture and depth buffer to
.pinterp with the desired orthogonal view and resolution for your
.falsecolor isoluminance image. Pass the output to falsecolor and
.generate your contours. The actual values will correspond to the
.original rpict view, but the image will be reprojected into your
.orthogonal view.
.
.Hope this helps!
.-Greg
.
.> From: "loscotec\@libero\.it" <[email protected]>
.> Date: February 4, 2008 7:10:05 AM PST
.>
.> Good day to everybody!
.>
.> I need yuor help!
.>
.> I would like to know if it is possible to do what I'm going to
.> explain and how could I obtain such result.
.>
.> So.. what I need is to have in the end an orthogonal view from
.> above a street which shows isolux lines of luminance from a
.> determined poin of view.
.>
.> I guess I should tell Radiance for every and each point of the
.> street as seen from above to collect radiance values as if that
.> point was seen from the observer point of view instead than from
.> above, and then to store those data in an .pic image. Then I would
.> have to pass this to falsecolor to compute isolines..
.>
.> but I don't know how I could do it.. even if I'm quite sure it is
.> possible.. !!
.>
.> Can someone help me?
.>
.> Lucio
.
._______________________________________________
.Radiance-general mailing list
[email protected]
.http://www.radiance-online.org/mailman/listinfo/radiance-general
.

.. Caminante no hay camino, solo se hace camino al andar ..

Hi Lucio,

Yes, it is true that pinterp needs to fill in missing pixel values, which is why you need a very high resolution image. (In fact, it would make sense to set the vertical resolution higher than the horizontal resolution, with the -pa 0 option to allow non-square pixels.) However, the results should still be valid.

If you are concerned about calculation efficiency, then you could write a script as you suggest. First, you would use vwrays to feed rtrace and get it to generate intersection points for all the positions on the orthogonal view. Second, you would apply a script to convert these positions to directions from the observer for a second rtrace run that would compute your radiance values. This would be output to an image. I guess it would go something like:

% vwrays -ff -vf ortho.vf -x XRES -y YRES -pa 0 \
  > rtrace -h -ff -op roadway.oct \
  > rcalc -if3 -of -e '$1=OX;$2=OY;$3=OZ;$4=$1-OX;$5=$2-OY;$6=$3-OZ' \
  > rtrace -ffc -x XRES -y YRES roadway.oct \
  > falsecolor -cl -s auto \
  > ra_tiff - roadway_lum.tif

where XRES and YRES are the desired map resolution and OX, OY, and OZ are the observer coordinates. (E.g., add -e 'OX:10.5;OY:-3.9;OZ=2' to the rcalc line.)

I hope this makes sense. It may require some adjustments -- I didn't test it out!

-Greg

···

From: "loscotec\@libero\.it" <[email protected]>
Date: February 4, 2008 9:39:02 AM PST

Wonderfull!!!

So powerfull is Radiance!! :o)

That's really what I wanted ! Thank you very much !!!

Now let's see if I'm able to really do it ! :stuck_out_tongue:

Just a curiosity. Pinterp just interpolates datas, right? So as much going far from the observer, as loosing detail, isn't it? This is probably the reason why I need high resolution image.

It is not possible to just calculate the points needed for the last image orthogonal one) from the observer point of view , and save results in an image format? It would probably need just a quite simple script (which calls rtrace many times) and could save much render time (definition is only were needed). Am I right? Or there is something I didn't contemplate?

Lucio

Alternative to Greg's proposal:

Render a first image as a parallel projection with view point and direction of
the observer. Create a falsecolor image from this rendering. Then use the
generated image as a texture to colour your street. The texture rotation would be
the view direction of your observer. Render the street from above just for the
texture effect (no second falsecolor).

Again the first image should be large to provide more details. The second rendering
could be done in any 3D modeller with sufficient control for texture mapping (Blender
for example).

Thomas

···

On 4 Feb 2008, at 15:10, loscotec@@libero..it wrote:

Good day to everybody!

I need yuor help!

I would like to know if it is possible to do what I'm going to explain and how could I obtain such result.

So.. what I need is to have in the end an orthogonal view from above a street which shows isolux lines of luminance from a determined poin of view.

Thank you Thomas!

I thought too something like that, but it does not fit my needs.

I would like to generate the isolux via script .

And your technique could also be quite unprecise, 'couse it doesn't actually calculate rays from the observer eye, in a 'radial' way but from a plane placed in the observer position with parallel rays ...

If I'm wrong, please tell it to me! :wink:

Thank you anyway for your suggestion !

now I'll try the suggestions from Greg, and then I'll let you know !

Lucio

.
.On 4 Feb 2008, at 15:10, loscotec@@libero..it wrote:
.
.> Good day to everybody!
.>
.> I need yuor help!
.>
.> I would like to know if it is possible to do what I'm going to
.> explain and how could I obtain such result.
.>
.> So.. what I need is to have in the end an orthogonal view from
.> above a street which shows isolux lines of luminance from a
.> determined poin of view.
.
.Alternative to Greg's proposal:
.
.Render a first image as a parallel projection with view point and
.direction of
.the observer. Create a falsecolor image from this rendering. Then use
.the
.generated image as a texture to colour your street. The texture
.rotation would be
.the view direction of your observer. Render the street from above
.just for the
.texture effect (no second falsecolor).
.
.Again the first image should be large to provide more details. The
.second rendering
.could be done in any 3D modeller with sufficient control for texture
.mapping (Blender
.for example).
.
.Thomas
.
._______________________________________________
.Radiance-general mailing list
[email protected]
.http://www.radiance-online.org/mailman/listinfo/radiance-general
.

.. Caminante no hay camino, solo se hace camino al andar ..

I finally tried the isolux plot from a different view as you suggested me, Greg .

Thank you very very very much for your help !

it does wark properly and I did not even had to correct formula "wrays.." as it was already correct !

I tried aslo the pinterp strategy, but, having my observer a very small angle of view on the street, the requested resolution of the first image would have been far to big.

I figured out that the vwrays method does not work correctly if there are some obstructions between observer and calculated point . As I'm feeding rtrace view view directions.. !

Is there a stratagem to control this in some way? I dont really need it right now, but i could in the future and I'm really interested in trying to build up some solid calculation program.. !

Thank you very much again !

Lucio

.Hi Lucio,
.
.Yes, it is true that pinterp needs to fill in missing pixel values,
.which is why you need a very high resolution image. (In fact, it
.would make sense to set the vertical resolution higher than the
.horizontal resolution, with the -pa 0 option to allow non-square
.pixels.) However, the results should still be valid.
.
.If you are concerned about calculation efficiency, then you could
.write a script as you suggest. First, you would use vwrays to feed
.rtrace and get it to generate intersection points for all the
.positions on the orthogonal view. Second, you would apply a script
.to convert these positions to directions from the observer for a
.second rtrace run that would compute your radiance values. This
.would be output to an image. I guess it would go something like:
.
.% vwrays -ff -vf ortho.vf -x XRES -y YRES -pa 0 \
. | rtrace -h -ff -op roadway.oct \
. | rcalc -if3 -of -e '$1=OX;$2=OY;$3=OZ;$4=$1-OX;$5=$2-OY;$6=$3-OZ' \
. | rtrace -ffc -x XRES -y YRES roadway.oct \
. | falsecolor -cl -s auto \
. | ra_tiff - roadway_lum.tif
.
.where XRES and YRES are the desired map resolution and OX, OY, and OZ
.are the observer coordinates. (E.g., add -e 'OX:10.5;OY:-3.9;OZ=2'
.to the rcalc line.)
.
.I hope this makes sense. It may require some adjustments -- I didn't
.test it out!
.
.-Greg
.
.> From: "loscotec\@libero\.it" <[email protected]>
.> Date: February 4, 2008 9:39:02 AM PST
.>
.> Wonderfull!!!
.>
.> So powerfull is Radiance!! :o)
.>
.> That's really what I wanted ! Thank you very much !!!
.>
.> Now let's see if I'm able to really do it ! :stuck_out_tongue:
.>
.> Just a curiosity. Pinterp just interpolates datas, right? So as
.> much going far from the observer, as loosing detail, isn't it? This
.> is probably the reason why I need high resolution image.
.>
.> It is not possible to just calculate the points needed for the last
.> image orthogonal one) from the observer point of view , and save
.> results in an image format? It would probably need just a quite
.> simple script (which calls rtrace many times) and could save much
.> render time (definition is only were needed). Am I right? Or there
.> is something I didn't contemplate?
.>
.> Lucio
.>
.
._______________________________________________
.Radiance-general mailing list
[email protected]
.http://www.radiance-online.org/mailman/listinfo/radiance-general
.

.. Caminante no hay camino, solo se hace camino al andar ..

I finally tried the isolux plot from a different view as you suggested me, Greg .

Thank you very very very much for your help !

it does wark properly and I did not even had to correct formula "wrays.." as it was already correct !

I tried aslo the pinterp strategy, but, having my observer a very small angle of view on the street, the requested resolution of the first image would have been far to big.

I figured out that the vwrays method does not work correctly if there are some obstructions between observer and calculated point . As I'm feeding rtrace view view directions.. !

Is there a stratagem to control this in some way? I dont really need it right now, but i could in the future and I'm really interested in trying to build up some solid calculation program.. !

Thank you very much again !

Lucio

.Hi Lucio,
.
.Yes, it is true that pinterp needs to fill in missing pixel values,
.which is why you need a very high resolution image. (In fact, it
.would make sense to set the vertical resolution higher than the
.horizontal resolution, with the -pa 0 option to allow non-square
.pixels.) However, the results should still be valid.
.
.If you are concerned about calculation efficiency, then you could
.write a script as you suggest. First, you would use vwrays to feed
.rtrace and get it to generate intersection points for all the
.positions on the orthogonal view. Second, you would apply a script
.to convert these positions to directions from the observer for a
.second rtrace run that would compute your radiance values. This
.would be output to an image. I guess it would go something like:
.
.% vwrays -ff -vf ortho.vf -x XRES -y YRES -pa 0 \
. | rtrace -h -ff -op roadway.oct \
. | rcalc -if3 -of -e '$1=OX;$2=OY;$3=OZ;$4=$1-OX;$5=$2-OY;$6=$3-OZ' \
. | rtrace -ffc -x XRES -y YRES roadway.oct \
. | falsecolor -cl -s auto \
. | ra_tiff - roadway_lum.tif
.
.where XRES and YRES are the desired map resolution and OX, OY, and OZ
.are the observer coordinates. (E.g., add -e 'OX:10.5;OY:-3.9;OZ=2'
.to the rcalc line.)
.
.I hope this makes sense. It may require some adjustments -- I didn't
.test it out!
.
.-Greg
.
.> From: "loscotec\@libero\.it" <[email protected]>
.> Date: February 4, 2008 9:39:02 AM PST
.>
.> Wonderfull!!!
.>
.> So powerfull is Radiance!! :o)
.>
.> That's really what I wanted ! Thank you very much !!!
.>
.> Now let's see if I'm able to really do it ! :stuck_out_tongue:
.>
.> Just a curiosity. Pinterp just interpolates datas, right? So as
.> much going far from the observer, as loosing detail, isn't it? This
.> is probably the reason why I need high resolution image.
.>
.> It is not possible to just calculate the points needed for the last
.> image orthogonal one) from the observer point of view , and save
.> results in an image format? It would probably need just a quite
.> simple script (which calls rtrace many times) and could save much
.> render time (definition is only were needed). Am I right? Or there
.> is something I didn't contemplate?
.>
.> Lucio
.>
.
._______________________________________________
.Radiance-general mailing list
[email protected]
.http://www.radiance-online.org/mailman/listinfo/radiance-general
.

.. Caminante no hay camino, solo se hace camino al andar ..

Hi Lucio,

It's probably easiest just to make the invisible areas zero in the falsecolor image, which you could do like so:

% vwrays -ff -vf ortho.vf -x XRES -y YRES -pa 0 \
  > rtrace -h -ff -op roadway.oct > roadpts.flt
% rcalc -if3 -of -e '$1=OX;$2=OY;$3=OZ;$4=$1-OX;$5=$2-OY;$6=$3-OZ' roadpts.flt \
  > rtrace -ff -opv -x XRES -y YRES roadway.oct \
  > rlam -if3 roadpts.flt -if6 - \
  > rcalc -if9 -of -e 's(x):x*x;OK=0.2-s($1-$4)-s($2-$5)-s($3-$6)' \
    -e '$1=if(OK,$7,0);$2=if(OK,$8,0);$3=if(OK,$9,0)' \
  > falsecolor -cl -s auto \
  > ra_tiff - roadway_lum.tif
% rm roadpts.flt

The usual caveats apply, as I haven't tried this. If your world units are cm or something smaller, the 0.2 value might have to be increased for reliable behavior.

-Greg

···

From: "loscotec\@libero\.it" <[email protected]>
Date: February 9, 2008 2:39:54 AM PST

Wow Greg, that's amazing !

That solution is simple and powerfull at the same time. And Indeed it helped me much in learning how to behave with Radiance's programs.

THANK YOU

But let me annoy you a little further. Going on thinking about this problem, I realized that what I really need is something different. I don't actually need ray to be traced from close to the point, 'couse this point aren't actually seen from the observer.. Neither I need ,as it was before, to have wrong informations. Then probably the best option would be to mark the 'wrong' points to understand them are not seen from the observer. A good way could probably be to paint them with an unreal color (or luminance level if postprocessed by falsecolor).

The method could be to check if ray intersection points with surfaces are different from the ones requested, and, in that case, to paint that area with given values. This could probably be achieved also building up some kind of mask image to combine later with pcomb ... ?

Well, I'm sure it is possible, and it is probably simpler than I figure it out, but I have no idea on how to achieve it.

Well, I'n neither in a hurge now of building such system, so don't worry if you cannot answer.

Lucio

Correction -- missed a step (pvalue):

% vwrays -ff -vf ortho.vf -x XRES -y YRES -pa 0 \
  > rtrace -h -ff -op roadway.oct > roadpts.flt
% rcalc -if3 -of -e '$1=OX;$2=OY;$3=OZ;$4=$1-OX;$5=$2-OY;$6=$3-OZ' roadpts.flt \
  > rtrace -ff -opv -x XRES -y YRES roadway.oct \
  > rlam -if3 roadpts.flt -if6 - \
  > rcalc -if9 -of -e 's(x):x*x;OK=0.2-s($1-$4)-s($2-$5)-s($3-$6)' \
    -e '$1=if(OK,$7,0);$2=if(OK,$8,0);$3=if(OK,$9,0)' \
  > pvalue -r -df -h -Y YRES +X XRES \
  > falsecolor -cl -s auto \
  > ra_tiff - roadway_lum.tif
% rm roadpts.flt

Sorry about that. It looks like a mess, but basically I'm just checking intersection values against the ones you get from your orthogonal view, and I need rcalc for that. All the -if's and -of's make it run faster, but aren't really necessary.

-Greg

GREAT !! Simply GREAT !!!!

Thank you very much Greg.

I was missing some knowledge to build up something like that and my printed manpages were not up-to-date as the online ones ..

Your help opens me new horizons ! Thank you very much !

And many thanks also to all the people who helped me with the rpict progress stuff (just giving thanks here to not send to much mails to the forum) !

Lucio

.Correction -- missed a step (pvalue):
.
.% vwrays -ff -vf ortho.vf -x XRES -y YRES -pa 0 \
. | rtrace -h -ff -op roadway.oct > roadpts.flt
.% rcalc -if3 -of -e '$1=OX;$2=OY;$3=OZ;$4=$1-OX;$5=$2-OY;$6=$3-OZ'
.roadpts.flt \
. | rtrace -ff -opv -x XRES -y YRES roadway.oct \
. | rlam -if3 roadpts.flt -if6 - \
. | rcalc -if9 -of -e 's(x):x*x;OK=0.2-s($1-$4)-s($2-$5)-s($3-$6)' \
. -e '$1=if(OK,$7,0);$2=if(OK,$8,0);$3=if(OK,$9,0)' \
. | pvalue -r -df -h -Y YRES +X XRES \
. | falsecolor -cl -s auto \
. | ra_tiff - roadway_lum.tif
.% rm roadpts.flt
.
.Sorry about that. It looks like a mess, but basically I'm just
.checking intersection values against the ones you get from your
.orthogonal view, and I need rcalc for that. All the -if's and -of's
.make it run faster, but aren't really necessary.
.
.-Greg
.
._______________________________________________
.Radiance-general mailing list
[email protected]
.http://www.radiance-online.org/mailman/listinfo/radiance-general
.

.. Caminante no hay
camino, solo se hace
camino al andar ..

          --- o
meglio ---

.. Caminante el
destino no es al
final de el viaje,
pero en todo el
andar ..