POV-Ray : Newsgroups : povray.binaries.images : Stone wall macro for a castle/crypt/dungeon/etc. (14k) Server Time
2 Oct 2024 12:25:01 EDT (-0400)
  Stone wall macro for a castle/crypt/dungeon/etc. (14k) (Message 11 to 11 of 11)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mike Williams
Subject: Re: Stone wall macro for a castle/crypt/dungeon/etc. (14k)
Date: 22 May 2000 02:36:21
Message: <zbN3rCAY$JK5Ew7H@econym.demon.co.uk>
Wasn't it Dave Blandston who wrote:

>This is a macro that creates a stone or brick wall. It has two stone
>placement methods, the first being the standard offset brick pattern, and
>the second is a somewhat random placement pattern. As it is now, this thing
>is easy to use, but renders really slowly. If anyone is interested, I will
>be glad to post the source.

There's a couple of obvious things that can be done to speed it up a
little:-

1. Add manual bounding to the "Brick" macro.

In DBStones.pov, near the end of the "Brick" macro, add a bounded_by
line as shown here:

   object {
      NewBrick
      bounded_by {box {0,1 scale <BrickWidth, BrickHeight, BrickDepth>}}
      translate <BrickX, BrickY, BrickZ>
   } //object


2. Simplify the mortar. There's no need to difference the bricks from
the mortar object (unless you want to allow transparent bricks in non-
transparent mortar). Simply allow the mortar to be a complete box that
passes through the bricks.

In BDStones.inc the mortar object becomes just:

   #local Mortar = object {
      box {<0, 0, .2> <WallWidth, WallHeight, WallDepth - .2>}
      texture {MortarColor}
   } //object Mortar

These two changes increase the rendering speed by a factor of 3.5

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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