POV-Ray : Newsgroups : povray.binaries.images : Stone wall macro for a castle/crypt/dungeon/etc. (14k) : Re: Stone wall macro for a castle/crypt/dungeon/etc. (14k) Server Time
2 Oct 2024 08:16:42 EDT (-0400)
  Re: Stone wall macro for a castle/crypt/dungeon/etc. (14k)  
From: Dave Blandston
Date: 21 May 2000 23:47:47
Message: <3928ade3@news.povray.org>
Interesting question - a limitation of this macro (besides render time) is
that the stones of exterior walls that are perpendicular to each other won't
"match up."

For your purposes, going around the corner of a square building would be
similar to going around a circular tower, in terms of stone placement. The
algorithm that I used is pretty simple, and could be modified for a round
tower. Here's one possible solution:

1. Create a randomly sized new stone. Position it so that it's rotated about
the center of the tower to just past the edge of the very last stone that
was created and just barely above the HIGHEST old stone that's directly
beneath the new stone. Record the location and size of this new stone in
arrays. (An old stone would be directly under the new stone if they overlap
in the same x AND z space, assuming that you're building your tower up in
the y direction.)
2. Repeat step 1 until you reach a certain height. The rules outlined in
step 1 will cause the stones to automatically spiral upward. (There won't be
a need to "connect" the sides, there won't be any sides.)
3. For my macro, I actually made a second pass to fill in some gaps with
smaller stones, because there were many gaps after the first pass.)
4. Add some mortar, and you're done!

You're right, the height field slowed things up a bit, but that's not the
major speed factor. It has something to do with how POV stores objects
internally. The problem came when I "unioned" all the stones together. If
you don't need to cut windows into your tower or do any other CSG stuff then
you can avoid that problem.

Regards,
Dave

P.S. At the time that I'm writing this, it makes sense to me, but that
certainly doesn't mean it will make sense to any sane people, so if
something is confusing let me know and I'll try to clear it up.

"Jan Walzer" <wal### [at] informatikuni-hallede> wrote in message
news:39283a4b@news.povray.org...
> Well .. I like the 1st one pattern (the left one)
> I'm working myself on a macro for building walls ...
> currently I'm trying to use my wall-makro to build a tower ...
> because of the rotation of a wall (of a tower) I only had an "simple!"
> algorithm for the wall, producing similar results, like the right one of
> yours ...
> My question would be if it is possible, to use the first one in such I
> manner I'm trying to do... Can I use it as the "Wall of a tower" ???
> I think the rotation should be no problem here, but can I "connect" the
left
> and right side of the wall???
> (hmm .. do you know what I mean ???)
> But instead, can you describe the algorithm you use, to create the pattern
> ???
>
> If I understand you right, you use a Heighfield for every Brick ??? This
may
> cause your speeding Problem ...
> Try (for previewing) a normalmap such as crackle ... But I'm sure you know
> ...
>
> BTW: If we "all" try to build walls; Has someone tried to build a wall
along
> a spline ???
> This would make it easier to build nice old castles ... ???
>
> --
>  ,',    Jan Walzer      \V/  http://wa.lzer.net     ,',
> ',','   student of      >|<  mailto:jan### [at] lzernet ',','
>   '   ComputerScience   /A\  +49-177-7403863         '


Post a reply to this message

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