applied material to all faces of a genbox

hi

playing w colorpict, I've had some luck using some concrete .pic files

the end result, tho' entirely for learning purposes, was much better than anything else I've encountered using Vectorworks

question: the top of the !genbox rendered sweetly - it really looks great

however, the box sides look like extrusions of the render...

is this unavoidable ?

or not ?

tom

Tom,

The image gets 'draped' onto the surface depending on the orientation of the surface and the orientation applied in the mapping of the image -- usually you arrange for them to be the same. So, what you see is normal. You need to set up materials to match the orientations of the surfaces, say three if all surfaces are rectilinear. See the example in file 'pattmats' which is found in the directory 'obj/cabin'. There's a way for cylinders too, but it's been ages since I last used colorpict and I've forgotten how it went.

-John

···

-----------------------------------------------
Dr. John Mardaljevic
Senior Research Fellow
Institute of Energy and Sustainable Development
De Montfort University
The Gateway
Leicester
LE1 9BH, UK
+44 (0) 116 257 7972
+44 (0) 116 257 7981 (fax)

[email protected]
http://www.iesd.dmu.ac.uk/~jm

'rectilinear'? Duh. I mean orthogonal!

-John (now of an age when multi-tasking should be left entirely to the computer)

I sometimes use a cheap hack to avoid the texture smearing along 1 axis:
- smearing it on a less noticeable axis.

Assuming you are texturing a wall pattern
squish the texture about 50% horizontally (not keeping aspect ratio)
Rotate it so it projects at 45 degrees. -rx 90 -rz 45 This works for
most walls - those that are 0, 90, 180, 270 orientations.
Tho at 45 135 etc, they don't work so well.

Rob F

···

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Tom
Young
Sent: Friday, May 02, 2008 5:23 AM
To: Radiance general discussion
Subject: [Radiance-general] applied material to all faces of a genbox

hi

playing w colorpict, I've had some luck using some concrete .pic files

the end result, tho' entirely for learning purposes, was much better
than anything else I've encountered using Vectorworks

question: the top of the !genbox rendered sweetly - it really looks
great

however, the box sides look like extrusions of the render...

is this unavoidable ?

or not ?

tom

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Tom,

there is a really well-written document on the Radiance FTP site by
Matiu Carr titled 'Image Mapping'. It is in some obscure compression
and format (uuencoded Word 2.0 for Mac). You may pick up a PDF from
here:

http://luminance.londonmet.ac.uk/pickup/image_mapping1.pdf

Cheers

Axel

Hi Axel,

I'm a little suspicious about the date, but this is great -- where did you find it, exactly? I should link it into radsite (as a PDF this time).

-Greg

···

From: "Axel Jacobs" <[email protected]>
Date: May 2, 2008 2:46:22 PM PDT

Hi Tom,

there is a really well-written document on the Radiance FTP site by
Matiu Carr titled 'Image Mapping'. It is in some obscure compression
and format (uuencoded Word 2.0 for Mac). You may pick up a PDF from
here:

http://luminance.londonmet.ac.uk/pickup/image_mapping1.pdf

Cheers

Axel

Hi Greg,

I'm a little suspicious about the date, but this is great
-- where did you find it, exactly? I should link it into radsite
(as a PDF this time).

Well, the date is today's date, as you have correctly worked out. I
was just re-running the PDF output, and it puts the date in without
asking you. There is probably some way of turning this off, though...

I remember that it took me a good few hours on the old Enigma engine
to decrypt the thing. That was at least three or four years ago. I'm
not at all sure, but this might well be the original:

http://radsite.lbl.gov/radiance/pub/doc/mapping.hqx

I re-did all the vector drawings, and got a nicer image of beautiful
Daphne off the Internet, but tried not to alter the text. I was
initially hoping to put this up on the next-generation Radiance
community web site (Wiki or whatever), but since this never
materialised, I've kept it to myself ever since. Back then, I also
tried to get hold of MC, but to no avail. Hope he's gonna sue me over
this... :wink:

