perforate.cal

Hi group,

I use a file called perforate.cal (from Georg).
Is it possible to change this file in such way that use it on surfaces which various normal directions ( not only through x, y or z plane) ?

-Iebele

perforate.cal:
{
        perforate.cal
        Perforation function for approximately horizontal sufaces,
        for use in a mixfunc. Foreground is solid, background the holes.
        Set background to empty for a true perforation, or to a different
        material for polka dots.

        Relative hole size is determined by A1.
        Size of single circle is 1 - scale as required (eg. 0.05m).

        x_hole cuts holes in x-direction (through the y-z plane)
        y_hole cuts holes in y-direction (through the x-z plane)
        z_hole cuts holes in z-direction (through the x-y plane)

    Georg Mischler 30. 04. 1993
}

`xn = mod(Px, 1) - 0.5;
`yn = mod(Py, 1) - 0.5;
`zn = mod(Pz, 1) - 0.5;

`outofcirc(x, y, r) = if(sqrt(x*x + y*y) - r, 1, 0);

z_hole = `outofcirc(`xn, `yn, A1);
x_hole = `outofcirc(`yn, `zn, A1);
y_hole = `outofcirc(`zn, `xn, A1);

I would suggest to follow this route:

-1- use obj to export your model with an UV mapping defined (Maxon Bodypaint
is what I use to create the UV, works fine... but I am pretty sure that even
Blender has something similar)

-2- edit the cal file substituting Lu and Lv with Px Py, no need of Pz since
we are on a surface

-3-
Define a mesh primitive
Define the material as usual

-4- import the file with a mesh primitive and attach the material while
importing:
Obj2mesh -a materials model.obj > model.mesh

Open you file wit objview, just a quick check,
Hopefully all should be ok....

I found this new feature really useful... all the old parametric textures
are now UV... really cool!

Cheers,
Hope it works,

giulio

···

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of atelier
iebele abel
Sent: 13 April 2005 15:18
To: Radiance general discussion
Subject: [Radiance-general] perforate.cal

Hi group,

I use a file called perforate.cal (from Georg).
Is it possible to change this file in such way that use it on surfaces
which various normal directions ( not only through x, y or z plane) ?

-Iebele

perforate.cal:
{
        perforate.cal
        Perforation function for approximately horizontal sufaces,
        for use in a mixfunc. Foreground is solid, background the holes.
        Set background to empty for a true perforation, or to a different
        material for polka dots.

        Relative hole size is determined by A1.
        Size of single circle is 1 - scale as required (eg. 0.05m).

        x_hole cuts holes in x-direction (through the y-z plane)
        y_hole cuts holes in y-direction (through the x-z plane)
        z_hole cuts holes in z-direction (through the x-y plane)

    Georg Mischler 30. 04. 1993
}

`xn = mod(Px, 1) - 0.5;
`yn = mod(Py, 1) - 0.5;
`zn = mod(Pz, 1) - 0.5;

`outofcirc(x, y, r) = if(sqrt(x*x + y*y) - r, 1, 0);

z_hole = `outofcirc(`xn, `yn, A1);
x_hole = `outofcirc(`yn, `zn, A1);
y_hole = `outofcirc(`zn, `xn, A1);

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

___________________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses.

Hi Giulio,

Thanks for your quick reply. I will give Bodypaint a try, but I doubt if it does generate surface normals from a file that doesn't have them.
Anyways, I wonder if the perforate.cal could be changed to work at once on surfaces without UV coordinates.
When mapping pictures it goed well, since I (not really me:) changed a few lines in picture.cal :

pic_u = U; //was: pic_u = Px;
pic_v = V; //was: pic_v = Py;

I don't know why this works, but it does....
If something like this could be done in the perforate.cal file, that would be nice,

-Iebele

Giulio Antonutto wrote:

···

I would suggest to follow this route:

-1- use obj to export your model with an UV mapping defined (Maxon Bodypaint
is what I use to create the UV, works fine... but I am pretty sure that even
Blender has something similar)

-2- edit the cal file substituting Lu and Lv with Px Py, no need of Pz since
we are on a surface

-3-
Define a mesh primitive
Define the material as usual

-4- import the file with a mesh primitive and attach the material while
importing:
Obj2mesh -a materials model.obj > model.mesh

Open you file wit objview, just a quick check,
Hopefully all should be ok....

I found this new feature really useful... all the old parametric textures
are now UV... really cool!

