POV-Ray : Newsgroups : povray.binaries.images : Starting a bricks library Server Time
27 Apr 2024 05:02:36 EDT (-0400)
  Starting a bricks library (Message 1 to 3 of 3)  
From: Chris R
Subject: Starting a bricks library
Date: 21 Dec 2023 15:25:00
Message: <web.65849ee863e710cc60052fc65cc1b6e@news.povray.org>
In may of my scenes, I have been using some code I wrote a few years ago to
generate brick walls as isosurfaces by using the pigment { brick } to define the
shape.  The code has grown bloated and complicated, and I still struggle to get
the brick pattern to line up the way I want it to, especially on the corners of
buildings.  Bricks were always rectangular, and mortar was also limited to a
simple type of joint as well.

So, I have begun the process of rethinking how to do brick walls and starting
from scratch.  The goal and current state, is the ability to define a
function(x,y,z) that can be used in an isosurface{} to define the bricks, and
another function to define the mortar.

I am introducing as much flexibility as possible, and there are dictionaries all
over the place, but at the same time, whenever there is a block of useful
combinations of the primitives, I create macros to simplify the normal cases.

This new code is also modularized to introduce additional brick bonding layouts,
beyond the standard stretcher bond that matches the brick pattern.  So far, I
have only implemented stretcher and a raking stretcher bond, with the additional
capability of being able to define the ends of a wall as being part of a corner,
or being flush.

Finally, as a side effect, I have put together some macros for defining patterns
to use in assigning a texture to the bricks such that you get fairly consistent
values across a single brick, but you can get discontinuities between bricks.

I won't be posting the code anywhere until I have at least the English bond
layout completed, as well as some of the other joint patterns beyond raking and
flush.  Since this will probably not fall into the object library standards, I
may end up just creating a project on GitHub to hold all of the files needed to
use the code.

In this sample, I have used a rounded_box for the brick, a raked joint for the
mortar, and have applied some textural noise to the brick shape and the mortar
shapes.  The brick pigments are selected using the aforementioned pattern
method.  I'll post a raking bond version as well as some with corner edges
later.

-- Chris R.
-- Happily rendering since 2014


Post a reply to this message


Attachments:
Download 'bricks_test.png' (344 KB)

Preview of image 'bricks_test.png'
bricks_test.png


 

From: jr
Subject: Re: Starting a bricks library
Date: 21 Dec 2023 16:10:00
Message: <web.6584a8ba997a9a307f6d9cf76cde94f1@news.povray.org>
hi,

"Chris R" <car### [at] comcastnet> wrote:
> ...
> I won't be posting the code anywhere until I have at least the English bond
> layout completed, as well as some of the other joint patterns beyond raking and
> flush.  Since this will probably not fall into the object library standards, I
> may end up just creating a project on GitHub to hold all of the files needed to
> use the code.

sounds like a nice and useful "system".  what makes you think it would not be
suitable for the Object Collection[*] ?  true, objects _ought_ to comply with
naming conventions to allow the user to "mix and match", but few do fully.  the
required / desired standards were outlined in one of the user's guide pages, I'd
be happy to send a copy (if needed).

[*] not too long now (fingers crossed) before we're "back in business".


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: Starting a bricks library
Date: 24 Dec 2023 14:35:00
Message: <web.658887cc997a9a301f9dae3025979125@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:

> So, I have begun the process of rethinking how to do brick walls and starting
> from scratch.  The goal and current state, is the ability to define a
> function(x,y,z) that can be used in an isosurface{} to define the bricks, and
> another function to define the mortar.

Not sure it will be of any help to you, but I just noticed that there is
Irregular_Bricks_Ptrn
in textures.inc

Also, if you search 'shadertoy bricks' , you will get a list of procedural brick
patterns that I'm sure will provide some inspiration.

- BW


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.