POV-Ray : Newsgroups : povray.general : finite texture Server Time
2 Aug 2024 02:27:53 EDT (-0400)
  finite texture (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: bmc
Subject: Re: finite texture
Date: 12 Apr 2005 21:10:00
Message: <web.425c7072e46da0b4144b13b30@news.povray.org>
a small update after finding the original german thread:

extension of the functions to 3d

// position "inside" the stone
#declare fn_brick_x = function { x - floor(y)*brick_length/2 - floor((x -
floor(y)*brick_length/2)/brick_length)*brick_length }
#declare fn_brick_y = function { y - floor(y) }
#declare fn_brick_z = function { z - floor(y)*brick_length/2 - floor((z -
floor(y)*brick_length/2)/brick_length)*brick_length }
// middle point of the stone
#declare fn_brick_n_x = function { floor((x -
floor(y)*brick_length/2)/brick_length)*brick_length }
#declare fn_brick_n_y = function { floor(y) }
#declare fn_brick_n_z = function { floor((z -
floor(y)*brick_length/2)/brick_length)*brick_length }

// mask for motar
#declare fn_mortar = function {
  max (
    select(x-brick_d,1,select(brick_length-brick_d-x,1,0)),
    select(z-brick_d,1,select(brick_length-brick_d-z,1,0)),
    select(y-brick_d,1,select(1-brick_d-y,1,0))
  )
}

this will probably lead to a lot of motar on the surface. a translation of
the texture should help in that case.
e.g.
translate <.25,0,.25>


Post a reply to this message

From: Jim Charter
Subject: Re: finite texture
Date: 13 Apr 2005 09:50:11
Message: <425d2393@news.povray.org>
Steely wrote:
> I have been asked to told you this:
> 
> The guy who originally posted the problem in our forum has tried the several
> solutions and *in this special case* the way shown by bmc leads to the best
> results. He (and me too) would like to say thanks to all for the very fast
> and professional help.
> 
> I guess we can expect his first public pictures in the next weeks and I will
> drive him to post them here (he is building an ancient city and I have seen
> very nice test renders).
> 
> Again: thanks to all.
> 
> S.
> 
> 
Glad it worked out, it is a process.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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