Please note that the pickup directory on luminance.londonmet.ac.uk is
only there for temp stuff, so you might want to grab it by its
extension and pull it over to the big servah.

Cheerioh

Axel

Oops

Hope he's gonna sue me over this... :wink:

NOT!!!

Axel

In hopes of not getting sued as well, I added a link to the Notes section of the radsite references. Not very prominent, but at least it's somewhere (and in a form) people can access.

Thanks, Axel!

-Greg

···

From: "Axel Jacobs" <[email protected]>
Date: May 2, 2008 4:11:23 PM PDT

Oops

Hope he's gonna sue me over this... :wink:

NOT!!!

Axel

hi Axel

i've printed the pdf out and am now going to log-out and read it over a cup of coffee in good ol' Kentish Town Road.

Many thanks.

regards

tom

Hi Tom,

there is a really well-written document on the Radiance FTP site by
Matiu Carr titled 'Image Mapping'. It is in some obscure compression
and format (uuencoded Word 2.0 for Mac). You may pick up a PDF from
here:

http://luminance.londonmet.ac.uk/pickup/image_mapping1.pdf

Cheers

Axel

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Tom Young Architects
19 Bassett Street
London
NW5 4PG
tel 020 7482 6150
mob 07765 378 502
fax 020 7691 7946
[email protected]
http://homepage.mac.com/thdyoung/FileSharing1.html
http://localstinker.blogspot.com/
http://www.localstink.com/rktat/index.html

···

On 2 May 2008, at 22:46, Axel Jacobs wrote:

Hi,

I have related question.
If I define some complex material (with patterns, textures or even
material mixture), and I want to apply it on various surfaces, how can
I adjust material orientation to fit the final surface.

For example my complex material is defined in ZX plane, and my surface
is in some other plane.
I calculated needed rotation and translation parameters for the
material but how can I apply them to material and then to an object.

#simple plastic materials mat1, mat2 and mat3 are defined previously

#Vertical bands
#bands.cal is my functional file
#-s mat1 + mat2 in meters
# A1 = mat1/(mat1+mat2)
#30cm mat1|60cm mat2
void mixfunc vert_bands
6 mat1 mat2 band_x ./bands.cal -s 0.9
0
1 0.33

#one additional mat3 band each 3 mat1 and mat2 bands
#300cm vert_bands|60cm mat3
void mixfunc bands3
6 vert_bands mat3 band_x ./bands.cal -s 3.6
0
1 0.8333

Now I want to apply bands3 material to some surface like this:
mat1 polygon cloisons_4D1C.0.1
0
0
18 4445.9871 2212.8005 1035
  4421.9526 2166.5971 1035
  4434.1345 2160.294 1035
  4431.804 2155.7899 1035
  4415.0455 2164.5516 1035
  4441.6689 2215.0555 1035

I calculated rotation and translation parameters:
-rx 0.000000 -ry -0.000000 -rz -117.482955 -t 4421.952600 2166.597100
1035.000000

So I need to use this transformation values on material to adjust
material orientation to the created surface.
*I can use transformations both on vert_band and bands3 material, but
then I would change my basic material and for all other surfaces I
have to redefine the material completely with new transformation
parameters.

*If I add transformations only to bands3 material, then bands made of
mat3 are rotated, but bands made of mat1 and mat2 stay in the same
orientation as before.

*My idea is to define complete complex material in ZX plane, and then
just adjust final material as needed for each surface.
I tried something like this:
void mixfunc mat1
14 bands3 void 1 . -rx 0.000000 -ry -0.000000 -rz -117.482955 -t
4421.952600 2166.597100 1035.000000
0
0
but it didn't work. Final material look the same as original bands3 material.

I'm not sure if I was clear enough, but if someone understands my
question and have an answer that would be great.

Marija

···

On Sat, May 3, 2008 at 10:51 AM, Tom Young <[email protected]> wrote:

hi Axel

i've printed the pdf out and am now going to log-out and read it over a cup
of coffee in good ol' Kentish Town Road.

Many thanks.

regards

tom