Cheers,
Hope it works,

giulio

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of atelier
iebele abel
Sent: 13 April 2005 15:18
To: Radiance general discussion
Subject: [Radiance-general] perforate.cal

Hi group,

I use a file called perforate.cal (from Georg).
Is it possible to change this file in such way that use it on surfaces which various normal directions ( not only through x, y or z plane) ?

-Iebele

perforate.cal:
{
       perforate.cal
       Perforation function for approximately horizontal sufaces,
       for use in a mixfunc. Foreground is solid, background the holes.
       Set background to empty for a true perforation, or to a different
       material for polka dots.

       Relative hole size is determined by A1.
       Size of single circle is 1 - scale as required (eg. 0.05m).

       x_hole cuts holes in x-direction (through the y-z plane)
       y_hole cuts holes in y-direction (through the x-z plane)
       z_hole cuts holes in z-direction (through the x-y plane)

   Georg Mischler 30. 04. 1993
}

`xn = mod(Px, 1) - 0.5;
`yn = mod(Py, 1) - 0.5;
`zn = mod(Pz, 1) - 0.5;

`outofcirc(x, y, r) = if(sqrt(x*x + y*y) - r, 1, 0);

z_hole = `outofcirc(`xn, `yn, A1);
x_hole = `outofcirc(`yn, `zn, A1);
y_hole = `outofcirc(`zn, `xn, A1);

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

___________________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses.

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

As you say you need to define UV first.
If you have a mesh and not UV values I cannot help you.
Sorry,
giulio

···

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of atelier
iebele abel
Sent: 13 April 2005 15:56
To: Radiance general discussion
Subject: Re: [Radiance-general] perforate.cal

Hi Giulio,

Thanks for your quick reply. I will give Bodypaint a try, but I doubt if
it does generate surface normals from a file that doesn't have them.
Anyways, I wonder if the perforate.cal could be changed to work at once
on surfaces without UV coordinates.
When mapping pictures it goed well, since I (not really me:) changed a
few lines in picture.cal :

pic_u = U; //was: pic_u = Px;
pic_v = V; //was: pic_v = Py;

I don't know why this works, but it does....
If something like this could be done in the perforate.cal file, that
would be nice,

-Iebele

Giulio Antonutto wrote:

I would suggest to follow this route:

-1- use obj to export your model with an UV mapping defined (Maxon

Bodypaint

is what I use to create the UV, works fine... but I am pretty sure that

even

Blender has something similar)

-2- edit the cal file substituting Lu and Lv with Px Py, no need of Pz

since

we are on a surface

-3-
Define a mesh primitive
Define the material as usual

-4- import the file with a mesh primitive and attach the material while
importing:
Obj2mesh -a materials model.obj > model.mesh

Open you file wit objview, just a quick check,
Hopefully all should be ok....

I found this new feature really useful... all the old parametric textures
are now UV... really cool!

Cheers,
Hope it works,

giulio

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of atelier
iebele abel
Sent: 13 April 2005 15:18
To: Radiance general discussion
Subject: [Radiance-general] perforate.cal

Hi group,

I use a file called perforate.cal (from Georg).
Is it possible to change this file in such way that use it on surfaces
which various normal directions ( not only through x, y or z plane) ?

-Iebele

perforate.cal:
{
       perforate.cal
       Perforation function for approximately horizontal sufaces,
       for use in a mixfunc. Foreground is solid, background the holes.
       Set background to empty for a true perforation, or to a different
       material for polka dots.

       Relative hole size is determined by A1.
       Size of single circle is 1 - scale as required (eg. 0.05m).

       x_hole cuts holes in x-direction (through the y-z plane)
       y_hole cuts holes in y-direction (through the x-z plane)
       z_hole cuts holes in z-direction (through the x-y plane)

   Georg Mischler 30. 04. 1993
}

`xn = mod(Px, 1) - 0.5;
`yn = mod(Py, 1) - 0.5;
`zn = mod(Pz, 1) - 0.5;

`outofcirc(x, y, r) = if(sqrt(x*x + y*y) - r, 1, 0);

z_hole = `outofcirc(`xn, `yn, A1);
x_hole = `outofcirc(`yn, `zn, A1);
y_hole = `outofcirc(`zn, `xn, A1);

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

___________________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses.

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

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

___________________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses.

Hi Iebele,

You could try the following additions to the cal file. I am not sure if this will work as I am not in a location to try it out right now. See inline below...

