|
![](/i/fill.gif) |
"Bill Pragnell" <bil### [at] hotmail com> wrote:
> Hi everyone.
>
> I've been saying I'll post this for ages, so here it is - my textured brick
> macro. I think it probably needs more testing and I'm sure there's a
> hundred ways it could be improved, but in the meantime I'm finding it
> damned useful so it's time to spread the wealth, so to speak!
>
> You can download the .inc file from the link on this page:
>
> http://www.infradead.org/~wmp/macro_bricks.html
>
> The page has some examples and a little background on how I usually use it.
>
> NB The page looks a little unfinished and has a couple of broken links on
> images because I'm in the midst of revamping my site - the page is in its
> final location, however, and this link will remain valid forever (or as
> good as).
>
> I hope to see some good images posted in p.b.i from anyone who finds this
> useful!
>
> Bill
Bill this is great I was wanting something like this. I made a brick wall macro
that uses normals because isosurfaces are waaaay to slow for using hundreds of
bricks. But you wrote on your site:
"The pigment function can either be defined in the .inc file itself or in your
scene file prior to macro use (in the latter case, the existing definition in
the .inc file must either be commented out or removed, else it will override
any previous definitions), and must be called 'gran'. The reason for this is
that I haven't found any easy way of passing the function as a parameter"
This is very easy to do with an #ifndef (if not defined). Just replace your
declare in your include with the following. Then make sure you declare your
gran in your scene file before you declare the include file. :)
#ifndef(gran) #declare gran = function {
pigment {
granite
color_map {
[0 color rgb 0.1]
[0.4 color rgb 0]
[1 color rgb 1] } } }
#end
Also I am looking in to how to write the mesh to a file for later use and have
that be an option in the macro call. Something like writeFile.
Ian
Post a reply to this message
|
![](/i/fill.gif) |