On 2 May 2008, at 22:46, Axel Jacobs wrote:

> Hi Tom,
>
> there is a really well-written document on the Radiance FTP site by
> Matiu Carr titled 'Image Mapping'. It is in some obscure compression
> and format (uuencoded Word 2.0 for Mac). You may pick up a PDF from
> here:
>
> http://luminance.londonmet.ac.uk/pickup/image_mapping1.pdf
>
> Cheers
>
> Axel
>
> _______________________________________________
> Radiance-general mailing list
> [email protected]
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>

Tom Young Architects
19 Bassett Street
London
NW5 4PG
tel 020 7482 6150
mob 07765 378 502
fax 020 7691 7946
[email protected]
http://homepage.mac.com/thdyoung/FileSharing1.html
http://localstinker.blogspot.com/
http://www.localstink.com/rktat/index.html

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hello Marija,

Without address your problem specifically, let me suggest three approaches to handling material orientations:

1) If your material definition cares only about orientation, and not position, and your surfaces tend to take on only a few principal orientations (such as the three coordinate planes), then create one material definition for each principal orientation. This method is used for the "woodpat.cal" file, for example.

2) If you have many orientations and/or your material definition depends also on position, then include your material in a file with your canonical surface, then transform the two together using xform. The surface will be moved, and the transformation added appropriately to your material definition. E.g:

  !xform [xf args] mat+obj.rad

3) If the above technique does not work because you are applying your material to different objects each time, then you can put the material definition in a file by itself and include it with your transform, along with the object file. E.g:

  !xform [xf args] matdef.mat objdef.rad

There is no need to worry about the material name being the same but meaning something different each time, as the most recent definition in a stream is always the one used.

Does this help at all, or am I missing your point?

-Greg

···

From: "Marija Velickovic" <[email protected]>
Date: May 7, 2008 3:32:56 AM PDT

Hi,

I have related question.
If I define some complex material (with patterns, textures or even
material mixture), and I want to apply it on various surfaces, how can
I adjust material orientation to fit the final surface.

For example my complex material is defined in ZX plane, and my surface
is in some other plane.
I calculated needed rotation and translation parameters for the
material but how can I apply them to material and then to an object.

#simple plastic materials mat1, mat2 and mat3 are defined previously

#Vertical bands
#bands.cal is my functional file
#-s mat1 + mat2 in meters
# A1 = mat1/(mat1+mat2)
#30cm mat1|60cm mat2
void mixfunc vert_bands
6 mat1 mat2 band_x ./bands.cal -s 0.9
0
1 0.33

#one additional mat3 band each 3 mat1 and mat2 bands
#300cm vert_bands|60cm mat3
void mixfunc bands3
6 vert_bands mat3 band_x ./bands.cal -s 3.6
0
1 0.8333

Now I want to apply bands3 material to some surface like this:
mat1 polygon cloisons_4D1C.0.1
0
18 4445.9871 2212.8005 1035
  4421.9526 2166.5971 1035
  4434.1345 2160.294 1035
  4431.804 2155.7899 1035
  4415.0455 2164.5516 1035
  4441.6689 2215.0555 1035

I calculated rotation and translation parameters:
-rx 0.000000 -ry -0.000000 -rz -117.482955 -t 4421.952600 2166.597100
1035.000000

So I need to use this transformation values on material to adjust
material orientation to the created surface.
*I can use transformations both on vert_band and bands3 material, but
then I would change my basic material and for all other surfaces I
have to redefine the material completely with new transformation
parameters.

*If I add transformations only to bands3 material, then bands made of
mat3 are rotated, but bands made of mat1 and mat2 stay in the same
orientation as before.

*My idea is to define complete complex material in ZX plane, and then
just adjust final material as needed for each surface.
I tried something like this:
void mixfunc mat1
14 bands3 void 1 . -rx 0.000000 -ry -0.000000 -rz -117.482955 -t
4421.952600 2166.597100 1035.000000
0
but it didn't work. Final material look the same as original bands3 material.