-Jack

atelier iebele abel wrote:

Hi group,

I use a file called perforate.cal (from Georg).
Is it possible to change this file in such way that use it on surfaces which various normal directions ( not only through x, y or z plane) ?

-Iebele

perforate.cal:
{
       perforate.cal
       Perforation function for approximately horizontal sufaces,
       for use in a mixfunc. Foreground is solid, background the holes.
       Set background to empty for a true perforation, or to a different
       material for polka dots.

       Relative hole size is determined by A1.
       Size of single circle is 1 - scale as required (eg. 0.05m).

       x_hole cuts holes in x-direction (through the y-z plane)
       y_hole cuts holes in y-direction (through the x-z plane)
       z_hole cuts holes in z-direction (through the x-y plane)

   Georg Mischler 30. 04. 1993
}

`xn = mod(Px, 1) - 0.5;
`yn = mod(Py, 1) - 0.5;
`zn = mod(Pz, 1) - 0.5;

{uv coordinate mapping}
`un = mod(U, 1) - 0.5;
`vn = mod(V, 1) - 0.5;

{uv mesh coordinate mapping}
`lun = mod(Lu, 1) - 0.5;
`lvn = mod(Lv, 1) - 0.5;

`outofcirc(x, y, r) = if(sqrt(x*x + y*y) - r, 1, 0);

z_hole = `outofcirc(`xn, `yn, A1);
x_hole = `outofcirc(`yn, `zn, A1);
y_hole = `outofcirc(`zn, `xn, A1);

{uv coordinate mapping}
uv_hole = `outofcirc(`un, `vn, A1);

{uv mesh coordinate mapping}
luv_hole = `outofcirc(`lun, `lvn, A1);

···

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

--
# John E. de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction

The U and V values defined in rayinit.cal will work for planar surfaces of any orientation, but will not work for curved surfaces or meshes. For these, you need to define a local (u,v) mapping and apply Lu and Lv on a mesh surface as Guilio suggests, or else come up with an approximation plane that will work and use that by rotating your function. You can always rotate any .cal function to another orientation by adding transform arguments (-rx, -ry, -rz) to the mixfunc primitive that references it.

-Greg

···

From: atelier iebele abel <[email protected]>
Date: April 13, 2005 7:17:56 AM PDT

Hi group,

I use a file called perforate.cal (from Georg).
Is it possible to change this file in such way that use it on surfaces which various normal directions ( not only through x, y or z plane) ?

-Iebele

Hi Jack,

It works perfect! Great, thanks!

-Iebele

Jack de Valpine wrote:

···

Hi Iebele,

You could try the following additions to the cal file. I am not sure if this will work as I am not in a location to try it out right now. See inline below...

-Jack

atelier iebele abel wrote:

Hi group,

I use a file called perforate.cal (from Georg).
Is it possible to change this file in such way that use it on surfaces which various normal directions ( not only through x, y or z plane) ?

-Iebele

perforate.cal:
{
       perforate.cal
       Perforation function for approximately horizontal sufaces,
       for use in a mixfunc. Foreground is solid, background the holes.
       Set background to empty for a true perforation, or to a different
       material for polka dots.

       Relative hole size is determined by A1.
       Size of single circle is 1 - scale as required (eg. 0.05m).

       x_hole cuts holes in x-direction (through the y-z plane)
       y_hole cuts holes in y-direction (through the x-z plane)
       z_hole cuts holes in z-direction (through the x-y plane)

   Georg Mischler 30. 04. 1993
}

`xn = mod(Px, 1) - 0.5;
`yn = mod(Py, 1) - 0.5;
`zn = mod(Pz, 1) - 0.5;

{uv coordinate mapping}
`un = mod(U, 1) - 0.5;
`vn = mod(V, 1) - 0.5;

{uv mesh coordinate mapping}
`lun = mod(Lu, 1) - 0.5;
`lvn = mod(Lv, 1) - 0.5;

`outofcirc(x, y, r) = if(sqrt(x*x + y*y) - r, 1, 0);

z_hole = `outofcirc(`xn, `yn, A1);
x_hole = `outofcirc(`yn, `zn, A1);
y_hole = `outofcirc(`zn, `xn, A1);

{uv coordinate mapping}
uv_hole = `outofcirc(`un, `vn, A1);

{uv mesh coordinate mapping}
luv_hole = `outofcirc(`lun, `lvn, A1);

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