I'm not sure if I was clear enough, but if someone understands my
question and have an answer that would be great.

Marija

Thanks Greg,

Your explanation solves my problem, and now I have another related
question, of course :slight_smile:

If my material is defined in some plane, for example ZX, and I have a
surface in some other plane, how can I calculate needed
transformations (rotations), to place the material correctly.

I wrote the script and used the code from replmarks.c but it seems I'm
missing something important. Calculated rotations give good results
for some surfaces and bad for others.

So question is how should I calculate 3 rotation angles for -rx -ry
and -rz, if I have:
* starting right-oriented coordinate system defined with vectors
x0,y0,z0 (plane where material is defined) and
* surface coordinate system defined with vectors x1,y1,z1 (calculated
from tree points on surface plane and normal)

Thanks again,
Marija.

···

On Wed, May 7, 2008 at 5:42 PM, Greg Ward <[email protected]> wrote:

Hello Marija,

Without address your problem specifically, let me suggest three approaches
to handling material orientations:

1) If your material definition cares only about orientation, and not
position, and your surfaces tend to take on only a few principal
orientations (such as the three coordinate planes), then create one material
definition for each principal orientation. This method is used for the
"woodpat.cal" file, for example.

2) If you have many orientations and/or your material definition depends
also on position, then include your material in a file with your canonical
surface, then transform the two together using xform. The surface will be
moved, and the transformation added appropriately to your material
definition. E.g:

        !xform [xf args] mat+obj.rad

3) If the above technique does not work because you are applying your
material to different objects each time, then you can put the material
definition in a file by itself and include it with your transform, along
with the object file. E.g:

        !xform [xf args] matdef.mat objdef.rad

There is no need to worry about the material name being the same but
meaning something different each time, as the most recent definition in a
stream is always the one used.

Does this help at all, or am I missing your point?

-Greg

Hi Marija,

Which version of replmarks.c are you using? There was a bug pointed out by Zack Rogers and fixed in late January of this year in this part of the code, so you should be sure you have the latest copy (vers. 2.15, reported at the top of the file). Specifically, it spat out incorrect rotations when the new X' axis was aligned with the world Z axis.

-Greg

···

From: "Marija Velickovic" <[email protected]>
Date: May 8, 2008 4:25:23 AM PDT

Thanks Greg,

Your explanation solves my problem, and now I have another related
question, of course :slight_smile:

If my material is defined in some plane, for example ZX, and I have a
surface in some other plane, how can I calculate needed
transformations (rotations), to place the material correctly.

I wrote the script and used the code from replmarks.c but it seems I'm
missing something important. Calculated rotations give good results
for some surfaces and bad for others.

So question is how should I calculate 3 rotation angles for -rx -ry
and -rz, if I have:
* starting right-oriented coordinate system defined with vectors
x0,y0,z0 (plane where material is defined) and
* surface coordinate system defined with vectors x1,y1,z1 (calculated
from tree points on surface plane and normal)

Thanks again,
Marija.

Hi Greg,

I didn't know about new version of replmarks code, so I downloaded and
used it now. It partially solves my problem.
I use the formulas from the replmarks but think my vector values for
calculation (in the code xp,yp and zp vectors) are wrong.

1.right-oriented coordinate system where pattern is defined is defined
with vectors x0,y0,z0 (plane where material is defined and its
normal) and
2. surface coordinate system defined with vectors x1,y1,z1 (calculated
from tree points on surface plane and normal)

How do I calculate xp,yp, ans zp vectors?
I tried to use xp=x1-x0, yp=y1-y0 and zp=z1-z0, but it seems my
calculation results aren't correct.

Marija.

···

On Thu, May 8, 2008 at 6:12 PM, Greg Ward <[email protected]> wrote:

Hi Marija,

Which version of replmarks.c are you using? There was a bug pointed out by
Zack Rogers and fixed in late January of this year in this part of the code,
so you should be sure you have the latest copy (vers. 2.15, reported at the
top of the file). Specifically, it spat out incorrect rotations when the
new X' axis was aligned with the world Z axis.

-Greg

From: "Marija Velickovic" <[email protected]>
Date: May 8, 2008 4:25:23 AM PDT

Thanks Greg,

Your explanation solves my problem, and now I have another related
question, of course :slight_smile:

If my material is defined in some plane, for example ZX, and I have a
surface in some other plane, how can I calculate needed
transformations (rotations), to place the material correctly.

I wrote the script and used the code from replmarks.c but it seems I'm
missing something important. Calculated rotations give good results
for some surfaces and bad for others.

So question is how should I calculate 3 rotation angles for -rx -ry
and -rz, if I have:
* starting right-oriented coordinate system defined with vectors
x0,y0,z0 (plane where material is defined) and
* surface coordinate system defined with vectors x1,y1,z1 (calculated
from tree points on surface plane and normal)

Thanks again,
Marija.

Hi Marija.

I tried to rewrite the replmarks routines for object rotations
for a while. I finally gave up and now I'm using the output of
a !replmarks command directly in my scene descriptions to place
an object with translation and rotation into a global coordinate
system.

The !replmarks command will create an "!xform -rx ..." line. You
could use these rotations to transform a matrix. The final matrix
will provide the vectors your after.

Regards,
Thomas

···

On 9 May 2008, at 11:10, Marija Velickovic wrote:

How do I calculate xp,yp, ans zp vectors?
I tried to use xp=x1-x0, yp=y1-y0 and zp=z1-z0, but it seems my
calculation results aren't correct.

Hi Marija,

Thomas' suggestion of using replmarks as is may be a good one, and you can feed it your vectors via rcalc if you like.

On the other hand, it should be possible to get the code to do what you want. Here are a few caveats:

1) The three vectors you give to the addrot() routine must be normalized (length 1) and orthogonal to each other.

2) The vectors specify the new axes orientations, so you give it the destination position for each original X, Y, and Z axis.

3) The axes must compose a right-hand coordinate system.

I assume from what you've said, that it's probably #1 that is the problem.

-Greg

···

From: "Marija Velickovic" <[email protected]>
Date: May 9, 2008 3:10:02 AM PDT

Hi Greg,

I didn't know about new version of replmarks code, so I downloaded and
used it now. It partially solves my problem.
I use the formulas from the replmarks but think my vector values for
calculation (in the code xp,yp and zp vectors) are wrong.

1.right-oriented coordinate system where pattern is defined is defined
with vectors x0,y0,z0 (plane where material is defined and its
normal) and
2. surface coordinate system defined with vectors x1,y1,z1 (calculated
from tree points on surface plane and normal)

How do I calculate xp,yp, ans zp vectors?
I tried to use xp=x1-x0, yp=y1-y0 and zp=z1-z0, but it seems my
calculation results aren't correct.

Marija.

For any interested , I too found that documentation useful to 'unblock' my initial difficulty with image mapping.

BTW Matiu Carr's Image mapping has a snippet of the picture.cal function code. This documentation is helpful but I found out the latest picture.cal packaged with radiance3.8 file has commented lines in picture.cal describing what each item does in the function.

Now Im wondering if there is a valid way of mapping a panaromic pic for a view through those wonderful daylight views we love so much.
The doc shows mapping on a tube with cyl.cal as way of doing just that. But that might interfere with skyglow and ruin the lux readings? Would a HDR mage mapped to the sky itself with sky luminance values 'indexed' to the bitmap's rgb values achieve a more accurate result??

Steve

···

----------------------------------------

From: [email protected]
Subject: Re: [Radiance-general] applied material to all faces of a genbox
Date: Sat, 3 May 2008 09:51:14 +0100
To: [email protected]

hi Axel

i've printed the pdf out and am now going to log-out and read it over
a cup of coffee in good ol' Kentish Town Road.

Many thanks.

regards

tom

On 2 May 2008, at 22:46, Axel Jacobs wrote:

Hi Tom,

there is a really well-written document on the Radiance FTP site by
Matiu Carr titled 'Image Mapping'. It is in some obscure compression
and format (uuencoded Word 2.0 for Mac). You may pick up a PDF from
here:

http://luminance.londonmet.ac.uk/pickup/image_mapping1.pdf

Cheers

Axel

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Tom Young Architects
19 Bassett Street
London
NW5 4PG
tel 020 7482 6150
mob 07765 378 502
fax 020 7691 7946
[email protected]
http://homepage.mac.com/thdyoung/FileSharing1.html
http://localstinker.blogspot.com/
http://www.localstink.com/rktat/index.html

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_________________________________________________________________
Find hidden words, unscramble celebrity names, or try the ultimate crossword puzzle with Live Search Games. Play now!
http://g.msn.ca/ca55/212

BTW Matiu Carr's Image mapping has a snippet of the picture.cal function code. This documentation is helpful but I found out the latest picture.cal packaged with radiance3.8 file has commented lines in picture.cal describing what each item does in the function.

Now Im wondering if there is a valid way of mapping a panaromic pic for a view through those wonderful daylight views we love so much.

Simon Crone wrote 'skymap.cal' to map panoramic sky images to the
sky hemisphere. You can download examples (and the .cal file) here:

http://radsite.lbl.gov/radiance/pub/libraries/

The doc shows mapping on a tube with cyl.cal as way of doing just that. But that might interfere with skyglow and ruin the lux readings? Would a HDR mage mapped to the sky itself with sky luminance values 'indexed' to the bitmap's rgb values achieve a more accurate result??

See Paul Debevec's work on HDR lighting:

http://www.debevec.org/probes/

Regards,
Thomas

···

On 24 May 2008, at 12:04, steve michel wrote:

Hi Steve,

For a sky view, folks usually apply the fisheye.cal mapping using a fisheye capture as input. Mapping appropriate sky distribution values is a challenge, although not one you have to worry about if you've managed to actually capture a good HDR sky. (This is a tricky proposition -- see <http://gl.ict.usc.edu/skyprobes/> for examples.)

I remember discussing with the Visarc folks ways to use the output of gensky or gendaylit to "correct" a sky image that was inserted for purely artistic reasons. Simply using the color from an image and the luminance from gensky doesn't work that well, since it would make eliminate important luminance changes at cloud boundaries and the like, I would think. However, you should be able to combine the highest luminance frequencies from your sky photo along with the color to get a reasonable impression.

I took the following image:

  http://www.camerantics.org.uk/wallpapers/clouds.jpg

and ran the following:

  djpeg clouds.jpg | ra_ppm -r > clouds.pic
  pgblur -r 40 clouds.pic | pcomb -e 'hfs=1/li(1);ro=hfs*ri(2);go=hfs*gi(2);bo=hfs*bi(2)' - clouds.pic > hfclouds.pic

This should give you a picture that contains all the color and the high frequency luminance changes of the original, normalized to an average of 1.0. Multiplying this against a sky distribution will give you the appearance of clouds while maintaining the overall luminance distribution. Of course, there are caveats, as the high frequencies (and even the color) may affect your rendering due to their local influence on the output of gensky or gendaylit.

(Note: the djpeg program is not included with Radiance -- you may need to use Photosphere or Photoshop to convert a JPEG image to HDR format.)

I hope this helps.
-Greg

···

From: steve michel <[email protected]>
Date: May 24, 2008 4:04:25 AM PDT

For any interested , I too found that documentation useful to 'unblock' my initial difficulty with image mapping.

BTW Matiu Carr's Image mapping has a snippet of the picture.cal function code. This documentation is helpful but I found out the latest picture.cal packaged with radiance3.8 file has commented lines in picture.cal describing what each item does in the function.

Now Im wondering if there is a valid way of mapping a panaromic pic for a view through those wonderful daylight views we love so much.
The doc shows mapping on a tube with cyl.cal as way of doing just that. But that might interfere with skyglow and ruin the lux readings? Would a HDR mage mapped to the sky itself with sky luminance values 'indexed' to the bitmap's rgb values achieve a more accurate result??

Steve